Live data from Hacker News

Try Clojure – An interactive tutorial in the browser

tryclojure.org

41–50 of 96 posts

Re: Try Clojure – An interactive tutorial in the browser

#41
I was always wondering why something like this doesn't exist already! This is really great.

Would it be possible to add `add-libs` from `tools.deps.alpha`? https://insideclojure.org/2018/05/04/add-lib/ Then you could add libraries at runtime directly from the REPL

You could then pair it with a pastbin and share/run code snippets (with some URL shortener). Could you imagine the possibilities for bug reports for instance? :D You could reproducibly demo bugs (well and features as well)

Re: Try Clojure – An interactive tutorial in the browser

#42
post #41

I was always wondering why something like this doesn't exist already! This is really great. Would it be possible to add `add-libs` from `tools.deps.alpha`? https://insideclojure.org/2018/05/04/add-lib/ Then you could add libraries at runtime directly from the REPL You could then pair it with a pastbin and share/run code snippets (with some URL shortener). Could you imagine the possibilities for bug reports for instan…

Check out https://klipse-embed.herokuapp.com/edit.php.

Re: Try Clojure – An interactive tutorial in the browser

#43
post #33

slightly offtopic: My company (Meta Blocks), and my last company (Status) are hiring for Clojure roles. Please reach out to me if you are considering a switch.

I have 15 minuets experience!

Oh very good, I love this comment.

Re: Try Clojure – An interactive tutorial in the browser

#44
post #41

I was always wondering why something like this doesn't exist already! This is really great. Would it be possible to add `add-libs` from `tools.deps.alpha`? https://insideclojure.org/2018/05/04/add-lib/ Then you could add libraries at runtime directly from the REPL You could then pair it with a pastbin and share/run code snippets (with some URL shortener). Could you imagine the possibilities for bug reports for instan…

This environment is running with SCI (https://github.com/babashka/sci) and only in the browser. What you describe might be more suitable for an environment like replit: https://replit.com/new/clojure.

SCI can be combined with Reagent, etc for online tutorials as well, or to build web apps, like you can see here: https://babashka.org/scittle/

Re: Try Clojure – An interactive tutorial in the browser

#47

    =>(map inc)

    function(b){return function(){function c(k,t){t=a.g?a.g(t):a.call(null,t);return b.h?b.h(k,t):b.call(null,k,t)}function d(k){return b.g?b.g(k):b.call(null,k)}function e(){return b.s?b.s():b.call(null)}var f=null,g=function(){function k(w,u,B){var p=null;if(2
The output is correct as far as I can tell but that's some pretty hairy Javascript right there.

Edit: Formatted code.

Re: Try Clojure – An interactive tutorial in the browser

#48

=>(map inc) function(b){return function(){function c(k,t){t=a.g?a.g(t):a.call(null,t);return b.h?b.h(k,t):b.call(null,k,t)}function d(k){return b.g?b.g(k):b.call(null,k)}function e(){return b.s?b.s():b.call(null)}var f=null,g=function(){function k(w,u,B){var p=null;if(2 The output is correct as far as I can tell but that's some pretty hairy Javascript right there. Edit: Formatted code.

I mean, peek under the covers at any minified code, and it’s a total mess. Minification tends to do that.

Re: Try Clojure – An interactive tutorial in the browser

#49

=>(map inc) function(b){return function(){function c(k,t){t=a.g?a.g(t):a.call(null,t);return b.h?b.h(k,t):b.call(null,k,t)}function d(k){return b.g?b.g(k):b.call(null,k)}function e(){return b.s?b.s():b.call(null)}var f=null,g=function(){function k(w,u,B){var p=null;if(2 The output is correct as far as I can tell but that's some pretty hairy Javascript right there. Edit: Formatted code.

clojurescript used to go through the Google Closure compiler, maybe it still does?

Re: Try Clojure – An interactive tutorial in the browser

#50

Earlier quoted context omitted.

Java the language? Very likely not. As proof - a majority of Clojure runs in JavaScript without any code changes (via ClojureScript). That said exceptions tend to look like Java classes, so you’ll definitely see Java bits. Java the JVM? You _probably_ don’t need to know it to get started, but you’ll have to get familiar with JVM deployment, dependency management, packaging, JVM memory settings, etc if you want to run…

My experience with ClojureScript is you absolutely have to know the host environment because you will encounter type errors and the maintainers have negative interest in making them clear to users (as in flatly refused offers to contribute changes to make those errors easier to understand).

There is nothing worse than library or language maintainers who do not understand that "pure" error messages are absolute hell. If 99.99 % of the time a user should simply write x instead of y, the message should absolutely state that if possible.
Post reply on HN