IRC channel logs

2015-08-10.log

back to list of logs

***cluck_ is now known as cluck
<mark_weaver>ACTION is running GuixSD on a non-Intel machine for the first time, namely my Lemote YeeLoong.
<mark_weaver>oops, wrong channel :)
<cluck>mark_weaver: right channel if you wanted to make people jealous ;)
<nalaginrut>morning guilers~
<artyom-poptsov>Hello nalaginrut
<nalaginrut>heya
***michel_mno_afk is now known as michel_mno
<paroneayea>hey #guile! who wants to see something exciting?
<paroneayea> http://pamrel.lu/b7e97/
<paroneayea>mark_weaver: ^^^
<paroneayea>mark_weaver: thanks for all your help :)
<paroneayea>mark_weaver: still much to do but as you can see, the main stuff is working!
<mark_weaver>paroneayea: that's great news! woohoo! :)
<paroneayea>mark_weaver: :D
<amz3>o/
<amz3>no updates on ijp's guile+javascript repository :-/
<amz3>how can profile the memory of my program
<amz3>I am under the impression that is not garbage collected correctly
<amz3>I mean my ffi binding are leaking some how
<amz3>are maybe I could try to use guile git like linas
<amz3>mark_weaver: how can I learn what is using memory in my guile program?
<amz3>using some dichotomy, i found that my immutable association is leaking
<amz3>or at least it does not GC enough
<amz3>and there is no cycles
<amz3>ping linas
<amz3>my program is running since 3 hours without leak which means... that at least the subset of wiredtiger I use doesn't leak
<amz3>the program that leak, import 1G of records inside a wiredtiger database. I do some alist-delete during the import
<ArneBab>paroneayea: I just found your article javascript beyond javascript and was happy to see your link to wisp: http://dustycloud.org/blog/javascript-beyond-javascript/
<ArneBab>paroneayea: but I saw that you use the domain drachentränen.de — could you change that to draketo.de? (that’s the canonical one)
<ArneBab>paroneayea: I stumbled over that while looking whether I could find updates to ijp’s compile-to-js project
<amz3>I fully agree with the stockholm syndrom, I use the same expression :)
<amz3>sorry to comment here, might interest
<amz3>trancompiling is ok only if the time spent on the application is worth the time required to load the runtime
<amz3>hence the new asm.js which is bytecode based
<amz3>discussing the matter with the maintainer of pypy.js he told the way of pythonium is still ok
<amz3>as it loads pretty fast
<amz3>Python is not huge. stdlib is huge. That's said I consider strong typing as huge, as I was too lazy to implement it
<amz3>disclaimer I don't say pythonium is perfect, there much room for improvements but for trivial things it works. Now last time I tried to do something with it I just got tired ;)
<amz3>I remember, even if there is transparent access to javascript functions ie. doing js_func(a, b, c) is possible to do from python
<amz3>python code
<amz3>you still have to convert python datastructures to javascript one. Right now list and dict datatypes are a mix of *pythonium* specific datastructures and javascript array and objects
<amz3>the only viable solutions, is to build javascripts APIs that are as much opaque as possible to avoid both way conversion of datastructure (especially the nested kind...)
<amz3>I tried to bind virtual-dom library
<amz3>as an example of non trivial stuff.
<amz3>(That said doing jquery can work well)
<amz3>I read a lot of people complaining about the state of python in the browser, few people really tried it. The discussion boils down to "this is not californian/flat/startup theme website, the library can't work well"
<amz3>on hackernews
<dsmith-work>Morning Greetings, Guilers
<dsmith-work>sneek: seen wingo
<sneek>I last saw wingo on Jun 24 at 08:05 pm UTC, saying: and how long prerelease will take, no idear.
<amz3>dsmith-work: o/
<paroneayea>davexunit: mark_weaver: hm, so I think there are two big things that will be needed in order to make this super useful
<paroneayea>one of them is type conversion to/from native types
<paroneayea>I'm looking at how racket does it, and it's not a trivial process to get all that working nicely
<paroneayea>at the moment guile-postgres can just return strings
<dsmith-work>Heya amz3
<paroneayea>davexunit: mark_weaver: but I guess I should publish things and iterate towards that later!
<davexunit>paroneayea: yeah, do that.
<paroneayea>hey, verified something cool:
<paroneayea>scheme@(guile-user)> (exec-query conn "SELECT id, data->>'name' AS name FROM books")
<paroneayea>$6 = (("1" "Book the First") ("2" "Book the Second") ("3" "Book the Third"))
<paroneayea>scheme@(guile-user)> (exec-query conn "SELECT id, data FROM books")
<paroneayea>$8 = (("1" "{ \\"name\\": \\"Book the First\\", \\"author\\": { \\"first_name\\": \\"Bob\\", \\"last_name\\": \\"White\\" } }") ("2" "{ \\"name\\": \\"Book the Second\\", \\"author\\": { \\"first_name\\": \\"Charles\\", \\"last_name\\": \\"Xavier\\" } }") ("3" "{ \\"name\\": \\"Book the Third\\", \\"author\\": { \\"first_name\\": \\"Jim\\", \\"last_name\\": \\"Brown\\" } }"))
<paroneayea>jsonb works :)
<davexunit>cool
<davexunit>:)
<davexunit>paroneayea: do you get any type info from the pg client to know how to parse the strings?
<daviid>davexunit: the type are in the schema
<paroneayea>davexunit: yeah I know how to get it, I'm going to supply the user with that metadata and for now I already allow the user to pass in a serialize method of their own
<daviid>paroneayea: you can also look to how it's done in guile-pg, maybe
<paroneayea>davexunit: so you could serialize to something else
<davexunit>do you really want that, though?
<paroneayea>davexunit: however right now I'm having it return strings, there's a "better" way to do it where it returns bytes, and you convert them yourself
<paroneayea>davexunit: but I think for now I can already use this fully
<davexunit>cool :)
<paroneayea>davexunit: anyway enough works presently where users can kind of do the conversion themselves, and maybe as I go I can expand out into more optimal structures.
<davexunit>yeah, converting numbers would be the easiest place to start, most likely.
<davexunit>and strings of course.
<davexunit>using guile's bytevector procedures
<paroneayea>argh I really need a nice way to deploy servers where I won't begrudge having to manage it (still hoping guixops is the answer!). I really don't want to set up my own code hosting again until I have that.
<paroneayea>I think for now
<paroneayea>I'm going to dump this on notabug.org
<linas>hi amz3
<amz3>hi linas
<amz3>I'd like to know which kind of GC bug guile git solves?
<linas>you'd mentioned my name ealier
<linas>the GC bug(s) are difficult and obscure, involving multiple threads
<davexunit>paroneayea: I kept it real simple with gitweb and gitolite and it's been easy to manage in the interim
<davexunit>of course, I have no bug tracker
<amz3>because I have a script that import a massive number of assoc in a database and its memory grows without bound. I'm trying to eliminate the possible source of bugs
<amz3>I pretty sure that it's the immutable association that I use that does that
<linas>if you manually call (gc) priodically, does that help?
<amz3>I'will have a look at that, thanks for the tips
<daviid>[ lost my internet connection ] paroneayea me too, i really need to set-up something
<linas>I'm not sure I know what an "immtable association" is.
<linas>there is a C call called "scm_gc_protect" and if you call that, the memory will never evr be freed.
<amz3>I'm doing pure guile
<linas>ahh!
<amz3>(immutable means when you "modify" a datastructure, it returns a new datastructure instead of returning the same datastructure but modified)
<amz3>which means you can re-use the old datastructure
<linas>yeah, my bugs are all due to crazy mixtures of C++ and guile and threads and fluids and ports and ...
<davexunit>that's what persistent means, actually. ;)
<daviid>davexunit: did you consider cgit when you set-up your own server?
<amz3>persistent ok thx
<daviid>linas: any hope to port more stuff on pure guile?
<davexunit>daviid: yeah
<davexunit>daviid: but gitweb was easier
<davexunit>since it comes with git and all that
<daviid>ok, i just like very much cgit :)
<davexunit>I think cgit is cool, too.
<amz3>linas my code is not as complex, but I have ffi bindings. I pretty sure it doesn't leak
<linas>daviid, no, the core is in C++ and it has bindings in guile, python and haskell
<amz3>linas: what is it?
<linas>I have 3 c++w/guile projhects, only one that I;'ve touched in the last ten years.
<linas>gnucash, which is very active, but I'm no longer involved
<linas>gnotime, a gtk/gnome time tracker with guile-configurable stuuff
<linas>and opencog, which is the current big monster app that I wrestle with
<amz3>cog like program proof solver?
<linas>artificial general intelligence
<amz3>you have a nice track :)
<linas>it does natural language, reasoning, learning, etc.
<amz3>I stumbled upon this. You have database of triplet I think
<linas>robitics.
<amz3>so it's might not be that project
<linas>daviid -- I figured out my UTF8 bug ... the fix was to call (setlocale LC_ALL "") every time a new thread is created.
<daviid>from the few git web interface I used, my pref is for cgit, so i'm lookng to service that provide it, or will maybe setup mine
<daviid>linas: really? the manual says it is global and specific measures should be taken ig thread independent :) ...
***michel_mno is now known as michel_mno_afk
<amz3>(I am thinking about AtomSpace)
<linas>amz3 the project is http://opencog.org/ it uses guile for "most things" but uses python for connecting to ROS
<linas>amz3 yes atomspace
<amz3>ACTION smiles
<amz3>I like this project
<daviid>linas: 7.2.13 Locales "... Note that setlocale affects locale settings for the whole process. See locale objects and make-locale, for a thread-safe alternative."
<linas>daviid - I do a setlocale on the very first, master thread. However, the other threads get created in C++ and I think guile doesn't inherite the dynamic state from the main thread
<daviid>oh ok, that i don't know
<linas>i.e. when I create a thread in C++, and then run guile in it, then the various fluids in it don't contain values inherited from the inital thread
<linas>I'm guessing that %port-encoding-state fluid is set to #f which defaults to iso-8859-1
<linas>so, in the end, its just me shooting myself in the foot, it seems.
<daviid>linas: ok, don't shoot your foot! :) but in 2.2 %port-encoding-state should be utf-8 no?
<daviid>are you talking about stable-2.0 now?
<daviid>just curious
<linas>yes, I guess so, which is almost surely why things worked in guile-2.2 but not 2.0
<daviid>ok, that make sence
<paroneayea>okay!
<paroneayea>so a friend gave me a great name for guile-postgres-ffi thingy
<paroneayea>guile-squee!
<linas>yep. rather painful
<paroneayea>derivative of "squeal", as a silly pronunciation of "sql"
<amz3>Oo
<daviid>linas: so, no utf-8 bugs in stable then
<amz3>paroneayea: I like it!
<linas>err, I guess not.
<daviid>paroneayea: why not guile-postgres ?
<linas>daviid, the defaulting back to iso-8859-1 caught me by surprise, and a partial issue is that things used to "just work", but so much code has changed on my end that ... well, it was all very confusing for a while.
<daviid>guile-gnome, guile-clutter, guile-opengl ...
<linas>there already is a guile-postgres
<daviid>guile-postgres
<paroneayea>daviid: because we have guile-pg and guile-dbi-pg
<paroneayea>and it's confusing
<paroneayea>so I wanted something noticably different
<daviid>ok, i prefer guile-postgres
<daviid>but ...
<daviid>I don't think it's confusing
<linas>btw what's wrong with guile-pg?
<linas>why not use that?
<paroneayea>linas: it's already used!
<paroneayea>there's alreayd a guile-pg
<paroneayea>already
<linas>I mean guile-dbi is ugly as sin, so I understand why you don't want to use guile-dbi
<linas>but what is wrong with guile-pg?
<amz3>in a guile 2.0 program of mine, the output port is UTF-8 but when I do (with-output-to-file "out.txt") I have to (set-port-encoding! (current-output-port) (UTF-8))
<daviid>i really think that for these tols, we should match the name of the lib, and in this case, luckely enough, the is no guile-postgres yet [the mae I mean]
<linas>(I mis-spoke, I meant guile-pg not guile-postrgres
<paroneayea>linas: I had a lot of trouble trying to get it packaged in guix
<paroneayea>linas: because of its custom autoconf macro stuff
<linas>amz3 that is because each new port (in guile-2.0) defaults to %default-port-encoding which is probably #f for you which means iso-8859-1
<daviid>linas: and the actual maintainer is no very cooperative person
<paroneayea>linas: anyway, guile-squee is pretty small in its code for now!
<paroneayea>though I do hope to make it more robust
<linas>amz3 if you say (setlocale LC_ALL "") at the beginging, then I beleive that writing to a file should work correctly, without needing the explicit set-port-encoding. At least, that is what the docs imply
<daviid>guile-squee or guile-squeel ?
<amz3>linas: thanks I will try
<paroneayea>daviid: I was originally going to do "squeal" but you can squeal for positive or negative reasons, and a friend suggested "squee" instead as an always-positive squeal
<paroneayea> https://notabug.org/cwebber/guile-squee anyway here it is!
<daviid>amz3: did you call (setlocale LC_ALL "") before ?
<amz3>linas: how can I help in #opencog?
<paroneayea>davexunit: mark_weaver: still more to do, it's just a .scm for now, I need to turn it into an actual module
<paroneayea>but it's starting to move along
<daviid>paroneayea: tx, will clone and look, i'd like to learn things from your learning :)
<amz3>me too :)
<paroneayea>\\o/
<amz3>daviid: no, but i'll try
<paroneayea>linas: ah cool! you work on opencog?
<paroneayea>linas: I'm very interested in seeing that project succeed!
<linas>yes, I work on opencog. It is very very very slow going, though
<paroneayea>linas: I considered trying to use the opencog triplestores for a project recently, but I decided to keep it a bit simpler :)
<linas>hi, yeah, the atomspace is not a triplestore its way more than that
<linas>the atomsapce is actually kind-of-like a typed prolog/datalog with probability thrown in.
<linas>yes, its .. complicated ..
<davexunit>paroneayea: good stuff with squee :)
<amz3>now that I think of that again, maybe squee will better suited for something like sqlalchemy
<amz3>ACTION runs
<paroneayea>davexunit: thanks :)
<davexunit>paroneayea: when it works "good enough", we can put together a database-backed web application to use as a test for 'guix deploy' :)
<paroneayea>davexunit: :D
<paroneayea>davexunit: and I might have just the application!
<paroneayea>davexunit: since I put this together out of an actual need
<paroneayea>I'm building a federation prototype application.
<amz3>another one?
<paroneayea>amz3: yes, this to prototype the spec we're working on at the W3C
<paroneayea>real "live" federation stuff continues in mediagoblin
<paroneayea>but this is to prove the ActivityPump spec
<davexunit>paroneayea: oh awesome
<davexunit>exciting stuff
<davexunit>Guile being used for W3C prototypes
<davexunit>gotta run! later!
<amz3>that was quick
<amz3>is your application single user or multi-user like gmg?
<ArneBab>opencog should really be on gnu.org/s/guile…
<amz3>ArneBab: +1
<amz3>paroneayea: I'd like rewrite my blog to use guile, and add a few features like sharing links and connect to other indieweb
<amz3>maybe we can help each other?
<paroneayea>amz3: sure! It would be good to have users :)
<amz3>paroneayea: can I help?
<paroneayea>amz3: sure... pull down the repo and look at the source, and the TODO file
<paroneayea>there's not much there yet :)
<paroneayea>but what's there seems to work
<amz3>on notabug ?
<paroneayea>yeah, well the todo file is in the repo :)
<amz3>nah, I'm not intersted by the postgresql part :)
<amz3>the idea of running postgresql scares me
<amz3>when I do it, I do it under the supervision of solid contract ;)
<amz3>well; I will just roll my own thing I pull things from you prototype
<amz3>btw it doesn't leak anymore. but I can't use persistent association list