IRC channel logs
2017-04-26.log
back to list of logs
<joe42>Hello all. I want to learn to program. And I would really like to begin with guile. Aside from the resources on the website, where might one learn programming techniques? <Deuk_Neukem>In particular prctl on whatever libc you link to your linux <Deuk_Neukem>davexunit, yeah I found that, it's not very understandable, it uses terms like "dobj" but doesn't tell me where it's explained what that i <davexunit>you can call (dynamic-link) to get the dynamic library object for libc <Deuk_Neukem>So how do I pass it C ints and constants from the libc? <Deuk_Neukem>I mean I just need to do prctl(PR_SET_CHILD_SUBREAPER, 1, 0, 0) really <davexunit>what you are calling a constant isn't a constant <davexunit>so you'll need to find the value of PR_SET_CHILD_SUBREAPER and pass the function that value from guile <davexunit>(pointer->procedure int (dynamic-func "prctl" (dynamic-link)) (list int int int int)) <brendyn>davexunit: someone said Hi to you in another channel 'from SICP' <brendyn>davexunit: I'm interested in playing around with your guile-sly or chickadee. guile-sly doesn't compile on Guix anymore. I'm not sure what the difference between the two are <davexunit>chickadee is what I'm putting efforts into now, so I'd recommend that one. need to make another release of it. <brendyn>I'd like to make a Game of Life clone in it. Is it suitable for that? <brendyn>Ok, this should be great for me to learn Scheme <davexunit>it's early days still, so maybe not all of the graphical primitives that you would want will be there <brendyn>Cool. I'm just figuring out how to load chickadee into my repl in emacs <davexunit>I just pushed a commit that fixes a pretty terrible bug in the game loop <davexunit>brendyn: you won't want to do everything from the repl directly because you need to start a game loop and that loop doesn't terminate <davexunit>so you'd just be sitting there twiddling your thumbs <brendyn>btw the https link to your git repo doesn't work, but the git:// one does <brendyn>build failure... ERROR: In procedure stat: Wrong type argument in position 1 (expecting open file port): #f <Petit_Dejeuner>Anyone here managed to compile Chickadee-0.2.0? I've got guile-sdl2-0.2.0 installed, but I still get the following errors when running make on chickadee. https://pastebin.com/raw/AWZNyC7X . It seems like sdl2 compiled incorrectly, but I didn't get any complaints from it. <brendyn>Petit_Dejeuner: I failed too but with different errors :P <Petit_Dejeuner>brendyn: I've been keeping track of all the stuff I had to do to get it working. I'll link you a copy. <brendyn>Petit_Dejeuner: I'm using the Guix definition from the git repo <brendyn>Yeah but the Guix definition davexunit provided seems incomplet. I'm not sure yet. <paroneayea>oops, I tried to set a breakpoint at the repl but it broke the breakpoint <Petit_Dejeuner>btw, maybe not the best place to ask, but how well does guix work on non guix based systems? <paroneayea>Petit_Dejeuner: you can run guix on any gnu/linux distro <lfam>Hi! I'm another person here to report that Guix works great on non-GuixSD GNU/Linux distros. I use it on Debian and NixOS, and it's very nice <lfam>Petit_Dejeuner: Please feel free to ask for help and share feedback on #guix or the mailing list <help-guix@gnu.org> <rlb>I'll try an upstream 2.0.14 build there next. <brendyn>Petit_Dejeuner: I just scrapped the guix definition. If I go `guix environment -f guix.scm' then `./bootstrap; ./configure; make' then it compiles <brendyn>But then I wonder how to actually load it... <rlb>2.0.14 fails in the same way. <rlb>I'll test C sqrt() on jessie and sid. Just saw something suggesting that might be relevant. <paroneayea>it avoids the dot notation alist mushing together with lists as value problem <rlb>i.e. powerpc libc sqrt() version that was broken. <rlb>OK, very likely - I tested against the libc version uploaded at the end of that report, and the test passed. <Petit_Dejeuner>brendyn: I got guix working a little while ago. Now I'm just reading the documentation. <CharlieBrown>I wish I could find my flash drives... :-( Can I use a microSD card instead? It's in an SD adapter. <brendyn>I've been struggling with chickadee. It compiles when I run ./configure; make manually, but I get all sorts of problems when I try to compile it with Guix <Petit_Dejeuner>brendyn: I was getting something weird about guile-2.2 being unbound in the guix.scm file, I thought it was because guile-2.2, so I tried changing it to just guile, but guile itself is unbound. <Petit_Dejeuner>Which is weird because it's bound for guile-sdl2's block of the guix.scm file. <brendyn>Petit_Dejeuner: Are you using chickadee from git? <brendyn>git clone git://dthompson.us/chickadee.git <Petit_Dejeuner>yes, the release version I had downloaded didn't seem to have a guix.scm, so I ended up using the git version <brendyn>Then the other thing to consider is your version of Guix being older <brendyn>Guix only recently started switching to guile-2.0, so we're in rough waters atm. <Petit_Dejeuner>Well hopefully after this is stable there will never be a major guile update ever again. <Petit_Dejeuner>Anyway, I'll let you know what happens after I try updating guix. <Petit_Dejeuner>That made guix work a lot better, but now I'm struggling to load the environment. <davexunit>paroneayea: I wrote to the list but mark and I avoided this direction because vectors are very inconvenient. <brendyn>'note: build failure may have been caused by lack of free disk space' <brendyn>Guile gave me an error message I can understand. It must have become sentient. <davexunit>paroneayea: it's a bit of tough call, Racket clearly gets away with doing this just fine, but it just doesn't feel 100% right. <paroneayea>ACTION imagines a day where Guile has something along the lines of Clojure's immutable hashmaps and immutable vectors by default exposed in the reader/writer... would result in a lot nicer quasiquotable stuff <davexunit>unquote-splicing only works with lists, which is one of the big things. <paroneayea>esp since it is true that #nil does cause problems in guile scheme <paroneayea>if that change would be made, now's the time to do itt <davexunit>I'm unsure what the proposed change is here. <paroneayea>davexunit: I think I use #nil because (ice-9 json) did <paroneayea>so the suggestion is to use the keyword #:null instead <manumanumanu>So, I just found he -L command line flag. Is there any convenience function or repl command that lets me import a module from a file without using guile -L . or manually adding to the load path? <manumanumanu>I am getting an unhelpful error: unknown location: syntax: bad `syntax' form in form syntax <manumanumanu>it is an r6rs library form. Any idea what I should look for? <manumanumanu>ice-9/boot-9.scm:230:17: In procedure map1: [newline] ice-9/boot-9.scm:230:17: Syntax error: [newline] unknown location: syntax: bad `syntax' form in form syntax <daviid>manumanumanu: it is most probably a syntax error in your own code <daviid>manumanumanu: so, no one here can help you until you post the code somewhere :) <daviid>paroneayea: i grabbed guile-sjson, then configure: error: could not locate guile aclocal macros <paroneayea>daviid: I guess I should have that pre-run and etc in the tarball <daviid>paroneayea: yes. so, this is a 'typical' aclocal problem, which I avoid by adding guile.m4 to all my project, and i advise others to do so, because, users might even not have guile installed ... <daviid>to your configure.ac, then mkdir m4, copy guile.m4 from the guile src tree, and of course it pass now ... à bon entendeur salut! :):) <daviid>manumanumanu: i can load the code from your last paste, no error here <daviid>of course i can't from the first, it depends on other module libs ... <daviid>paroneayea: why sjson by the way, I trioed to figure out from emails the readme, but i still fail to undrstand whhat is diff from json and (ice-9 json) ? <daviid>paroneayea: sorry to bother you with what may appear ridiculous quizz :), not very familiar with json and never used (ice-9 json) either, yet ... <daviid>paroneayea: and :), if it can't make it to (ice-9 json), may be we can(should?) make a guile-lib module? <paroneayea>daviid: does it matter where I add it in configure.ac? <paroneayea>daviid: anyway, added, thanks! The next release will do better <paroneayea>daviid: and the main benefits of it is a) immutable structures (either through lists or fashes) b) quasiquotable json generation <paroneayea>why not in (ice-9 json)? it maybe should still go in there <daviid>paroneayea: this is great, but why not patching (ice-9 json) then? <paroneayea>daviid: mainly because I needed it for several projects and kept copying it into them <paroneayea>the main challenge might be that I also support fashes now <paroneayea>and that would mean getting fash up into guile proper <paroneayea>daviid: I'll work on getting it upstream into guile proper in a few weeks <daviid>paroneayea: ok, i don't know that fash will be part of ice-9 'tomorrow' though <daviid>paroneayea: maybe we should make fash and sjson part of guile-lib, that can be done now and release pressure on ice-9 ... <paroneayea>I dunno, what's the benefit of it being a separate package, since that's already been done? <daviid>paroneayea: imo, sjson is a very good candidate for guile-lib, unless it makes it to ice-9, which is unlikely because of fash ... these 2, fash (fectors...) and sjson would be much better part of guile-lib, which, imo, exactly for these very generic functionalities, that could well be in guile core, but not yet ... guile-lib is the right place, but hey, just my idea, to centralise good lib modules in guile-lib rayhter trhan everyone of <daviid>us sprerading on gitlab, hub, ... and users having to grab (and know it exists, where...) <daviid>paroneayea: I hope I'm not annoying you! I'd love to have ytou, davexunit, janneke 'on board' guile-lib, the board of reviewers with veto right :), and help me to blow a fresh wind on guile-lib, so user gets confident about guile-lib again (they think it has been abandonned...), redesign its web pages ... add plist as well, goops extensions ... <paroneayea>daviid: I support more work on guile-lib, and the goops stuff is probably a good fit there <paroneayea>the sjson stuff seems like more time / effort mostly just because it's already been done as a separate package, and may be pushed to go up to guile anyway <paroneayea>so at the very least, we should see how probable it is to go in guile proper still first <daviid>paroneayea: yes, lets see how probable it is to go in guile proper still first, if not, I still think it better be in guile-lib, it is easy for me to add it to guile-lib and release... of course you could become a guile-lib commiter and do it too, but till you're up and running, I can do it...