Fork me on GitHub
#planck
<
2016-06-07
>
gowder01:06:28

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

gowder01:06:26

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

gowder01:06:20

hmm... maybe I need to update homebrew

gowder01:06:41

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

fasiha01:06:14

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

mfikes01:06:57

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

fasiha01:06:45

A bhauman trick?

fasiha01:06:29

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

fasiha01:06:57

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

fasiha02:06:15

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

mfikes02:06:58

Thatā€™s cool šŸ™‚

mfikes02:06:16

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

fasiha02:06:07

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

fasiha13:06:48

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

manutter5113:06:59

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

manutter5113:06:36

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

gowder14:06:36

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

mfikes14:06:04

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

mfikes14:06:33

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

fasiha14:06:04

@mfikes: that's a helpful comparison!

mfikes14:06:18

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