lumo

:lumo: Standalone ClojureScript environment. Currently at version 1.9.0
futuro 2018-05-16T15:28:55.000301Z

@richiardiandrea A current goal for the project is to be a drop-in replacement for most of the ways you deal with IO via <http://clojure.java.io|clojure.java.io>, though there are some JVM assumptions about the way <http://c.j.io|c.j.io> deals with things, so that goal might not be tenable, ultimately.

futuro 2018-05-16T15:29:18.000885Z

Oh, sorry, I see that wasn't a question now.

richiardiandrea 2018-05-16T15:29:28.000840Z

Ah ah no problem ;)

richiardiandrea 2018-05-16T15:29:39.000365Z

Still worth reading that answer

richiardiandrea 2018-05-16T15:29:43.000075Z

:)

futuro 2018-05-16T15:30:40.000983Z

Also, I'm finishing up a short set of examples in my async forks and then I'll be putting up a PR.

richiardiandrea 2018-05-16T15:31:15.000120Z

Oh great!

futuro 2018-05-16T15:31:18.000874Z

Which you can see here, if you're interested https://github.com/futuro/abio-node/blob/async-io/examples/walkthrough.cljs

richiardiandrea 2018-05-16T15:32:52.000678Z

I see what you mean there, the Clojure core namespaces do not have async functions at all right?

futuro 2018-05-16T15:33:43.000088Z

Yeah, they rely implicitly on the consumer of the library to handle async desires.

richiardiandrea 2018-05-16T15:34:08.000598Z

I guess having different names from core makes sense for async funcs

futuro 2018-05-16T15:34:10.000284Z

They also have different kinds of streams and readers and writers, which are defined by the host.

futuro 2018-05-16T15:35:16.000062Z

My current approach is to have a single protocol method that can do both sync and sync, depending on arity.

richiardiandrea 2018-05-16T15:35:52.000489Z

I was thinking earlier that in the lumo tests it would be great to replace all the <http://lumo.io/slurp|lumo.io/slurp> with the abio slurps

futuro 2018-05-16T15:35:55.000596Z

F.e., https://github.com/futuro/abio-node/blob/async-io/src/abio/node/io.cljs#L9 that's the definition of a reader, and -read takes either no arguments or one argument, that being the callback to run.

richiardiandrea 2018-05-16T15:36:02.001030Z

As sanity check 😄

richiardiandrea 2018-05-16T15:36:37.000750Z

Gotcha

futuro 2018-05-16T15:36:41.000784Z

Ha, that'd be pretty neat.

richiardiandrea 2018-05-16T15:37:06.000866Z

Lumo tests are doing all sorts of io btw and we basically use node directly

futuro 2018-05-16T15:38:26.001053Z

It's been interesting learning from the <http://clojure.java.io|clojure.java.io> code while also trying to piece apart the things that don't make sense for CLJS (or, at least, for Node).

richiardiandrea 2018-05-16T15:38:35.000827Z

Nice

futuro 2018-05-16T15:38:51.000349Z

For example, I called the two records BufferedReader and BufferedWriter, but I don't think Node has an unbuffered reader or writer.

futuro 2018-05-16T15:38:59.000071Z

Maybe streams, but I can't recall right now.

richiardiandrea 2018-05-16T15:39:31.000239Z

Yeah streams I guess are close to that, but I am not a node super expert as well

richiardiandrea 2018-05-16T15:40:42.000648Z

With nRepl now out of contributors I am starting to eye a possible lumo nRepl server

futuro 2018-05-16T15:40:58.000242Z

"out of contributors"?

richiardiandrea 2018-05-16T15:41:24.000923Z

Sorry autocomplete

richiardiandrea 2018-05-16T15:41:36.000877Z

Out of clojure.contrib

richiardiandrea 2018-05-16T15:42:04.000523Z

It's now in clojure-emacs

richiardiandrea 2018-05-16T15:42:29.000443Z

So easier to contribute to

futuro 2018-05-16T15:42:48.000717Z

Ah, nice!

futuro 2018-05-16T15:43:15.000440Z

I'm really curious if there's efforts to port cider and friends to be self-hosted compatible.

richiardiandrea 2018-05-16T15:44:59.000420Z

Well, I am the one carrying that flag, I am working on a PR for cljs-tooling now, there is a lot of work to do though

richiardiandrea 2018-05-16T15:46:28.000820Z

Abio will be very helpful with that

futuro 2018-05-16T15:46:33.000147Z

I know when I was researching the nRepl, I found that threading and host specific IO were the two biggest hurdles. What hurdles have you encountered so far with cljs-tooling?

richiardiandrea 2018-05-16T15:47:30.000372Z

None, I just want to add var to lumo and I need some time to fix the error I found in some tests

richiardiandrea 2018-05-16T15:47:47.000080Z

But there is no IO in there so it's relatively easy

richiardiandrea 2018-05-16T16:02:22.000654Z

the patch is here in WIP if you are curious https://github.com/clojure-emacs/cljs-tooling/pull/24

futuro 2018-05-16T16:13:57.000743Z

Neat, thank you 🙂