***petercom1and is now known as petercommand
<wingo>it seems bit-count* just doesn't do what the docs claim that it does <taylanub>Guile needs more users (who report bugs) :P <wingo>janneke: i think there is something in the manual about it <wingo>search for something like trap-at-source-location <janneke>whatever i do, i get either (without GEISER) ERROR, or with geiser WARNING: <janneke>;;; WARNING (no instructions found for simulate.scm : 185) <janneke>WARNING, it still shows up in ,traps -- but no break when executed? <wingo>you didn't find documentation in the manual about how traps are implemented? <janneke>eh...i went straight to trap-at-source-location and add-trap-at-source-location <wingo>breaking on procedures and breaking on source locations are implemented differently <wingo>it could be you have found a bug <wingo>does the source location you are trying to break at correspond to the start of the procedure? <wingo>i don't doubt you did; just mentioning some implementation details :) <wingo><wingo> does the source location you are trying to break at correspond to the start of the procedure? *wingo not communicating well it seems <janneke>in my first tries, i used different locations than the start of a procedure <janneke>but when i got more desperate, i tried the location of the start of a procedure <janneke>including off-by-one (user/vs guile) line locations <janneke>so, eh, i gues: yes: even if i use start of procedure, i do not get it to work *janneke is starting to wonder if people use the debugger... <wingo>;(use-modules (system vm program)) <wingo>yeah i mean something like that <wingo>if you (use-modules (system vm program)) <wingo>and you say (program-source <your-proc> 0) <wingo>and yes that user vs guile thing regarding line numbers is irritating <janneke>$12 = (0 "/home/janneke/vc/verum/development/language/asd/simulate.scm" 181 . 0) <janneke>scheme@(language asd simulate)> ,break-at-source "/home/janneke/vc/verum/development/language/asd/simulate.scm" 181 <janneke>ERROR: No procedures found at ~a:~a. "/home/janneke/vc/verum/development/language/asd/simulate.scm" 181 <janneke>scheme@(language asd simulate)> ,break-at-source "/home/janneke/vc/verum/development/language/asd/simulate.scm" 182 <janneke>;;; WARNING (no instructions found for /home/janneke/vc/verum/development/language/asd/simulate.scm : 181) <janneke>Trap 8: Breakpoint at /home/janneke/vc/verum/development/language/asd/simulate.scm:182. <wingo>so that 181 is in "guile" coordinates <wingo>it corresponds to 182 in user coordinates <wingo>that guile says ;;; WARNING (no instructions found for /home/janneke/vc/verum/development/language/asd/simulate.scm : 181) <wingo>the source corresponding to the start of a procedure is the source position of the left-paren in a lambda expression <wingo>or the left-paren of a define <wingo>but the ,break-at-source stuff looks for source locations corresponding to individual expressions <wingo>the first expression in that procedure probably is on some other line <wingo>probably that code needs a special case to look at the program-source of the procedure being called, when entering procedures <wingo>not just the source of the given instruction <wingo>and with macros one expression can have multiple sources... <wingo>the source of the macro, and the source of all of its expansions... and guile only records one of them. <janneke>np...just trying to figure things out <janneke>when this did not work, and eg there seems no real convenient way to print local variables <janneke>...but makes me think no-one uses it. i'd expect: ,l <janneke>and a way to automatically print them each step <janneke>wingo: you have used gdb /gud haven't you? <wingo>but i've never rigged up gdb to print locals at each step <wingo>i've only used info locals, info arguments, and bt full to get locals <janneke>you get 6 windows...with source, frame, locals etc info <wingo>so my yes was a half-truth it seems <janneke>i never until now used debugging in guile -- i hate debugging <janneke>but at my current gig, i want to introduce guile, and the others want a debugger :-) <janneke>also, the namings and documentations of step and next confuse me <janneke>davexunit: that's what i said, but i could not produce an ide (not even in emacs) up till now <wingo>definitely room to improve, no doubt! <janneke>it seems all/most is there, but some missing bits...and that makes me wonder if it's used a lot <davexunit>the timing and profiling features are cool, I can move up/down the stack frames, inspect locals, etc. all my needs are covered <janneke>and if i'm on the wrong track; that's all <janneke>davexunit: ok -- yes that's more than i need <janneke>but i'm looking into GUD integration to present some kind of debugger IDE <janneke>and break-at-source-location is kinda necessary <janneke>(delete/disable trap-at-source-location would be nice too) <ijp>who is conveniently not here... <wingo>you can delete and disable traps <janneke>yes...but i need to figure out a way to find the trap id from the file's source location <davexunit>that's the lisp that business people approve of <janneke>does anyone have a nice compilation-error-regexp-alist-alist that works with guile backtraces? *davexunit wishes that he could get paid to write software in Guile some day... <janneke>when i came, it was all c++, not too bad even... <janneke>but terribly over- or mis-engineered <davexunit>lisp is a tough sell, let alone scheme, let alone an implementation with a small community. <janneke>we're a startup and had next to 60.000 loc c++ <janneke>25.000 generated...which makes it less worse, and more worse <janneke>now we (i) have basic functionality in under 2000 loc guile <janneke>luckily we have some very smart people, some mathematicians/scientists who like stuff like haskell <janneke>and if i fail with guile, c++14 is almost lisp :-) <newb-101>Help please... Installed guile-sdl, tests work but (use-modules ((sdl sdl))) reports "ERROR: no code for module (sdl sdl)"... <ft>That's one set of parens too many. <newb-101>(use-modules ((sdl sdl) #:prefix SDL:) (srfi srfi-1) (srfi srfi-2)) I was assuming use-modules takes a list of bindings... <wingo>actually (use-modules ((sdl sdl))) is equivalent to (use-modules (sdl sdl)) <wingo>usually you see the latter, but both are valid <wingo>newb-101: it is probably related to load paths <wingo>i guess your guile is from the system, but you built guile-sdl yourself? <davexunit>is it installed in /usr/local but that isn't in your guile load path? <wingo>so probably guile-sdl got installed in /usr/local <wingo>i suggest you do "sudo make uninstall" in the directory in which you built guile-sdl <wingo>then do the ./configure as you did before -- but add "--prefix=/usr" <wingo>that will install guile-sdl in /usr instead of /usr/local <wingo>this could over-write other things on your system, in general -- but if you didn't have guile-sdl installed before there's no worry <wingo>newb-101: yes ubuntu packages are in /usr -- all of them. <wingo>DESTDIR is mostly useless -- it's only useful when e.g. cross-compiling for ARM. <newb-101>Excellent, use-modules now succeeds. Thanks again <ArneBab>janneke: could we get your company to give your text here as an official reference to guile? <janneke>ArneBab: that would be nice, but it's waaay to early for that <ArneBab>with “your” I meant “the one you’re working at” <janneke>if/when they "get" it and are happy, possibly.... <janneke>*my* company that is consulting for this startup, is happy to give an official reference to guile ;-) <ijp>We like our programming languages like we like our women, 50 years old and curvy -- Janneke's company *taylanub gives ijp the side-glare <janneke>ijp: if she looks like babushka, she's mine -- programming language an woman alike <wingo>boo for making a sexualized environment around a tech project. boo. <ArneBab>actually it would be nice to have a (randomly selected) quote on the website from someone who successfully uses guile. <ijp>"I used guile and lost 200lbs" <ijp>if you don't ask around you don't get, but asking makes you seem desparate <ArneBab>“I used guile and lost 97% lines of code” (60k down to 2k) <ArneBab>well, provide a link to the one you quote and that’s beneficial both wars. <ArneBab>“we want to add a section with quotes from successfull guile-users. Would you like to take part?” <wingo>it's mostly me using it; not much of a quote :) <ijp>maybe we can pay for a celebrity endorsement <ArneBab>wingo: we could select random quotes from your articles on guile ☺ <davexunit>I'm going to be renaming guile-2d now that I'm adding 3D support. someone just suggested the name "Sly". I like it. *wingo pleased; another piece of the compiler came together <wingo>this time reducing execution time and memory, thankfully <wingo>combatting O(n^2) has been interesting <wingo>this is in the optimizer and backend <wingo>you end up wanting to compute e.g. what values are available at each program point <wingo>because it's nlabels * nlabels <wingo>so at first i was using a modified version of vhashes to share state <davexunit>what is a label in this context? (apologies if I'm distracting you from work) <wingo>that's what's currently in for type inference <wingo>a label is like a label in C -- it identifies an expression <wingo>but the vhash strategy was too branchy -- lookup took too long <wingo>and it was too much overhead for the case in which you just want to store one bit per label <wingo>so i just implemented a persistent bitset instead -- which has some other advantages <wingo>it seems to be the right compromise <wingo>anyway, i have to write about this <wingo>it's actually the writing about this that's the forcing function -- it needs to be nice :) <wingo>and i've failed in a number of interesting ways ;) <wingo>but the short story is that clojure-style data structures are great. <davexunit>I haven't used clojure. are you referring to them being immutable or some other property? <wingo>it's more that it shares structure <wingo>and the particular way of dividing up the key-space into a tree whose leaves are packed arrays, which can be bit arrays or even in this case fixnums <wingo>which is neat, representing numbers as state-sharing trees <wingo>i've never programmed in it, but its vectors and hash-maps are nice *wingo printed out those java files yesterday to study <wingo>thing is in guile you can get functions with 10K labels, not too difficult <wingo>the root function of a big module, for example <wingo>naively that's 100M data points to store <ijp>which reminds me, I should really clean up my hamts module and release it <wingo>which depending on your choice of data structure could be 1GB or 100K <wingo>i think i'll implement something similar for integer keys -- more like AMTs than HAMTs <wingo>as it is, this bitset is an AMT <wingo>but with fixnums at the leaves <wingo>and a smaller branching factor, to share more structure -- though that needs more benchmarking *wingo doing science, this is great