IRC channel logs

2023-02-09.log

back to list of logs

<sneek>chrislck: Greetings :D
<sneek>Welcome back dsmith
<dsmith>sneek: botsnack
<sneek>:)
<dsmith>!uptime
<sneek>I've been running for one month and 7 days
<sneek>This system has been up 15 weeks, 1 day, 40 minutes
<dsmith>goodbot
<lechner>Hi, why is a build product (*.x) being included in this source file, please? https://github.com/opencog/guile-dbi/blob/5dcb97c79069e55b9956d268e234aa620259c0b2/guile-dbi/src/guile-dbi.c#L314-L316
<iyzsong>lechner: see '(guile) Function Snarfing' from guile manual, the *.x files are output of guile-snarf, which remove boilerplate code (by generate it into .x files) when wrap c functions.
<lechner>sneek / botsnack
<sneek>:)
<lechner>sneek / later tell iyzsong / thank you for that pointer!
<sneek>Okay.
<sneek>Welcome back haugh!
<jlicht>is there a way to match alists? Or maybe just an `alist?' predicate?
<jlicht>s/match/ice-9 match/
<mirai>jlicht: is this to be used with guix?
<mirai>though not guix specific, you can use this snippet: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/services/configuration.scm#n442
<mirai>in hindsight, it should have been written as (list-of pair?) but the idea came a tad late
<jlicht>mirai: tyvm! Yes, to (eventually) be included in guix
<mirai>jlicht: it already is 😅
<jlicht>no, I mean my code that needs to use `alist?'
<mirai>but if you could get it moved to (guix utils) that'd be great
<mirai>jlicht: note that you also have `generic-serialize-alist' procedure you may want to take a look at
<lloda>alists are icky
<jlicht>mirai: the linked alist? was 100% what I needed ;-)
<chrislck>alist? is O(N) not O(1) unfortunately
<jlicht>I need it for a `match-lambda' that will most likely only look at alists with < 10 entries, so anything but O(2^N) should be fine ;-)
<chrislck>lol until the next customer comes along!
<chrislck>mirai: even better, list-of? shouldn't call (list? x) at all
<old>jlicht: You could wrap the alist in a record. That way you have O(1) predicate with a tag
<old>The problem of alist? is that it is a predicate on the memory layout of the object instead of a simple tag
<old>But I guess that if user pass an alist, things are little more difficult
<chrislck>my word there's lots of (list?) in guix
<chrislck>and there's lots of flatten everywhere
<lechner>Hi, is there a trick with guile-dbi to getting the row values to show? something like this does not work locally https://notabug.org/ZelphirKaltstahl/guile-examples/src/master/databases/sqlite3-via-guile-dbi/example.scm#L25
<lechner>i just found this https://mail.gnu.org/archive/html/help-guix/2022-05/msg00043.html
<lechner>but i see (0 . query ok) beforehand
<lechner>on postgresql
<lechner>i do not have the prerequisite problem in that bug but rather the rows are empty, even though the number of rows returned matches my expectations
<sneek>Yey! dsmith-work is back :D
<dsmith-work>sneek, botsnack !
<sneek>:)
<dsmith-work>!channels
<lechner>Hi, can guile-json deal with nested records?
<civodul>lechner: hi! in define-json-mapping, you can do that, but indirectly
<civodul>you can grep Guix for these, you'll see
<civodul>(that is, you need to define each record mapping separately)
<lechner>civodul / thank you!
<apteryx>do anyone know how the .xpi files offered as download by Mozilla come into existence? (e.g., those at https://ftp.mozilla.org/pub/thunderbird/releases/102.7.0/linux-x86_64/xpi/).
<apteryx>I'd like to package them
<apteryx>*does, s/as download//
<lechner>it's a ZIP
<lechner>it think it's mostly JS
<apteryx>oh, wrong channel, apologies, but thanks for the info lechner!
<lechner>Hi, what is an idiomatic way to escape all single quotes in a string with an additional single quote, please (for Postgres)?
<wingo>good evening
<lechner>hi, you invented the whole thing!
<wingo>i am just along for the ride, not the inventor :P
<wingo>in general be careful with string interpolation etc but if the problem is exactly as you posed it, here are two solutions:
<wingo>(string-join (string-split "fo'o" #\') "''")
<lechner>wingo / thanks! it's a tradeoff; i am inserting with json_populate_recordset.
<lechner>wingo / thanks also for this great software. i recently vowed never to write another shell script again, and it's been holding up so far
<wingo>(with-output-to-string (lambda () (string-for-each (lambda (c) (write-char c) (when (eqv? c #\') (write-char c))) "fo'o")))
<wingo>happy hacking :)
<old>hey wingo, thanks for your FOSDEM talk on GC
<old>it was fun
<lechner>yeah
<wingo>oh glad you enjoyed it ;)
<dthompson>yeah it was great
<old>Since I have you the hook now, can you tell me what's happening with guile-charting? :-p
<wingo>old: haha in the long term, "whatever i need it to do for the next chart i need to make"
<old>I've been using it for quite a while now for generating stuff for my research. I have a couple of fixes
<wingo>ah!
<old>If you're taking patches
<wingo>sure
<old>awesome
<old>great stuff btw. because of that, I can stay with Guile for everthing
<old>Don't need to pull Python as a dependency
<wingo>i am very surprised you have managed to figure out how to make it work ;)
<dthompson>I've never used new guile-charting but wingo's graphs are always cool
<wingo>generally speaking for this kind of project the best thing is pull requests to https://gitlab.com/wingo/guile-charting and then badger me here or via email
<old>it's quite readables and hackable
<wingo>it may take a couple pokes ;)
<old>okay
<wingo>also civodul has the commit bit, if you can manage to bend his arm that works too
<wingo>i am not sure if it is the sort of project one wants to not break because there are old users, or to break because the future could be much better
<wingo>until now i have taken a mostly conservative approach
<old>well you do now know that I use it. So that's one user depending on it!
<wingo>(also if we manage to be on the same wavelength i'm happy giving away the project, too)
<wingo>hehe yes :)
<old>Although, I've mostly copied/paste most of the stuff in a module because I had to hack private stuff
<wingo>right
<dthompson>wingo: speaking of giving away projects... guile-opengl has been on my mind lately.
<wingo>dthompson: who wants it. do you want it
<wingo>o/~ take it o/~
<dthompson>wingo: I'll take it. :)
<old>Sure. I would like to contribute to the Guile ecosystem
<wingo>take another little piece of my maintainer-load now baby, whoa whoa
<wingo>dthompson: it is yours :)
<wingo>where do i do that...
<dthompson>wingo: I'm davexunit on savannah. you can add me as a member of the project.
<gnucode>dthompson: what changes do you have for guile-opengl?
<dthompson>wingo: I just requested inclusion
<dthompson>gnucode: the biggest thing is just making a 0.2.0 release that has the changes in git for working on guile 3+
<wingo>lol i think we race-conditioned savannah
<old>wingo: About whippet. Will there be a limit on the heap allocation? Currently, the memory limit of BDW is hard coded.
<dthompson>wingo: and here I was thinking I was being helpful...
<old>I'm thinking like making huge bytevector allocation for mapping files
<dthompson>lol
<wingo>old: i think we will end up with all three strategies in https://wingolog.org/archives/2023/01/27/three-approaches-to-heap-sizing
<wingo>with the adaptive / membalancer approach being the default
<wingo>fwiw that is what racket does
<dthompson>wingo: well I don't want to waste a bunch of your time on it. maybe it will settle out or I can go find an admin to poke.
<old>okay
<dthompson>thanks for trying to hand it over to me!
<dthompson>savannah says I have no requests awaiting approval lol
<wingo>dthompson: can you see if you have a request-to-join now?
<wingo>i just re-did the thing
<dthompson>checking!
<wingo>dthompson: or otherwise plz request again
<dthompson>I don't see it. I'll try requesting again.
<dthompson>the dreams of the 90s are alive on savannah
<lechner>that's funny
<dthompson>wingo: requested.
<wingo>punk's not dead
<dthompson>punk died when my band broke up last year
<wingo>;.;
<dthompson>wingo: got the approval email! thank you!
<wingo>yass
<dthompson>my quest to become the dictator of the entire guile graphics stack is one step closer to completion...
<wingo>i will tell my children that i was here for this moment
<old>I heard the other day on this channel about someone hired to work on a WASM compiler for Guile. Was there an announcement at FOSDEM?
<dthompson>really my main motivator is that people that try to use chickadee that aren't also using guix get stuck because guile-opengl 0.1 doesn't build with guile 3 because of autotools nonsense.
<old>maybe it was on the ML can't remember
<wingo>old: no announcement at fosdem afaiu. exciting stuff tho
<old>yesss. If guile can target the Web natively that would be awesome
<wingo>ACTION grumbles at autotools
<old>No more javascript nighmare
<dthompson>old: I work for Spritely, who announced the effort, and what I can say right now is that there will be more news to share before too long.
<old>awesome
<old>I'm happy to see that there's interested in the private sector
<wingo>yeah!
<wingo>i suppose a lot of the guix interest is public sector
<old>s/interested/interes
<old>t
<old>mostly scientific
<dthompson>I'm thinking back and remembering that 10ish years ago I got interested in guile because I wanted to embed it as a scripting language for a silly game that never went anywhere.
<dthompson>and now I develop in guile for a living. life is weird!
<old>dthompson: Same for me but ~5 years ago
<wingo>i think mine was music but (gulp) 20yo
<old>wanted to have a embedded scripting language in my game. Re-made the game from scratch the other way around. All Scheme and some C backends
<wingo>*years ago
<old>the game is still unfinished ..
<wingo>right. i never made music with the thing i was working on either. it's fine, guile is fun :)
<old>trully the most fun I have doing programming
<dthompson>the projects come and go, but guile is forever
<old>just whish more distros would support it
<old>I think arch linux finally got 3.0.8
<old>It was still on 2 something couple of months back
<old>on some it's simply absent
<wingo>ACTION wanders off. will be around more starting in a week or so, when i am back from leave. happy hackin!
<wingo>g
<old>later
<old>!
<dsmith>So. Work is going away! Last day is the 24th. But I'll be starting a new gig on the 27th! Woo.
<civodul>dsmith: yay, congrats!
<dsmith>Inet access is horrible at work right now as everything is being taken apart.
<dsmith>Thanks! The company is Schenck Process. Be doing mostly Linuxy stuff. Kinda/Sorta embedded.
<lechner>congratulation!
<lechner>s
<haugh>the best kind of embedded
<mwette>hmm
<mwette>maybe for non-realtime
<dsmith>Ya, no control loops.
<ArneBab>dthompson: very cool!
<ArneBab>(re work for spritely)
<dthompson>ArneBab: thanks! it's a lot of fun! and also work! but good work!
<lechner>that "guile is forever" came across as very sincere
<dthompson>it was! well its lower on the scale of permanence than some things but yeah you could say I'm a real guilehead! a guile freak
<dsmith>A Guileer
<dsmith>(Like mouseketeer)