IRC channel logs

2014-06-18.log

back to list of logs

<nalaginrut>morning guilers~
<lloda>where does and=> come from? shouldn't it handle > 1 args like and does?
<nalaginrut>lloda: well, it's unrelated to > it's a product like symbol =>, (and=> x func) means (if x (func x))
<nalaginrut>(if x (func x) #f)
<lloda>i meant, is there some standard to respect or something? I kinda expected (and=> a b c proc) to work too
<lloda>something else, I have a string and a list of separators, is there a function to tokenize? I tried string-split but that throws away the separators, (string-split "hello.x+(bye)" (string->char-set ".+()")) -> '("hello" "x" "" "bye" "") and I'd like -> '("hello" "." "x" "+" "(" "bye" ")")
<nalaginrut>seems you need pipe-line
<nalaginrut>hmm...let me see
*nalaginrut is trying to solve this with compose
<lloda>thanks. but don't bother if it isn't very simple, I can always do a loop...
<nalaginrut>I think it could be a generic method, so it's cool to find it ou
<nalaginrut>out
<lloda>yeah...
<nalaginrut>anyway, it's easy to use fold I think
<nalaginrut>lloda: alright, I think I made a new high-order-function for that, seems useful as a generic way ;-)
*nalaginrut has the ability to make simple things complicated
<nalaginrut>lloda: https://gist.github.com/NalaGinrut/4ddc9839683bd4c9aff4
*nalaginrut has a new post idea for blog now~
<nalaginrut>hmm...shouldn't be parser, it's lexer...
<lloda>lexer, yes
<lloda>I was reading intros to parsing and they all say ---your input is already tokenized, then... :p
<lloda>but thanks a lot
<lloda>(parser "hello(,99)abc" "(),") -> ERROR: In procedure string: Wrong type (expecting character): #<eof>
<lloda>am i calling it wrong?
<nalaginrut>hmm...seems a bug?
<nalaginrut>well, I should check EOF in lexer function
<nalaginrut>anyway, the k function is generic high order function, and the pred checks exit condition
<nalaginrut>ah, I see, it's a bug in tokenizer
<nalaginrut>lloda: fixed https://gist.github.com/NalaGinrut/4ddc9839683bd4c9aff4
<nalaginrut>anyway, it's users duty to check in the customized r function
<lloda>thanks, this seems useful enough to go in a library
<nalaginrut>I'll post to blog for detailed discuss, and consider what cases can be solved with this high order function
<nalaginrut>I don't know if there's a one before
***brendyyn is now known as brendyn
<lloda>there's also string-tokenize, but it does (string-tokenize "hello(abc+xyz*a)" char-set:letter+digit) -> '("hello" "abc" "xyz" "a")...
<lloda>what do people use to tokenize?
<jmd>What is the license of guile?
<lloda>LGPL v3
<dsmith-work>Morning Greetings, Guileers
<dsmith-work>!uptime
<sneek> 13:40:16 up 19 days, 11:09, 0 users, load average: 0.01, 0.03, 0.05
<civodul>congrats, sneek :-)
<janneke>how do i get guile to enter the debugger upon error?
<davexunit>janneke: call-with-error-handling
<davexunit>in the (system repl error-handling) module
***wleslie is now known as w5e
<janneke>davexunit: thanks, i remember something like (debug 'debugger)
***w5e is now known as v3e
***v3e is now known as wleslie