Fork me on GitHub
#planck
<
2017-04-25
>
mfikes10:04:26

@cgrand I’ll add the ability to open and listen on sockets in Planck. It should be fairly straightforward since Planck supports Socket REPL. An experimental change been done previously with the Objective-C (Planck 1.x) (https://github.com/mfikes/planck/pull/297), I just need to add similar support to the C-based version (Planck 2.x). https://github.com/mfikes/planck/issues/499

cgrand11:04:37

Do you think some of this work (async *in*, async reader, repl even) could move to cljs.js proper?

mfikes11:04:17

I think there are some new things that ClojureScript previously excluded owing to it being predominantly used in a browser that are now making more sense (https://dev.clojure.org/jira/browse/CLJS-1428) Perhaps some of the stuff you are working on also fits in to that category.

cgrand11:04:20

What’s the best way/place to discuss that?

mfikes11:04:57

@cgrand #cljs-dev Is an appropriate place to chat about potential changes to ClojureScript (prior to writing JIRA tickets, etc.)

cgrand11:04:08

thanks, yesterday I was looking for #clojurescript-dev 🙂

richiardiandrea16:04:10

Talking about the target being node...I really wonder if there shouldn't be two compilers (is modes) for browser and node that do different stuff

cgrand13:04:33

richiardiandrea: like?

richiardiandrea14:04:28

There was a blog post that was highlighting that the compiler still fails with many node.js dependencies. Also it could emit more idiomatic node output that in the long run will (maybe?) be optimized better than ES3.

slipset17:04:04

@mfikes It’d be super neat if you brought life into my PR again. I haven’t had the whatevers needed to port my stuff to C, but it should be quite simple.

slipset17:04:49

Better yet, as you say, abstract a bit over the socket repl thingy and pass whatever’s supposed to listen to the socket as a function.

mfikes17:04:51

Yeah, I think I’ll take the C implementation used for the Socket REPL implementation and morph it into what is neeeded to listen on sockets.

slipset17:04:27

I guess the place where I got confused in my PR was if I was implementing a client or a server 🙂

slipset17:04:53

and if it was supposed to act as both at the same time and how that was supposed to be handled.

slipset17:04:23

But my main goal was actually just to be able to write an http-server to test the http thing that I wrote 🙂

mfikes17:04:50

Cool. Yeah, I’ll think about how to support server and client sockets