<koz_>Is there a reason why SRFI-1 is so much more comprehensive in terms of what it provides than SRFI-43? <jyc>koz_: if you have a procedure to generate the cartesian product, you could just iterate to get [24]^16 :P <slwebber>trouble is, I'm getting an unbound variable message when using geiser to evaluate <paroneayea>slwebber: both the code and the error would help <slwebber>;;; <stdin>:37:0: warning: possibly unbound variable `insertR_' <slwebber><unnamed port>:37:0: In procedure #<procedure 2f92ba0 at <current input>:37:0 ()>: <slwebber><unnamed port>:37:0: In procedure module-lookup: Unbound variable: insertR_ <paroneayea>slwebber: btw, one clear error to me is that on your cond check for (null? l) <paroneayea>because you're not evaluating it, just returning it <slwebber>must be a difference in notation in the little schemer <paroneayea>slwebber: little schemer has the same notation here <paroneayea>you can see that the rmember?_bad you did it the right way <slwebber>that was my implementation, that latter was the little schemers <paroneayea>remember that ' is a reader macro for (quote ...) <paroneayea>slwebber: btw, some useful commands to know while working with geiser: <paroneayea> - C-x C-e <at the end of an expression>: evaluates it <paroneayea> - C-M-x: evaluates the whole expression, even if in the middle <paroneayea> - C-c C-z: switches you to a REPL, for quick testing of things <paroneayea>slwebber: those are the commands I use most often, in case that's helpful <slwebber>or, when would it be useful in comparison? <paroneayea>slwebber: oh, C-c C-a is similar, but it switches "into" the module <paroneayea>which will have no difference for what you're doing <paroneayea>slwebber: but imagine you were writing a bunch of modules, in a program with a lot of little libraries in it <paroneayea>slwebber: C-c C-a will switch you into the module itself, so you can play with even the un-exported variable <paroneayea>slwebber: but it's not really of concern when you aren't writing any modules to be experted, so those commands are effectively the same for what you're doing <slwebber>haven't grokked the distinction, though I assume it has to do with visibility <paroneayea>slwebber: hence why your prompt says (tuile-user) <paroneayea>slwebber: I can show you the distinction in person if that's helpful.. if you start hacking guix or writing a library for others to use, it'll be more useful to know the difference then <paroneayea>in the meanwhile, they do the same thing for now. <paroneayea>slwebber: that (quote ()) thing is definitely confusing though; little schemer takes shortcuts based on type to distinguish between variables and quoted variables <paroneayea>slwebber: ,trace (firsts '((a b c) (d e f) (g h i))) <slwebber>paroneayea, I'm getting used to the paren alignment conventions <paroneayea>davexunit: I'm working my way through 3.3.4 of SICP now, the circuit simulator <paroneayea>I'm getting closer to understanding Sly's SICP basis and concepts :) <koz_>Is there a version of list-index that gets me the index of the *last* element satisfying pred? <koz_>If not, what's the easiest way of doing this short of hand-rolling? <koz_>davexunit: For the index? <koz_>OK, I need to think a bit. <davexunit>rather than folding, I'd probably use a named let and iterate <koz_>davexunit: I think I figured it out. Thanks for directing me to fold! <davexunit>ransom_: no, I mean the picture language that is define in SICP chapter 2 <ransom_>ooo... i like the formatting on this version <koz_>Well, it's time to see how Guile handles combinatorial explosion. <koz_>As well as how well my OS handles having to constantly swap. :P <koz_>How bad is it if the REPL spits this at me? Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS <koz_>OK, and my REPL is dead. <koz_>How do I make Guile print (i.e. not using display and co) a number as a float instead of a fraction (i.e I want it to display 0.5 instead of 1/2)? <koz_>nalaginrut: I don't quite understand what you mean. <lloda>koz_: did you see the pointer to Knuth re: combinations? you'd use a vector not a list for those algorithms. It should be pretty fast <lloda>I did it in C and it takes no time for 8 out of 24, at least <lloda>scheme@(guile-user)> ,time (combination-matrix 24 8) <lloda>;; 0.033257s real time, 0.045691s run time. 0.016172s spent in GC. <koz_>lloda: It's OK - my main problem was that I was trying to hold the entire problem space in memory. <koz_>Once I switched to a generate-on-demand approach, it didn't matter. <wirrbel>how can I switch to a language that is not in guile's module set? <wirrbel>ah probably by importing that module first <wirrbel>so I have the language definition imported and can inspect its value <wirrbel>neither does (compile '(+ 1 2) #:from 'mylang .... <ArneBab_>you need the language spec in the path (so that guile can import (language yourlang spec) <ArneBab_>wirrbel: for wisp I use guile -L path/to/toplevel/dir <ArneBab_>wirrbel: you’ll have to ensure that the spec.scm is parsed before switching to the lang — after switching to it, Guile cannot read scm files till you switch back, but it can read the .go files <ArneBab_>I’m wondering whether giving a talk about wisp would be useful for FOSDEM. <davexunit>pointed out by mthl in a bug report for haunt. <davexunit>current-date is not handling daylight savings time correctly <davexunit>srfi-19 has a nasty hack to handle it correctly in string->date <davexunit>so haunt's test suite fails if you live in a place with daylight savings time <davexunit>for testing purposes, I think we could use some sort of 'call-with-timezone' procedure. <davexunit>yeah, (date-zone-offset (current-date)) yields a different value than (date-zone-offset (string->date "...")) <paroneayea>mark_weaver: oh, I guess I haven't noticed it as much <mark_weaver>if you search for ' \\*' in module/.../*.scm, you'll find many examples <cmhobbs>would guile be useful for tasks that i'd normally use bash for? sometimes i use ruby for system scripting <cmhobbs>could you point me to some examples or some useful modules? <amz3>cmhobbs: you can easily break your system using guile too :p <cmhobbs>amz3: i'm good at that with or without guile <paroneayea>whew! finished entering all the code from the circuit simulator of SICP <cmhobbs>sicp is a great book. i should finish it sometime <davexunit>paroneayea: now you basically know how Sly works <paroneayea>davexunit: did you take that and fold in the functional aspects on your own, or is that worked in later on in section 3? <davexunit>I took the propagator system described a bit later <davexunit>and sort of crippled it, if you will, by turning into a DAG rather than a graph that allows cycles. <davexunit>Sly at it's heart is SICP chapters 2 + 3 glued together. :) <paroneayea>my SICP workflow is, start reading a chapter, get enough of it in my mind that I have a sense of it, watch the accompanying video lecture, then enter the code and occaaaaaasionally try some of the exercises ;) <paroneayea>many of those exercises are too hard for me initially and i have to come back to them later when it's sunk in more <cmhobbs>just asked to use guile on a smallish project at work... waiting on my team lead to respond is agonizing <paroneayea>mark_weaver: yeah I agree that it doesn't really sink in often until you do the exercises <paroneayea>mark_weaver: I've found I finish more of the exercises of the previous chapter once I'm on the next one :) <paroneayea>mark_weaver: because I keep the texinfo version of SICP open in emacs, and wehn I'm seeking a distraction <mark_weaver>paroneayea: sure, as long as they get done eventually, that's the important thing :) <wingo>paroneayea: i think in CL they mark variables that are not just global but also "special" <wingo>ACTION landed f64 unboxing in master <wingo>will be interested to hear of successful compilation reports on 32-bit systems <mark_weaver>ah, I happen to be running on i686 right now, so I can try. <paroneayea>mark_weaver: wingo: it seems more conventional to use %foo in guile-land for those <taylan>.oO( dynamic scoping is indeed a bit "special" :P ) <wingo>paroneayea: there are many conventions, some conflict :) <wingo>for example in older guile code, a % prefix indicates something that's internal in some way <taylan>isn't that convention still used? in my code I'll frequently name e.g. a "low-level" record constructor %make-foo so I can call the "proper" one make-foo. <mark_weaver>taylan: yes, I think so. I was agreeing with what wingo wrote after the "," <davexunit>in guix, % is also used to denote certain module global variables as opposed to procedures. <mark_weaver>the great thing about conventions is that there are so many to choose from <taylan>although it doesn't seem popular, I really like naming syntax rules pattern variables <foo>. (IME, rarely conflicts with record types, and doesn't confuse even then because the purposes are so different.) <mark_weaver>it's a fine convention, although personally I don't feel the need to mark the pattern variables in any way at all. <mark_weaver>feels like "sigils" to me, which I'm not fond of in general. ***heroux_ is now known as heroux
<jeffrin>mark_weaver : can guile be used for data analysis ? <mark_weaver>it's a general purpose programming language, so I don't see why not. but I don't know enough about data analysis in practice to know how well suited it is. maybe your question is too broad. <jeffrin>mark_weaver : is there any certificate course for guile ? <davexunit>let's start the "Guile Wizard Certification Program" <jeffrin>anyway god knows what i should learn <mark_weaver>one way to learn guile is simply to try to use it to write whatever programs you want to write, and ask here for help and advice as you go. <mark_weaver>if you're new to scheme, the "Little Schemer" and "Seasoned Schemer" books are good. <mark_weaver>if you are comfortable with calculus-level mathematics, and want to go deeper, I can heartily recommend SICP (Structure and Interpretation of Computer Programs), which was the introductory textbook for software engineering at MIT for a few decades. <mark_weaver>(the entire book and video lectures are available online) <mark_weaver>as for the chest pain, I can't help with that. I would consider seeking consultation from a health care professional if you have the means. <mark_weaver>but this channel is the wrong forum for discussing health issues, obviously. <jeffrin>mark_weaver : what are the benefits that a person gets after learning (guile,SICP) related <jeffrin>mark_weaver : are the problems related in the book easy <mark_weaver>SICP fundamentally changed the way I write programs. it introduced me to radically different approaches to programming. scheme is an exceptionally flexible language, supporting many different programming paradigms, including ones that haven't yet been invented. <mark_weaver>not as sexy as the other new things, but it'll be good to reduce build time to something more reasonable :) <paroneayea>mark_weaver: I'd also say, SICP is not a blocker even if you're very rusty on your calculus <paroneayea>I'd studied enough calculus for what's covered but I had been very rusty on it <paroneayea>going through SICP helped encourage re-oiling that machinery :) <mark_weaver>paroneayea: yeah, I guess so. math has always come easily to me, so I don't really know what it would be like to work through SICP if I were weak at math, but I've heard that non-engineering types have trouble with SICP. <paroneayea>I have trouble with reading symbolic math expressions <paroneayea>though I don't have trouble with the actual concepts <paroneayea>I really struggle deeply with reading the notation <paroneayea>and it takes me a long time to make it through things even if I know the concepts because of it <paroneayea>so I don't really consider myself a math'y person <paroneayea>mark_weaver: I was very slow but got the concepts and enjoyed it... I think it took me about 3 times as long as anyone else to work through examples. However, due to reasons unrelated to the actual class, I dropped out partway through, and I've been kicking myself for that ever since <paroneayea>the unrealated reason was they were closing my small college's campus, which I had been fighting really hard in a movement to keep open <paroneayea>and after we failed I fell into a deep depression <mark_weaver>how long it takes to do the work doesn't really matter, as long as you understand the concepts. <paroneayea>so I've had an incomplete set of calculus knowledge <mark_weaver>of course, calculus is not fundamental to the things that SICP teaches. it's really just that many of the examples and explanations assume that the student has knowledge of calculus. <mark_weaver>paroneayea: well, if you ever want to finish up your calculus, MIT has online courseware for it. <mark_weaver>paroneayea: if you run into difficulties, feel free to ask me questions <m0li>jeffrin, But if you're not computer/computist and want to start, HTDP is a good choice, then complement it with guile manual. <mark_weaver>HTDP also teaches Racket, which has diverged from Scheme. <m0li>jeffrin, haaa ok xD no problem, mark_weaver have the reason <mark_weaver>paroneayea: the MIT online courseware that jeffrin looks like a good start to me! <jeffrin>m0li : may be i should start with htdp <mark_weaver>okay, you'll end up using Racket then, and maybe get stuck there.. <mark_weaver>because HTDP teaches a bunch of Racket-specific constructs. <mark_weaver>whereas SICP teaches standard Scheme, suitable for any scheme implementation. <mark_weaver>and SICP actually teaches many different programming paradigms, which is why Scheme is so great. HTDP doesn't do that. <m0li>mark_weaver, what he says is true, I use it because I am a beginner, but I read in parallel SICP <mark_weaver>personally, I don't think there's much of interest in HTDP for someone who already knows how to write programs. <m0li>It can be used as a guide, but the essentials are in SICP. <mark_weaver>HTDP's strength is helping people who don't even know the basics of how to get started writing a program, like children. <jeffrin>i have not written typical large programs <mark_weaver>(or adults who never learned how to write a program) <wingo>mark_weaver: it's an attempt :) would be nice to avoid expanding the optimization phases during bootstrap <wingo>but for some reason i didn't manage to get that to work, should try again <jeffrin>mark_weaver : i may come back here for support <wingo>still, if you are building .go files already with a 32-bit system that's good <mark_weaver>wingo: so far, I've built eval.go, psyntax-pp.go, and intmap.go in bootstrap. working on intset.go now <wingo>dunno if you will be able to compare performance to a previous build <wingo>the novel change of course is that all stack items are 64 bits wide <wingo>even if SCM values are still 32 bits <m0li>jeffrin, I support what mark_weaver says. He is right. <mark_weaver>no, it's been a while since I used this X60, and I didn't save the old build times anyway. <mark_weaver>(the power management circuitry in my X200 is busted) <mark_weaver>(it refuses to charge the battery, and when I disconnect power the machine just turns off about half the time) <wingo>ACTION afk for a while. happy hacking :) <mark_weaver>because this machine tends to overheat when I use both cores <jeffrin>mark_weaver : please help me even if i start with htdp and then may be move on to sicp <mark_weaver>jeffrin: HTDP teaches a language I'm not familiar with. I don't have time to learn Racket and support you on Racket, sorry. <jeffrin>mark_weaver : anyway may be i can ask questions about things other than racket <dsmith-work>mark_weaver: Speaking of hardware, I just bought one of those VoCore things. <jao>dsmith-work, what for? <jao>now you have a project: embed guile in there! <dsmith-work>Flash is 8M or 16M, RAM is 32M (from memory, will confirm) <paroneayea>submitted my Guix + deployment talk for now, I'll withdraw if we don't make it <mark_weaver>wingo: fyi, I successfully built master on i686, and it seems to work. running "make check" now. so far, so good. <wirrbel>when I want to implement a language using `define-language` do I have to do this in (system base language)? <paroneayea>though I can't figure out how some of these are resolved ***dje is now known as xdje