IRC channel logs

2015-11-05.log

back to list of logs

<csed>amz3: Here's how PAIP does the power function. Well, less Common Lisp, obviously: http://paste.debian.net/322778/
***turbopape__ is now known as turbopape
<mike121>civodul: cool, thanks. I can delay the chore of learning how to write a finalizer to another year.
<civodul>SMOBs have finalizers too
<joolean>Hey Guilers! Just wanted to stop by and say that the new web site looks really, really great. And congrats on 2.1.1
<acebarry>Might I suggest weechat is added to https://gnu.org/software/guile/libraries/#apps ? It's a great (GPLv3) irc client that has support for guile scripting.
<acebarry>I apologize if this has been discussed before.
<paroneayea>acebarry: oh hey, neat suggestion
<acebarry>Also, the link in the footer that leads to the community section 404's. I just guessed the channel is here ;)
<paroneayea>hello davexunit !
<guile-guest4>Ragnarok, linked from the guile homepage, just goes to a blank Gitorious page. is there another library for webdev in guile?
<davexunit>hey paroneayea
<paroneayea>heya davexunit. I'm procrastinating on reading the last 5 difficult emails in my inbox by catching up on tech news :)
<davexunit>hehe
<davexunit>some choice comments about the new website:
<davexunit>"holy shit Guile's new webpage looks like it was designed after 1999"
<paroneayea>heh
<davexunit>"Holy fuck that's the best gnu site I've ever seen"
<paroneayea>most of the comments are super positive
<davexunit>"Guile wins the award for the most cute and friendly GNU website"
<paroneayea>the only negative ones I've seen are about mobile stuff
<davexunit>"The cute illustrations on the GNU guile page should encourage anyone to try some LISP."
<davexunit>yeah, that needs some fixin'
<davexunit>but who actually gets that totally right on the first go?
<paroneayea>:)
<davexunit>"A GNU project webpage that looks friend modern and not falsely hip. And a lisp at that."
<davexunit>I don't know if "friend modern" is a typo or what but either it was a nice compliment
***ft_ is now known as ft
<paroneayea>one other comment I saw was "Guix is Guile's killer feature"
<paroneayea>we seem to be doing a good job of increasing the ability of both
<davexunit>yes indeed
<davexunit>ACTION hacks on guile-syntax-highlight some more
<atgnag>Have you been able to install guile-reader?
<atgnag>When I try, I get this backtrace. http://pastie.org/10530855
<Xe>Does guile being under the AGPL mean any programs I make with or using it also need to be AGPL?
<wleslie>guile is LGPL
<OrangeShark>Xe, I am pretty sure Guile is GPL
<wleslie>LGPL 3+
<OrangeShark>the website is AGPL
<Xe>ah
<OrangeShark>ah right, LGPL
<Xe>what's the legal sthick with the LGPL?
<Xe>i can link it to GPL and non-gpl code?
<wirrbel>can someone point me at a good repository that exemplifies a module layout for a guile extension?
<taylan>Xe: you can link LGPL code and proprietary code, but you must make it possible for your users to link your proprietary components with their own version of the LGPL component, for instance by shipping .o files generated by the C compiler prior to linking
<civodul>Hello Guilers!
<remi`bd>Congratulations for the new release! The features list is extremely impressive.
<taylan>+1
<remi`bd>New virtual machine, new intermediate code, new object file format… it’s almost unbelievable to have such amount of enormeous changes in just one release
<civodul>remi`bd: it reflects work done over a lot of time, but yes, it's really crazy :-)
<amz3>héllo
<amz3>hiphiphip for guile!
<solrize>hey guile 2.1 looks good but when i try to build it on x86-64 debian 7, it complains that the installed version of bdw-gc is too old
<solrize>does it really need >= 7.2 ?
<amz3>dunno sorry
<solrize>np thanks
<solrize>also trying on a debian 8 armhf box
<amz3>doesn't the configure complain?
<amz3>gtg anyway
<solrize>yes that was the configure complaining
<solrize>gtg?
<taylan>solrize: a fairly recent BDW-GC is probably needed
<taylan>Got To Go
<solrize>taylan, hmm, ok, thanks. are the new versions really better? bdw has been around forever
<taylan>it seems to be under active development...
<taylan>solrize: BTW you can use Guix on top of Debian to easily get very new GNU packages :)
<solrize>interesting i might try that
<solrize>can i apt-get install guix?
<taylan>it's very easy to install on top of an existing distro with the drop-in binary tarballs
<taylan>don't think anyone made a .deb
<solrize>ic. well i'll look at the guix site
<taylan> http://www.gnu.org/software/guix/manual/html_node/Binary-Installation.html#Binary-Installation
<solrize>i've been afraid to mess too much with the config of my main computer but lately i'm messing with some small servers/vps so i coudl try on those
<solrize>well i thought the gnu spirit is to compile everything from source as much as possible...
<taylan>the changes this will make to your system are fairly small and self-contained
<taylan>you can also compile guix from source, this is just a bit quicker
<solrize>ftp://alpha.gnu.org/gnu/guix/guix-binary-0.8.2.armhf-linux.tar.xz that the current version?
<taylan>0.9.0 has *just* been released
<solrize>aha, ok, ftp://alpha.gnu.org/gnu/guix/guix-binary-0.9.0.armhf-linux.tar.xz
<solrize>thanks
<solrize>hmm looks like my armhf config finished
<solrize>is guix interesting? guile seems to be building ok on the arm now
<solrize>hash.c:115:3: warning: left shift count >= width of type
<solrize> JENKINS_LOOKUP3_HASHWORD2 (str, len, ret);
<solrize>similar for wide_string_hash
<taylan>I find guix very very interesting
<civodul>gratuitous plug: https://savannah.gnu.org/forum/forum.php?forum_id=8398 :-)
<solrize>civodul, thanks
<solrize>is lt-guile the guile compiler?
<solrize>it's eating cpu, nom nom
<taylan>"lt-guile" doesn't ring a bell for me. maybe Guile 2.1 names an executable so during compilation. if it eats a lot of CPU it's probably indeed the compiler.
<civodul>solrize: "lt-guile" is the name of the 'guile' executable before it's installed
<civodul>"lt" comes from "Libtool"
<solrize>hmm ok. i wonder what it's doing, it's used 6 cpu minutes
<solrize> BOOTSTRAP GUILEC ice-9/eval.go
<solrize>.go isn't golang i guess
<solrize>is there any chance this step could be parallelized ?
<taylan>the building of individual .go files can't be parallelized, but the whole build process can be parallelized by running e.g. 'make -j4', and then it will build multiple .go files in parallel
<ArneBab_>if you want to craft memorable, relevant-seeming lessons, introduce your locked doors before your keys: http://mkremins.github.io/blog/doors-headaches-intellectual-need/ — hopefully useful for the next Guile tutorial.
<ArneBab_>solrize: go: guile object (IIRC)
<solrize>ArneBab_, yeah that makes sense
<solrize>thanks
<solrize>taylan, i'm using make -j4, i guess this particular .go is very large
<solrize>or else something's broken... how long should it take? this box is about 1/8 the speed of a fast x86 per core
<solrize>and it's been 11 minutes
<taylan>solrize: it's normal that the first few .go files take very long to build
<solrize>hmm ok
<solrize>16 minutes now, i'll look in on it later i guess. probably should go to bed and check tomorrow...
<taylan>you would have probably been done installing it with guix by now ;)
<solrize>:)
<solrize>the gnu system should eventually include sources to everything and debug symbols in all the binaries, so you can always look at what any program is doing
<taylan>guix lets you fetch the source of a package, and to install debug info. (that's not really new per se, though guix offers a much higher confidence in source-binary correspondence.)
<taylan>(much higher than conventional package managers that is)
<solrize>so what's going on, this very long bootstrap process?
<taylan>solrize: it's bootstrapping the efficient compiler from a very primitive compiler, roughly, from what I understand
<solrize>oh interesting. i wonder whether it could compile the compiler with stalin or something
<taylan>if you're doing this on a slow machine, I'd leave it overnight indeed
<solrize>ic. ok that sounds like a plan
<taylan>stalin might just take literal months to compile something big like the Guile compiler :)
<solrize>omg i didn't realize it was that slow
<taylan>I've only heard horrors
<solrize>guile seems like a cool and powerful full featured scheme system, which is kind of at odds with being an extension language
<taylan>maybe I'm misinformed though, very few people seem to actually get it to work at all
<taylan>yeah, it's really not just an extension language anymore
<solrize>does it generate machine code ?
<lloda>being full featured AND an extension language is Guile's reason to be
<lloda>solrize: not yet, but it's in the plans I believe
<solrize>nice... i was looking at luajit recently and it's impressive
<wingo>if your box has 1/8 the speed of a fast x86 per core and you have around 4 cores your -j4 build is going to take around 6 or 7 hours, solrize
<solrize>oh great.. thanks
<wingo>the initial two files are not compiled in parallel for bootstrap reasons, then the rest are compiled in parallel
<solrize>i think it's 1/2 hour into the second one... the first was much faster
<wingo>the second will take around 7 times as long as the first, then the following ones get faster
<solrize>is it using some simple interpreter to self-compile the compiler?
<solrize>box is a scaleway.com 4-core arm7 server if that's of any interest
<solrize>ok gnite thanks all
<paroneayea>holy crap
<paroneayea> https://www.reddit.com/r/linux/comments/3rivdc/gnu_guile_gets_a_site_redesign_and_it_looks/ 513 points on reddit r/linux
<paroneayea>people really like the redesign.
<civodul>understandably so!
<civodul>i hope people also noticed the somewhat interesting release ;-)
<paroneayea>yeah
<paroneayea>a verrry interesting release
<paroneayea>not to mention the guix release!
<taylan>"I came here not knowing what this was and now I think it's cool" :D
<mbuf>the new guile site is excellent!
<paroneayea>mbuf: taylan: \\o/
<solrize>why are there BSD devils all over it?
<solrize>it does look nice
<paroneayea>solrize: I think they're more like gnu outfits
<paroneayea>vaguely that
<solrize>oh ok
<paroneayea>but kind of "where the wild things are"
<solrize>heh
<paroneayea>davexunit: I re-bumped across https://groups.csail.mit.edu/mac/users/gjs/6.945/psets/ps09/ps.txt
<paroneayea>which is a version of "how to implement propagators" by sussman which is pretty nice, and explains in terms of the actor model as well
<davexunit>paroneayea: nice find
<paroneayea>davexunit: here's one titled "regexp disaster" https://groups.csail.mit.edu/mac/users/gjs/6.945/psets/ps01/ps.txt
<paroneayea>already so promising! ;)
<davexunit>hahaah
<paroneayea>> Although regular-expression systems are derived from a perfectly good mathematical formalism, the particular choices made by implementers to expand the formalism into useful software systems are often disastrous: the quotation conventions adopted are highly irregular; the egregious misuse of parentheses, both for grouping and for backward reference, is a miracle to behold. In addition, attempts to increase the expressive power and
<paroneayea> address shortcomings of earlier designs have led to a proliferation of incompatible derivative languages.
<paroneayea>shit, I wish I could take https://groups.csail.mit.edu/mac/users/gjs/6.945/
<davexunit>loved the explanation for why regexps suck
<daviid`>me too!
<daviid`>hi guilers! good times, new release, new web site ... fantastic!!
<daviid`>some of the comments are really awsome!
<paroneayea>yeah
<paroneayea>great morning
<davexunit>"The moral of this story is that regular expressions are a beautiful example of how not to build a system."
<paroneayea>:)
<paroneayea>ACTION runs wget -r on the assignments page
<davexunit>btw, Sly being on the new guile home page got me 400 tracked page views
<davexunit>I don't think it really ought to be featured so prominently since there's nothing for people to actually use in an easy way, yet. and it's a library, not an application.
<daviid`>ACTION thinks we should leave sly there and not removing it
<davexunit>lilypond should be there or something, despite the whole 1.8 -> 2.0 fiasco.
<daviid`>yes
<daviid`>we should add, not removing sly
<davexunit>sly could be moved to the libraries page
<daviid`>add lilypond and Kisê [not that I wrote it, I don't mind really, but it is the only full app written using guile, guile-gnome anf guile-sqlite3]
<paroneayea>I also think Sly is pretty compelling, but I agree that it isn't something someone can pick up and use very easily right now
<daviid`>we should remove guile-gtk
<paroneayea>but
<paroneayea>Sly is one of the things that really drove me to explore Guile
<paroneayea>if Sly had a page that showed that video of davexunit doing live coding
<paroneayea>that would be compelling
<davexunit>I guess it means I just need to fix some bugs that I know exist and release as-os.
<daviid`>yeah, leave it tehre! davexunit release and get an exmple of a game ...
<paroneayea>davexunit: I absolutely think so
<davexunit>the limitation for sly's site right now is Pelican.
<davexunit>I need to move the blog to Haunt
<paroneayea>davexunit: maybe instead use that pressure to get that release out there instead :)
<daviid`>1+
<davexunit>in which I will make a little framework for all of my project pages so they have a uniform look
<davexunit>yeah, I'll try to just release something.
<paroneayea>shit
<paroneayea>this material is incredible
<paroneayea>ACTION reading through a bunch of the material from sussman's advanced symbolic computation class
<paroneayea>I wish I lived in an alternate universe where I was able to take this in person.
<paroneayea>I'm glad that in the present universe, the material is publicly available.
<amz3>davexunit: yeah let sly on the website, it's already useable, but a release would be very helpful. I don't it requires to be sync with the new website as long as there up to date doc
<davexunit>alright I'll release something when I get a chance. will prioritize that.
<davexunit>then I've really gotta get the haunt migration out the door.
<amz3>demo works so it's cool
<davexunit>brb switching machines
<amz3>I started to try to make minikanren work with tuple database
<amz3>I'm to the point where i need to use in a real app to make sure it works
<amz3>but so far I find it nice to make queries using minikanren
<amz3>it's encourging
<paroneayea>sirgazil!
<paroneayea>sirgazil: people love your design!
<sirgazil>Hi paroneayea :)
<paroneayea> https://www.reddit.com/r/linux/comments/3rivdc/gnu_guile_gets_a_site_redesign_and_it_looks/ 615 points on reddit and counting!
<paroneayea>and yesterday there were a bunch of positive comments on hacker news
<paroneayea> https://news.ycombinator.com/item?id=10509146 <- it was about the release, but you can see some compliments on the web site there
<paroneayea>anyway, horray!
<sirgazil>Yeah, thank you everyone for working on the project!
<sirgazil>New release!
<paroneayea>yeah!
<sirgazil>And Guix too
<paroneayea>and new guix release now too!
<paroneayea>yes
<paroneayea>!
<paroneayea>it's a great time to be a guiler :)
<sirgazil>I'll start fixing problems with the website today
<paroneayea>davexunit: btw, re: getting Sly out and stuff, at least container stuff finally landed
<davexunit>paroneayea: yes, that is nice!
<paroneayea>so that's one thing dequeued from the plate!
<davexunit>I've already found some new problems with it! :)
<paroneayea>hehe!
<sirgazil>Glad to see most comments about the website are positive :)
<davexunit>sirgazil: yeah people really like it overall!
<davexunit>we've avoided the "web 2.0 hipster" association for the most part
<paroneayea>> Traditionally, in cryptographic literature, the participants are named Alice and Bob, but in our class they are named Alyssa and Ben.
<paroneayea>davexunit: from the diffe-hellman example in that goldmine of material
<paroneayea>thought you'd like that
<davexunit>sirgazil: IIRC, the bootstrap responsive image CSS is very minimal and could help with the images going off screen on mobile: http://getbootstrap.com/css/#images-responsive
<davexunit>paroneayea: haha
<davexunit>I really enjoy Sussman's sense of humor.
<sirgazil>Thanks, davexunit, I'm collecting issues to fix now.
<civodul>howdy, sirgazil!
<civodul>and congrats! :-)
<sirgazil>Ça va, civodul :)
<sirgazil>Thanks
<davexunit>but most importantly don't let the nits about mobile make you think that you didn't do a completely stellar job with this.
<sirgazil>No problem, I'm a learner, I know I make mistakes. The good thing is they can be fixed.
<daviid`>davexunit: here is an updated version of the example script I cooked a few days ago: got rid of tipos, improved and cleaned it further ... http://paste.lisp.org/+3E6X/1
<davexunit>daviid`: thanks!
<daviid`>wc!
<bavier>a lot of nice comments on http://www.reddit.com/r/linux/ about he new guile website!
<bavier>*the
<m0li>thanks guilers, your web and Guile is very awesome and beautiful!
<davexunit>m0li: thank you!
<davexunit>we hope you hack happily with Guile
<amz3>there is so much things nice about guile
<amz3>and also things that needs improvements ;)
<m0li>no davexunit, thank you guilers :)! congratulations!, and yeah very nice for happy hacking :)
<amz3>I wondering what's up with the bot of nala
<bavier>I notice that https://www.gnu.org/software/guile/download/ doesn't yet mention the latest 2.1.1 release
<paroneayea>rekado: btw, I think you mentioned scsh interest
<paroneayea>did you ever get it to run? I just tried compiling, and it segfaulted
<dsmith-work>Thursday Greetings, Guilers
***raphaelsss is now known as raphaelss
<amz3>I pushed a fixed version of miniKanren, based on microKanren with a small example query over a list of tuple
<amz3> https://github.com/amirouche/microKanren/blob/master/microKanren.scm#L206
<amz3>the query does return the identifiers of amirouche's friends
<amz3>I will try to mock datomic query dsl
<paroneayea>oh hey
<paroneayea>irregex ships with a irregex-guile.scm
<civodul>srfi-115 is the future!
<davexunit>:)
<davexunit>I wonder if I should use it as the basis of a lexer for doing syntax highlighting
<davexunit>I am a bit unhappy with what I've come up with.
<civodul>syntax highlighting is the future!
<civodul>oh sorry, being too enthusiastic
<davexunit>hahaha
<civodul>:-)
<davexunit>lexing scheme went OK, but lexing XML was more complex because context was more important.
<civodul>so you're working on a syntax highlighter?
<davexunit>yes
<davexunit>civodul: example output: https://imgrush.com/Wkbxg3W3scDA.png
<civodul>cool!
<civodul>Skribilo has something, but not very good
<davexunit>I'm using a parser combinator style approach
<davexunit>lexer combinators really
<civodul>nice, i should browse that code
<davexunit>originally I used SRFI-41 streams to treat a port as a character stream
<davexunit>but it seems that is just too damn slow.
<civodul>yeah i can imagine
<davexunit>so I moved instead to using a string with an index marking the cursor.
<davexunit>and the combinators return results + the new cursor
<davexunit>that seems to be better and allows me to use regexps directly
<davexunit>though so far in practice I haven't used many regexps.
<davexunit>but lexing XML exposed some flaws in my design.
<davexunit>context is important, and I don't account for it
<davexunit>href="#foo" could be just plain text or an attribute
<civodul>oh
<davexunit>it depends on if something like "<a " came before it
<civodul>yeah, can be tricky to get right
<davexunit>and the way i deal with it now is hacky.
<davexunit>in one way it's nice, I have a lexer that knows how to parse a full opening tag like "<a href=\\"#foo\\">"
<davexunit>and it returns a list of the different components of that expressions
<davexunit>expression*
<davexunit>which then must be flattened into the resulting token list
<civodul>ok
<davexunit>maybe this is all too much to be dumping on IRC here ;)
<davexunit>but it's clear to me that my design could use some work
<davexunit>the end result is that I want to a accumulate a flat list of tokens
<davexunit>s/to a/to/
<civodul>i'd need to look more closely, but parser combinators sound interesting anyway
<civodul>ACTION has to go
<civodul>later!
<davexunit>bye!
***cataska_ is now known as cataska
<davexunit>ACTION really wants this syntax highlighter to work decently so he can roll out a new blog
<davexunit>still have to figure out how to make Skribe more pleasant to edit as well.
<paroneayea>ACTION considers rolling out a irregex-guile guix package, why not
<paroneayea>"why not" might be the pile of other unfinished things
<davexunit>sweet!
<paroneayea>I really want to have SRFI-115 on hand generally
<davexunit>yeah
<amz3> http://srfi.schemers.org/srfi-115/srfi-115.html#Abstract
<paroneayea>hrm
<solrize>hmm i built guile 2.2 and ran make install. then when i try to run guile i get:
<solrize>$ guile
<solrize>guile: error while loading shared libraries: libguile-2.2.so.0: cannot open shared object file: No such file or\\
<solrize> directory
<solrize>problem with the install script?
<solrize>export LD_LIBRARY_PATH=/usr/local/lib makes it find 2.1.1
<paroneayea>davexunit: got irregex working in guile :)
<paroneayea>and packaged
<paroneayea>in guix
<paroneayea>time to submit a patch
<davexunit>woooo!
<amz3>solrize: did you try to uninstall guile-2.0?
<solrize>no
<solrize>hmm
<davexunit>2.2 is parallel installable with 2.0
<amz3>does anyone has a socket + thread snippet ? :)
<solrize>old version is 2.1.1 in debian 8 i think
<davexunit>2.0.11
<davexunit>you installed guile to /usr/local
<davexunit>which is why you needed the LD_LIBRARY_PATH
<davexunit>for it to find the shared lib
<solrize>yeah i just ran "make" and "make install" which put it there
<solrize>but, it finds 2.1.1
<davexunit>the gnu build system uses /usr/local as the default prefix
<davexunit>basically all configure scripts
<davexunit>it can be changed with ./configure --prefix=/whatever
<solrize>i had run apt-get install guile-2.0 earlier i think
<solrize>should i rebuild? the build takes 7 hours but i guess i can start it and let it run
<solrize>/usr/local seems ok to me
<solrize>looks like debian put it in /usr/bin
<davexunit>reconfiguring wouldn't entail a full rebuild
<davexunit>debian packages install to /usr, yes.
<davexunit>/usr/local is the typical place for stuff compiled "by hand"
<solrize>hmm
<paroneayea>patch sent to guix list
<solrize>well i have /usr/local/bin ahead of /usr/bin in my path
<solrize>if i run meta/guile it runs 2.2
<davexunit>yeah, you need not install guile to run it
<solrize>but anyway my debian guile install is now busted, it's not real important that i fix it (it's a throwaway cloud server even) but it seems like something didn't work right
<davexunit>just uninstall the guile 2.2 stuff
<solrize>how do i do that? the make install pushed out 100's of files
<davexunit>make uninstall
<solrize>i gotta switch to guix :)
<solrize>ok lemme try that thanks
<solrize>oh wait, i see, the tarball i downloaded was 2.1.1 but since it's a 2.2 prerelease it named a lot of libraries 2.2 and i got confused and thought 2.1.1 was the old version
<solrize>and when i run it, it says 2.1.1
<solrize>which is somewhat confusing
<solrize>not sure it makes sense
<davexunit>2.1.1 is the current version
<davexunit>it's the unstable series leading to 2.2
<solrize>yeah but it's not a 2.2 release candidate, why does it name the libs 2.2 ?
<davexunit>it's "effective version" is 2.2
<davexunit>as far as parallel installation is concerned
<solrize>ok i guess you guys have thought this through
<solrize>thanks
<davexunit>2.1 is the unstable transition series being stable 2.0 and stable 2.2
<davexunit>yw
<sirgazil>ACTION fixed responsive design issues in the website
<sirgazil>Now they are waiting for a kind maintainer to deploy them.
<davexunit>:)
<sirgazil>ACTION goes check what else needs updating/fixing
<daviid`>sirgazil: great! i ment o write but i'll jump here instead: could you grab the latest guile-gnome description from the 'new' web-pages. indeed the old description is obsolate... really inaccurate
<daviid`> https://www.gnu.org/software/guile-gnome/
<gnusosa>To anybody that worked on the new redesign of the guile website, thank you. I looks beautiful.
<davexunit>all praise goes to sirgazil
<gnusosa>It's just amazing , the logo, the clean design.
<gnusosa>Thank you.
<daviid`>yeah all praise goes to sirgazil, with these wonderful drawings
<daviid`>sirgazil: we should remove guile-gtk or otherwise have a 'historical lib, not maintain for more then 5 to 10 years ...' but i'd just remove it in this case
<daviid`>and we should add an entry for guile-clutter
<daviid`> https://www.gnu.org/software/guile-gnome/clutter/ [note that 1.12.2 has not been release yet, but i already prepared it's web-pages as if ... i can quickly comment that entry untill release is out, probably i should if you add an entry to guile's web pages, please let me know, tx!]
<sirgazil>daviid`: Sure
<sirgazil>gnusosa: Thanks :)
<daviid`>sirgazil: great, thanks! I really ment to patch but i'm overloaded and better work on guile-lib and guile-clutter release ...
<sirgazil>no problem
<profan>is there any meaning behind the guile api reference sometimes specifying that the C functions refer the SCM type and sometimes not?
<profan>ie, one line they'll say explicitly "SCM scm_c_locale_stringn_to_number" and the few functions before have no specifications (implicitly SCM?)
<daviid`>going afk, bbl
<amz3>profan: can you give an example of a C function without SCM?
<amz3>I'd rather think there is no error and that the function updates the argument in place
<amz3>s/updates/mutate
<Sleep_Walker>is it correct assumption that guile-json requires guile 2+?
<profan>amz3: http://www.gnu.org/software/guile/manual/guile.html#Arithmetic
<profan>pretty much the entire API reference where the functions also exist inside of scheme
<profan>(so i assume they're defined like SCM scm_sum(SCM z1, SCM z2);) if defined like that
<profan>saying C function may have been a bit off, since they're the ones used from within guile as well i suppose
<profan>so that function signature would make sense?
<profan>looking at the source, it looks to be that way at least, might have answered my own question
<csed>Bit confused. I have this: http://paste.debian.net/324527/
<csed>But now I've realized that I'm not actually sure how cond works. It's just one iteration, right? If it doesn't reach the recursive call it just stops.
<csed>In which case I'd have to make the edge case check at the start?
<csed>Also, I have no idea if this'd be more suited to #scheme or whatever. I can go ask there, if need be.
<csed>Yeah, so the car was the problem.
<csed>Retracting that, there are about five thousand problems also I suck at figuring out recursion so bad.
<davexunit>new guile site on HN front page https://news.ycombinator.com/item?id=10512772
<paroneayea>csed: going through The Little Schemer helped me a ot
<paroneayea>re: recursion
<csed>paroneayea: Should go through it, yeah. I mean, PAIP is both explaining and providing examples to it very well. I'm just not thinking about it properly.
<paroneayea>man, guile/guix are killing it on getting coverage this week
<csed>Practice practice practice.
<csed>And yeah, they are.
<dsmith-work>csed: You can think of cond as a chain of if's. It evaluates each of the conditions from left to right (until one is true). No recursion, unless you call something recursively.
<csed>dsmith-work: Figured as much, yeah. Cheers.
<dsmith-work>Ok. cool.
<csed>I think the problem I'm having is that I'm calling (+ (thing (car list)) (thing (cdr list))) But then I get (thing ("asdf")) followed by (thing (()). That then reaches the car function and freaks out.
<csed>And it passes by my null? since (null? (())) => #f
<csed>(thing (("asdf")))
<csed>Aaaand wrong again. Works now.
<OrangeShark>csed: cond evaluates each clause in the order you have. So it first does the (equal? item (car tree)), if it is false, it moves onto the next clause which then checks (null? tree)
<csed>OrangeShark: I was missing a (null? tree). I just had an atom check in terms of (not (or (pair? tree) (null? tree))). I saw the "not?" and figured I had that covered. Then I double-checked and went "oh"
<csed>Added the null? and it worked as expected.
<OrangeShark>csed: but don't you already have the null? as the second clause of the cond?
<csed>OrangeShark: I changed from that paste a few times. Didn't repost it because the problem turned out to be something completely different.
<csed>Figured I'd give solving it a go before asking for more help.
<OrangeShark>csed: oh okay, basically the problem was just the ordering, you wanted to do (null? tree) before the first clause in that paste
<csed>OrangeShark: Righto. Thanks.
<csed> http://paste.debian.net/324611/
<csed>I have created life.
<profan>is there a raw list of all the C api functions in guile somewhere?
<profan>trying to generate some bindings towards the C api for another language without going bonkers
<profan>i mean, they're there in the API reference, and i'm going with just parsing that to generate it right now, but if theres a better way