I haven't used it, but here is a talk about it https://www.youtube.com/watch?v=uwdtTQ2ky5Q , maybe you find it interesting
Thank you -- added to my list.
I remember there was a function in Clojure that would be like if (cond) f(a) else a
but I can't find it anymore…anybody has that on top of his head?
@vincenz.chianese is cond->
what you want?
(cond-> 10
true inc)
;; => 11
(cond-> 10
false inc)
;; => 10
Aha! I think so!
moved to #leiningen
Is there a library that parse the fixed with file in Clojure?
Quick google gave me this article - http://www.lexicallyscoped.com/2015/01/05/parsing-flat-files-in-clojure.html but it seems to be overkill for me.
You'll probably have to do that yourself, and read each line's fields with subs
At least that's how I'd do it
Should be quite straightforward actually.
Thanks will give that a try then.
You could also get fancy with a spec and use conform
Yes, read in the file with slurp
, then do a (str/split yourstring #"\n")
so you have one array entry per line, then just use subs
with whatever field length you have repeatedly over each line
I am reading in huge file, so will do that lazily
@agilecreativity line-seq
lets you handle a line at a time lazily
https://clojuredocs.org/clojure.core/line-seq
This technique can also be used: https://blog.michielborkent.nl/2018/01/17/transducing-text/
Any way I can use REBL to develop on a remote machine?
@setzer22 REBL works "in process" so you could use it on the remote machine if you can "project" the UI from that machine onto yours (say via X11 if it's a *nix machine or remote desktop if it's Windows/Mac)...
thanks! I'll see if I can pull off X11 forwarding on this machine
When I'm on my Windows laptop, I use Xlaunch so that I can run X11 UIs from WSL2 and then appear under Windows. Similar concept but not really "remote".