Live data from Hacker News

Tetris in ClojureScript

shaunlebron.github.io

21–30 of 34 posts

Re: Tetris in ClojureScript

#22

Earlier quoted context omitted.

I wrote about my journey covering Clojure's pros and cons: https://medium.com/swlh/what-i-learned-after-writing-clojure...

"It has a slow startup time. Clojure runs on the JVM and has a significantly slower startup time compared to Node. Again, this is only a problem from an outsider’s perspective. We have REPL. You start the app only once, and it keeps running in the background. You can interactively include new changes, without having to startup every time." I've been using Clojure for about 8 years and this is one of the talking point…

The faster startup time is one reason I've thought that clojurescript on Node (shadow-cljs makes this really easy) could become more popular than Clojure Classic.

Re: Tetris in ClojureScript

#23
post #6

That's one of the coolest programming demos I've ever seen! Suggestion: make the completed rows fade asynchronously.

It does. <! reads from a channel that closes in the specified timeout. It is non-blocking. (similar to the away/async JS magic - rewrites the go block to a state machine)

Re: Tetris in ClojureScript

#24

This was the final push I needed to learn Clojurescript. Absolute awesome work. I always kept my distance from Clojure because of the reliance on the Java ecosystem but having a productive and stable language that is a pleasure to work in and that transpiles to JavaScript seems like a good deal. Plus a solid REPL-based workflow and rapid prototyping support, something I sometimes miss from more static languages.

If you are getting into clojurescript, take a look at shadow-cljs for the build tool. It provides a better experience than the built-in tooling IMO.

Re: Tetris in ClojureScript

#26

This was the final push I needed to learn Clojurescript. Absolute awesome work. I always kept my distance from Clojure because of the reliance on the Java ecosystem but having a productive and stable language that is a pleasure to work in and that transpiles to JavaScript seems like a good deal. Plus a solid REPL-based workflow and rapid prototyping support, something I sometimes miss from more static languages.

http://clojurescriptkoans.com/ is a great way to get started with the essence of the language.

Re: Tetris in ClojureScript

#27

Earlier quoted context omitted.

I wrote about my journey covering Clojure's pros and cons: https://medium.com/swlh/what-i-learned-after-writing-clojure...

"It has a slow startup time. Clojure runs on the JVM and has a significantly slower startup time compared to Node. Again, this is only a problem from an outsider’s perspective. We have REPL. You start the app only once, and it keeps running in the background. You can interactively include new changes, without having to startup every time." I've been using Clojure for about 8 years and this is one of the talking point…

Right. I find it annoying too, but for the opposite reason.

Since GraalVM, Babashka, and before them Lumo and Planck, or just plain CLJS + NodeJS, Clojure (the language) has several answers to those use cases, and it’s unclear to me at least why this is a point of contention regarding Clojure (the JVM implementation). Should we also bash CLJS for being single threaded?

Re: Tetris in ClojureScript

#29

Earlier quoted context omitted.

"It has a slow startup time. Clojure runs on the JVM and has a significantly slower startup time compared to Node. Again, this is only a problem from an outsider’s perspective. We have REPL. You start the app only once, and it keeps running in the background. You can interactively include new changes, without having to startup every time." I've been using Clojure for about 8 years and this is one of the talking point…

Right. I find it annoying too, but for the opposite reason. Since GraalVM, Babashka, and before them Lumo and Planck, or just plain CLJS + NodeJS, Clojure (the language) has several answers to those use cases, and it’s unclear to me at least why this is a point of contention regarding Clojure (the JVM implementation). Should we also bash CLJS for being single threaded?

And now that it's honestly approached as a potential issue, you can talk about the tradeoffs involved here. I haven't followed those projects closely so correct me if I'm wrong, but Babashka is an interpreter that implements a "substantial subset" of Clojure, right? GraalVM seems amazing, but it also is not a guaranteed seamless experience, either (no eval, partial support for reflection).
Post reply on HN