IRC channel logs

2016-04-29.log

back to list of logs

<nalaginrut>civodul: hi ludo, is fencepost down now?
<nalaginrut>cc mark_weaver
<civodul>nalaginrut: seems like it, along with git.sv.gnu.org
<nalaginrut>I failed to send mail and ping
<nalaginrut>OK, just confirm ;-)
<civodul>and lists.gnu.org
<nalaginrut>hmm
<civodul>well!
<civodul>i think it's 2AM in Boston, so we may have to wait
<nalaginrut>alright
***peterbrett_work is now known as peterbrett
***peterbrett is now known as peterbrett_work
<nalaginrut>civodul: it's ok now
<flurb>Hi, i installed gneuralnetwork to /opt/gneural and want to use libgneural_network with dynamic-link
<flurb>that library is installed to /opt/gneural/lib/libgneural_network.so (symlink)
<flurb>I start guile with LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/gneural/lib GUILE_LOAD_PATH=script guile
<flurb>directory script contains simple scm file which loads library with dynamic-link. however i get file not found error
<flurb>what am I doing wrong?
<nalaginrut>flurb: which version are you using? IIRC there's no libgneural_network.so, but only a executable file gneural_network
<flurb>I'm using git version and worked on librarifying gneuralnetwork, see "Compiling gneuralnetwork as library" thread on ML
<flurb>archives are currently unavailable
<nalaginrut>oops, I think GNU server is down occasionally today, I can't pull from git.savannah.gnu.org
<flurb>nalaginrut: I think it's version 0.8, jean makes odd use of git...
<nalaginrut>well, yes ;-)
<nalaginrut>I'm still doing the home work of NN, I'll do some contribution when I done the course
<nalaginrut>alright, I can't download the tarball from gnu site too
<flurb>savannah has never enough resources :(
<nalaginrut>yes, I plan to rewrite savannah in modern way when Artanis get mature
<flurb>that's a great plan, I should play with Artanis until then
<nalaginrut>it's why Artanis was born ;-)
<flurb>you should prepare against pushback against too modern frontends. it must be usable with text mode browsers
<nalaginrut>it's ok, the views (say, page rendering) is splitted out, it's the modern way too
<nalaginrut>so we may have a different view when we're using safer browser which disabled JS
<flurb>isn't that a lot of duplicated work? i.e. one view with lots of javascript added and another with traditional form?
<nalaginrut>maybe, developers may need to write different template code to be rendered according to clients, but that's the first obvious way to meet the need. Athough it sounds not perfect way
<nalaginrut>one of the solution could be not add JS code for fancy UI when rendering views, automatically
<flurb>yes it sounds cumbersome. but savannah needs a rewrite and if that's the only way to make most happy I'd say lets do it :)
<nalaginrut>then we don't have to maintain two views which are most the same
<flurb>what resources are you using to learn about NN? I'm not familiar either and so far just wanted to get a basic guile binding working
<nalaginrut>flurb: Machine learning course of Stanford, it's good for beginner IMO
<flurb>thanks :)
<nalaginrut>flurb:
<nalaginrut>flurb: https://www.coursera.org/learn/machine-learning/home/info
<nalaginrut>this session begin, you may prepare for next session
<nalaginrut>if you want to get the certificate anyway
<nalaginrut>but you may start the course anytime, I'm not sure, you have to try
<jmarciano>nalaginrut: I wish to use the Artanis function with templating, make-string-template
<jmarciano>only it expects exact number of variables, and if there is one missing, it makes error
<nalaginrut>jmarciano: I'm not sure about your problem, could you give a code and error message on github?
<jmarciano>I have explained it to you in email from 3rd April
<jmarciano>it is more of a wish-list and not a bug
<nalaginrut>I don't remember this mail, did I reply to you?
<jmarciano>like 2 things, if there is no variable, it shall be extrapolated to nothing, and rather not fail
<jmarciano>no, that's why I remember it now
<nalaginrut>oh, maybe it's the problem of the filter
<jmarciano>the other thing is, that it shall not expect the exact number of variables
<jmarciano>I compare your implementation to various text templating in Perl
<nalaginrut>jmarciano: are you talking about make-string-template or sxml template?
<jmarciano>make-string-template
<jmarciano>it would be extremely good to have it like you started it.
<nalaginrut>jmarciano: it's hard for me to understand the idea from words, I need an example code with an exptected result
<jmarciano>OK let me give you example from what i already use for thousands of times per month
<nalaginrut>jmarciano: could you send the mail again?
<nalaginrut>nice, thanks
<jmarciano>Mr {$firstname} {$lastname}, much greetings from {$me}.
<jmarciano>the function make-string-template shall accept IMHO some kind of hash/alist, whatever, and extrapolate those variables which it finds.
<jmarciano>if it has firstname, it would replace it. If not, it should not give error. Like it does now.
<jmarciano>1. it should not give errors, 2. it shall not expect exact number of variables. Than it becomes usable in same manner like in other languages, or so many templating methods.
<jmarciano>email forwarded again
<jmarciano>Subject: Artanis, questions on tpl
<nalaginrut>jmarciano: if it don't throw error when there's no given value, how should it display? #f ?
<jmarciano>If template is: "here {$variable} something" it shall extrapolate to "here something"
<jmarciano>with 2 spaces, because after here was space, before something was space, it extrapolates to nothing, but shall not throw errors.
<nalaginrut>jmarciano: I can't find the mail topic in my mail box, and not in Spams too, I belive it's missed when transfering ;-(
<jmarciano>and the other thing in usability is, that it shall rather accept some kind of key-value hash or alist, whatever
<jmarciano>I gave it in private, maybe I am sending to wrong email address
<jmarciano>but it is all here
<nalaginrut>ok, so you proposal two spaces when the values is #f
<jmarciano>no. Spaces were there, they stay because they are there
<jmarciano>proposal is that if there is no variable, it shall not throw error. It shall be nothing.
<nalaginrut>ok
<jmarciano>because function does not know what it will get as template
<jmarciano>I am using 150+ templates in the database, they have various variables inside.
<nalaginrut>it's fair
<jmarciano>I cannot bind function to know what variables are in the template that is coming.
<nalaginrut>and it accepts alist I think, you have to use `apply' and keywords as keys
<jmarciano>on the other side, if I make function to extrapolate variables in the template, it would not be nice to put all variables in such function. that is binding the content to the function.
<nalaginrut>for hashtable, it could be checked and apply too
<jmarciano>I would look into that later.
<random-nick>anyone know of something like pcase but for guile scheme?
<flurb>nalaginrut: It's back: https://lists.gnu.org/archive/html/gneuralnetwork/2016-04/msg00015.html
<nalaginrut>jmarciano: I'm tring to understand the idea, and I'll open an 'feature request' issue on github with the description later, I'll need you double confirm the description then ;-)
<jmarciano>well I removed my github account
<nalaginrut>flurb: well, but there seems no new upate in git repo
<jmarciano>isn't it simple, if there is no variable, the function shall not throw error.
<jmarciano>and function shall not know as it does not know, what template comes until it is hard coded inside.
<jmarciano>which means the function cannot know how many variables are in the specific template
<jmarciano>so it shall extrapolate variable if it is there, and if not, it shall extrapolate the expected, non-existing variable into nothing, but not throw error.
<nalaginrut>jmarciano: I guess the feature contains two part, 1. missing value won't throw error; 2. support hashtable for key-value
<jmarciano>voila
<jmarciano>it is just basic in all templating systems I have ever tried.
<nalaginrut>but frankly, why not (apply your-tpl-gen (hash->alist ht))
<nalaginrut>it saves some work
<nalaginrut>then we just need to handle the blank value
<jmarciano>if it works like that no need for changes
<jmarciano>than only number 1 is left, right?
<nalaginrut>yes, I'll fix 1
<jmarciano>that is very nice
<nalaginrut>oh, one more thing, I'm working on the new server core of Artanis, so it won't be very soon to release before I can make it work. So you may not expect this fix in release soon
<nalaginrut>jmarciano: hope you're not hurry to use it ;-)
<flurb>nalaginrut: yes, so it's still v0.8. in the mail I attached some patches which librarify gneuralnetwork. do you want to give it a try?
<flurb>scheme code is https://paste.ubuntu.com/16124657/
<jmarciano>yes I see
<nalaginrut>jmarciano: but you may see the fix in commit someday
<nalaginrut>flurb: not now, I think it's better to be reviewed by Jean first ;-)
<nalaginrut>alas, savannah is too old school to communicate with folks, or I could drop github issue...
<jlicht>Hi guile! I enabled readline support for my repl, but I'm not getting the autocomplete support I was hoping for.
<jlicht>It seems that a module (e.g., `haunt utils`) is in my guile load-path, as I can load it using `(use-modules (haunt utils))`, but getting the repl to autocomplete the module name for me seems to not do anything
<jlicht>The symbols exported by the imported module are autocompleted properly though :-)
<janneke>jlicht: i don't think many of us use guile-readline...
<jlicht>janneke: the same actually applies to Geiser as well, at least before these modules are imported ;)
<janneke>that's interesting
<flurb>jlicht: iirc guile does not know about existing modules, it only starts searching for it as soon as a module is requested
<jlicht>flurb: That is totally okay, I was just afraid it might have something to do with my own configuration
<davexunit>jlicht: readline doesn't do autocomplete AFAIK
<davexunit>or at least not module autocomplete
<jlicht>davexunit: after having enabled readline, pressing <TAB> does autocomplete in most scenarios. Maybe it just allows the <TAB> -> autocomplete to be triggered?
<Jookia>Is there a way to get a backtrace involved functions that I suspect have been optimized out?
<sneek>Jookia, you have 1 message.
<sneek>Jookia, ng0 says: contact me in psyc://psyced.org/@libertad about the git repo for guix-outside-of-guix thing, i'll have the server ready soon.
<random-nick>is thee something like pcase but for guile scheme?
<random-nick>there*
<taylan>random-nick: (ice-9 match)
<Jookia>Perhaps there's an established workaround?
<rain1>i think theer are tools to disassemble compiled code
<rain1>i don't remember how to invoke it though
<Jookia>This is at the REPL
<random-nick>try ,optimize
<Jookia>Guile backtraces don't keep track of my intermediate function calls
<davexunit>,x does disassembly to show VM ops
<Jookia>ie if a calls b calls c and c errors, it'll only report c (if anything at all)
<random-nick>,optimize doesn't show all the optimizations, only the ones that can be described in scheme
<df_>Jookia: if they're tail calls, that's unavoidable
<Jookia>df_: Is there a way to disable this
<davexunit>that's like asking if a backtrace in a loop should show all previous iterations of the loop
<Jookia>This isn't a loop
<davexunit>what you said to df_ made it seem like you are using tail calls
<Jookia>Let me link to my example
<Jookia> http://paste.rel4tion.org/342
<Jookia>Sometimes Guile will not even give a backtrace
<taylan>MIT/GNU Scheme has a strategy to keep a constant amount of TCO'd stack frames around for debug info, but I don't think Guile has such a thing (yet)
<jchmrt>Jookia: maybe you could use ,trace
<taylan>(I'm stressing the "constant amount of" because one might ask "isn't the whole point of TCO to *not* keep them around?" ^^)
<rain1>taylan: that's fine
<Jookia>jchmrt: That's not as useful when macros come in to play
<random-nick>taylan: afaik lua also keeps track of tail calls but doesn't remember the function name
<rain1>it's just a O(1) number of frames, TCO takes you from O(n) down to O(1)
<jchmrt>Jookia: ah okay
<Jookia>The correlation of source code line to error message is important
<Jookia>Perhaps this is a fundamental issue of macros
<df_>bah I was about to offer some advice
<df_>oh well
<davexunit>don't worry about it
<davexunit>they come and go
<paroneayea>hm hm
<paroneayea>so the game I'm writing will expose a connection over telnet
<paroneayea>but
<paroneayea>I wonder if there's some way to set up a local connection with something like (readline) but which is non-blocking
<paroneayea>I guess there probably isn't
<wingo>prolly not but there is rlwrap
<paroneayea>wingo: what's that?
<wingo>guix package -i rlwrap :)
<wingo>run rlwrap nc localhost 12345
<paroneayea>wingo: innnnnnteresting :)
<wingo> http://docs.libuv.org/en/latest/design.html is nice and clear and perhaps interesting to you paroneayea :)
<wingo>ACTION looking to see how to do nonblocking io in guile
<df_>wrapping http://libevent.org/ ?
<df_>ah, libuv seems to be solving a similar problem
<wingo>apparently libuv was started as an abstraction layer between libev and windows IOCP; libev was a rewrite of libevent.
<paroneayea>wingo: thanks :)
<paroneayea>wingo: yeah I've wondered if we want something like libev / libevent
<wingo>i don't think guile should depend on any of those but they have good ideas i think
<paroneayea>*nods*
<paroneayea>that seems to be the general comment :)
<df_>do you want async io as part of guile core?
<wingo>and i need to think a bit about windows, systems with kqueue, etc -- there is too little uniformity in this part of posix
<paroneayea>wingo: the main benefit seems to be being able to have a general abstraction over "what's available"
<wingo>df_: sorta? see recent threads on wip-port-refactor on guile-devel
<paroneayea>where "what's available" is some subset of select, poll, epoll, whatever windows usese...
<paroneayea>wingo: I guess we could provide that ourselves in guile too though.
<df_>I think it would be silly to re-implement that abstraction when somebody's already done it
<rain1>Q: What's the difference between USA and USB?
<rain1>A: One connects to all your devices & accesses your data, and the other is a hardware standard
<df_>plus libevent/uv would give you whatever those crazy kernel devs think of next for free
<df_>ACTION looks at ML
<wingo>"for free" ;)
<df_>free in terms of coding effort
<wingo>ACTION shrug
<rain1>what is it for?
<taylan>rain1: that's a good one ^^
<paroneayea>wingo: rlwrap isn't in guix yet, but I'm guess it's not hard to package :)
<taylan>rain1: libevent/libuv are for async IO
<rain1>the async stuff seems like the new paradigm of 2016
<davexunit>depending on libuv would probably be a bad idea
<rain1>i really want to get my head around this new idea ...
<random-nick>rain1: basically async means that you leave a message in a queue and there's a loop called the event loop which waits for new messages in the queue and then does the action that the message requests
<df_>rain1: essentially, being called when there is io work to do, rather than having an event loop or blocking
<df_>well, I guess the event loop and blocking are abstracted from you
<df_>but modern kernels have interfaces to do this more efficiently than the traditional select/poll
<df_>non-standard interfaces, so there are compatibility libraries to wrap them
<rain1>ooh
<random-nick>rain1: sometimes there are more threads each running a separate event loop
<rain1>what is this kernel level thing?
<rain1>random-nick: what you described sounds exactly like 8sync
<df_>in the linux kernel it's epoll
<rain1>epoll i see
<random-nick>rain1: that's why 8sync is called a async framework
<rain1>will 8sync bind to epoll?
<df_>in bsd it's kqueue
<df_>(freebsd, at least)
<wingo>ACTION also likes http://tinyclouds.org/iocp-links.html; super clear
<rain1>thank you this looks really comprehensive
<rain1>this is wizard magic http://tinyclouds.org/colorize/
<dsmith-work>Happy Friday, Guilers!!
<rain1>happy friday!
<random-nick>how do I declare a global variable that is avaible only at macro expansion time and macros can use?
<random-nick>is syntax parameters the only way?
<df_>does eval-when do what you want?
<wingo>random-nick: syntax-parameters are a good way for that. otherwise (eval-when (expand) ...)
<random-nick>is it possible to export that?
***karswell` is now known as karswell
<daviid>happy friday guilers!
<sneek>Welcome back daviid, you have 1 message.
<sneek>daviid, lloda says: thx
<stis>Happy Friday!
<rain1>hi!
<jmd>Any tips on hunting Heisenbugs in Guile modules?
<stis>trace function and do printouts
<daviid>Heisenbugs in Guile modules? or in your modules ?
<jmd>It's not my module. My code is using the module.
<daviid>jmd: could you post a snipset [lisppaste, not pastebin pleas]
<jmd>well the trouble is, being a heisenbug it's hard to localise.
<daviid>jmd: afaict, after guile-2.0 was born, I never ever face a module Heisenbug in Guile again
<jmd>Well surely that depends on the module.
<daviid>jmd is it guile-2.0 or guile-2.2?
<jmd>2.0.11
<daviid>so, what is the bug? can you describe it?
<jmd>It segfaults sometimes
<jmd>But not always
<daviid>jmd: using the FFI?
<jmd>Not so far as I'm aware.
<daviid>what guile modules are you using?
<jmd>guile-ncurses
<daviid>ah, that is not guile :)
<jmd>No. It's a module
<daviid>and it surely use the FFI. you probably better try to contact the maintainer, trying to narrow down the condition(s) that raise the exception
<daviid>jmd: I don't know neither do use guile-ncurse, sorry
<daviid>jmd: so, just to be precise here, it is not a Guile module, it is a guile-ncurse module
<jmd>Well it's a module
<daviid>if you write here 'a Guile module segfault from time to time', everybody hides and get scared to death :)
<jmd>It scares me too.
<daviid>jmd: if you write 'a Guile module', we all think it is a module that comes with Guile, not an external module, you see? no big deal, but it is a hude difference.
<daviid>jmd: anyway, good luck, but it has probably nothing to do with guile, but with guile-ncurse itself
<daviid>so try to contact the author/maintainer
<paroneayea>hm :(
<rain1>whats up paroneayea?
<paroneayea>wingo: is there any hint in the compiler as to *what* made a coroutine unrewindable?
<paroneayea>oh no
<paroneayea>wow
<paroneayea>hmmmm
<paroneayea>welp, that's interesting
<paroneayea>goops methods (in guile 2.0) are unrewindable :)
<rain1>oh man :/
<rain1>that sucks
<paroneayea>but iirc a lot of goops was recently rewritten in guile...
<davexunit>paroneayea: yes goops is rewritten in guile for 2.2
<paroneayea>davexunit: yeah now trying to see if the code runs fine with 2.2
<amz31>I was thinking about my graphdb project a lot of people downloaded but I had no feedback at all except the download count which was great (according to my own numbers regarding my past projects) but recently i switched to a wiredtiger only backend an nobody downloads it any more :(
<amz31>ACTION amz3
<amz31>oops!
***amz31 is now known as amz3`
<amz3`>anyway now I have another project idea!!
<rain1>whats your new idea? :D
<amz3`>I figured that I am using proprietary search engine only for looking a few website, so I think I will try to build a search engine for the limited set of website I need
<rain1>ooh wow that sounds brilliant!
<amz3`>ah ha thanks!
<amz3`>rain1: what are you up to?
<daviid>paroneayea: scheme is not rewindable either, that would [always] be a user feature, am I right?
<rain1>i started to implement a 'shell' (in C)
<rain1>and porting Chez to openbsdd
<daviid>paroneayea: if i understand rewindable correctly
<amz3`>rain1: wow!
<paroneayea>daviid: I don't really know what you mean; scheme is rewindable
<paroneayea>it's stuff that goes into C and calls back into scheme which breaks delimited continuations
<davexunit>yeah, there cannot be a C stack frame when using delimited continuations
<paroneayea>daviid: http://wingolog.org/archives/2010/02/26/guile-and-delimited-continuations has a great explaination