planck

Planck ClojureScript REPL
gowder 2016-06-07T01:38:28.000020Z

"brew upgrade planck" are like my new three favorite words šŸ™‚

gowder 2016-06-07T01:40:26.000021Z

oh no! but it looks like homebrew only has 1.12.1! @mfikes insert oliver twist voice please sir, can I have some more? šŸ™‚

gowder 2016-06-07T01:41:20.000022Z

hmm... maybe I need to update homebrew

gowder 2016-06-07T01:41:41.000023Z

oh, there we go! I take back my pitiful whining.

fasiha 2016-06-07T01:44:14.000024Z

I ā€¦ I find myself wanting to run a webserver on Planckā€¦

mfikes 2016-06-07T01:46:57.000026Z

@slipset may have implemented HTTP servingā€”not sure. There is also a trick Bruce Hauman pointed outā€¦

fasiha 2016-06-07T01:49:45.000028Z

A bhauman trick?

mfikes 2016-06-07T01:51:16.000029Z

@fasiha: Indeed: https://twitter.com/mfikes/status/636689169897648128

fasiha 2016-06-07T01:59:29.000031Z

@mfikes: that is ā€¦ truly ā€¦ sick

fasiha 2016-06-07T01:59:57.000032Z

$ cat my-watch.sh
#!/bin/bash
fswatch -0 -r src | xargs -0 -n 1 -I {} planck build.cljs
$ websocketd --port=8081 ./my-watch.sh
ā€¦ā€¦ā€¦

fasiha 2016-06-07T02:01:15.000033Z

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

mfikes 2016-06-07T02:02:58.000034Z

Thatā€™s cool šŸ™‚

mfikes 2016-06-07T02:10:16.000035Z

Interestingly, if Planck supported the accept-fn aspect of Socket REPL, then you could probably hand-code support for any protocol in pure ClojureScript.

fasiha 2016-06-07T02:29:07.000036Z

Didn't realize that CORS and such don't apply to websocket connections. Even better šŸ˜ˆ

fasiha 2016-06-07T13:44:48.000038Z

Lazy question: is Objective-C (or Swift?) nice to use like Clojure/Script?

2016-06-07T13:48:59.000039Z

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

2016-06-07T13:49:36.000040Z

I think the main libs have mostly been given Swift interfaces? but itā€™s been a while since Iā€™ve looked

gowder 2016-06-07T14:30:36.000041Z

I'm really hoping that someone smarter than me just flat out produces clojure that compiles down to swift one of these days. (Clojureswift?)

mfikes 2016-06-07T14:34:04.000042Z

Yes, something similar to the recently-announced Scala Native would indeed be interesting.

mfikes 2016-06-07T14:35:33.000043Z

@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.)

fasiha 2016-06-07T14:49:04.000044Z

@mfikes: that's a helpful comparison!

mfikes 2016-06-07T14:50:18.000045Z

One dream is that the native parts of Planck can be compiled to Linux-compatible machine code (Iā€™ve already done this with JavaScriptCore).