How to use third party libraries with Scala REPL?

Of course, you can use scala -cp whatever and manually manage your dependencies. But that gets quite tedious, especially if you have multiple dependencies. A more flexible approach is to use sbt to manage your dependencies. Search for the library you want to use on search.maven.org. Algebird for example is available by simply searching for … Read more

Does Go provide REPL?

No, Go does not provide a REPL(read–eval–print loop). However, as already mentioned, Go Playground is very handy. The Go Authors are also thinking about adding a feature-rich editor to it. If you want something local, consider installing hsandbox. Running it simply with hsandbox go will split your terminal screen (with screen) where you can write … Read more

automatically disable a global minor mode for a specific major mode

Global minor modes created with the define-globalized-minor-mode1 macro are a bit tricky. The reason your code doesn’t appear to do anything is that globalized modes utilise after-change-major-mode-hook to activate the buffer-local minor mode that they control; and that hook runs immediately after the major mode’s own hooks4. Individual modes may implement custom ways of specifying … Read more

Why does this JavaScript code print “undefined” on the console?

It’s because the “printCounter()” function itself returns undefined. That’s the console telling you the result of the expression. Change “printCounter()” by adding return “Hello Anton!”; to the end 🙂 It’s a little confusing to say it “returns undefined“; really, it has no explicit return, but it’s the same effect.