Trying to launch the Figwheel REPL by running the command from https://figwheel.org/#quick-usage
clojure -Sdeps "{:deps {com.bhauman/figwheel-main {:mvn/version \"0.2.20\"} com.bhauman/rebel-readline-cljs {:mvn/
version \"0.1.4\"}}}}" -M -m figwheel.main
Results in the REPL never becoming active due to an error on the web side of things. Namely one of the required assets is not getting served properly and 404 is return instead -- http://localhost:9500/cljs-out/goog/base.js
Response body:
> Figwheel Server: Resource not found
> Keep on figwheelin' yep
20 and 19 are broken for me too, but 18 seems to work:
clj -Sdeps "{:deps {com.bhauman/figwheel-main {:mvn/version \"0.2.18\"}}}" -M -m figwheel.main
That said, I've recently had better experience with https://shadow-cljs.github.io/docs/UsersGuide.html (also: #shadow-cljs) for ClojureScript.I can confirm that the command above doesn't work for me either. I see 404s preventing cljs from running. @bhauman Any ideas?
Does the REPL quick start also break for anyone else or it works?
Do you mean https://clojurescript.org/guides/quick-start ? What exactly is breaking?
https://clojurians.slack.com/archives/C053AK3F9/p1756999774629669
yes, the browser is unable to download some goog things.
Hello All, When using memory mapped file IO in clojure using the clj-mmap library, is there a way to read a line? I ask because it appears that the only way to read a file using this way is by reading byte chunks. Many thanks for any help!
my mistake
I checked the value of \n in my repl, and of course I should have checked \newline instead
user=> (System/lineSeparator)
"\n"
the problem with using that is it isn't based on the text you are looking at, it is based on the language settings of the user running the code, this can be a weird source of bugs(ins)user=> (first (System/lineSeparator))
\newline
(ins)user=> (int (first (System/lineSeparator)))
10IMHO your best bet is to check out the underlying java library. there's a asCharBuffer method, and CharBuffer has a .codePoints method. you could iterate the codepoints, separate on 110 (the int value of newline), and make strings
the code is very small and isn't about characters or strings https://github.com/thebusby/clj-mmap/blob/master/src/clj_mmap.clj
or you could just iterate the bytes and split on 110 but that could break for unicode
forgot to link those java methods: https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html#asCharBuffer-- https://docs.oracle.com/javase/8/docs/api/java/nio/CharBuffer.html https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html#codePoints--
Bard (or whatever it is these days) says, "ASCII code 110 represents the lowercase letter "n"." Usually the line separator characters are 13 and 10, or just 10, but if it's related to the platform you can ask Java with System.lineSeparator