planck

Planck ClojureScript REPL
bherrmann 2019-06-17T01:13:13.003800Z

Boo...

$ sudo add-apt-repository ppa:mfikes/planck
$ sudo apt-get update
$ sudo apt-get install planck
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 planck : Depends: libzip4 but it is not installable
E: Unable to correct problems, you have held broken packages.

bherrmann 2019-06-17T01:13:38.004100Z

$ cat /etc/issue.net 
Ubuntu 19.04

mfikes 2019-06-17T01:17:43.004600Z

Thanks @bherrmann, will take a look...

bherrmann 2019-06-17T01:17:56.004800Z

:thumbsup:

mfikes 2019-06-17T02:57:34.005300Z

@bherrmann Fixed

sudo apt-get update
sudo apt-get install planck
and you should be good to go

bherrmann 2019-06-18T23:15:47.022100Z

There is much rejoicing!!!!

2019-06-17T15:09:30.006200Z

Can planck handle reading in binary files into a buffer? My attempt at google-fu is returning results that start with (require '[<http://clojure.java.io|clojure.java.io> :as io])

mfikes 2019-06-17T15:40:47.007500Z

@manutter51 Yes. <http://planck.io|planck.io> has input stream and output stream abstractions just like <http://clojure.java.io|clojure.java.io> (as contrasted with reader and writer abstractions)

2019-06-17T15:41:50.008400Z

Ok, I got that far, but I’m drawing a blank on how to move data from the input stream into a byte array. I need to load a 22K file.

mfikes 2019-06-17T15:44:46.009Z

@manutter51 You would like a single array that looks like #js [7 1 32 ...] ?

2019-06-17T15:49:37.010200Z

Maybe? I need to post a file to a web server for some code I’m testing. The file I’m loading is the multipart form data, including some file attachments in binary.

2019-06-17T15:50:05.010900Z

I can just slurp and go with a text-only file, but as soon as I include binary data the POST request times out

2019-06-17T15:50:24.011300Z

which I assume is because you can’t safely use slurp with binary data.

mfikes 2019-06-17T15:54:36.011500Z

Ahh, @manutter51 https://github.com/planck-repl/planck/issues/651

2019-06-17T15:55:02.011900Z

Ooo, that looks promising, thanks!

mfikes 2019-06-17T15:55:30.012500Z

I suspect it is a trivial change to make to the code, but not supported yet.

2019-06-17T15:56:15.013300Z

Ok, I can try lumo instead, I’m sure node supports that sort of thing

mfikes 2019-06-17T15:56:26.013500Z

Yeah, it must

2019-06-17T15:57:12.013800Z

Good enough, that’s what I needed to know, thanks.

mfikes 2019-06-17T15:57:18.014Z

Cool