IRC channel logs

2015-12-06.log

back to list of logs

<amz3>poll/pool
<amz3>ACTION note for self that poll != pool
<amz3>I read the code of the webserver, thinking that poll was pooling sockets, which it does but using poll
***karswell` is now known as karswell
<paroneayea>heh, pooling :)
<artyom-poptsov>mark_weaver: Hello.
<artyom-poptsov>It turned out that it wasn't as hard to implement input and output Guile-SSH channels as I expected at first: https://github.com/artyom-poptsov/guile-ssh/blob/master/modules/ssh/channel.scm#L128
<artyom-poptsov>Thanks for the advice.
***darthlukan_ is now known as darthlukan
<amz3>héllo :)
<davexunit>ACTION wants to write a GPIO library for guile
<davexunit>would actually go well with 8sync
<davexunit>since you need to constantly poll the file descriptors for the gpio pins
<paroneayea>oooh
<paroneayea>davexunit: that'd be cool
<paroneayea>ACTION trying to get a nice http system baked into 8sync right now
<amz3>davexunit: does SICP has a chapter about signals like those found in sly?
<davexunit>amz3: no, but it has a section about "propagation of constraints" which is similar in a number of ways
<amz3>it's much simpler to implement coroutines using prompt than using call/cc
<davexunit>yes, delimited continuations rock.
<amz3>this propagation code looks like propagators...
<amz3>strange ;)
<davexunit>heh
<amz3>thx :)
<wingo>paroneayea: i had http working with epoll at some point; did you look at wip-nio?
<davexunit>ACTION dusts off syntax highlighter, tries to rewrite parts of it
<davexunit>needs a state machine
<davexunit>as trying to lex XML has proven
<daviid>happy sunday guilers!
<vanila>hello :)
<mthl>davexunit: Have you received (a while ago) my haunt patch for the manual direntry?
<davexunit>mthl: I applied a patch from you awhile ago. perhaps you didn't see my response?
<davexunit>ACTION checks mail
<davexunit>mthl: looks like I missed that one!
<mthl>davexunit: :) no problem
<davexunit>mthl: applying now!
<davexunit>thank you!
<mthl>davexunit: you are welcome
<davexunit>mthl: pushed
<davexunit>I'm trying to make more progress on my migration to haunt
<davexunit>xml syntax highlighting is the blocker currently
<mthl>you mean migrating your blog?
<davexunit>yes
<mthl>xml syntax highlighting seems not that easy to achieve
<davexunit>I had it working more or less, but it was ugly
<davexunit>revealed flaws in my lexer cominators
<davexunit>combinators*
<daviid>wingo: heya! how about a little sunday evening 'apertif' guile-gnome/gcc-5.2 challenge 'mise en bouche'? :)
<cmhobbs>davexunit, sly's web page says to run ./bootstrap before ./configure but the current tarball doesn't include a "bootstrap" file
<cmhobbs>i also need to update guile :/
<davexunit>cmhobbs: tarballs are already bootstrapped
<cmhobbs>ACTION builds guile again
<cmhobbs>davexunit, thanks for the tip
<davexunit>that's only for building from git
<daviid>wingo: seriously, I hope you will find some time to help me with this 1, here: https://lists.gnu.org/archive/html/guile-devel/2015-10/msg00025.html
<cmhobbs>ok
<davexunit>I should just remove the mention of ./bootstrap
<cmhobbs>well
<cmhobbs>then that'd cause confusion from the repo
<cmhobbs>i think it's useful to know just be explicit?
<davexunit>it's in the directions elsewhere for building from git
<wingo>daviid: sorry, no time :/ prepping for a trip
<davexunit>now that I have release tarballs, the instructions should assume that
<daviid>wingo: ok, but another day maybe?
<daviid>good trip!
<daviid>wingo: it could well be that it just need a tiny change at the end of this file glib/gnome/gobject/gclosure.c ... I think at this time, you only would know ... and I hope you can look at it 'soonish'
<daviid>amz3: guile-clutter future user ping :)
<amz3>daviid: pong
<cmhobbs>ugh
<daviid>amz3: for yoy it is eaaaasy to install, pinuts really! a few git clone, pointing to gcc-4.9.3 and like 15 min at the very most ...
<cmhobbs>"Generic instructions for configuring and compiling Guile can be found
<cmhobbs>in the INSTALL file."
<cmhobbs>no INSTALL file
<cmhobbs>from guile's git repo
<daviid>cmhobbs: impossible, check you clone ...
<amz3>daviid: I'm in the process of making packages for guix
<cmhobbs>daviid, i *just* pulled it
<cmhobbs>err
<cmhobbs>cloned it
<cmhobbs> git clone git://git.sv.gnu.org/guile.git
<cmhobbs>cd guile
<cmhobbs>cat INSTALL
<cmhobbs>no file
<cmhobbs>cmhobbs@insulo:~/src/guile$ git pull --rebase
<cmhobbs>Current branch master is up to date.
<daviid>cmhobbs: it did not clone [properly] ?
<cmhobbs>i just re-cloned
<daviid>amz3: wohw cool! if any quizz ping me then
<davexunit>cmhobbs: it's your standard GNU build process
<davexunit>just run ./autogen.sh first
<cmhobbs>there isn't a configure script, either
<davexunit>you need to bootstrap
<daviid>amz3: the problem is wrt guile-cairo, you must clone the source, it won't work with the tarball
<cmhobbs>davexunit, how does one go about doing that
<davexunit>./autogen.sh
<cmhobbs>actually, i'm more concerned that there's missing files
<cmhobbs>i'll download a tarball
<amz3>daviid: is cobra really required?
<amz3>daviid: it won't build without cobra right?
<daviid>amz3: corba
<daviid>amz3: let me check, you mean for guile-clutter right?
<amz3>guile-gnome requires corba
<amz3>which program requires gcc 4.9.3?
<daviid>amz3: guile-gnome does not require corba, it will build the wrapper if you have the deps staisfied, iirc
<amz3>cool
<daviid>amz3: read here: https://www.gnu.org/software/guile-gnome/clutter/download.html
<daviid>amz3: Guile-Gnome will not work if it has been compiled using gcc >= 5.0. We are sorry about that, but until we find the source of the problem and solve it, you have to install and compile G-Wrap, Guile-Cairo, Guile-Gnome and Guile-Clutter using Gcc 4.9.3
<cmhobbs>gnar, i don't know why i'm building guile when i need to reinstall debian...
<cmhobbs>programming as a tool for procrastination
<wingo>daviid: did you try compiling with -fno-strict-aliasing
<wingo>with gcc 5
<amz3>cmhobbs: hint: build guile before reinstall debian ;)
<daviid>wingo: no I did not
<cmhobbs>amz3, working on that
<cmhobbs>heh
<daviid>wingo: will try now
<cmhobbs>i don't think i have time to switch back to debian right now so i'm going to tinker with sly
<daviid>ACTION hides for being so ingnorant about C, gcc ...
<wingo>it's almost impossible to make a language runtime work in the presence of strict aliasing rules :/ even v8 just turned it off
<daviid>wingo: I did not know that 4.9.3 would have such an important default and gcc changing it ... but I'll try right now
<paroneayea>wingo: I did not
<paroneayea>!
<paroneayea>wip-nio is a branch on guile from git I assume?
<paroneayea>ACTION looks
<wingo>it's a bit old but it has the base of the idea anyway...
<paroneayea>wingo: I don't see a wip-nio branch...
<wingo>ah no?
<wingo>perhaps i ended up calling it wip-ethreads
<paroneayea>yeah there's one called wip-ethreads there...
<paroneayea>wingo: I'll take a look at that
<wingo> https://lists.gnu.org/archive/html/guile-devel/2012-03/msg00192.html
<paroneayea>wingo: oh this is cool, I didn't know it existed!
<paroneayea>wingo: I'll investigate, thanks
<paroneayea>wingo: interesting
<amz3>ACTION competly forgot about O_NONBLOCK
<paroneayea>wingo: I wonder if I can add something like libevent to 8sync which uses epoll if available, and poll or select if not
<paroneayea>wingo: anyway, thanks for showing me this! :)
<wingo>paroneayea: i wouldn't worry about epoll tbh. it's good if you have many connections and only very few of them are active. but "many" == like 1e5 or more and "few" == 1e3 or less
<wingo>ACTION makes up numbers
<wingo>but it's something like that
<paroneayea>:)
<wingo>poll is generally fine
<paroneayea>wingo: I think it's 1024 in linux for select's limit
<wingo>select != poll
<wingo>select is trash
<wingo>don't use it
<paroneayea>wingo: oh okay :)
<paroneayea>wingo: I'm currently using it...
<wingo>:)
<wingo>use poll!
<paroneayea>wingo: I'll try to look at switching to poll
<paroneayea>I think it should be pretty easy with what I have so far to make the switch...
<paroneayea>wingo: why is select trash? because of its number of connection limits? or because it requires splitting between read/write/except stuff?
<wingo>because of its limits, because it's O(n), because of guile's wonky wrapping of select
<paroneayea>wingo: got it
<wingo>select is ok if you are using a small number of low-numbered fds. otherwise trash :)
<wingo>ACTION opinions today, apparently
<paroneayea>wingo: opinions are welcome, especially at this early stage in 8sync
<paroneayea>wingo: so (ice-9 poll) is the appropriate path to poll usage yeah? I was reading it, though it's a bit underdocumnted
<paroneayea>there's these poll-set things and I don't know what they do, for instance
<wingo>yep it's indeed underdocumented
<daviid>wingo: g-wrap autogen/configure/make/make check fine using -fno-strict-aliasing but guile-cairo complains:
<daviid>configure: error: unrecognized option: `-fno-strict-aliasing'
<daviid>
<wingo>daviid: it's not a configure option, it's CFLAGS='-g -O2 -fno-strict-aliasing'
<wingo>set it as an environment variable or ./configure CFLAGS=...
<daviid>ok
<daviid>ACTION hides again
<paroneayea>wingo: so am I right about the poll-set things that they're basiclally sets fo file descriptors to pass to poll? maybe I should read some poll manual page things and figure out why there's all this idx stuff
<paroneayea>which is presumably the index
<wingo>yeah it assumes you know what the system provides
<wingo>probably should be better documented...
<paroneayea>wingo: well okay, time to crack open the appropriate man pages and stuff
<wingo>yeah :/
<wingo>otoh, poll will be around for the next 20 years, so it's a good investment :)
<paroneayea>:)
<paroneayea>wingo: is epoll's interface similar enough that adding support to either will be easy enough, you think?
<paroneayea>wingo: I mean, I guess I should RTFM, but since you have a better mental model... :)
<wingo>epoll is similar but it exposes some weird low-level concepts
<wingo>i think if you are going there and you are currently doing just select then adding poll will help
<wingo>it's a step along the way but not all they way there
<paroneayea>wingo: got it
<paroneayea>wingo: I anticipate one thing I'll have to decide on from a high level is to support select style (sec . microsecond) pairs or poll style milliseconds
<paroneayea>since currently I do expose the option to do (sec . microsecond)
<paroneayea>wingo: anyway, thanks for your help
<paroneayea>back to hacking!
<wingo>milliseconds would be an error imo
<paroneayea>wingo: so you think doing the pair is mostly the right approach?
<wingo>paroneayea: pair or considering an integer to mean microseconds
<paroneayea>currently I let the user pass in an integer or a float or whateve and convert to the pair no matter what
<wingo>anyway, opinions opinions, la la la
<paroneayea>wingo: I appreciate you sharing your opinions!
<daviid>wingo: no luck, it still and compile fine and make check fails the same way: ERROR: Throw to key `gruntime-error' with args `("%gtype-class-bind" "No GType registered with name ~A" ("GClosure") ())
<wingo>strange, you wouldn't think an error like that would be a gcc error
<wingo>v odd :)
***w1gz_ is now known as w1gz
<daviid>wingo: it seems to me that, reading glib/gnome/gobject/gclosure.c [at the end], gcc did require a bit of magic in the past as well, and now the magic must change a bit ?
<wingo>wowwwww
<wingo>where is that line from
<wingo>you could make the static gtype volatile maybe :)
<wingo>"volatile static GType gcc_please_look_the_other_way" :P
<wingo>so wrong :P
<daviid>wingo: it as all behond my knoweldge ... but I did find it very 'strange' when I did read it
<wingo>seriously do try adding "volatile" before the static
<wingo>the issue is that g_closure_get_type() has a side effect
<wingo>but the function is annotated as being pure
<wingo>which is incorrect fwiw...
<wingo>but it give GCC license to remove the call
<wingo>afaiu
<wingo>but if you make the assignment to a volatile variable, it won't remove the call
<daviid>ok, so in gclosure.c line 235, becomes:
<daviid>volatile static GType gcc_please ...
<daviid>let's try
<daviid>wingo: great, that did solve the problem!
<wingo>happy hacking :)
<daviid>wingo: I'll pay a beer or wine for your trip! :):)
<daviid>shall add the -g -O2 -fno-strict-aliasing somewhere, and where?
<daviid>does g-wrap, guile-cairo require these as well right?
<daviid>or shall I just update the web pages telling people to define CFLAGS ?
<wingo>you can add it to AM_CFLAGS in glib/gnome/gobject/Makefile.am
<daviid>ok, thaks
<wingo>er
<wingo>um, no
<wingo>no need for -fno-strict-aliasing, sorry
<wingo>that was a guess
<wingo>so i think it didn't improve anything afaiu?
<daviid>ok, I'll recompile the all chain without it
<wingo>it was just the "volatile static ..." change
<daviid>fine, then I 'll fix and release 2.16.4
<daviid>I'll try to write an intellible commit message based on what you wrote here
<daviid>wowow I'm very happy wingo, 2 users already did ping me about this bug, an 1 is Brandon [the gnueval hacker]
<daviid>going afk a little bbl
<daviid>wingo: it would be so much easier for our users if you could release guile-cairo 1.10
<daviid>wingo: anyway, thanks again, bbl
<davexunit>bleh, hacked my way into another wall with my syntax highlighter. I'm good at this.
<amz3> daviid it means I will be able to compile with gcc 5?
<daviid>amz3: yes
<daviid>amz3: I will try to release tonight, or at least within the next day or so, but you cn already do it: just edit this file glib/gnome/gobject/gclosure.c and add volatile in front of line 235 so it becomes this:
<daviid>volatile static GType gcc_please_look_the_other_way;
<daviid>the make distclean; and the autool danse ...
<daviid>amz3: ^^
<daviid>amz3: guile-gnome is really esy to install now, guile-clutter is a bit more complicated because you need to grab cogl and clutter specific versions, manually compile these, properly configure your env before to try to compile guile-clutter. This said, it is fully explained on web-pages, so I would apreciate feedback,.. just follow step by step, the recommendatins I wrote there ...
<paroneayea>WOO I got http stuff (starting to) work in 8sync
<daviid>to poll ot not to poll, that is the quetion :)
<daviid>paroneayea: all this is great work, right now will try to solve my 'problem' using guile-inotify2 [which works, i tested] but 1 day i'll use 8sync [but only if the modules is called 8sync haha]
<paroneayea>daviid: "only if the module's named 8sync"? :)
<paroneayea>is this a strong opinion on the (use-modules (8sync/eightsync agenda)) pseudo-debate? :)
<daviid>:)
<daviid>paroneayea: yes! (8sync agenda) soooooo mmuuuch better!! :):)
<daviid>paroneayea: guilers/users wll (use-module ...) or ,use (...) they won't [almost never do ,m (...)
<daviid>so, who cares about the [un]pretty print, most won't even know ...
<daviid>I think wingo opinionated day was contagious :)
<daviid>ACTION hides in case ArneBab shoots ... haha
<paroneayea>daviid: :)
<paroneayea>daviid: opinions / feedback welcome esp at this time