I wonder if the cacheing mechanism is in any way configureable. Like chache once and whenever a macro is defined after that, lumo will reject its change, or setting compilation level to none (if its other than none), not very important, just sometimes evaluating macros can take up to a minute, just one (big) macro.
@hlolli not exactly sure what you’re saying there
Lumo will currently invalidate the cache for a file if that file changes
ok for example I just made this macro now
(defmacro define-fx
[fx-name string-inject-fn param-vector]
`(letfn [(param-key# [param-num#]
(keyword (str "p" param-num#)))]
(defn ~(symbol fx-name)
[~(symbol "&") {~(symbol "keys") keys-vector# :as fx-env#}]
(let [fx-env# (merge ~(apply hash-map param-vector) fx-env#)]
(fn [aL# aR# param-cnt#]
(let [param-vector-keywords# ~(filter keyword? param-vector)
param-nums# (range (inc param-cnt#)
(inc (+ param-cnt# (count param-vector-keywords#))))
param-val-list# (partition 2 (interleave (map param-key# param-nums#)
param-vector-keywords#))
fx-name-key# (keyword ~fx-name)]
;; Swap parameter name for p-field number
[(apply ~string-inject-fn aL# aR#
(map (fn [s#] (str "p" s#)) param-nums#))
;; Make a map of {:px [:fx-name :param-name]}
;; and {[:fx-name :param-name] value}
(merge (reduce (fn [init# val#] (assoc init# (first val#)
[fx-name-key# (second val#)]))
{} param-val-list#)
(reduce (fn [init# val#] (assoc init# [fx-name-key# (second val#)]
(get get-env# (second val#))))
{} param-val-list#)
{:param-cnt (last param-nums#)})]))))))
takes ca. 30 secs to load. These are two seperate questions. That invalidate mechanism, is it possible to turn it off, so that even in situations the file has changed, lumo will not recache.Maybe it would render all useage of lumo repl unuseable, in that case, I wont push that question further 🙂
so.. if you don’t wanna use the cache, don’t pass the -K/-k
flag
oh, I thought lumo would do it anyway, just if it would be automatic or not 🙂 nice I try that!
caching is opt-in
not opt-out
it’s off by default
I could cache once, and use small -k to point to a pre-cached directory, and it wont recache?
if the file has changed from the cached version, it will recompile & re-cache
ok
@moxaj are you still thinking about working on the tagged literal stuff?
@anmonteiro sure! I was abroad for a few days, so no progress was made
no pressure
just wondering if I should add it to my queue or not 🙂
if your hands are empty, i'm not going to fight for it 🙂 otherwise, I can give it another shot tomorrow
@moxaj you’re welcome to do it. happy to provide any guidance should you need it
alright. later then
any caveats to connecting to the socket repl, trying this js snippent
//client.js
var io = require('socket.io-client');
var socket = io.connect('<http://localhost:5555>',
{reconnect: true});
// Add a connect listener
socket.on('connect', function (socket) {
console.log('Connected!');
});
socket.emit(`(println "Hello Lumo!")`)
nothing prints on either side (telnet works, so its running).you might not be redirecting streams in http://socket.io?