IRC channel logs

2020-02-10.log

back to list of logs

<oni-on-ion>does (use-module (oop dict)) exist ? required by guile-persist
***daviid` is now known as daviid
<daviid>oni-on-ion: that is not a guile goops 'core' module, but i mhght exists elsewhere, don't know
<oni-on-ion>daviid, yeah, thats what i've surmised. i've looked around but i dont see any real way to "reverse lookup" use-module forms
<oni-on-ion>i've commented it out. my assumption is that (oop dict) was merged into goops
<oni-on-ion>well, i've tried to compile this, but i am now given up: https://gitlab.com/gule-log/guile-log
<oni-on-ion>"no code for module (logic guile-log primitive)" is as far as i can get after all the dependencies. i would be iterested to hear if anyone else is using guile-log, because it looks really great.
<daviid>oni-on-ion: the guile-log author appears here (i this channel), he was here earlier today, try to ping him, his nick is 'stis'
<oni-on-ion>daviid, ah cool! thank you.
<daviid>wc!
<dsmith>sneek: seen stis?
<sneek>I last saw stis on Feb 09 at 09:03 pm UTC, saying: hmm, lot of legacy in the reader who knows you may have spotted a bug..
<rlb>Here with 3.0 right now, this does not print "test": (error (format #f "test"))
<rlb>But (error "test") does.
<rlb>3.0.0
***wingo_ is now known as wingo
<oni-on-ion>rlb, error procedure is (message . args)
<oni-on-ion>format procedure is not a message, but is (dest fmt-str . fmt-args)
<wingo>i think rlb found a real bug fwiw
<wingo>the result of calling (format #f "foo") is just "foo"
<wingo>so it's the same as (error "test")
<oni-on-ion>ohhh.
<wingo>rlb: apparently there is a bug in message-irritants, see (with-exception-handler values (lambda () (error (format #f "foo"))) #:unwind? #t)
<wingo>vs (with-exception-handler values (lambda () (error "foo")) #:unwind? #t)
<wingo>for the first I get "?", whereas for the second it is ()
<wingo>i think the irritants should indeed be a list
***apteryx_ is now known as apteryx
<g0d_shatter>anyone awake here, I'm trying to figure out how to get pkg-config to find a guile.pc file
<wingo>pkg-config --cflags guile-3.0
<wingo>^ doesn't show you anything?
<wingo>if not, your PKG_CONFIG_PATH env var is missing the dir that contains guile-3.0.pc
<wingo>(or guile-2.2.pc, etc)
<g0d_shatter>ack
<g0d_shatter>sorry andy i didn't see this right away
<g0d_shatter>wingo: I'm trying to build gdb manually with guile-2.0 so I can use guile as an extension language
<wingo>neat
<wingo>is there a reason not to use guile-2.2 ?
<g0d_shatter>I was under the impression gdb won't build with 2.2?
<g0d_shatter>I thought there was a blocking bug of some sort
<civodul>ah true
<civodul>we should fix that
<wingo>ah i didn't know about that :)
<wingo>should have fixed that over fosdem :P
<wingo>w tromey and pedro in the room ;)
<civodul>yup!
<g0d_shatter>My goals for the moment are to finish the project using it and then work on the patch
<civodul>it's just the port API stuff
<wingo>ah, should be easy to make a shim for 2.2 api implemented for 2.0 then
<g0d_shatter>si
<wingo>g0d_shatter: anyway i would see what pkg-config --cflags guile-2.0 prints
<g0d_shatter>as far as the original question though
<g0d_shatter>haha
<wingo>and if it's not finding the guile-2.0, then check your PKG_CONFIG_PATH env var
<wingo>*the guile-2.0.pc
<g0d_shatter>wingo: it prints out -pthread -I/usr/include/guile/2.0
<wingo>that looks good then
<g0d_shatter>wingo: this is the output from trying to build https://dpaste.org/Q11j
<g0d_shatter>when I call: echo $PKG_CONFIG_PATH I get nothing
<g0d_shatter>I"m guessing I'm doing it wrong
<wingo>i am not sure that pkg-config is what is being used at this stage, fwiw
<wingo>like, that message seems to check that /usr/bin/guile works
<wingo>it just happens to follow a check for the pkg-config program
<wingo>does /usr/bin/guile --version print out something sensible?
<g0d_shatter>wingo: guile --version gives me sensible output
<wingo>is it 2.0?
<g0d_shatter>yes
<wingo>k
<wingo>in that case i would check the config.log to see precisely what check is being run and what is failing
<wingo>it's a lot of output, but it's the only way to know :P
<wingo>search for the strings in the output around where the problem occurs
<g0d_shatter>running file on /usr/bin/guile leads to /usr/alternatives/guile which is a symbolic link to /usr/lib/x86_64-linux-gnu/guile-2.0/bin/guile
<g0d_shatter>wingo: good call, thank you
<g0d_shatter> wingo: so grepping config.log for relevant strings didn't turn up anything useful, strangely, so I'm trying to run the configure script with a different option this time, instead of --with-guile=/usr/bin/guile I'm trying --with-guile=/usr/bin/guile-2.0
<g0d_shatter>in the hope that that will work this time? its still running in the background
<g0d_shatter>still no dice, man this is frustrating
<wingo>:(
<wingo>did you manage to find the specific thing that caused configure to say "no guile" ?
<g0d_shatter>nope
<g0d_shatter>thats what I'm trying to figure out now
<g0d_shatter>I've never used pkg-config (that I remember) other than with this, and I've had this issue before on an older ubuntu install
<g0d_shatter>where would I find the guile.pc file?
<g0d_shatter>i downloaded the source to see if there is one there and simply put it where it belongs in my path
<wingo>the file is called guile-2.0.pc
<wingo>probably you could "locate guile-2.0.pc" if your locatedb works
<wingo>ok here's a dumb question, did you install the development package for guile 2.0 from your distro?
<g0d_shatter>wingo, I'm just installing locatedb now
<g0d_shatter>wingo: I did!
<wingo>locatedb isn't necessary fwiw, just a useful thing when you want to know where a file is
<g0d_shatter>for sure, my find command fu is weak though
<g0d_shatter>alright!! we're getting somewhere, its located at /usr/lib/x86_64-linux-gnu/pkgconfig/guile-2.0.pc
<g0d_shatter>so it does exist on my system, theres that much at least
<g0d_shatter>wingo: do you know how I would tell pkg-config to find it here? or maybe its a naming conflict of some kind? like its looking for guile and can't find guile-2.0 or something
<wingo>i am sure your pkg-config is already finding it
<wingo>because of what pkg-config --cflags guile-2.0 printed
<g0d_shatter>should it matter that pkg-config --cflags guile fails?
<wingo>no, because it should be pkg-config --cflags guile-2.0
<wingo>fwiw it would seem that the right argument to --with-guile is a version
<wingo>so ./configure --with-guile=2.0
<g0d_shatter>I will try that now
<g0d_shatter>so this is the configure command I'm using
<g0d_shatter>../configure --prefix=/usr --with-system-readline --with-python=/usr/bin/python3 --with-guile=/usr/bin/guile-2.0 && make
<g0d_shatter>I just tried it with the option for guile being --with-guile=2.0 and no dice on that one either
<g0d_shatter>fwiw I just realized that the command thats failing is make
<g0d_shatter>embarrassing
<g0d_shatter>wingo:just wanted to thank you for taking the time to help me, I'm about to sign off for the night/morning, but at some point I'm going to solve this madness
<g0d_shatter>wingo: and I appreciate you helping me get closer to that
<wingo>hey sorry that it's not working for you, good luck!
<rekado_>Is it possible for a macro to return not one but multiple expressions, so that they would be spliced into the location of the macro call site?
<rekado_>like this: (list 1 2 3 (my-macro 10 11 12) 4 5) –> (list 1 2 3 10 11 12 4 5)
<civodul>rekado_: nope!
<civodul>macros are "singled-valued"
<civodul>it'd be an interesting extension though
<civodul>in the meantime you'd need to make 'list' a cooperative macro
<str1ngs>sneek later tell daviid later when you have time. these flags do not seem to be working properly you can verify this is right? (g-application-set-flags app '(handles-open can-override-app-id)) . This might not be easy for you to test since it requires argv conversion. Which I'm doing in C for now, maybe we can revisit this once arrays are complete? can-override-app-id should allow passing --gapplication-app-id but instead I get Unknown
<str1ngs>option --gapplication-app-id. If I set the flags via C it works okay. like so g_application_set_flags (G_APPLICATION (app), G_APPLICATION_HANDLES_OPEN | G_APPLICATION_CAN_OVERRIDE_APP_ID); . setting the 'flag slot has the same result. I used the method for simplicity
<sneek>Got it.
<str1ngs>sneek: later tell daviid the error was truncated. here is the error 'Unknown option --gapplication-app-id'
<sneek>Will do.
<str1ngs>sneek: later tell daviid here's the enum reference if it helps. https://developer.gnome.org/gio/stable/GApplication.html#GApplicationFlags
<sneek>Will do.
***dddddd_ is now known as dddddd
<rekado_>civodul: thanks for the hint. Does “cooperative macro” mean that I’d replace “list” with a macro that takes care of splicing in the result of “my-macro”?
<civodul>rekado_: yes
<rekado_>thanks!
***dsmith-w` is now known as dsmith-work
<dsmith-work>Monday Greetings, Guilers
<faLUCE>hello. Which function can I use for sorting a list of integers?
<d4ryus>faLUCE: hmm, what about sort?
<faLUCE>d4ryus: '(2 8 7 4) ---> '(2 4 7 8)
<faLUCE>d4ryus: I don't understand how to apply sort
<d4ryus>faLUCE: (sort '(2 8 7 4) <) => '(2 4 7 8)
<faLUCE>d4ryus: thanks! Why is the online doc so bad??
<faLUCE> https://www.gnu.org/software/guile/manual/html_node/Sorting.html
<faLUCE>a list of functions without any example of how to apply the _syntax_
<faLUCE>and it's the only one doc
<daviid>faLUCE: the doc is very good, excellent imo, as a reference manual, not a user guide nor a tutorial - if/when you wish examples, just search for some, like duckduckgo 'scheme programming sort examples' ...
<sneek>daviid, you have 3 messages.
<sneek>daviid, str1ngs says: later when you have time. these flags do not seem to be working properly you can verify this is right? (g-application-set-flags app '(handles-open can-override-app-id)) . This might not be easy for you to test since it requires argv conversion. Which I'm doing in C for now, maybe we can revisit this once arrays are complete? can-override-app-id should allow passing --gapplication-app-id but instead I get Unknown
<sneek>daviid, str1ngs says: the error was truncated. here is the error 'Unknown option --gapplication-app-id'
<sneek>daviid, str1ngs says: here's the enum reference if it helps. https://developer.gnome.org/gio/stable/GApplication.html#GApplicationFlags
<daviid>str1ngs: ok will look asap, could you paste a self executable example using this (g-application-set-flags app '(handles-open can-override-app-id)), so i can save, chmode, execute and .. . compare what it does with what is expected, that would save me a bit of time ... tx the shortest possible example that does exactly that ... tx
<daviid>str1ngs: sorry for the lttle delay wrt closure args, i've been dragged to solve something else, but should solve this later today
<faLUCE>daviid: there's some problem with the google search key
<faLUCE>daviid: In fact I did not know what is the right search key
<faLUCE>maybe the word "scheme" is too common
<oni-on-ion>it definately is for duckduckgo , having troubles finding stuff yesterday.
<daviid>don't use gaagle
<daviid>just paste the search i posted here, comes with top search result as scheme programming examples of sort ...
<daviid>don't use 'scheme' alne, use 'programming scheme' or the like ... scheme programming language blablabla ... this generally works well, for me at least
<daviid>anyway, back to hack
<oni-on-ion>davexunit, even 'guile' is difficult. my search history yesterday is like iterative updates =/
<daviid>oni-on-ion: yes, you prob want to use 'guile scheme' then the serch words ...
<oni-on-ion>daviid, tried that too! there were many attempts. my search terms are generally hyper-accurate so it was a hit to my pride as well
<oni-on-ion>search-fu
<dsmith-work>It's good to have a unique name for a project/language nowadays.
<oni-on-ion>ahem. does anyone know anything about "guile-studio" ?
<dsmith-work>Searching for go stuff is often difficult. "golang" usually works.
<oni-on-ion>ah, yep! truth. done the same, the one time i searched on it
<oni-on-ion>i wish "quotes" were as useful as before. (both ddg and ggl seem to ignore it) searching for syntax and errors especially
*dsmith-work invents a new concatenaive languge: "and"
<daviid>guile and guild, alone will almost always trigger search within diff context, hence, 'no matter what', you prob want to add 'scheme, programming ...'
<oni-on-ion>=(
<oni-on-ion>yep, daviid . maybe we need a specialised searcher =)
<jcowan>Google Search pretty much requires quotation marks on search terms, at least for the (obscure) things I search for. Otherwise it will ruthlessly disregard my search terms on the assumption that I actually care about something altogether different.
<jcowan>but evidently more popular
<dsmith-work>A long time ago, there was google code search. Very useful to find something being used in the wild.
<dsmith-work>Too bead they turned that off.
<dsmith-work>bad
<wleslie>that is one packed graveyard
<wleslie>not many results include anything relevant. include results that are relevant? {y n}
<dsmith-work>Nah, I'd rather have the non-relevant ones, of course.
<dsmith-work>WHo wouldn't?
<wleslie>< google> however will you learn and discover new things?
<dsmith-work>Excatly what I was thinking!
<oni-on-ion>there is stuff like github code search now though -- microsoft's latest IDEs uses it for autocompletion
<mfg>Hey
<mfg>i'm trying to use the peg module. What predefined Character Classes are available and how do i add '/' to one?
<mfg>nvm i forgot something else :)
<str1ngs>daviid: will see what I can do. 'can-override-app-id might be hard to model because it requires passing argv to g_application_run which is not possible without use C to convert **char from say a list. I'll try with 'handles-open at least hopefully the two issues are related.
<daviid>**char is in g-golf
<daviid>is supported
<str1ngs>daviid: does it use string list? I will double check but I thought that's what you meant by you need to work on arrays?
<daviid>str1ngs: but you were talking about flags 'not working', i'd like a snipset just for that if possible
<str1ngs>well the two are related in these case. since in order to use can-override-app-id you need to satisfy **char to g-application-run
<str1ngs>basically argv needs to pass to somehow g-application-run
<daviid>str1ngs: yu tell me, but i'd like to see why this flags settings are not working
<str1ngs>I'll have an example here in a sec might help
<daviid>but setting the app glags is not related?
<daviid>*flags
<mfg>Hm now i think i have a question ... How do you add the - to a character class escaping does not seem to work :(
<wleslie>you could put it as the first or last in the character class
<str1ngs>daviid: yes its related since you can't pass commands arguments like --gapplication-app-id to satisfy the 'can-override-app-id flag
<str1ngs>same with handles-open now that I think about it
<mfg>wleslie: When i try [-a-z] or [a-z-] guile complains about unbound variables, without the minus it doesn't complain in either case ...
<wleslie>hmm. the other possibility is maybe you have to double-escape it to get the escape past the reader.
<daviid>str1ngs: ok, please send a snipset i can try here ..
<daviid>str1ngs: it should be possible to pass **char, just pass a list of trings
<str1ngs>daviid: here's a simple use-case http://paste.debian.net/1130083 note g-files is not available I don't know if its related to argv but that is a GFile aarray. I don't want to overload use with issues here.
<daviid>it should be converted to **gchar, but if not, we'll debug of coure ...
<mfg>wleslie: double esacping also doesn't work ... i'm trying to escape with a backslash are there other escape methods in scheme? (i don't knoiw scheme that well ...)
<daviid>so far i always use #f #f ...
<str1ngs>passing arguments use this error Warning: Unimplemented type - array;: (c -1 #f 0 filename)
<daviid>str1ngs: but i think i kind of remember you did try in the recent past, to send a list of argv
<str1ngs>I mentioned this long time ago. I thought it was related to arrays
<mfg>or is there another way to write that particular character?
<mfg>direct ascii code or smth?
<daviid>i know g-golf does have arrays, but that is diff them argv ... i'll try to see if i find your example
<daviid>str1ngs: of course i also will fix the array type, but tht id not the same as **gchar, which should work
<str1ngs>daviid I've gotten around it by converting a list to **char using C meantime.
<daviid>the warnig is a surprise, because we pass #f #F, it should not even try to do anything, but pass %null-pointer ...
<str1ngs>see the commented out call though that produces that
<str1ngs>actually I think the warning is produced regardless. I'm assuming that has to do with argv
<str1ngs>I just thought since **char is an array and the array says array are not supported. it was related to array support :)
<str1ngs>err warning says*
<daviid>str1ngs: i know the warning, ever since g-golf exists
<daviid>clutter-init produces it ... gtk-init, any init
<daviid>but that has nothing to do the argv
<daviid>or at least should not be related
<daviid>anyway
<str1ngs>well not using any special flags and calling with (g-application-run app (length args) args) gives (process:12372): GLib-GIO-CRITICAL **: 13:44:41.160: g_application_run: assertion 'argc == 0 || argv != NULL' failed my guess is argv is NULL
<str1ngs>also gtk-init takes argv are you sure there not related? you can shoot me if I'm wrong :)
<str1ngs>daviid ^
<daviid>str1ngs: i was hoping to look at the flags problem, this init warning exists ever since i worked on g-golf, and it's something i need to work on, not urgent: most of the time, we call all init function using #f #f ...
<daviid>str1ngs: but without a snipset ...
<str1ngs>daviid: did you not get my snippet?
<daviid>str1ngs: please copy paste the hello-world.scm scrpt, change it so it has a minimum executable code that reproduce this flag problem
<daviid>that i can save chnode and run
<daviid>or load in a repl
<daviid>*save/chmod and execute loclly
<daviid>tx
<str1ngs>daviid: http://paste.debian.net/1130091 this is not copied verbatim from hello-world.scm but it should satisfy your requirements.
<str1ngs>maybe I can find another flag that has issues that not related to command arguments I dunno
<daviid>tx, will look at this asap
<str1ngs>the error seems wrong because 'open should satisfy this no problem.
<daviid>this snipset doesn't seem to call gtk-init?
<str1ngs>you don't need gtk-init with GtkApplication
<daviid>ok
<str1ngs>activate handles all of that.
<str1ngs>here is my C use-case that works http://git.savannah.nongnu.org/cgit/nomad.git/tree/typelib/util.c?h=feature-g-golf#n129 it might be a good reference as well
<str1ngs>the point in the use case is the C code is pretty much on par with the scheme in term of expectations
<str1ngs>don't mind the scm_c_eval_string ("(command-line)"); hack I was being lazy :P
<str1ngs>more precisely GApplication handles 'active GtkApplication is derived for course.
<str1ngs>s/for/of
<daviid>str1ngs: i can't find the flags property def
<daviid>if i comment that line, it's ok, still have the init related warning of course, as expected, but the app launches ... then i wanted to lookmat the flags property ef, i can't find it :)
<str1ngs>daviid does this help https://developer.gnome.org/gio/stable/GApplication.html#GApplicationFlags ?
<daviid>ok, when i do not comment the lie, here i get this message
<daviid>guile:29176): GLib-GIO-WARNING **: 19:51:26.199: Your application claims to support custom command line handling but does not implement g_application_command_line() and has no handlers connected to the 'command-line' signal.
<str1ngs>right 'open should satisfy that
<daviid>and it doesn't launch the app
<str1ngs>right
<str1ngs>but this C example does not suffer from this. http://paste.debian.net/1130097
<daviid>str1ngs: worth mremembereing that i am not familiar with neither gtk-pplicatio not gtk-application-window, which is not a 'problem', but of course i need help to find out if it is a g-golf or an app problem ..
<str1ngs>understandable
<str1ngs>here's a make file for the C example if it helps http://paste.debian.net/1130098