IRC channel logs
2024-10-26.log
back to list of logs
<fireking04>Hi everyone, I have a question about project management in guile. I'm using geiser as my IDE and I split my project into multiple files, each with their own (define-module ...). But since I'm using geiser, my main.scm cannot load the individual modules since (current-filename) returns #f. I can't find any resources out there. It seems that guile will not load the module unless it's in the load path, correct? What's the correct <fireking04>development workflow for guile such as I can work on it via geiser and also run my code in the shell by simply executing =guile main.scm=? <mwette>Can you use `(add-to-load-path (getcwd))' ? <graywolf>I personnaly set `geiser-repl-per-project-p t', so each project gets own repl. Geiser adds the project root into the load path, so everything seems to just work <old>I wish geiser could support multiple build directories <old>for a pure Guile project, this is not necessary <old>but for a project with C for example, you would like a REPL for each build you have <old>I think there could be a way to overcome this issue with Guile itself. I'll have to think about it further more <graywolf>Hm, I guess to some degree you could get by with geiser-connect, but that will give just the repl. I have no idea how to integrate those multiple repls with a single source code buffer. <graywolf>Honestly I am not even sure what it *should* look like <Arsen>graywolf: I've considered the same question in the context of C/++ language servers <Arsen>if you find an answer, let me know :) <graywolf>I do not fully understand why the original code expect `error' to be real number. I did not use complex number in many many years, so I am unsure what the expected semantics for the `error' in complex domain are. <graywolf>To me it seems confusing to mandate the error to be the same in real and imag part. I am unsure why that should be the case. <graywolf>civodul: I've sent patches for the first two bullet points in lloda's feedback. Just a heads up on the second one (complex numbers), it has comment below the --- line and is more for a proposal. If you feel strong enough either way, feel free to just drop the ε-r and ε-i and apply like that. <lampilelo>so i've been researching how to make a browser extension in js and i was looking at how i can make a websocket reconnect whenever it loses connection and the vast majority of answers on the internet, the topmost upvoted ones on stackoverflow tell you to have a recursive call in the onclose callback to recreate the socket, the problem being that js in browsers doesn't usually have TCO, so the stack grows and grows from that <lampilelo>the worthwhile answer was at the bottom of the list with 36 upvotes <lampilelo>maybe i'm misunderstanding something, but if i'm not that would mean that the proportion of bad js programmers to good ones is staggering <lampilelo>it's possible i'm wrong, i don't know browsers or javascript <Arsen>lampilelo: browser JS is event-driven so that likely ends up returning early and resuming on a callback later <Arsen>so, say, thing.onclose = function() { initWebsocket(); }; this'd cause a connection to happen again but it would return from the onclose event back into the browsers event loop, and then continue again later from a different point <dthompson>lampilelo: yeah Arsen is right. the stack is growing without bound here. <lampilelo>well the backtrace doesn't really agree with that <dthompson>event callbacks are invoked asynchronously i.e. not on the same call stack <Arsen>you sure the browser isn't keeping some event stack? <lampilelo>i don't know, i spent too much time playing with making an extension, so i'm not really that keen on digging deeper right now