IRC channel logs


back to list of logs

<davexunit>woo, getting closer to a working syntax highlighter
<davexunit>will release as new library eventually
<zacts>Ok so I've totally switched over to weechat
<zacts>and apparently you can script it with guile
<zacts>which rocks
<zacts>also, there are multiple frontends to the weechat relay server
<zacts>such as weechat.el
<zacts>so I can use a local client to connect to a running weechat acting as a server
<zacts>I like it better than bnc
<zacts>also rocks
<zacts>I can connect to my chat from any GUI web browser on any computer on any major OS or distro
<zacts>and weechat will also log all login attempts too
<cmhobbs>i'd like to be able to open a tcp connection and send strings over it kind of how i can with ruby's and #puts. can someone point me in the right direction for figuring out how to do that with guile?
<cmhobbs>thanks in advance
<davexunit>cmhobbs: Guile uses an abstraction called 'ports' for all IO
<davexunit>so an open socket is just a port that you read/write to with the usual procedures like display, format, read-char, and others
<cmhobbs>thanks, davexunit!
<davexunit>woot, I have a working Scheme syntax highlighter
<davexunit>and the library can be extended easily enough to handle other languages.
<davexunit>I converted a list of parsed tokens to a list of SXML span nodes with particular CSS classes applied
<davexunit>aaand here's the code. LGPL3+ licensed:
<sirgazil>I just got a minimal SXML website working with i18n. Now I can migrate my multilingual website from Python to Guile :D
<davexunit>sirgazil: great to hear!
<sirgazil>ANd I'll be needing davexunit syntax higlighter soon :)
<davexunit>I'm also working on migrating my site from python to guile
<davexunit>getting there.
<davexunit>sirgazil: :)
<davexunit>I think the API is simple enough, just needs people to add support for additional languages.
<sirgazil>Yeah, I'm happy. Now I can sleep well tonite
<sirgazil>davexunit: And it is needed for Guile website.
<davexunit>yes, indeed. I need Scheme, C, and XML primarily.
<davexunit>I'm referring to Chicken's colorize module while I write this
<davexunit>their code is awful, but the parsing rules are handy to translate
<sirgazil>Nice. You are an incredibly prolific programmer, davexunit :)
<davexunit>thanks! :)
<davexunit>Guile is great, so I can't help but write Guile!
<please_help>Where are guile's interactions with boehmgc stuff defined?
<davexunit>with a few more convenient libraries like this, Guile will start to look more attractive to people.
<davexunit>please_help: somewhere in libguile, I imagine. maybe search for 'libgc'?
<davexunit>I don't know anything about that part of the code.
<amz3>ACTION looking for bugs in
<amz3>so there is a parser combinator embedded in it
<amz3>it's probably good enough but it doesn't have parens higlighting
<amz3>there is an interesting article on HN about coding a Full-text search engine in Javascript, it involves using a better metric that improves TFIDF called BM25
<amz3>I think the pydata video about the subject is more interesting as it explaines the underlying reason for TFIDF metric in the first place
<amz3>ie. what means TF, what means IDF, what it makes sens to do TFIDF otherwise said TD-IDF in Natural Language
<amz3>Sorry TF*IDF
<amz3>There is a link to a free book about Informational Retrieval in the HN discussion
<amz3>I recently learned that replacing words in the bag of words representation with lemmas (root words) is not efficient to do IR because basicaly different words means differents things
<amz3>even if they have the same root
<amz3>I can't recall the exact example but it in the line of: operational transformers != operate transformer
<please_help>I don't find anything directly related to boehmgc stuff in any include file for guile for some reason.
<amz3>if you checking master, it might be because master use another gc
<amz3>try the 2.0 branch
<amz3>IIUC guile 2.1 comes with a new gc
<please_help>I'm actually checking in 2.0
<amz3>I'll have look
<please_help>What motivated the change to a different GC?
<amz3>I don't know the maintainers reason, but it might along the lines of "they are bugs we can't fix" or something like that
<amz3>I have a bug with the GC: when I quickly create and destroy a lot of immutable records, the memory don't stop to grow
<please_help>I had severe memory leak issues in guile, but then I rewrote my minimal example in C using boehmgc and there's no leak.
<amz3>yes it was a memory leark of some kind
<please_help>yeah, my test example used large memory block allocs repeatedly in a loop
<amz3>I though, it was in the ffi bindings, but when I tried the guile-2.1 the leak is gone
<please_help>but the only way to cause the leak in C is: enable incremental mode, do NOT define GC_DEBUG, and compile with debug info.
<please_help>and even that causes ridiculously low amounts of leaks, so that can't be it.
<amz3>please_help: looks like my use case, I have a 8G of tuples, I load them in a database
<please_help>yeah, my use case is to load several GBs worth of data from a database, then send that to the GPU and perform a stirng of hardware-accelerated computations.
<please_help>I actually haven't found a language implementation that uses boehmgc and doesn't leak in the same way, yet I have never been able to reproduce the leaks in C, which is why I"m wondering where the boehmgc-related code is in the guile source.
<amz3>I can't reproduce the leak either without both msgpack lib and ffi bindings
<amz3>in guile
<amz3>I did not dive much, AFAIK as soon as I remove ffi bindings or msgpack the leak deasppear
<amz3>and having the loop only obviously doesn't leak either
<amz3>please_help: maybe try with guile-2.1 other users reported using it sucessfully
<amz3>please_help: I found this file: guile/libguile/gc.h
<please_help>I tried to signal the GC about the real amount of memory being alloc'd in guile, but to no avail. Guile objects leak too, but at a much more reasonable rate. I allocate using the FFI and register a finalizer instead for the test.
<amz3>This is indeed an interesting bug
<please_help>amz3: that would look like it, except what are GC_MALLOC and GC_MALLOC_ATOMIC? The boehmgc stuff are GC_malloc and GC_malloc_atomic, rather.
<amz3>please_help: I'm not a guile hacker, i don't know
<please_help>oh well, hopefully someone who knows can chime in.
<amz3>I would suggest you compile and try guile-2.1 to see if the issue is resolved their
<amz3>my program use ffi and it did not require any change to work on guile-2.1
<amz3>FWIW one way to go, to avoid the leak maybe, if it really linked to a immutable/persistent behavior, is the recycle the datastructure and use vectors instead of list
<amz3>I should try that some day
<amz3>davexunit: I'm working on guile-parser-combinators, I'm still don't understand what parse-lift really does, I see it in action in parse-map, but don't see the point of it, how is to related to the definition of 'to lift' ?
<amz3>by the way I had a look at syntax-highlighter it's nice, I did not test it yet, I think parens higlighting would be a must ;)
<davexunit>it highlights parens
<amz3>really? matching parens?
<davexunit>the rendering is up to you
<davexunit>I wrote a naive SXML renderer that doesn't do rainbow delimiters
<davexunit>but it can be done easily
<amz3>I'll have a look at it
<amz3>I am adding GLL2 memo-cps to your combinators
<amz3>to have recursive grammars
<davexunit>anyway, the purpose of parse-lift is to take a procedure that is *not* in the parsing monad and put it in the parsing monad
<amz3>the parsing monad is the composition of parsers ?
<davexunit>things in the parser monad are procedures that accept a single value, stream, and return a <parse-result>
<davexunit>parse-lift lets you bring arbitrary procedures into that type of structure
<davexunit>the resulting procedure returns parsers
<davexunit>(parse-lift +) will add numbers, but return a parser.
<davexunit>(((parse-lift +) 1 2 3) null-stream) will return a <parse-result> with a value of 6 and a remainder of null-stream.
<amz3>the call stack is at 3 level deep at this point
<amz3>ACTION thinking loud
<davexunit>such is the life of monads
<amz3>parse-return, parse-bind, parse-lift are all linked from parse-map
<amz3>is there another usecase of parse-lift outside parse-map
<amz3>well you just gave one
<amz3>ok I think I get it
<amz3>parse-lift return a procedure that return a parser
<amz3>which is the job of parse-return I think
<davexunit>parse-return creates a parser that always succeeds with a constant value
<amz3>in the context of parse-map, the value is the result of the processed previous/current parse
<davexunit>well, it's actually the result of applying 'proc' to the result of 'parser'
<amz3>yes the problem i have with parse-return, what it returns is computed, so it's not constant in the bigpicture, it just wrap some result in a parser
<davexunit>that's the point
<davexunit>because values need to be wrapped
<davexunit>as a parse result
<amz3>that the canonical name for this operation in monads I suppose
<amz3>so it seems like lift, extract ie. lift some results outside the parser structure to apply some procedure on it
<amz3>and put it back
<amz3>that's interesting how procedure work together, I never thought this way
<amz3>I'm transforming combinators into cps style using the memo-cps I hacked together, and it seems that parse-lift, appens outside the cps dance
<amz3>until coming back to parse-result
<amz3>s/coming back/arriving
<davexunit>yeah lift, return, and bind are standard monadic terms
<amz3>btw the README of guile-parser-combinator is not update to date
<davexunit>not surprising
<davexunit>it's not a *real* project at this time, so I got sloppy.
<amz3>I suppose you are not interested right away in the cps thing
<davexunit>I'm interested in it
<amz3>I will let you know where I fork it
<davexunit>I'd like the implementation to be somewhat elegant and easy enough to understand.
<davexunit>I'm interested in how you've implemented it.
<amz3>I'll make git, so you'll have the time to look at it
<amz3>you're welcome
<amz3>FWIW: the cps style allows to try all alternatives, before continuing, memo-cps check whether it already started to explore a given alternative, if so it restarts from there
<davexunit>yeah that's a nice feature
<davexunit>gotta run!
<amz3>for given path aka. alternative, continuation are insereted, say the initial parse call is (scheme-parser "((compose (list->stream string->list)) do-something)" pk)
<amz3>'pk' is the initual continuation
<amz3>before 'pk' is run parser are interleaved with 'unify-or-drop' continuations
<amz3>nalaginrut: do robots like jokes?
<nalaginrut>amz3: you mean the project just brought 10,000 award today?
<amz3>really you got the prize?
<amz3>the award
<nalaginrut>yes, cash
<amz3>I am happy for you
<nalaginrut>amz3: well, but there're four people, unfortunately
<amz3>yeah, that's a bummer
<amz3>lucklily the robot require money
<amz3>doesn't require money
<amz3>but 2K per person is not bad, it's good month of work here in europe
<nalaginrut>and include a Forth fan who insist use Forth as the low-level, I could have used Scheme in a row, but oh well
<nalaginrut>anyway, I will rewrite the low-level secrete
<amz3>Forth: write once, never read.
<amz3>nalaginrut: what does the robot do?
<nalaginrut>yeah, we never expect such result, it's the top award in this hackathon
<nalaginrut>amz3: painting
<amz3>based on a picture or via vision?
<amz3>sound fun, I though it was the car robot that got a prize
<nalaginrut>no, just like LOGO style
<nalaginrut>I and a friend decide to build a toy for our daughters
<nalaginrut>amz3: yes it's a car
<nalaginrut>with two motors
<amz3>congratulations nalaginrut you work on exciting stuff
<nalaginrut>thanks ;-)
<nalaginrut>it's not new idea, but I can find no where to buy it, and control with Guile
<amz3>I really meant it!
<amz3>I'd love to have a robot of somekind
<nalaginrut>and wireless, with bluetooth
<amz3>I asked the company that does the humanoid robot you see everywhere this days, whether I could borrow one for some experiments to help people with disabilities
<amz3>My bad, I said that I want the robot to act as a surroget of the disabled person to play with a cat or dog
<amz3>kind of thing
<amz3>well, they answered me it's not a toy to play with. It's programming platform.
<amz3>You mean I should use legos?
<nalaginrut>I think it's easier to get and hack
<amz3>not easier that this robot ^
<nalaginrut>amz3: and you may try this, a metallic lego, you may play it with Scratch
<amz3>I did not even ask to borrow it, I save and buy it, but the guy cut the conversation never answer my reply
<amz3>In this situations I wonder what would happen if I had another name
<nalaginrut>amz3: oh, a human like one, which sounds very unlikely to get for free
<amz3>because a few weeks, later they hired some cognitive scientist to work exactly with robot+disabled people
<amz3>not really a cognitive scientist but anyway
<amz3>and this is the brightest people of France! pff!
<amz3>ACTION goes dark
<nalaginrut>I dream I can build the 'soul' of a Humanoid robot
<nalaginrut>I don't know if Scheme is still proper for building such 'soul'
<amz3>soul is vague
<amz3>do you think about a machine with awareness?
<amz3>AFAIK scheme is a really good solution because AI involves various DSL as such Guile is a good fit
<amz3>even 'understanding' is vague in terms of AI
<amz3>nowdays what I try to understand howto, is the "how to make a machine learn to learn"
<amz3>knowing that even making a machine backed by wikipedia answer questions is already a great achievement
<nalaginrut>sounds like a machine learning way
<amz3>I think the 'soul' is the manisfestion of awareness, but that is only sensical if it's aware of the world around it
<amz3>machine learning is neural nets, the way I understand it like shaking a radio receiver with a short circuit until it works
<nalaginrut>I think human still doesn't define it properly, so maybe 'soul' is good for a metaphor, anyway
<nalaginrut>hmm...interesting analogy
<paroneayea>hey sirgazil
<paroneayea>I wonder what you would think of the tutorial ideas I dumped to the list this morning :)
<sirgazil>Hi paroneayea
<sirgazil>Oh, I didn't get that mail :(
<paroneayea>ACTION just sent it
<sirgazil>Ah, I'll check
<sirgazil>ACTION was reading here about the robots conversation, went to Aseba website and it seems to close my GNOME session every time 0_0
<sirgazil>ACTION goes to make lunch...
<amz3>sirgazil: what is Aseba?
<sirgazil>It is or was a project hosted in Savannah about robots.
***jao` is now known as jao
<sirgazil>paroneayea: +1k to the tutorial idea :)
<paroneayea>sirgazil: \\o/
<amz3>you guys did not read my tutorial?
<amz3>or is not inline with any kind of policy?
<paroneayea>amz3: I didn't see your tutorial! where is it?
<amz3>I should have sent a sent the mail in a new thread, that would have left no chance for misunderstanding
<sirgazil>amz3: I think paroneayea's tutorial is for beginners to programming and yours is more for people going from X language to Guile. I think both are useful.
<sirgazil>Or am I mistaken?
<civodul>bah, emacs-devel is such an unwelcoming place
<civodul>i think that will do more harm to Emacs than Guile's strings could ever do
<holomorph>i just look at the thread and frown
<civodul>probably the best thing to do...
<amz3>sirgazil: indeed my tutorial is for people that have at least basic knowledge of programming and want to learn guile
<amz3>I just received a message from the mailling saying that my sub was disabled with gibberish text instead of probably an explanation
<sirgazil>amz3: I think that's good because then people writing the other one don't have to struggle trying to satisfy two audiences.
<karhunguixi>amz3, i get different results than you in your basic tutoral, Toplevel variable definition. I get 4011 donuts and 2674 chai.
<daviid>civodul: i wish i had a bit more time i could dig in and try to undesrtand better why (a) it seems there is no possible compromise wrt string representation and related string stream/buffer IO between guile and emacs and (b) why they, all of them, keep repeating that we are wrong in our string representation
<civodul>daviid: i wish the naysayers would do that work *themselves*
<civodul>rather than spread FUD and agress people
<amz3>karhunguixi: indeed, thanks for the report
<daviid>they are very agressive indeed
<daviid>I stop reading it after trying hard...
<amz3>sirgazil: definitly the tutorial is not about try to onboard people into programming
<karhunguixi>amz3, sure. Thanks for making tutorials, much appreciated :)
<amz3>karhunguixi: you're welcome
<mark_weaver>daviid: I'm not aware of any blocker to making guile's string representation suitable for emacs. it's just a matter of doing the work.
<mark_weaver>I haven't looked at any recent threads about this though.
<civodul>mark_weaver: dak + Eli are spreading FUD, basically
<daviid>it just seems absolute non sense to me that nobody will take and do more on guile-emacs, because it's there, it's already pretty good, and the only real attempt which did lead to something working, so far at least. it is pretty stupid from them, to propose lua or C or any non lisp dialect for futurte emacs, imo
<daviid>mark_weaver: ah thanks, so there are agressive and lazy folks! :) they talk a lot, far too much for me, i don't like that
<mark_weaver>it's a shame that some people are spreading FUD, but I suspect it won't matter in the end. guile-emacs will continue to advance, albeit slowly, and eventually reach a point where it's a no-brainer.
<daviid>it's too bad bipt does not have much freetime, he did such a good job ...
<mark_weaver>and RMS is in favor of it, so...
<daviid>mark_weaver: 1+ yeah, it will happen and then everybody will be 'oh, cool.. should have done that before ....'
<daviid>i've heard there could be some funding for bibpt continuing as 1 of his 'real' job tasks, don't know if it's true
<daviid>oh, mark_weaver, any time to look at guile-gnome gcc-5.2 problem yet? [gentle ping here]
<mark_weaver>not yet, sorry, I'm too overloaded at the moment.
<daviid>ACTION hopes to release guile-clutter 1.12.2 tomorrow or thursday
<amz3>cool :)
<amz3>paroneayea: sirgazil having a tutorial for learning young people programming is noble goal. I though that a middle ground was more interesting
<paroneayea>amz3: I think a variety of tutorials are good
<paroneayea>python has many, and is unhampered by that
<sirgazil>amz3: they don't have to be young people, tho :)
<paroneayea>and yes, my goal is to have a tutorial that's good for people who might otherwise feel "intimidated" by Guile
<amz3>yes, defintly even older people might be interested in learning programming
<paroneayea>I think it's easy to lose track that Guile, at present, looks intimidating
<paroneayea>I was intimidated, and I've been coding for well over a decade
<paroneayea>but that's really not the language being an intimidating thing, most languages without the right guide are intimidating
<paroneayea>even python
<paroneayea>which tries hard to be a language friendly for education
<amz3>that's what i wanted to say in the ML, introducing emacs seems to me a factor of "initimidation"
<paroneayea>amz3: that's why I suggested having that as the "advanced" option,
<paroneayea>but endcourage a "any editor + the REPL" option
<amz3>you seem headed for a bigger project that what I was expecting
<paroneayea>and "here's something you can head back to"
<paroneayea>I don't think it has to be so big
<karhunguixi>amz3, in your tutorial, maybe you could spell out cryptic names like "car" and "cdr" when you introduce them - assuming they're an abbreviation for something of course.
<mark_weaver>karhunguixi: what 'car' and 'cdr' stand for are best forgotten :)
<amz3>karhunguixi: their synonym of respectively head and tail, but I don't remember the exact explaination
<mark_weaver>"contents of address register" and "contents of data register" iirc
<mark_weaver>it had to do with the specifics of the machine that lisp was first implemented on
<paroneayea>civodul: I'm writing a "In support of guile-emacs" to the list
<paroneayea>to emacs-devel
<karhunguixi>mark_weaver, heh :)
<mark_weaver>the reason the names survived so long is because things like cdadr (short for the cdr of the car of the cdr) are pronounceable
<sirgazil>car and cdr... wow :)
<paroneayea>"my other car is a cdr"
<mark_weaver>and there was a time when those things were heavily used
<mark_weaver>paroneayea: heh :)
<mark_weaver>but now we recommend using 'match' instead to minimize the use of things like cdadr
<amz3>karhunguixi: that's weak part of the tutorial cdr/car/cons
<amz3>karhunguixi: I would prefered to directly introduce match and avoid cdr/car/cons
<amz3>I try to rely on the intuition of the reader to understand through pratice what the inner working of list and assoc is
<amz3>(cons a some-list) adds an item to the beginning of the list and (con 'a 'b) makes a pair
<amz3>eventually and hopefully the puzzle makes sens naturally. I think that explaining car and cdr via their definition is difficult to understand but's that my personal experience
<daviid>trying to generate the doc for guile-clutter 1.12 raises bugs, I wonder if \\n is 'now' allowed in gtk-doc function definitions and was not the case before? because here is a summary of 1 of these raised bugs:
<daviid>,use (gnome-2)
<daviid>,use (gnome gw support gtk-doc)
<daviid>,m (gnome gw support gtk-doc)
<daviid>(parse-func-name "void\\nclutter_x11_set_display (Display *xdpy);")
<daviid>ERROR: could not parse "void\\nclutter_x11_set_display (Display *xdpy);"
<daviid>the code is here:
<daviid>line 510
<paroneayea>anyone want to review an email draft?
<daviid>any hint ?
<paroneayea>mark_weaver: civodul: maybe others: sanity check before posting?
<daviid>(parse-func-name "void clutter_x11_set_display (Display *xdpy);")
<daviid>$3 = clutter-x11-set-display
<daviid>so it is about these \\n, I wonder what would be the best fix here ? thoughts ?
<daviid>paroneayea: in the ยง When I last talked to BT Templeton about this, should it not be 'he' instead of 'they' there and after ...
<paroneayea>I did say "they", not "he"
<paroneayea>you're objecting to that
<daviid>who are they? i thought you talked to BT and he told you ...
<daviid>don't know
<paroneayea>I don't know BT's gender, and had some indication they may not be male, or may be genderfluid, so I went with the neutral "they" as a pronoun.
<paroneayea>which I think is more respectful
<paroneayea>so it's intentional
<paroneayea>at the very least, I'm not trying to make assumptions.
<daviid>i think bibpt is a he :) i recall i did see something wehrn he got hired at igalia but not sure either. and since i'm not a native speaker i did not know about that 'they' usage , fine of course
<paroneayea>bipt may be "he", I don't know, but since I don't know, I say "they"
<paroneayea>regardless, I don't want to make an issue of this... I don't feel comfortable discussing someone else's gender for them.
<daviid>that "they" sounds shakespeare to me :) good!
<paroneayea>they as in shakespeare is a good way to see it :)
<paroneayea>I think... :)
<paroneayea> is a thing, at any rate!
<daviid>yes me too :)
<paroneayea>daviid: email looked otherwise fine to you?
<karhunguixi>amz3, I actually get a void-like feeling when i don't know what a cryptic name means. It's fine that it spells out something unhelpful to me, but then i know and i don't get sidetracked looking for what it means.
<daviid>paroneayea: the last sentence, you used twice repetitive, maybe a better way?
<amz3>karhunguixi: you have point, it's better to say what it is, i will add it
<paroneayea>daviid: ah good cath
<daviid>paroneayea: yes, looks good to me
<sirgazil>paroneayea: "someone needs up to step up"
<paroneayea>sirgazil: good catch!
<daviid>paroneayea: wrt emacs' C core is fine, civodul also mentionned in the thread that all that if using guile, most would become redundant with libguile [just to let you know]
<daviid>anyway, i think it is good
<paroneayea>I reordered the last two paragraphs
<paroneayea>to end on a positive "dig in" note rather than "stfu on the FUD" one ;p
<paroneayea>not that I said STFU :)
<daviid>paroneayea: perfect, ending with positive ideas and way(s) to go is better
<karhunguixi>paroneayea, the "But the active and repetitive..." line reads weird for me
<daviid>i wonder where in the code these \\n are added because xml files don't seem to have them
<daviid>talking about my above mentionned gtk-doc related bug
<daviid>i could just nasty hack parse-func-name for the time beeing ?
<daviid>no, I found the \\n in the xml file indeed
<daviid><programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
<daviid>clutter_x11_set_display (<parameter><link linkend="Display"><type>Display</type></link> *xdpy</parameter>);</programlisting>
<paroneayea>karhunguixi: you're right (and I adjusted before sending)
<amz3>oh! that wasn't yoda speaking?
<daviid>i have the intuition that i should indeed patch parse-func-name, i wish someone could confirm that
<amz3>you are looking for a way to pattern match \\n in dot operator of the regex?
<daviid>because what is passed to the function comes from xml 'blocks' as <programlisting language="C">... ...</programlisting> which indeed do sometimes contain \\n
<amz3>I was suprised by the regex behavior, I don't recall what's the fix
<daviid>that is probably new because till 1.10 for guile-clutter and 2.15 for guile-gnome, generating the doc was fine
<amz3>there is also the xml->sxml, maybe its behavior changed
<daviid>paroneayea: when yu post, paste the thread please, i'm not a regurlar emacs-devel reader...
<davexunit>what's going on in emacs-devel?
<davexunit>guile-emacs discussion?
<civodul>paroneayea: your message looks nice to me!
<civodul>davexunit: yes, again
<davexunit>fun times!
<daviid>davexunit: thought your were off line. would you mind give me some hint wrt xml [gtk-doc.scm] raises a bug and I am trying to figure out the best patch
<davexunit>ah, I see you've posted in it
<paroneayea>civodul: whoo
<civodul>paroneayea: and i think "they" is right, here
<civodul>ACTION -> zZz
<davexunit>later civodul
<civodul>happy hacking!