IRC channel logs


back to list of logs

***Server sets mode: +nt
<lloda>wingo: the assert with GUILE_JIT_COUNTER_THRESHOLD=0 guile is fixed
<lloda>although startup is a lot longer than with GJCT=-1
<lloda>the segfault is still there
<lloda>> touch empty.scm
<lloda>> GUILE_JIT_COUNTER_THRESHOLD=0 $GUILE -s empty.scm
<lloda>;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
<lloda>;;; or pass the --no-auto-compile argument to disable.
<lloda>;;; compiling /home/danielo/Prog/test/empty.scm
<lloda>Segmentation fault
<lloda>I'll rebuild with -O2 -g to see if gdb can show anything
<lloda>morning wingo
<lloda>one of my array benchmarks is 10 times slower in lightning
<lloda>I'll try to isolate it
<wingo>vs 2.2 you mean? probably worth profiling the interpreted version to see what's going wrong
<wingo>i definitely want to fix those things but am focusing on fixing the crashers for now
<lloda>-O2 -g doesn't help alas
<lloda>I get it with -O1 too, same backtrace
***rekado_ is now known as rekado
<dustyweb>hello #guile
<civodul>hey hey!
<wingo>greets :)
<mwette>has anyone worked monads in Scheme besides Oleg? (
<wingo>lloda: fixed the crasher, i think :)
<wingo>mwette: it's a big thing in guix!
<mwette>wingo: thanks -- I will look
<wingo>search for "store monad"
<wingo>(the idea being that you build up a graph of operations on the "store", managed by the guix daemon, then run that program; the monad builds the graph)
<mwette>see it: (guix store), based on racket better-monads, which is based on Oleg's work. I have some reading ahead ...
<mwette>oops - (guix monads)
<apteryx>hello, what's the recommended way to modify a program at run-time? I want to patch some function definition.
<Nomenclatura>I'm going to learn programing using guile. I never liked python syntax. Perl made more sense to me.
<Nomenclatura>Tell me I'm making a mistake.
***ng01 is now known as ng0
<apteryx>Nomenclatura: Coming from Python I got tired of feeling constrained to use a more imperative style; Guile is funnier to me!
<amz3>apteryx: you want to monkeypatch a procedure?
<outtabwz>Nomenclatura: Perl gave me brain cancer. Scheme is at lest easier to understand.
<amz3>apteryx: look at the documentation about the module system in the manual, there is something like 'module-set' or search for 'mock' inside guix codebase, IIRC there is a procedure that allows to mock another procedure which IIRC use monkyepatching like you described (except the mock revert the change after..)
<mwette>In the index there is a reference to @@. Check that if you want to modify internals of a module.
<Nomenclatura>outtabwz: maybe I get it because that's what I got in school
<outtabwz>Nomenclatura: College profs are sadists. They want you to suffer. That's why they teach Perl.
<Nomenclatura>outtabwz: then I had C++ >.>
<amz3>I learned elisp at school
<amz3>I mean to day, they were teaching elisp
<amz3>I should have learned elisp, but was busy doing 'somthing else' anyway, I have much regrets about those times
<outtabwz>Nomenclatura: I'm so sorry. I had Java.
<stis>hello guilers!
<apteryx>amz3: actually, I want to reuse a function definition but I need to modify it slightly.
<apteryx>I thought the code being data, it should be doable using the usual list manipulations procedures.
<amz3>that is not monkey patching
<amz3>apteryx: then, you can use @@ to import the private procedure that you want to change slightly
<apteryx>amz3: thanks, but how would I alter the procedure definition? I'm looking at the (guix build gnu-build-system)'s configure procedure (a build phase).
<apteryx>I want take out the ,@(if docdir ...) expression.
<apteryx>is there a way to edit the source representation of the procedure object?
<amz3>no, you can't alter the procedure definitio like that
<amz3>apteryx: better ask on guix what you want to do, but my recommendation for the time being is to copy/paste the definition and edit it (using @@ to import the private stuff that the procedure you want to change use)
<amz3>code is data... well, I let other comment on your understanding of that expression.
<apteryx>in lisp, the structure of code is the same as the structure of data; that is my understanding. Please correct me if it's wrong :)
<amz3>apteryx: you could for instance, retrieve the source of the procedure dynamically, parse that string, search and replace with code stuff etc...
<amz3>code is data sound much like a 'marketing slang' there is some thruth in it, but there is also some mistake
<amz3>for instance, you can take a list with a bunch of symbols in it
<amz3>like done with quote '
<apteryx>amz3: I wonder then why they keep repeating this (they don't flat out say that, but they make the students reflect on the question a many times) in the SICP classes.
<amz3>if you pass that to eval procedure, it's interpreted (maybe even compiled) and that will lead the previously called data to behave like code.
<amz3>it depends what the actual vm expose, but you can not easily in Guile take a procedure and rework except if it was meant to be
<apteryx>do you mean that after data/code is evaluated, its internal structure is no longer list based (i.e. no longer easily manipulated as data?) I supposed I should experiment at the REPL some.
<amz3>not sure
<amz3>like I said, I am not sure what I am saying is ok
<apteryx>amz3: it'd be nice if guile provided some facility to expose the source level representation of a procedure, to allow alterating it a run-time, as data :)
<apteryx>amz3: it's OK, I am thankful you entertained this conversation, it helped me to see a bit farther and gave me ideas to try. Thank you!
<amz3>yes, that's what smalltlak was advocating and implemented
<amz3>look into 'hot reloading', I am not sure how it related to smalltalk way of doing it, but it ends up achiving a similar purpose
<amz3>apteryx: look also at live coding technics
<amz3>apteryx: like guile chicadee
<apteryx>OK! thanks.
<amz3>you would get a definitive answer on the mailling list about the guix build system thing
<amz3>apteryx: also there is low volume #scheme channel on freenode, with a lot of more experience and knowledgeable people about all things scheme AND programming languages in general especially lisp and functional
<jcowan>apteryx, amz3: the hard part of hot reloading is being able to alter a procedure while it is executing: in the general case, it can't be done, you can make some changes but not any arbitrary change
<mwette>from, moo: This command is connected to the MOO command. When encountered during normal execution, it searches the program code in reverse looking for a matching MOO command and begins executing again starting from the found MOO command. When searching, it skips the instruction that is immediately before it (see MOO).
<outtabwz>mwette: It seems to be turing complete. Moo indeed
<mwette>yes, so simple!
<mwette>and yet so powerful!