IRC channel logs
2023-05-29.log
back to list of logs
<wingo>got soft ports and r7rs textual ports on top of "custom ports". should be suspendable too. pushed to wip-custom-ports <rgherdt>is there a way to get `guild compile` to output locations of errors found? For example I get: "<unknown-location>: warning: possibly unbound variable ..." <rgherdt>I implemented diagnostics for my LSP server by `load'ing the file, but I wonder if there's a better way for getting useful information <wingo>rgherdt: it should output locations... if you have a test case that produces this error do file a bug <wingo>provided your guile is new enough (there were some read changes a couple years ago) <rgherdt>wingo: indeed, I just tried with 3.0.9 and it worked, thanks! I was using 3.0.8 I think, but maybe there was a problem with my installation <dokma>I'm going nuts for weeks trying to connect to a websocket using guile-websocket... <dokma>Nothing I try works. I always get 400 Bad request <dokma>Has anyone actually used guile-websocket? <mirai>am trying to get started with transducers by writing a INI-file serializer with it <rlb>dokma: don't know anything about it myself, though glancing, if you're using 0.1, looks like there's been a client commit or two since then: https://git.dthompson.us/guile-websocket.git I'd also wonder if the client were well tested, commonly used, etc., but again, no nothing about the lib. <rlb>Did idly wonder if the 400 could be related to the client "secure websockets" commit there. <mwette>mirai: are you sure about caar? Maybe add a (tmap (lambda (x) (pretty-print x) x)) before that to debug <mwette>s/before that/before (tmap add-section-header) <mirai>since it happens after tpartition <mirai>what I'm concerned about the cons is if using it like that ends up being wasteful when considering the context within transducers <dokma>rlb: I pulled and now it works. Thank you! <dokma>Now I'm pulling my hair as to why my assoc-ref works in the repl but not in my code: <dokma> (display (format #f "~a" (assoc-ref (cdr (car json-data)) 'c))))) <dokma>this doesn't work in code (the assoc-ref part) <dokma>((B . 0) (Q . 37036.77824760) (V . 1.33806000) (q . 51340.96441860) (x . #f) (n . 79) (v . 1.85484000) (l . 27679.45000000) (h . 27679.46000000) (c . 27679.45000000) (o . 27679.45000000) (L . 3129160849) (f . 3129160771) (i . 1m) (s . BTCUSDT) (T . 1685393879999) (t . 1685393820000)) <dokma>Whereas if I remove the assoc-ref it prints the alist. <dokma>RhodiumToad: I fetched it from Binance using guile-websocket <dokma>The pasted version works (prints each alist it fetches). But if I add assoc-ref it just prints #f#f#f <dokma>Do you have guile-websocket installed? <dokma>(("B" . "0") ("Q" . "20363.59195920") ("V" . "0.73563000") ("q" . "51895.96451220") ("x" . #f) ("n" . 100) ("v" . "1.87473000") ("l" . "27681.83000000") ("h" . "27681.84000000") ("c" . "27681.84000000") ("o" . "27681.83000000") ("L" . 3129162634) ("f" . 3129162535) ("i" . "1m") ("s" . "BTCUSDT") ("T" . 1685394299999) ("t" . 1685394240000)) <RhodiumToad>note that you need assoc-ref rather than assq-ref or assv-ref, because strings need equal? for comparisons <dokma>That's what I used once I figured out those were strings. <RhodiumToad>~a is like (display ...) whereas ~s is like (write ...) <mwette>mirai: thanks for the srfi-171 intro -- looks super useful