IRC channel logs


back to list of logs

<amirouche>is it possible to call a procedure from its symbol
<amirouche>I'm trying ((string->symbol "display") "qsmdlk")
<amirouche>but it's failing
<davexunit>amirouche: yeah that way will not work
<turbofail>you could try ((eval (string->symbol "display") (interaction-environment)) "foo"), which will kind of work. but in general it's best not to do such things
<davexunit>the way I know is: ((module-ref (current-module) 'display) "foo")
<amirouche>it's not very dynamic : /
<taylanub>amirouche: You can do it like davexunit said, but that smells like bad practice; whatever problem you're trying to solve can surely be solved in a better way.
<amirouche>with case...
<turbofail>with a hash table, usually
<amirouche>probably a hashtable is better in the long run
<turbofail>which is basically how the run-time module lookup would work anyway. but having your own hash table will give you more control over it
<amirouche>i'm writring a skribe to html translator
<amirouche>in the spirit of skribilo
<amirouche>or something I'm not sure how all this works
***tolk` is now known as tolk
<nalaginrut>morning guilers~
<davexunit>hey shanecelis
<shanecelis>heh, oops.
<dsmith-work>Hey Hi Howdy, Guilers
<wingo>heya :)
<amirouche>Hi :)
<amirouche>my program works, so far, so good
<amirouche>it's refreshing to learn a new language
<amirouche>also I was thinking that working without using OOP was not pratical
<amirouche>but actually so far it works :)
<amirouche>I could use OOP but it's kind of an extra layer of flexibility I don't need right now
***linas_ is now known as linas
<stis>evening guilers!
<shanecelis>I ordered a Leap Motion controller. Expect to see a guile-leap-motion package pop up once it gets here.
<stis>That would be a fun task :-)
<shanecelis>I should have paid for fast shipping.
<stis>currently I'm stuck with xml schema, irk!
*stis really think that one should try to follow the KISS route for xml technology in stead of all the bloat.
<davexunit>shanecelis: you've been creating library bindings like crazy lately!
<shanecelis>davexunit: They've built up over time. I had them all part of a big monolithic app, but now I want to run it in separate pieces, so I've been breaking them apart. It's good. It's nice to get things into modules.
<dsmith-work>shanecelis: Cool
<shanecelis>Yeah, just so people know, I made some incomplete bindings for Bullet Physics library, NSGA-II (real valued genetic algorithm optimization), mathematica eval interface, a logging (log4c) interface, an open sound control (liblo) interface.
<shanecelis>search for guile and you'll see them.
<shanecelis>Having a autotools template has made it pretty easy to package things up such that they can be distributed.
<shanecelis>Still it's a lot of ceremony for what doesn't feel like a lot of code.
<shanecelis>davexunit: How's the repl going?
<shanecelis>davexunit: (I need to just download and try guile-2d. It's on been on my agenda.)
*shanecelis afk
<davexunit>shanecelis: The repl is going okay. the global mutex solves part of the problem. now I want to take the thunks that the repl creates and schedule them for execution in the main thread.
<davexunit>not sure how I will handle exceptions and stuff, though.
<shanecelis>I just started using the (call-with-error-handling proc) procedure, which is awesome and I wish I had found out about earlier. I'm not sure it would work in your circumstance (it might end up _nesting_ REPLs if it did work).
<davexunit>shanecelis: if you look in (system repl repl) you will see quite a large nest of error handling.
<davexunit>I'm not sure how to translate that.
*shanecelis nods
<davexunit>but in theory it should be possible.
<davexunit>so once the work is done I will have a wonderful REPL for guile-2d.
<shanecelis>davexunit: that'll be awesome.
*shanecelis afk (lunch)
<davexunit>late lunch. enjoy.
<amirouche>davexunit: is it your blog ?
<davexunit>amirouche: yes.
<davexunit>started it not so long ago.
<amirouche>awesome :)
<amirouche>Thanks to you I discovered two intersting software
<amirouche>StumpWM and MediaGoblin :)
<davexunit>good reason to keep blogging. :)
<amirouche>too bad I've put aside a Python to learn guile
<amirouche>yes of course
<amirouche>the creator of MediaGoblin has so much luck to work on his own software
<amirouche>I'd like to do the same
<amirouche>Do you know who pays him ?
<davexunit>he did a fundraiser with the FSF
<davexunit>he got about $40,000
<davexunit>I think.
<shanecelis>amirouche: you can always sneak away into academia. :)
<davexunit>that's a low income for a programmer for a year, but he was happy with it .
<amirouche>that's what I was gonna say
<davexunit>since he got to work on mediagoblin.
<davexunit>I'm a "junior" developer still and I make much more than that.
<amirouche>UK or US ?
<sneek>Welcome back add^_, you have 1 message.
<sneek>add^_, mark_weaver says: to understand psyntax, you'll need to read "Syntactic abstraction in Scheme" by R. Kent Dybvig, Robert Hieb, and Carl Bruggeman <>
<add^_>sneek: later tell mark_weaver Thanks for the link!
<sneek>Got it.
<add^_>sneek: botsnack
***ijp` is now known as ijp
<ijp>I remember chipping in to the mediagoblin fundraiser
<ijp>jordigh was moaning at people on #emacs to support other gnu projects
<tupi>the octave maintainer ?
<tupi>why [the hell :)] didn't they choose guile by the way
<tupi>[just thinking loudly]
<amirouche>seems like guile web is still in progress, that might be the reason ?
<ijp>is that ttn's thing?
<amirouche>ttn ,
<ijp>thien thi nguyen
*ijp double checks spelling
<add^_>It's correct
<add^_>Except he uses a - too
<ijp>well, it's missing a hyphen
<add^_>thien-thi nguyen
<add^_>Like that name
<add^_>I thought amirouche meant the (web http) and such modules..
<amirouche>I might be wrong, but python has at least sqlalchmy which make it easy to work with a database
<amirouche>whereas guile AFAIK only has communication libraries with databases
<amirouche>mediagoblin don't seem to use framework so it looks like he did all the remaining
<ijp>or maybe he just likes python
<add^_>amirouche: define "easy to work with a database"?
<add^_>I think ijp's guile-gdbm was easy to work with. :-P
<amirouche>actually there quite of few libraries in this project
<ijp>gdbm is not a production database, and that is not a production binding :)
<add^_>But that wasn't the question ;-)
<ijp>just dont' tell gdbm I said that, they'll probably flame me
<add^_>Ah well, I remember using guile-sqlite3 was kinda annoying but that was mostly because I was (and still am) ignorant to SQL stuff.
<amirouche>looks like gdbm is only a key/value store with no transactions
<amirouche>that's it
<amirouche>SQLAlchemy avoid the needs to write SQL
<amirouche>you write plain python stuff on fallback to SQL when you really need it
<ijp>sqlalchemy is a pretty large library
<amirouche>tables are represented by classes
<amirouche>I don't know very well SQLAlchemy but the django's equivalent
<amirouche>anyway both do the same and they are quiet useful productivity tools
<amirouche>for instance a query looks like Table.objects.filter(Table.attribute == "spam").filter(age >= 25) etc...
<amirouche>they specific functions to deal with more tricky queries like OR or select and update queries etc...
<amirouche>Anyway I'm tired of RDBMS, I'm thinking about creating a graph database to run query against in scheme
<amirouche>the things I'm not sure is whether to rely on the JVM (easy) or not (difficult)
<amirouche>relying on JVM is the easy solution since they are already graph databases, it's just a matter of plugging a Scheme in the story
<ijp>I've been meaning to try out neo4j forever
<ijp>such is the depths of my laziness
<amirouche>you should it's fun :)
<add^_>Then use neo4j
<add^_>make bindings or whatever for it
<ijp>well for one my arms are sore from juggling
<amirouche>I already tried binding neo4 in Python through JNI and the fasted JNI library available in Python but this failed for two raisons 1) Global Interpreter Lock in Python, you can't multithread the queries 2) JNI takes to much time to process iterators
<ijp>besides, I should really release that memcached library I basically finished in february
<amirouche>actually I already wrote a standalone java server for graphdbs but lost all the code during a crash (!)
<add^_>ijp: I meant amirouche should make the bindings :-)
<ijp>amirouche: blah blah backups blah blah
<add^_>I should continue reading my new book.
<add^_>But I should also go sleep. :-/
<amirouche>what is it ?
<add^_>The book?
<add^_>"The Lambda Calculus, its Syntax and Semantics"
<ltsampros>question: (tms:clock (times))
<ltsampros>does this returns nanosecond timestamps ?
<amirouche>it doesn't seem to be nano seconds
<amirouche> The current real time, expressed as time units relative to an arbitrary base.
<ijp>please dont' refer to the docs for guile 1.6
<ijp>they are way out of date
<amirouche>same here
<ijp>all the same, assume anything with a 1.6 in it is wrong until proven otherwise
<ijp>ltsampros: srfi 19 time objects have nanoseconds fields
<ijp>I'm not quite sure how they relate to the (times) function
<ijp>well, the docs do warn that the resolution may be lower
<add^_>gzochi looks like a cool project.
<ltsampros>ijp: thanks.
<ltsampros>haven't got into the habit of looking the srfi