IRC channel logs

2015-10-06.log

back to list of logs

<davexunit>ACTION pokes at SDL2 bindings
<davexunit>I can open/close and otherwise manipulate windows thus far
<paroneayea>oh hey amz3 that thing is great
<amz3>paroneayea: yes, the documentation is nice, but I think it's buggy. I will try ijp and eventually buy reasoned schemer
<amz3>taylan: is it you who works with bytevectors?
<amz3>I'm wondering how to represent binary values
<amz3>srfi 60 is helpful
<amz3>here is the code for building morton curve
<amz3>(define (zinteger . vs) (list->integer (apply append (map integer->list vs))))
<amz3>wait... I can use cut
<amz3>>:)
<mark_weaver>amz3: better to use 'concatenate' than 'apply append'
<amz3>thx
<mark_weaver>there's also 'append-map'
<roelj>If I have a list like: (property1 property2 property3), could I somehow bind names to the properties so I can access them as (my-list :property1)?
<amz3>roelj: you are looking for assoc-ref, and acons, cons to build the list
<roelj>amz3: Thanks, that looks like what I need.
<roelj>However, my list always has the same properties in the same order.
<roelj>((a . 1) (b . 2) (c . 3)), ((a . 15) (b . 34) (c . 99))
<amz3>look at define-record-type
<roelj>That looks pretty complex for what I'm trying to do.
<nilg>is there a an assert in guile/scheme, akin to C++ assert?
<ArneBab_>is there a tool for cyclomatic complexity analysis in Scheme?
<ArneBab_>nilg: you mean something which throws errors during development but is removed in production?
<ArneBab_>nilg: there is (use-modules (rnrs)) (assert <condition>)
<amz3>roelj: there is srfi 99 which simpler
<nilg>thanks ArneBab_ that's exactly what I meant
<ArneBab_>glad to help ☺
<ArneBab_>(I didn’t know it, but info-mode with full-text search helped :) )
<amz3>roelj: did you find srfi 99? basically you define your record with (define-record-type* <my-record> field-one field-two)
<amz3>it's possible to mutate the record *inplace* but you can do (set-field my-record (field-one) "new-value") to retrieve a new record with 'field-one' modfied
<amz3>I sly has another record type that easier to work with
<amz3>you don't need to go through (set-field)
<roelj>amz3: Well, I'm a bit confused on how to apply it. Thanks for the example, I have to try it out.
<roelj>amz3: And I need to figure out how to expose it using the C functions.
<mark_weaver>amz3: srfi-99 has neither define-record-type* nor set-field
<mark_weaver>'define-record-type*' is a guix construct, and 'set-field' is a guile extension of srfi-9 records.
<mark_weaver>srfi-9 has 'define-record-type' without the '*'
<roelj>I am looking for something equivalent to my planet-property function: http://pastebin.com/M6GRteK1
<roelj>Currently it's kind of inefficient.
<mark_weaver>roelj: pastebin.com blocks tor users, which includes me :-( can you use another paste service instead please?
<roelj>mark_weaver: Sorry, do you have one in mind I should use instead?
<mark_weaver> http://paste.lisp.org/new works
<roelj>Here it is: http://paste.lisp.org/+3COI
<lloda>maybe just using symbols and assq-ref would be fast enough
<mark_weaver>an alist would be one option, but in this case I suspect a SRFI-9 would be preferable. see section 6.7.8 (SRFI-9 records) in the guile manual
<mark_weaver>roelj: that section has an example that could be easily adapted
<roelj>mark_weaver: Thanks. Now I would like to construct it in C and expose it to Guile.
<roelj>Or should I instead write a wrapper in Guile to parse a cons list to the record-type?
<mark_weaver>you can call arbitrary scheme procedures from C
<mark_weaver>see 'scm_call' and friends
<mark_weaver>so you can call the record constructor directly from C
<roelj>Should I then call the "(use-modules (srfi srfi-9))" first?
<mark_weaver>you'll need to import (srfi srfi-9) in the module that defines your record type, yes.
<roelj>Alright.
<roelj>Is that how you would solve the problem too?
<mark_weaver>I suppose it depends on the details, but probably yes.
<Petruchio>mark_weaver: I seem to have gotten through the (many) missing macro problems. The project seems to pack its own m4 files along, and prevent autoconf from looking elsewhere for others. I pulled the necessary files in, one by one, and added them to aclocal.m4.
<Petruchio>Having gotten past that (I think), I'm now getting this error: error: required file 'config/config.rpath' not found
<Petruchio>And I'm getting scant search results for that on the web. Does it look familiar?
<mark_weaver>Petruchio: I'm not sure, sorry. I can find no occurrences of the string "config.rpath" in the postgresql-9.4.4 tarball. maybe you introduced an occurrence of it when you imported all of those m4 files.
<mark_weaver>civodul might know; he has much strongly knowledge of autoconf and build systems.
<mark_weaver>*stronger
<Petruchio>I expect so.
<mark_weaver>I guess I would start by searching the entire source tree for occurrences of that string, and find out where it came from.
<mark_weaver>I have to go afk now. good luck!
<Petruchio>Well, let me express my appreciation again. With the help I got here, I got enough material that I could start reasoning about this, and solving some problems. That would have taken much, much longer on my own.
<mark_weaver>you're welcome!
<mark_weaver>:)
<civodul>Petruchio: config.rpath probably comes from automake, and so it gets copied when running "autoconf -i" or "automake --add-missing"
<civodul>i think
<Petruchio>Any idea what I might do about it?
<Petruchio>Some interesting references to config.rpath in the guile tarball.
<Petruchio>Including the file itself.
<civodul>did you try running "automake --add-missing"?
<civodul>i think that would copy the file
<civodul>now, i missed the beginning of the discussion, so let me know if i'm saying nonsense :-)
<mark_weaver>civodul: Petruchio intends to modify postgresql to use libguile, and he's trying to modify its build system appropriately. postgresql does not currently use automake. I'm not sure if that's pertinent to your suggestion or not.
<mark_weaver>he's added some code to configure.in and imported some .m4 files (e.g. guile.m4 and pkg.m4) into the postgresql build system, and is now getting this error about a missing config.rpath file.
<civodul>ooh, i see
<civodul>well i think "automake --add-missing" should still work
<mark_weaver>okay, thanks!
<mark_weaver>Petruchio: ^^
<mark_weaver>ACTION goes afk again
<paroneayea>heya
<paroneayea>ArneBab_: ping
<ArneBab_>paroneayea: pong ☺
<paroneayea>ArneBab_: want to finish getting wisp packaged for guix
<paroneayea>ArneBab_: looks like you've simplified some things!
<ArneBab_>sure!
<paroneayea>ArneBab_: so I no longer need to do ./bootstrap.sh, right?
<paroneayea>in 0.9.0
<ArneBab_>I hope so — though the bootstrap script isn’t ported yet
<paroneayea>it looks like ./configure might just work
<ArneBab_>… I think I have ported bootstrap…
<paroneayea>ArneBab_: I also wonder if I should keep my file-copying stuff or if make install will work now
<ArneBab_>I did not port the configure.ac
<paroneayea>probably keep the file copying stuff?
<ArneBab_>yes
<paroneayea>from my previous patch
<paroneayea>okay cool
<ArneBab_>it doesn’t create the right filesystem hierarchy yet
<paroneayea>ArneBab_: so most of my previous code should be kept around, just maybe try dropping the bootstrap.sh step, bump the version
<ArneBab_>(thank you for putting up with that!)
<paroneayea>ArneBab_: np. Most things are ready to work with the package
<paroneayea>I might as well get it it into guix!
<ArneBab_>use bootstrap-reader.sh instead of bootstrap.sh
<paroneayea>one less half-packaged thing :)
<paroneayea>ArneBab_: oh, so still use bootstrap, but use bootstrap-reader.sh? I can try this
<ArneBab_>yes, though that’s what make should do automatically
<paroneayea>ArneBab_: if make should do it then we don't need to worry
<paroneayea>I'll try it.
<ArneBab_>wisp.scm is available, so it should not rebuild it
<paroneayea>ArneBab_: is wisp.scm generated in make dist now or something?
<ArneBab_>yes
<paroneayea>ArneBab_: excellent.
<ArneBab_>but configure.ac still checks for python3…
<paroneayea>np
<paroneayea>ArneBab_: works :)
<paroneayea>ArneBab_: now to send a new patch to the list!
<ArneBab_>paroneayea: cool!
<ArneBab_>thank you very much!
<paroneayea>np
<paroneayea>ArneBab_: not sure if you saw
<paroneayea>but wisp appeared in my talk on guix
<paroneayea>in the "getting over your parenthesis phobia"
<ArneBab_>I didn’t see it… can you give me a link?
<ArneBab_>
<paroneayea>ArneBab_: that talk was a major motivator for me to explore wisp further :)
<ArneBab_>
<paroneayea>I may do a future talk on embracing lisp!
<paroneayea>and all the cool ideas that are around from lisp history
<ArneBab_>you know where parens are really great? When you just shell out to guile to do some quick calculations in bash.
<ArneBab_>for i in 0.2 0.5 1.0; do ./plotstation.py ... -o ~/phd-thesis/"histogram-l-curve-vs-obspack-$(guile -c "(use-modules (ice-9 format))(format #t \\"~3,'0d\\" (inexact->exact (* $i 0.2 1000)))")ppb-2011.pdf"; done
<ArneBab_>^ real code
<paroneayea>ArneBab_: :)
<paroneayea>I originally was thinking of a talk named "Don't Fear the Parens"
<paroneayea>but my friend Deb thought that gave people the impression that they should start out afraid, and maybe some people don't know enough to have even heard parens are scary from the general coding world. good point!
<amz3>embrace the parens ^^
<paroneayea>so now I'm thinking "Back to the Future With Lisp"
<ArneBab_>that sounds nice
<paroneayea>with the description "The Dreams of the 60s-90s are alive in Lisp!"
<amz3>back to the future ftw
<Petruchio>paroneayea: On the other hand, it would allow you to tie in cowbells.
<amz3>what '50 years of software engineering" ?
<ArneBab_>that sounds good
<ArneBab_>(all of it)
<paroneayea>amz3: I think that sounds too heavy for the kind of talk I want to give
<paroneayea>"engineering" immediately makes it sound intimidating; my goal is to reduce the intimidation factor while giving the indication that lisp has a ton of cool ideas that you *want* to dive into!
<amz3>ok
<amz3>the DSL thing is important imo, it was copied by scala
<paroneayea> http://sarah.thesharps.us/2015/10/06/what-makes-a-good-community/ food for thought
<amz3>I don't how this applies to guile community
<amz3>I see strange situations sometimes, but I guess that's the way of the community
<amz3>One thing is true, is that people are more helpful than say python
<amz3>Also scheme is open to the world, compared to python that does its python things mostly web stuff
<ArneBab_>it’s unclear though, whether this is a result of the smaller size.
<ArneBab_>(the more helpful)
<amz3>maybe because we have the same concerns
<amz3>no
<ArneBab_>I know Python as a science-language
<amz3>meh, asked multiple times, multiple question on #python-fr no answer
<amz3>about science stuff
<ArneBab_>the scientists I know mostly google and get their answers from stackoverflow
<amz3>then I'm not a scientist :)
<amz3>stackoverflow is really helpful for web-y things
<amz3>the things I've doing lately... no much help
<amz3>Markov Logic Network, no help
<amz3>Inference engine, no help
<amz3>metaclass? scary #python-fr
<amz3>of course, if you want to do web python/ruby is still interesting because there so much question on SO that you don't even need to ask
<amz3>at some point on Django ML, there was so much ghost accounts it's horrible
<amz3>people ask question, nobody answer or ask to STFW
<ArneBab_>amz3: you do the computer-science-interesting things, we here do the “interesting for other reasons” stuff ☺
<ArneBab_>(reading files in many formats, plotting stuff, using existing libraries which realize what we want to do, …)
<amz3>ArneBab_: definitly
<amz3>my work is not really useful as is
<ArneBab_>which isn’t to say that “how can I plot these three million datapoints” isn’t computer-sciency complicated, just that people are mostly interested in having a solution, not in finding a better one :)
<amz3>my plan is always to help the community though, even if I pursue my own lullaby
<ArneBab_>amz3: I have the feeling there isn’t much science which is useful as is… (though it’s very useful down the road)
<amz3>I know, say that it will be more helpful to build guile async
<ArneBab_>maybe as the project gets bigger there’s a danger of having more pure users and less community-helpers?
<ArneBab_>so the number of people who ask and leave increases faster than the number of people who anser?
<ArneBab_>answer
<amz3>For instance, I plan to use at least sly, and at some point guix but like I said it's down the the road
<ArneBab_>how to scale a community?
<amz3>make it easy to contribute
<amz3>moreover i have a useful package, it's called wiredtiger :D
<amz3>ok it's very niche software
<amz3>IMO the projects are very difficult without small achievements
<amz3>for instance, the article of nalaginrut is a nice example of small achievement
<amz3>I think it keeps the community alive
<amz3>I'm not a proponent of perfect final release my.nice.software-1.0.0-GA
<amz3>ArneBab_: or your book :)
<amz3>ArneBab_: btw do you have any dowloadws
<amz3>?
<ArneBab_>:)
<ArneBab_>I have source downloads and freenet-exclusive downloads. I’m trying to find out whether free licensing and making money can work together more easily by requiring payment for the ebook while providing the full sources.
<amz3>sorry gtg
<ArneBab_>I’m still missing a way to get the ebook with non-bitcoin (except for the one bundled with the printed book)
<daviid>whaaat? david@capac:/usr/local/src/gcc-5.2.0 19 $ make uninstall
<daviid>the uninstall target is not supported in this tree
<daviid>
<daviid>???
<daviid>here is the answer of the gcc folks: how do I unnstall?
<daviid><andreyv> rm -rf /opt
<daviid>do you beleive this?
<amz3>:)
<daviid>you c, anything dealing with C corrupts peoples mind up to an unbelievable stage where by when you reached it, it's too late :) the gcc folks wrote 10 lines to tell 'do not install' ... ?????????
<daviid>and they still fail to answer the quizz: why does the gcc-5.2 tarball does not support uninstall ???
<daviid><andreyv> If you find yourself in a situation where you want to run make
<daviid>I can't believe this is happening
<csed> http://www.markwitmer.com/guile-xcb/guile-wm.html
<csed>Anyone give this a try?
<davexunit>csed: yes, I have a couple of patches in guile-wm.
<csed>Still on StumpWM, here.
<davexunit>it's a really neat idea, but Mark Witmer hasn't been an active Guile programmer in quite some time
<davexunit>so guile-wm is left loveless.
<csed>davexunit: Shame.
<davexunit>it worked pretty well, but there were a couple of annoying bugs that I couldn't figure out.
<davexunit>I wish Mark were still occasionally active so I could help sort them out.
<csed>Ah well.
<davexunit>I don't know enough about how X works to get it done on my own.
<csed>I don't know how X works.
<davexunit>but I really enjoyed using it.
<davexunit>so much nicer than StumpWM simply because I had all the power of Guile
<davexunit>I could connect right to it in Emacs with Geiser and mess around.
<davexunit>and it's not strictly a tiling WM, you can implement any windowing system you'd like.
<csed>davexunit: Sounds fun. What're you using now, Stump?
<davexunit>csed: xfwm
<davexunit>on guixsd
<davexunit>or whatever gnome's WM is on other machines
<davexunit>I used ratpoison for awhile and that was fun, but ultimately unsatisfying because it's not so hackable
<csed>davexunit: And Stump? You can do the whole SLIME + Emacs thing and then just go (in-package stumpwm). Works like a charm for messing about with it.
<davexunit>I used stump a bit, but I really don't enjoy common lisp.
<csed>davexunit: Fair. Cheers for the info, anyway.
<davexunit>it's Lisp, which is nice, but call me picky because I just don't think it is very good compared to Scheme. :P
<davexunit>oh and I had a really hard time getting it to run
<davexunit>it just wouldn't work with sbcl
<csed>davexunit: I've had milk runs with the Stump/Emacs/SLIME combo, and I've had regular torture sessions. Still don't know enough about Scheme to compare it to Common Lisp, though.
<davexunit>I think I ended up running it with clisp
<csed>davexunit: Yeah? That's what I'm using at the moment.
<daviid>ACTION dreams about writing a [small] wm using guile and clutter, but that prob won't happen :(
<csed>Debian Stable, though.
<davexunit>daviid: that would be so awesome
<daviid>davexunit: we spoke about that with wingo in ... 2008 ... but it could only happen if we have a fast, really fast release scheme wrt guile-gnome and guile-clutter, I'm trying hard, but ...
<davexunit>daviid: in time :)
<daviid>davexunit: i will need help wrt gcc 5.2 and guile-gnome, you, mark_weaver ... i will write an email about this, i won't be abble to debug myself, my C knowledge is too weak
<daviid>and time ... i really want to release guile-clutter, hope this week
<daviid>mark_weaver: would you be willing to help me wrt to guile-gnome and gcc 5.2 ? it would only take you to install glib and gobject, no need to have the all wrappers
***Guest94060 is now known as micro`
<daviid>paroneayea: love 'Back to the Future with Scheme' or Lisp I can't remember
<paroneayea>daviid: :)
<daviid>mark_weaver: i'll take it as a 'yes'! I'm joking, if your are not interested, I'll solve it anyway, but it would be faster, and safer if I could count with help from experienced gcc guiler...
<daviid>paroneayea: wonderfull title for a talk I think
<daviid>and it actually is kind of what is happening right? I think so anyway ...
<davexunit>paroneayea: compare Scheme to Marty McFly's hoverboard in BTTF2
<davexunit>(define (flux-capacitor plutonium) ...)
<paroneayea>davexunit: :)
<davexunit>(define (time-paradox? condition) ...)
<davexunit>(define johnny-be-good (compose try-to-keep-up watch-for-changes blues-riff-in-b))
<davexunit>OK I'm done
<ArneBab_>paroneayea: After giving it some time to sink in, I like Back to the Future with Lisp the most.
<paroneayea>ArneBab_: :)
<paroneayea>ArneBab_: oh, forgot to push that patch...
<ArneBab_>amz3: you can get a plain HTML version of py2guile from http://draketo.de/proj/py2guile
<adhoc>what is with this obsession with python ?
<mark_weaver>daviid: can you email the details of what goes wrong with gcc-5.2 to guile-devel? I'll try to take a look soonish.
<daviid>mark_weaver: sure it was my intention, will do asap! many thanks, it will be reallly very helpful and a nice learning step as well to get your help on this
<paroneayea>ArneBab_: new patch submitted to guix-devel