IRC channel logs

2017-04-22.log

back to list of logs

<daviid>wingo: (I know you're most probably sleeping, but I also kow you read the log... :)) where is the guile-charting source code these days?
<daviid>wingo: oh, please allow another gentle ping about this: how about a guile-cairo release?
<bookug>can I use pattern matching in guile? this is a useful feature
<bookug>is anyone here?
<bookug>why guile console does not have command-line utility
<bookug>like history and backspace
<nikita2>bookug: it has. you just need to add a readline support in your .guile file
<nikita2> http://bit.ly/2odYMpW
<bookug>oh, thanks
<nikita2>bookug: concerning pattern matching -- yes. Guile has it also: http://bit.ly/2pP4bnl
<bookug>thanks a lot, it seems that guile is powerful. Maybe I need to read the documents first
<amz3`>ijp: fingertrees are awesome:)
<amz3`>\\o/
<amz3`>I just discovered it's used in haskell's editor
<amz3`>it's a very particular datastructure
<amz3`>I mean it stands out
<amz3`>the measure monoid is something new to me
<amz3`>ref: https://github.com/ijp/pfds
<Rains>eMBee, would you sing with me the Lennart song in D-minor.
<Rains>It goes like "Lennaaaaaart Lennaaaaaahaaart Lenaaaaaahaaahaaart Lennaaaaaart"
<Rains>I mean amz3`
<Rains>sorry
<amz3`>who is Lenart?
<Rains>amz3`, software developer.
<Rains>Kind of cute but has someweird ideas I find.
<Rains>A bit hell bent on re-implementing things that already exist and obtains some criticism over not fully nderstanding the things he deems broken enough to re-implement
<Rains>People often joke about that one day hewill replace "rm" with "filectl delete"
<amz3`>systemd person?
<amz3`>ah ok
<amz3`>I don't know how he relates to fingertrees, but ok :)
<Rains>amz3`, yeah, lead dev of systemd.
<Rains>Well it doesn't.
<Rains>I just want to sing the Lennart song with soeone.
<amz3`>ok!
<amz3`>I read about systemd doing a rm -rf /
<amz3`>I read about systemd doing a rm -rf /* or something
<Rains>Well yeah tht was a recent thing.
<Rains>Nonono
<Rains>Like ehh it has some thing ina conig file to remove certain dirs at boot or something
<Rains>Like "R! /tmp/.*" in a config flie
<amz3`>yes, but it leads to a removing / with a strange syntax
<Rains>But in systemd that will also expand to /tmp/..
<Rains>As in /
<amz3`>ah ok
<Rains>So like people said that that was a very bad design and should surely be changed
<amz3`>I did not understand where the bug was coming from
<Rains>And he responded with that the rm also did that so it was onsistent.
<amz3`>yep
<Rains>And then people pointed out that rm will refuse to remove any name named . and .. exactly to avoid this.
<Rains>But mostly, I'm looking at a config file that contains "R! /path/to/file" to remove stuff at boot and I'm like: is that really needed, can't you just add "rm -rf -- /path/to/file" to the @reboot section of your crontab? Do we need a new special thing or that?
<Rains>But that mostly seems to be his thing; re-implementing stuff that already existed and in this case arguably making a pretty big mistake in something that used to work pretty well.
<Rains>Still cute as hell though
<Rains>I wanna fuck him
<amz3`>huh
<amz3`>I agree because I don't see the point of the new syntax
<amz3`>rm -rf /path/to/something does say what it does but R! /tmp/.* is bizar to me
<amz3`>I am not against rewriting stuff, tho
<Apteryx>Q: What should I use to print a simple message warning in Guile?
<amz3`>Apteryx: I use pk everywhere but it's for debug
<Apteryx>amz3`: OK. I guess there's no such thing as a logging library included with Guile?
<amz3`>I am not aware of such a thing in guile proper
<Apteryx>OK. Thanks.
<Apteryx>Oh. Just searched and closest thing might be in guile-lib: http://www.nongnu.org/guile-lib/doc/ref/logging.logger/
<amz3`>I think guile-lib is in guile 2.2
<amz3`>but i can not find a logging module using use-modules
<Apteryx>OK! I'll find out soon! Guile 2.2 is being deployed in Guix.
<Apteryx>Another question: is there a function to print the message of an exception?
<Apteryx>I saw "print-exception" used somewhere, but it's undocumented and I'm not sure what to pass as the "frame" argument.
<Apteryx>It's signature is: (print-exception port frame key args)
<amz3`>I am also interested to know how to do that
<Apteryx>Apparently when an exception is thrown it passes its arg to the handler as (key arg1 arg2 ...).
<amz3`>yep
<Apteryx>If you pass it to your handler using (key . args), then you can use (found this in Guix sources): (print-exception (current-error-port) #f key args)
<Apteryx>the frame argument is disregarded in all of Guix example, so I can't say what it should be if you wanted to use it, but at least #f should work.
<amz3`>Apteryx: btw you can already use guile@2.2 in guix
<Apteryx>amz3`: Yeah, I think it's hit master already, but I just haven't updated yet! I was finishing a small patch :)
<amz3`>Apteryx: there is an issue with print-exception, it doesn't seem to print the callstack... further inverstigation is required
<Apteryx>amz3`: Oh, that's probably what the frame argument is for? :)
<amz3`>"See its source code for more details."
<amz3`>there is 'display-backtrace' procedure but it requires a stack
<Apteryx>Geiser won't bring me to print-exception sources. I'm not sure why.
<amz3`>because it's C I think
<Apteryx>I C
<amz3`>ok, I got something but it's slightly more complicated that I was thinking
<Apteryx>To catch any exception, am I correct to use (catch #t ... ?
<amz3`>yes
<amz3`> http://dpaste.com/1M70H2X
<amz3`>this is what I have... BUT it doesn't print the correct stack
<amz3`>backtrace has something to say about it https://www.gnu.org/software/guile/manual/html_node/Pre_002dUnwind-Debugging.html#index-backtrace-1
<amz3`>it has something to do, with 'pre-unwind handler'
<Apteryx>ACTION is reading it
<Apteryx>Isn't (foo) printed as your backtrace?
<amz3`>there is no foo in my backtrace (guile 2.2)
<Apteryx>Ah I thought (foo) was the output but you just called it.
<Apteryx>If the logging library linked above as something like in Python (logging.exception) there might be some sources to look at there too.
<amz3`>Apteryx: there is also https://www.gnu.org/software/guile/manual/html_node/Throw-Handlers.html#Throw-Handlers
<amz3`>but I can't make it work like I want
<amz3`>it doesn't display foo in the stacktrace
<amz3`>s/stacktrace/backtrace/
<Apteryx>Could you educate me as to what is the difference between stacktrace and backtrace? I think backtrace is the history of functions called... But these are related to the stack frames... So I'm not sure what is the difference.
<amz3`>I dunno actually
<amz3`>I am in the same position as you, I use one or the other depending on the mood
<amz3`>using 'catch' pre-unwind-handler doesn't do what i want either
<amz3`>it seems, putting a (backtrace) inside it, prints the stacktrace at the moment the error is catched which is not what I want
<Apteryx>amz3`: Read some stackoverflow page, apparently they are synonyms; backtrace word came from the Linux tool of the same name.
<Apteryx>amz3`: What would you want instead of "at the time the error is catched" ? Isn't that the desired behavior when handling exceptions?
<amz3`>tx
<amz3`>Apteryx: no, I need the callstack at the moment the exception is thrown
<amz3`>the callstack of the catch'ing site is known
<amz3`>imo
<Apteryx>Looks like (backtrace) lears its stack from where it's defined. Which means it's useless for what you want to do.
<Apteryx>*learns
<Apteryx>amz3`: Looks like section ".13.8.3 Throw Handlers" has something you'd want to use.
<amz3`>I already tried that
<Apteryx>Right, that was the link above. Hmm.
<amz3`>Apteryx: what are you working on?
<Apteryx>Some small fix for our compress-documentation phase
<Apteryx>(in gnu-build-system.scm)
<Apteryx>We were breaking symlinks when there was more than 1 level (e.g.: a -> b -> c). We'd retarget a -> b.gz, but since b was a symlink too and uncompressed, the symlink would be broken.
<Apteryx>Not very interesting I guess :P
<Apteryx>amz3`: Are you working on something yourself?
<amz3`>Apteryx: I am fiddling with a toy text editor
<apteryx[m]>OK! :)
<MaliRemorker>what's the state of guile-emacs?
<MaliRemorker>seems to not have been update for more than a year
<MaliRemorker>did i just answer my own question?
<MaliRemorker>:)
<wingo>waiting for a champion, i think :)
<MaliRemorker>wingo: it looked so promising
<wingo>still is :)
<amz3`>\\o/ I finished porting my editor to ijp's fingertrees
<amz3`>time to do add more features... like... merging lines when deleting newlines...
<amz3`>as of right now, it's less than 300sloc.
<amz3`>without counting unittests
<spk121>Good (UTC-7) morning, all.
<amz3`>:)
<amz3`>and now you can open a custom file and save it!
<amz3`> https://github.com/amirouche/azul.scm
<manumanumanu>hehey! Do I read correctly if guile head does not support mutating the literal list?
***nikita2 is now known as nikita
<manumanumanu>if I am: great! Mutating a literal list is a great way to make sure your program runs differently across different schemes
***nikita is now known as Guest21116
***Guest21116 is now known as nikita1
<nikita1>Hello all, who does know personally people mantaining guile-dbi library?
<amz3`>wiredtiger ftw!
<amz3`>ACTION hides
<daviid>hello guilers!
<catonano>I'm reading this https://mitpress.mit.edu/sites/default/files/titles/content/sicm/book-Z-H-11.html#%_sec_1.4
<catonano>and there's this L-free-particle procedure
<catonano>guile says: "source expression failed to match any pattern in form (define ((L-free-particle mass) local) (+ mass local))
<catonano>"
<catonano>maybe that orm is valid in MIT-scheme ? I know thhat Sussman used MIT-scheme
<random-nick>catonano: I think that's a curried definition, so you'll need to import a module for that: https://www.gnu.org/software/guile/manual/html_node/Curried-Definitions.html#Curried-Definitions
<catonano>random-nick: Ah ! Thanks !
<amz3`>you can also do it with define* i think
<catonano>amz3` yes and also with define-public
<amz3`>you can also do it with define* i think
<amz3`>sorry typo
<catonano>I read that scmutils has been ported to guile. Is it current or some bitrot has occurred ?
***ertesx is now known as ertes
<amz3`>davexunit: can your syntax highligher support rainbow delimiters highlighting?