- Install bloop
1.0.0-M11
by following the Bloop installation instructions. Then, make sure you start up the bloop server on the background and to generate the configuration files by runningbloopInstall
in your build tool. - Install IntelliJ 2018.2 EAP and then enable the nightly version of the Scala Plugin by opening Preferences | Languages & Frameworks | Scala | Updates tab and selecting the Nightly plugin update channel:
- check for updates and download the Scala plugin Nightly release.
- Reboot IntelliJ. The Scala plugin should now have version 2018.2.277 or higher (check in Preferences | Plugins)
- Open the "Find Action" search box (usual hotkey Shift+Ctrl+A or shift+cmd+A) and search for "bsp". The search box will show the full action name: "Enable experime
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[warn] Run 'evicted' to see detailed eviction warnings | |
[info] Update report: | |
[info] Resolve time: 163 ms, Download time: 7 ms, Download size: 0 bytes | |
[info] compile: | |
[info] com.lihaoyi:scalarx_2.11 | |
[info] - 0.3.0 | |
[info] status: release | |
[info] publicationDate: Sat Jan 23 05:34:42 CET 2016 | |
[info] resolver: sbt-chain | |
[info] artifactResolver: sbt-chain |
Because you know I'm all about that Bayes,
'Bout that Bayes, low frequentist
I'm all 'bout that Bayes, 'bout that Bayes, low frequentist
I'm all 'bout that Bayes, 'bout that Bayes, low frequentist
I'm all 'bout that Bayes, 'bout that Bayes
Yeah it's pretty clear I can't count to two
But I can calculate odds like I'm supposed to do
Cause I got priors that beat your stats to the chase
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package de.munich.softwerkskammer; | |
import java.util.ArrayList; | |
import java.util.Deque; | |
import java.util.LinkedList; | |
import java.util.List; | |
public class Game { | |
private Deque<Frame> frames = new LinkedList<Frame>(); | |
private List<Roll> rolls = new ArrayList<Roll>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Thing t = { t | a:Int, b: String } | |
type Tag = { c: Int, d: String } | |
type Tagged = Thing Tag | |
thing = { a=3, b="foo" } | |
tagged = { thing | d = "derp" } | |
write: Tagged -> Element | |
write {a,b,c,d} = asText <| join " " [show c, d] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- based roughly on http://gamedevelopment.tutsplus.com/tutorials/gamedev-6331 | |
module BubblePhysics where | |
-- plain old pair for coordinates, vectors | |
type Vec2 = (Float,Float) | |
type Body b = { b | | |
velocity: Vec2, -- direction and speed | |
inverseMass: Float, -- we usually use only inverse mass for calculations | |
restitution: Float -- bounciness factor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Body s = { pos:(Int,Int), shape : s } | |
data Shape = Box {w:Int, h:Int} | Bubble {radius:Int} | |
mv: (Int,Int) -> Body a -> Body a | |
mv (x,y) body = | |
let (x0,y0)= body.pos | |
in { body | pos <- (x0+x, y0+y)} | |
myBubble = Body (0,0) <| Bubble {radius=10} |
NewerOlder