"brew upgrade planck" are like my new three favorite words š
oh no! but it looks like homebrew only has 1.12.1! @mfikes insert oliver twist voice please sir, can I have some more? š
hmm... maybe I need to update homebrew
oh, there we go! I take back my pitiful whining.
I ā¦ I find myself wanting to run a webserver on Planckā¦
@slipset may have implemented HTTP servingānot sure. There is also a trick Bruce Hauman pointed outā¦
A bhauman trick?
@fasiha: Indeed: https://twitter.com/mfikes/status/636689169897648128
@mfikes: that is ā¦ truly ā¦ sick
$ cat my-watch.sh
#!/bin/bash
fswatch -0 -r src | xargs -0 -n 1 -I {} planck build.cljs
$ websocketd --port=8081 ./my-watch.sh
ā¦ā¦ā¦
fswatch
watching for my HTML to change. It tells Planck about changes. The build.cljs script already prints out one line saying what updated. Added a websocket connection code to my template (4 lines in template.html) and I have auto-reloading
Thatās cool š
Interestingly, if Planck supported the accept-fn
aspect of Socket REPL, then you could probably hand-code support for any protocol in pure ClojureScript.
Didn't realize that CORS and such don't apply to websocket connections. Even better š
Lazy question: is Objective-C (or Swift?) nice to use like Clojure/Script?
Swift is kinda cool, but I only just dabbled in it a little bit. Itās kinda like āIn hindsight, this is how we should have designed Objective-Cā. You still need to use all the old objective-c libs to do anything useful, so you should at least be able to read the old stuff
I think the main libs have mostly been given Swift interfaces? but itās been a while since Iāve looked
I'm really hoping that someone smarter than me just flat out produces clojure that compiles down to swift one of these days. (Clojureswift?)
Yes, something similar to the recently-announced Scala Native would indeed be interesting.
@fasiha: to me, Objective-C āfeelsā a lot like Java in practical usage. To be honest Swift is reminding me of C++. (Sorry, dunno if that helps by comparing languages to languages.)
@mfikes: that's a helpful comparison!
One dream is that the native parts of Planck can be compiled to Linux-compatible machine code (Iāve already done this with JavaScriptCore).