Fork me on GitHub

Online terminal REPL implemented with xterm.js + the small clojure interpreter: source: I'm sure there are a few input/output handling edge cases. Feel free to follow up in #sci. Thanks to @plexus for the idea.

๐Ÿ‘ 48
sci 27
๐Ÿ‘ 30

Looks awesome @plexus . Congrats. What was the use case for building it?


It can be used to showcase your CLJS libraries in a terminal setting.


thanks. From what I read it seems that I could implement a scripting terminal to my clojure / java app and expose the internals (spring beans, etc) ? Use cases would be - level 3 support, changing app behavior at runtime or doing one off scripts that are not yet exposed via api


@U04V15CAJ: Regarding your use case: can I load clojurescript libraries dinamically in the terminal running in my browser ?


@U011NGC5FFY Not like that. Right now you would have to compile your library along and connect it into the sci options: And then host it somewhere.


But sci can be used for the things you mentioned.


There is a REPL example in the examples dir of sci


But there is also babashka.nrepl which can be used to expose an nREPL server to your sci environment.


thanks, I love that about it. I was looking for a language that is safe to embed in an back-end app to expose internal services for maintenance operations not yet implemented in API


yes. it's safe in the sense that you control what people can execute


we also have some options to restrict infinite seqs

๐Ÿ‘ 3

I will check that one up as awell, thanks. I would like to offer my appreciation for your help with clojure and in general. You are awesome and if you ever think I can help, just let me know.

โค๏ธ 3

but it's still possible to craft examples that will run for a long time - we haven't quite solved that problem

๐Ÿ‘ 3

a solution would be to run this within a thread and just kill the thread after some timeout


on the JVM that is. The same solution is taken by nREPL when you press ctrl-c.


in the browser this is more difficult


have you looked at web assembly? I don't know if it makes any sense (just started reading about it). WebAssembly works in most modern browsers> Not sure if clojurescript could be made to work with web assembly (don't know about garbacge collection). But if it can, we can have a very powerfull clojre / clojurescript experience .


WebAssembly does support threads and can be called from JS.


There's also webworkers, but I don't think they can access the dom


The execution length problem is more or less only a problem for scripts you don't control


I guess the worst thing that could happen is that your browser freezes


๐Ÿ™‚ for running things in browser yes, but for using sci on back-end via xterm.js ...


like I said, then you can run things in threads which you can kill on timeout


neither web workers nor web assembly can access dom. they need to do that via JS.


JS can call functions in WebAssembly and web Assemly can call JS so there is a lot of room for how to do that


cool. well, if you want to figure this out, that'd be cool


I'll look into it when I have a more concrete use case. Right now I'm just exploring WebAssembly. They do have an open spec for GC and a v1 implementation . I think it would be worth exploring having a clojure version on web assembly once GC is in place.


The concrete use case for this is interpreting scripts from other users in something like


Maybe @U0FT7SRLP can you tell more about it


I'm a bit ashamed to admin it's not clear what Athens does. I've looked at the github page and some other docs and as a new commer I have no idea what it does. Does it make beer ๐Ÿ˜„?


It's something like Roam. I have used neither myself.

๐Ÿ‘ 3

I just read the description of Roam and I think I understand what it does. I've been looking for something like this to start a journal ๐Ÿ™‚ . I'll check it out


@U011NGC5FFY Regarding the (potential) power of Sci, yes Athens or Roam are future potential use cases, allowing for safe third party extensions. Sci/Clojure is a lot easier to contain than Javascript is, and a much better programming model. For current inspiration, I would look at this only supports javascript, but imagine a Sci variation. I think this is basically what (a part of) Athens could be

โค๏ธ 3

thanks, looks very interesting (and nice)


@UUY06DFL5 Might be able to explain Athens or itโ€™s current status a bit better :)

aw_yeah 3

I'm curios about that. I'm working to grow a clojure company and I'm looking for an intranet tool. Not sure if Athens fits this profile yet.


I think the important things that are still missing are persistence and an authorization layer. So probably not a good fit yet, if thatโ€™s not the core of your product at least


The original use case for this (and one we may still pursue) is to add a drop down repl to lambda island, and to offer various features and customizations over time via the repl


To answer your question @U011NGC5FFY


@plexus Made various improvements to the babashka/xterm-sci. Single quotes work. Pasting multiple sexprs. Dealing with incomplete input. Println, prn, pr, etc.


It depends on a fork of local-echo:


Also made a PR to the original one, but they're not fast to respond

jeff tang19:09:09

Roam allows arbitrary css, js, html, and even some hiccup and datalog. This is fun because it opens up user customization and programmable apps. But it's of course not as secure! This is why JS execution in Roam has this UI

๐Ÿ‘ 3
jeff tang19:09:15

My hope is that Athens will have a plugin system that is both powerful (arbitrary code), but also safe, so something like sci would be great. But it's not a priority atm. hope that helps @U011NGC5FFY


@UUY06DFL5 I think the warning is great. Even with sci we cannot guarantee the length of execution time currently, but maybe allowing users to flag scripts as malicious or something would help in that regard.

๐Ÿ‘ 6

Anything exciting in JDK15 anyone knows of? I've not followed along really.


Nashorn is truly removed


Z1 is stable


Multi-line strings with """


(that's Java language, not JVM, so not useful to us)


And we should probably follow-up in #java

dominicm16:09:41 I'll probably look at 12/13/14 too as I didn't follow those either as I only am interested in lts versions. Not sure if they are rolled up or not.


I know we won't see clojure using this for a long time, but anonymous classes seem like they might be really handy


Looks like this isn't the LTS release. That'll be 1 year from now.


I thought 17 is the next LTS?


6 month release cycle, so 16 is next, then 17 in 1 year which is LTS.


There are some interesting projects in JVM / JDK land. Loom and Valhalla are probably the most interesting


Loom aims to bring tail call elimination. Looking forward to seeing that.


The devs have been pretty vocal about "LTS" not meaning anything to them


So the latest version is the best supported version - LTS is arbitrary based on whatever companies want to do with regards to paid support


Yes and no - eg. on AWS itโ€™s nice to know that Amazon will apply security fixes to Coretto for a long time.


The clojure devs feel differently :)


Clojure only officially supports lts the


Well, "officially support" is open to interpretation. Clojure itself is tested against 8, 9, 10, 11 right now (Oracle and OpenJDK versions) per


I'm surprised by 9/10.


Iโ€™m pleased to announce Fulcro 3.3.0. This release has a few new tools that make hot code reload even better. In prior versions a change to a query when using dynamic queries would not be properly seen if nested. This new version provides a function you can call as part of your hot reload refresh that will scan for changes like that and fix them.

๐Ÿ‘ 27
metal 15
fulcro 18

Fulcro RAD now has another possibility for storage: Key Value stores (in general). The repository is setup as another RAD Demo, just to demonstrate it all working. Please take a look:ย

metal 15

There are some interesting projects in JVM / JDK land. Loom and Valhalla are probably the most interesting