IRC channel logs


back to list of logs

<amz3>actually I'm using format to convert the array of bytes to an hex number and then use string->number to convert it to a number
<galex-713>this is ugly
<galex-713>But I’m no much sure it’s disapointingly faster than a cleaner approach :/
<amz3>thx for noticing :D
<galex-713>Because of C
<galex-713>We really need native compilation
<galex-713>Know what? if I were you I would just code that cleanly and procedurally, and just suppose the day native compilation will come this code will be good and efficient, even if currently it’s not
<galex-713>Except if you’re actually using your code for something useful, then it is different
<amz3>I was planning to bind libxml2 library but this lib is so massive, that I may only bind what I need
<galex-713>then you have to use the horrible-ugly-distasteful way
<amz3>I should probably use ash but I'm not sure right now what to do
<amz3>I figure this later
<amz3>ACTION afk
<galex-713>amz3: does it just take more ram than it should or does it provide really inefficient functions?
<amz3>galex-713: what are you talking about?
<galex-713>amz3: libxml2
<amz3>I'm not sure why you think that
<amz3>I said there is a lot of things in libxml
<amz3>that's why I won't create bindings for it right now
<galex-713>ah ok
<galex-713>oh ok I didn’t understood completely
<amz3>no problem
<amz3>now I can benchmark libxml against ssax guile module :D
<galex-713>ssax is the sxpath thing?
<amz3>ssax is the module powering xml parsing in guile
<galex-713>including the sxpath/sxml stuff ?
<amz3>no sxpath is something else
<amz3>sxml is the output of ssax parser
<galex-713>ah ok
<amz3>you don't know sax?
<galex-713>Yeah but to find hierarchized stuff in sxml you need sxpath
<amz3>there is basically two apis in xml world, sax and dom
<amz3>and xpath
<amz3>but they do different things
<galex-713>oh ok
<amz3>sax is a parser API which allows to parse an xml file without having to put it all in memory
<galex-713>don’t know sax, know little of dom, hoped a doc for xpath but found none
<galex-713>oh that is cool
<amz3>I learned xpath on w3school website
<amz3>but since I don't pratice it often I often check the syntax on SO
<galex-713>yeah but sxpath
<galex-713>no doc for sxpath
<amz3>there is some doc now on master
<galex-713>oh really?
<amz3>I think
<galex-713>What is cool for xml too: CSS syntax
<galex-713>Because lot of people know it currently
<galex-713>Also even if it’s more unixy, I don’t like using slashes, gt or lt are way more logical
<amz3>what is more unixy?
<galex-713>amz3: slashes
<galex-713>ijp: logical here = coherent with human culture of common meaning of « > » and common meaning of « / » outside computing legacy
<amz3>yeah, css is terse syntax compared to xpath
<amz3>I think there is a module in Python that allows to query JSON with css syntax
<ijp>that's a very grandoise anthropological claim
<galex-713>ijp: that is a claim concerning most languages including « / » or « > », especially math (except for « / », yet it has a different meaning than « including/superior to »)
<brendyn>Who did the artwork on
<thomeith>brendyn: i don't know, but it's awesome
<brendyn>I have never quite seen a style like that
<brendyn>I have never seen a style quite like that
<amz3>héllo :)
<amz3>here is a paste of my sax parser using libxml2, it segfault for some reason I'm not sure why
<amz3>it doesn't segfault all the time tho
<wingo>libxml2, whyy
<amz3>because ssax is too slow, but I might revert to that solution if I can't fix this issue
<wingo>you are running over utf-8 ports on 2.1.x with buffered input?
<amz3>I'll try 2.1
<ruste>Morning all.
<dsmith-work>Morning Greetings, Guilers
<amz3>2.1 is faster but still much slower than python's libxml2 bindings
<amz3>I think it will do the job
<amz3>plus now i use 2.1 :)
<wingo>how much slower? and is it slower for python with libxml2 using SAX or using some DOM or other library?
<wingo>i would expect something like 5-7 times slower but i dunno
<wingo>native compilation should get us within a factor of 2, then there are more optimizations to do
<amz3>something like 10 times slower
<amz3>using sax in both cases
<wingo>ACTION nod
<wingo>could be more things to optimize there
<ruste>How is guile doing on concurrency? I like what I've seen so far, futures etc., but how do they compare to haskell, erlang etc?
<davexunit>ruste: in short: not as good.
<ruste>Where do we fall short? Just less efficient? Are we missing features?
<davexunit>I think wingo has written about this somewhere
<davexunit>I don't know all of the details.
<ruste>Hmmmm. I can't find anything on his blog. Or google can't at least.
<davexunit>mailing list
<ruste>I'll see what I can find.
<wingo>i miss gmane
<dsmith-work>Yeah. Sad about that.
<paroneayea>looks like I need to implement cookie support
<ruste>paroneayea: for guile? We'd have most of a web scraping library at that point. All that would be left would be https support.
<paroneayea>ruste: yes (and at least, for the guile library I'm working on)
<ruste>Do we have https support? I think I asked about this a few days ago...
<davexunit>ruste: gnutls comes with guile bindings, so you can handle https requests that way
<ruste>davexunit: I tried that and was never able to get it working. Something about the server and my client not being able to agree on protocols.
<ruste>I've been using guile-curl for now.
<davexunit>okay, well that's the way to do it so I dunno
<davexunit>guix uses it
<davexunit>curl sucks
<davexunit>does guile-curl even expose a port interface?
<ruste>davexunit: it does what I need it to for now.
<ruste>davexunit: I don't think so.
<davexunit>yeah, see that's not so good.
<ruste>Just wraps the curl easy interface.
<ruste>It's not the cleanest, no.
***dje is now known as xdje
<paroneayea>guile's lack of https / tls support out of the box is probably its biggest current visible hole
<paroneayea>yeah there are ways to do it, but they're leaky and hard to set up. it should just work.
<paroneayea>but that's all been discussed before :)
<ruste>I'd rather it not come with https than add another dependency.
<paroneayea>ruste: really?
<paroneayea>anyway, it's possible to have it be a configure-time option.
<paroneayea>assuming it was added.
<wingo>it could be an ambient thing
<ruste>paroneayea: That is a possibility. I like things that depend on as little as possible.
<ruste>wingo: ambient?
<wingo>like if gnutls is installed, then https is usable
<wingo>otherwise you get an error telling you to install gnutls
<paroneayea>wingo: that would be pretty ideal, I think
<ruste>I like that better than most other options.
<wingo>when you first try to use an https link
<ruste>I think I'd prefer having the whole web client thing in a separate but easily installable package that requires gnutls/ssl
<ruste>Not sure though.
<ruste>Is it common to package web client libraries with a language?
<davexunit>we're approaching philosophical differences here
<ruste>davexunit: agreed.
<davexunit>I really don't like stripped down minimalism
<davexunit>I think Guile should come packed with useful things
<davexunit>http(s) clients and servers are so commonly used that it only makes sense for guile to support them out of the box
<ruste>I could see putting it in guile-lib. Then if you want minimalism you just install the core. If you want packed with useful things you install guile-lib.
<ruste>python does have http, I don't see https though.
<davexunit>python's huge standard library is one of its greatest strengths
<davexunit>we should aspire to have something so useful
<ruste>I can agree with that.
<davexunit>I want a JSON module in guile core
<davexunit>among other things
<paroneayea>davexunit and I are on the same page
<davexunit>pack it all in, I say.
<paroneayea>if you want a more minimal scheme, there are more minimal schemes out there :)
<davexunit>as long as it meets a criteria of general usefulness and is worth the maintenance burden.
<paroneayea>we have sxml, surely we can have https ;)
<ruste>paroneayea: Consider me the loyal opposition. :)
<paroneayea>(I love sxml fwiw :))
<ruste>paroneayea: I have used sxml. It's pretty nice.
<davexunit>in the nodejs community, it's common to make libraries that provide only a single function. in fact, it's recommended.
<ruste>davexunit: I've heard some pretty convincing critiques of that.
<paroneayea>anyway, I think all the maintainers want https / tls support in guile, it's not whether the project wants it or not :)
<paroneayea>it's a matter of it being done
<davexunit>that's the extreme end of the minimalist "keep everything out of core" mentality
<davexunit>the suckless project is another good example of misguided minimalism
<ruste>davexunit: I fight for it knowing I'm going to lose.
<davexunit>dwm, for instance, where you have to write some nasty C code and recompile it to configure it, because anything else is surely bloated.
<ruste>davexunit: As far as C code goes it was pretty gorgeous, that's an argument for another day though. (They openly admit it's to keep the userbase elitist.
<davexunit>C ain't gorgeous.
<ruste>paroneayea: As far as implementing https goes, are we just talking about gnutls because that's what we have bindings for?
<davexunit>the point is that Guile more aligns with projects like Emacs and Python
<ruste>Are there licensing reasons for not using SSL?
<davexunit>gnutls implements SSL and TLS.
<ruste>davexunit: I agree. I think it's a good goal to strive to be like python.
<ruste>As far as useability etc. goes.
<ruste>davexunit: OpenSSL etc. Sorry, that was unclear.
<dsmith-work>Python does seem to have a whole lot of useful stuff out-of-the-box
<dsmith-work>Cool. guix has awesome
<brendyn>Can I publish a website in sxml or do webbrowsers not support it?
<ruste>I don't believe they do.
<davexunit>brendyn: that's not how sxml is supposed to be used.
<ruste>Something about being able to render the page before it's done downloading.
<davexunit>you use sxml to manipulate sxml documents within your program and then serialize it to xml
<davexunit>xml documents, that is.
<brendyn>They are isomorphic right?
<davexunit>what does that mean?
<ruste>Every xml document has exactly one corresponding sxml document and vice versa.
<davexunit>sorry I don't know what that is
<davexunit>well, no.
<davexunit>you can't reproduce the exact same input document
<davexunit>because it doesn't preserve whitespace or comments
<ruste>davexunit: Those aside, yes?
<ruste>I think.
<thomeith>i love sxml. programming servers in guile has been a dream come true for me thanks to it and the (web server) package.
<thomeith>but i do wish we had a general functional reactive library like Rx. there is a reactive component of the Sly guile game engine which i haven't tried yet, though.
<koosha>Hello friends !
<koosha>What is the Emacs irc channel ?
<jmd>koosha: #emacs
<koosha>jmd: Thanks .