IRC channel logs

2015-04-03.log

back to list of logs

<daviid>export PAtH=/opt/bin:$PATH
<daviid>then try again
<zanta>ERROR: In procedure scm-error: ERROR: no code for module (g-wrap gw standard)
<daviid>that's not possible :)
<zanta>I am so scared
<daviid>zanta: scared of what? relax!
<daviid>let me think
<daviid>ah i kow
<daviid>know
<daviid>wait a sec
<zanta>Okay
<daviid>do you see a g-wrap directory here: /opt/share/guile/site
<daviid>no
<daviid>or do you ?
<zanta>a sec
<zanta>yes
<daviid>ok
<daviid>try this
<daviid>just a sec
<daviid>echo %GUILE_LOAD_PATH
<daviid>what does it say?
<daviid>oh, sorry
<daviid>echo $GUILE_LOAD_PATH
<daviid>anyway, you can do this:
<zanta>it is null
<daviid>export GUILE_LOAD_PATH=/opt/share/guile/site:$GUILE_LOAD_PATH
<daviid>and try the example again
<zanta> it says /opt/share/guile/site:
<daviid>export GUILE_LOAD_PATH=/opt/share/guile/site
<daviid>then try the demo
<daviid>cd ~/gtk/examples/guile-gtk-demo; ./guile-gtk-demo.scm
<zanta>it worked! :)
<daviid>i mean <where guile-gnome git clone is>/gtk/examples...
<daviid>ok
<daviid>you nedd to add this export to your shell, also /opt/bin to PATH for future run ...
<zanta>Go on, oh wise one
<daviid>at least the 3 first examples work, and the third is a main application window example, so you are good to learn
<zanta>Where do I add export to my shell? I am using bash
<daviid>these 2 exports we did manually, in your .bashrc file
<daviid>at the end of the file, so you are on the safe way... [PATH maybe there already]
<zanta>In my home or root?
<daviid>your home
<daviid>:)
<zanta>$ export GUILE_LOAD_PATH=/opt/share/guile/site:$GUILE_LOAD_PATH
<zanta>Is that what it should look like?
<daviid>then you should ba able to start a new terminal, cd to the examples... and run the demo
<zanta>or should I exclude the $
<daviid>zanta: no
<daviid>export GUILE_LOAD_PATH=/opt/share/guile/site
<zanta>and there is one more
<daviid>export PAtH=/opt/bin:$PATH
<daviid>then try to open a new terminal
<daviid>cd ...; ./guile-gtk-demo.scm
<zanta>./guile-gtk-demo.scm: line 3: exec: guile-gnome-2: not found
<zanta>:/
<zanta>here is my bashrc
<zanta># # ~/.bashrc # # If not running interactively, don't do anything [[ $- != *i* ]] && return alias ls='ls --color=auto' PS1='[\\u@\\h \\W]\\$ ' export GUILE_LOAD_PATH=/opt/share/guile/site export PAtH=/opt/bin:$PATH
<daviid>most of the demo work actually, but 3 [maybe], the good news is the important work: the main window, the buttons, the menus and the last one 'tree view/list store
<daviid>zanta: you need an export per line
<zanta>I did, it is a bad format
<daviid>export GUILE_LOAD_PATH=/opt/share/guile/site
<daviid>then ona seperarte line
<daviid>export PAtH=/opt/bin:$PATH
<daviid>ok, try
<daviid>. .bashrc
<daviid>then try the demo
<daviid>that has nothing to do with guile neither with guile-gnome by the way
<daviid>does it work?
<zanta>I fixed it
<zanta>PATH != PAtH
<daviid>perfect!
<zanta>I am so glad you spent the time to help me.
<daviid>are you a schemer ?
<zanta>A newborn schemer
<zanta>I want to work with GUIX for the google summer of code.
<zanta>Ludo wanted me to create a simple program, so I am trying to learn as fast as I can.
<daviid>ok, try to install geiser, then read the guile manual, at least the intro, the hello guile, programming in guile
<daviid>at least chapters 1, 2, 3 and 4
<zanta>I installed geiser. Couldn't seem to use the ELPA though
<zanta>So I did it manually
<daviid>you need to program your emacs, congigure i mean
<zanta>I did
<zanta>(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/") ("marmalade" . "https://marmalade-repo.org/packages/") ("melpa" . "http://melpa.org/packages/")))
<zanta>I appended that to my ~/.emacs
<daviid>zanta: i don't do that, you'll need to see with someone else
<zanta>but M-X Package-install couldn't find the package
<daviid>i installed it and :
<zanta> ´┐╝This is you, btw, ´┐╝http://books.gentoomen.org/wizard.jpg
<daviid>zanta: http://paste.lisp.org/+358B
<daviid>but this is basic basic config, see geiser manual for better...
<daviid>haha!
<zanta>Are you on here often?
<daviid>anyway, welcome and good luck!
<daviid>yes
<daviid>most of the time, but wrt guile, others will help you better then I, i helped today becaue of guile-gnome ...
<zanta>You did excellent
<daviid>tx
<zanta>Alright, I'll start hacking! Au revoir!
<daviid>bye
<zanta>Thank you again
<daviid>wc!
<daviid>try to write down what we did, then you can help someone else...
<daviid>our icr is logged by the way, here
<daviid> https://gnunet.org/bot/log/guile/
*paroneayea reads the geiser docs
<paroneayea>I bet there's things in here I'm not aware of, always good to come back to docs of things you already know and thumb through now and then :)
<paroneayea>esp know-ish ;)
<paroneayea>one thing I'd like to do is hook into the development environment I'm in easier
<paroneayea>the load path of whatever project I'm in
<paroneayea>M-x connect-to-guile still works tho
<dje42>I'm having trouble compiling (via guild) a module that uses another module that uses load-extension.
<dje42>I'm getting: ice-9/boot-9.scm:106:20: In procedure dynamic-link: file: "gdb", message: "file not found"
<dje42>presumably from this line: ?: 1 [load-extension "gdb" "gdbscm_load_frame_unwinders"]
<dje42>wingo: ^^^
<wingo>dje42: hi
<wingo>sooo
<dje42>guild is invoked as: /usr/bin/guild compile -Warity-mismatch -Wformat -Wunused-toplevel -L . -o gdb/init.go gdb/init.scm
<wingo>hmm
<wingo>you know how it works right -- that gdb registers the extension, and then the module calls the registered extension
<wingo>load-extension can also dynamically load a library but that's not applicable to gdb's case
<dje42>init.scm references command/frame-unwinder.scm which then references frame-unwinders.scm
<wingo>when compiling frame-unwinders.scm there's no problem as the load-extension call isn't actually invoked
<dje42>right, that compile completes
<wingo>but when compiling another module that uses frame-unwinders.scm, it does run the body of frame-unwinders.scm
<wingo>including that attempt to call into gdb which fails
<wingo>ok.
*wingo wonders about the best way to fix that.
<wingo>i mean, one way would be to just wrap the load-extension in a (false-if-exception ...) or something
<wingo>it's not nice but it can work
<dje42>ISTR a way of knowing what phase of the loading process one is in.
<wingo>yes
<dje42>Could one condition load-extension on that? [assuming it exists]
<wingo>it doesn't exist, i don't think -- not in any useful way
<wingo>given that these .scm files are really only accessible from within gdb,
<wingo>i think it's reasonable to wrap in a catch-all
<dje42>Pass some flag in from the command line and condition load-extension on that?
<wingo>yeah could be
*wingo looks
<wingo>dje42: another option would be to make commands/frame-unwinder.scm lazily load the frame unwinders module
<wingo>dunno if that is a good idea tho
<dje42>how would the lazy loading work?
<wingo>using resolve-interface and module-ref
<wingo>there is another lazy loading mechanism
<wingo>#:autoload
<wingo>which is more transparent
<wingo>but it does require the module to be available at compile-time
<wingo>depends on how much you call from the command module to the support module
<wingo>whether it's irritating or not
<dje42>Once at gdb startup.
<dje42>Well, I guess then each time the relevant command is invoked too.
<wingo>right, i was thinking more statically than dynamically
<wingo>i mean, whether it's irritating to write and maintain
<wingo>sorry i haven't had the chance to follow up with the unwinder patch -- will do so soon
<wingo>had some things at work come up
<dje42>No worries.
<wingo>great that alexander's patch landed :-)
<dje42>I'm working on info/enable/disable commands for frame-unwinders. With the common framework it's trivial.
<dje42>Spelled "info guile frame-unwinder ...", etc.
<wingo>nice
<dje42>Not ideal, but the gdb community was really adamant that guile not intrude on python support, which is understandable.
<dje42>wingo: how about this? (eval-when (load) (load-extension "gdb" "gdbscm_load_frame_unwinders"))
<dje42>Anyways, it's late here. 'nite
<zacts>hello #guile
<wingo>dje42: doesn't really do the right thing
<wingo>when frame-unwinders is being loaded its load phase is indeed "load"
<wingo>because it is indeed being loaded -- but it doesn't know that it's being loaded for use by some other module that is compiling
<wingo>so, that's probably the wrong thing to use
<wingo>anyway, sleep well :)
<wingo>morning zacts :)
<zacts>hello :-)
<civodul>Hello Guilers!
<iyzsong>hello #guile!
<zacts>yo
<jmd>I have a question about gettext under guile
<jmd>How should arguments be represented?
<jmd>Neither (_ "There are %d of them" 8) noor (_ "There are ~A of them" 8) nor (_ "There are ~s of them" 8) do anything sensible.
<paroneayea>heya, *
*paroneayea needs to generate UUIDs or something like them
<paroneayea>I guess one option would be to do something as hacky as how python generates uuids
<paroneayea> http://pamrel.lu/e8849/
<paroneayea>probably I could just do something like this.
<paroneayea>oh
<paroneayea>hm :(
<paroneayea>I wonder if this is good enough ;p
<paroneayea>(format #f "~x" (random (expt 10 50) (*uuid-random-state*)))
<paroneayea>probably good enough for a unique id
<daviid>hello guilers! for info, this referenced link in the manual does not exist http://www.hpl.hp.com/personal/Hans_Boehm/gc
<civodul>daviid: fixed in the source, thanks!
<daviid>civodul: hello, thanks!
*paroneayea braindumps https://identi.ca/cwebber/note/EQEu_1aXS6Of6gKUgVu5rA
<dsmith-work>Happy Friday, Guilers!!
<paroneayea>happy friday, dsmith-work, * :)
***michel_mno is now known as michel_mno_afk
<paroneayea>hey #guile
<paroneayea>is there any way to do
<paroneayea>(define-method (foo-+ (x <parameter>) (y <number>))
<paroneayea> (+ (x) y))
<paroneayea>(is-a? (make-parameter 2) <parameter>) ;; => #f
<paroneayea>so..
<paroneayea>not sure how to do it, if possible
<taylanub>paroneayea: a parameter is a procedure
<paroneayea>taylanub: hm
<paroneayea>so I guess "no" huh
<paroneayea>I could use match? instead
<paroneayea>er
<paroneayea>match
<taylanub>well, apparently there is a <parameter> type...
<paroneayea>instead
<paroneayea>yeah but it doesn't work
<paroneayea>frustrating
<taylanub>I think we're using is-a? wrong, because I'm getting (is-a? <number> 0) => #f
*taylanub never actually used goops yet
<taylanub>never mind, wrong argument order :P
<paroneayea>taylanub: I guess the problem is that there's just not enough OOP and typing throughout guile for it to work with everything you might want
<taylanub>strange; parameters are neither <procedure> nor <parameter>
<paroneayea>I decided that, though my program is mostly functional, I have some IO stuff, might as well make that OOP since it kind of fits here and I wanted to learn GOOPS better anyway
<paroneayea>and IO is already non-functional, so :)
<taylanub>I'd file a bug report; at least <parameter> should work here IMO.
<paroneayea> http://this-plt-life.tumblr.com/post/44462204757/simon-peyton-jones-adding-the-io-monad-to-haskell
<taylanub>unless GOOPS tends to have such limitations, which would be sad
***please_help is now known as please_help0
<taylanub>paroneayea: hehe :)
***please_help0 is now known as please_help
<paroneayea>ooh, http://this-plt-life.tumblr.com/post/44373483122/when-somebody-tries-to-add-a-type-system-to-an also kinda applicable :)
<paroneayea>thanks for your help taylanub
<paroneayea>I guess I ought to subscribe to the guile lists!
<davexunit>taylanub: not procedure or parameter? ummm
<davexunit>(procedure? (make-parameter 'foo))
<davexunit>=> #t
<paroneayea>davexunit: he means within the context of GOOPS, above
<paroneayea>see the is-a? thing and (define-method) issue I was raising
<davexunit>there's no public '<procedure>' variable... does GOOPS add one?
<davexunit>in which <procedure> becomes a GOOPS class?
<paroneayea>yep
<paroneayea>davexunit: it does
<davexunit>I see
<paroneayea>again, http://this-plt-life.tumblr.com/post/44373483122/when-somebody-tries-to-add-a-type-system-to-an :)
<davexunit>lol
<taylanub>that blog is too hilarious :D
<paroneayea>I'm not always a fan of "reaction blogs" but that one is sooo good
<paroneayea>though I also like Hy's http://livefromthehyve.tumblr.com/
<davexunit>this blog is very anti-fp it seems
<taylanub>davexunit: you mean This PLT Life?
<paroneayea>davexunit: it's at least anti-FP-purism
<taylanub>yeah, I also interpreted it as just anti-dogmatic-pure-FP, like the Haskell extremists I've been hearing of
<bipt>hmm... (let ((x (make-parameter #f))) (eq? (class-of x) (class-of x))) => #f
<bipt>this thread seems relevant but it's about srfi-9 record types rather than structs: http://lists.gnu.org/archive/html/guile-devel/2014-10/msg00060.html
<paroneayea>I thought that I could make this technique fail by defining the record
<paroneayea>type before importing (oop goops), but it still worked. Why?
<paroneayea>- Dave
<paroneayea>why indeed
<paroneayea>GOOPS is both pretty nice but not as nice as CLOS, because CLOS is designed to fit with the rest of the common lisp spec
<paroneayea>or so it felt to me
<paroneayea>less surprising type behavior
<paroneayea>I think davexunit told me wingo was interested in a typed guile
<paroneayea>maybe that would make things easier, somehow
<paroneayea>if, somehow, slapping a fish onto an already made sandwich could be avoided
<davexunit>GOOPS just needs a little love
<davexunit>but not from me :)
<paroneayea>oh
<paroneayea>bipt: thanks for linking that
<paroneayea>there's my answer :)
<paroneayea>(is-a? (make-parameter 2) <<parameter>>)
<paroneayea>=> #t
<davexunit>oh yeah, the ol' double-bracketed GOOPS class identifier
<paroneayea>f*ing magnets, how do they work
<paroneayea>miracles, man
<paroneayea>(class-of (make-parameter 3))
<paroneayea>oh
<paroneayea>huh
<paroneayea>I didn't think there was anything like that which worked in guile
<paroneayea>(add-interesting-primitive! 'class-of)
<paroneayea>haha
<paroneayea>great name
<paroneayea>wow
<paroneayea>now I have rainbow-delimeters-mode *and* rainbow-identifiers-mode
<paroneayea>and they are both interesting
<ijp>I didn't find rainbow delimiters helpful, but rainbow identifiers is
<mark_weaver>ijp: would you care to finish that sentence? :)
<ijp>helpful
<mark_weaver>oh, right, I guess that sentence was already complete.
<paroneayea> http://dustycloud.org/tmp/emacs-rainbow-all-the-things.png