IRC channel logs


back to list of logs

<w0ll3q1uszxabiwo>How the hug do i contribute an example code to the guile docs ` Fold, Unfold & Map` so that i can avoid screaming at monitor for it to be hot garbage next time?
<w0ll3q1uszxabiwo>i want to add example inspired by racket to the thing to make it more understandable
<w0ll3q1uszxabiwo>instead of:
<w0ll3q1uszxabiwo>Scheme procedure: map
<w0ll3q1uszxabiwo>Map the procedure over the lists
<drakonis>but map is explained earlier in the documentation?
<drakonis>anyways, anything interesting happening lately in guile land?
<ArneBab>manumanumanu: can you give me the subject-line of your patches? I???m currently swamped with email
<dsmith-work>Thursday Greetings, Guilers
<sneek>cow_2001, you have 1 message!
<sneek>cow_2001, old says: where they are in their reading of the Guile's manual
<cow_2001>do i read scip?
<cow_2001>oh, someone said something
<cow_2001>i've gotten stuck at the API. i'm not much of a C programmer, so the API chapter is... ah...
<cow_2001>so i learned a bit of SQL meanwhile
<cow_2001>on some ibm coursera course
<old>you can skip the part that talks about C in the API if you're only interested in pure Scheme
<haugh>that's pretty much what I'm doing
<haugh>although I'm trying to keep an open mind about it because it seems like a feature set that could one day be life-changing
<cow_2001>i also want to learn C, but maybe i shouldn't learn it by reading Guile C API <_<
<old>cow_2001: Start with the classic:
<old>Then hack your way by looking at small code base that are not too archaic or make a small project
<old>From what I remember, to learn C I've read the entire GNU Bison manual and implement a JSON parser in C with it
<old>Quite a good exercice
<old>Btw if you read the classic from R&K, this is a very old C. Modern C is a bit different but you will get at least the base of it
<cow_2001>i am afraid of R&k. picking bad habits.
<old>There's other good C book I guess. I've never really look them up. I've heard good thing about this one:
<old>Probably avaible for free at your local library ;)
<cow_2001>there is also the recent RMS guide, but it has no exercises
<cow_2001>compiled here
<cow_2001>i haven't seen it officially compiled
<cow_2001>some of the exercises in K&R are ill defined :|
<cow_2001>there was an exercise where you need to find the maximal and minimal representable values of various types. these values are available in the headers, but they also give extra points for creative hacks which are probably platform and compiler dependant :|
<cow_2001>maybe i should talk C on #c
<old>I'm not sure if you will find a strong community around C on IRC
<old>Nothing to lose to try I guess
<cow_2001>they are pretty strong, from my grass leaf vantage point
<cow_2001>do you find yourself learning better when you learn one thing for a period of days or a few topics per day?
<old>I learn better by reading a lot then applying my reading
<dalepsmith>K&R is great. Most everyone learned C from that. Back in the day, I used to read a lot of usenet posts.
<old>I often read almost the entire book then I implement something with my learning
<dalepsmith>Some code was crystal clear, others horrible.
<old>Ofc, re-reading chapter for clarity is often done also
<old>But that's just how I learn. Everybody is different
<cow_2001>but do you slice up your day learning for an hour topic A then an hour of topic B, etc or do you dedicate a week for topic A then a week for topic B etc?
<dalepsmith>Yah, you have to "do the exercises". Need to solve a real-world problem. Make your head work at it.
<cow_2001>or something like that
<cow_2001>the question is the frequency of topic switching, i guess
<old>Well if by topic you mean switching between Computer Science and Biology for example
<old>I do that yes
<cow_2001>i want to learn C, Guile, and data science in this coursera course
<old>Often at a variable frequency of 1-2 weeks
<dalepsmith>For me, a first reading of anything is only partial. After a while I go back and I see things I missed earlier.
<cow_2001>so you dedicate yourself for 1 or 2 weeks for a topic
<old>Around that yes. It really depend on my schedule to be honest
<old>Right now I'm writting my master thesis, so most of my lecture are off for a bit
<cow_2001>dalepsmith: you skim things through?
<old>But typically, I've passed through the entire for 2 weeks then I switch to micro-biology and fermentation for few week
<cow_2001>i try not to miss anything and understand everything and it makes reading way too slow. need to let go.
<old>cow_2001: Skkim through is also a good thing
<dalepsmith>More like I don't pick everything up on the first pass.
<old>Read fast, learn fast. Then go back to re-reading when needed for more clarity
<old>Typically why I have the book in paper, so I can re-read whenever I want anywehre (subway, bus, etc.)
<old>cow_2001: Btw you were talking about SQL earlier. If you want to have a solid base in relational database I recommend this:
<old>It's the text book that I had at the university. I would not read everything since it's 1200 pages, but it's a solid reference manual
<cow_2001>old thank you
<cow_2001>dalepsmith: you are just a natural skimmer! ;p
<cow_2001>really, i have to fight the urge to be thorough.
<lilyp>they have tests whether you're a chad?
<old>lilyp: lol
<old>weird name for a database textbook PF I agree
<stis>hi guilers!
<old>sneek: tell stis welcome
<sneek>stis, old says: welcome
<old>Is there any Guile conference/talk for the community usually? Something like Guix day.
<pinoaffe>old: there have been some guile-related talks at fosdem, iirc
<yosik>Hi everyone! It looks like `guile -c "(list-ref '(1 2) -1)"` segfaults on 3.0.8.
<yosik>3.0.7 works fine for me
<old>pinoaffe: thanks
<dsmith-work>What does "work fine" mean in that context?
<yosik>error without segfault
<daviid>yosik: oesn't segfault here, it correctly reports an error, fwiw
<yosik>I use guile@3.0.8 from guix
<old>I also get segfault with 3.0.8 from guix
<daviid>old: try guile-next?
<daviid>in guix, i pretty sure (list-ref lst out-of-range-index) correctly raises an exception, since guile's inception
<old>guile-next is 3.0.7 so as yosik said, it's fine
<old>confirm I just get a Value out of range error
<old>yosik: Here's a backtrace of the segfault:
<dalepsmith>And I can confirm it throws and exception for
<dalepsmith>(actually v3.0.8-86-gf72cd7915)
<lilyp>Also got a segfault for (list-ref '() -1)
<lilyp>Possibly the negative integer is what makes this crazy ??? (list-ref '() 0) throws
<old>Here's the backtrace with GUILE_JIT_THRESHOLD=-1: 7
<old>euh sorry. this one:
<dalepsmith>exp@entry=(list-ref (quote (1 2)) 4611686018427387903))
<old>this is fixed on main branch
<old>Version 3.0.8 as: range_error (arg, 0, scm_integer_from_uint64 (UINT64_MAX)
<old>When it's supposed to be: range_error (arg, scm_integer_from_uint64(0), scm_integer_from_uint64 (UINT64_MAX));
<old>I think that solve it
<dalepsmith>Ahh. yes. NEVER expose a bare 0 (or NULL) as a SCM.
<old>Can't wait for 3.0.9 :)