IRC channel logs


back to list of logs

<davexunit>fun with guile:
<jmd>According to the /topic this channel is destroying the environment.
<yuqian>In an example, there is a line with function (read-line) but while I run it, my guile alarmed because it doesn't know what is (read-line).
<yuqian>Who knows what has happened? Thank you!^_^
<jchmrt>yuqian: read-line is a function defined in (ice-9 rdelim), so to use it you need to import that module with: (use-modules (ice-9 rdelim)). See this page in the reference manual:
<daviid>happy saterday!
<rain1>cheers :)
<rain1>you too
<davexunit>ACTION wishes (ice-9 match) could destructure bytevectors
<mark_weaver>davexunit: in general, when dealing with compound structures that cannot store arbitrary scheme data (e.g. symbols), the pattern cannot be represented using that structure type.
<davexunit>mark_weaver: makes sense
<davexunit>just staring at a bunch of record type destructuring that I'm going to remove to try out an optimization using packed bytevectors.
<civodul>maybe you can write a custom pattern matcher
<civodul>a bit unsatisfactory, but hey
<davexunit>I could
<davexunit>I think it's easier to just rewrite what I have that used it.
<davexunit>trying to aggressively optimize some vector math operations with inlining, float unboxing, etc.
<mark_weaver>you can use a pattern like (= bytevector->list (a b c ...))
<davexunit>that's a good point.
<davexunit>I'll keep that in mind. it's not appropriate for this case because it allocates a fresh list.
<davexunit>but I can see it being useful elsewhere.
<rain1>There are some pattern matchers in scheme which can be extended with new instructions for stuff like this
<rain1>I don't know if thats any use
<davexunit>I'm just going to not use a pattern matcher here
<davexunit>it will be okay
<rain1>oh okay
<rain1>I had a pretty bad experience trying to debug my program for a while
<rain1>then I added a (display x) debug thing and it worked
<rain1>so i deleted it and it continued to work
<rain1>I guess guile somehow cached a compile of when the code was wrong
***micro` is now known as Guest88790
***siel_ is now known as siel
***darthlukan_ is now known as darthlukan
***petercom1and is now known as petercommand
***Fuuzetsu is now known as Guest85605