IRC channel logs

2020-07-23.log

back to list of logs

<pkill9>RhodiumToad: It worked! thanks!
<pkill9>I replaced the read-unicode-char function definition with all that paste
<pkill9>strangely I don't get that error on my vps which is also runnign guix system
<pkill9>it's running guile 3.0.2, I'm running guile 3.0.4 on my laptop
<pkill9>guile feels very robust
<dsmith>What platforms have stack grow up these days?
***nckx is now known as nckx-
***nckx- is now known as nckx
<RhodiumToad>I believe the ia64 register stack grows up. IIRC the PA-RISC stack grows up, but that's long defunct.
<RhodiumToad>if there's any other architectures in recent use that have a stack growing up, I don't know of them.
<RhodiumToad>above c+p problem turned out to be in xterm, of all places
<dsmith>PA-RISC. Was that in the old hp-9000's ?
<RhodiumToad>yes
<dsmith>With terminals that looked like bullits, sort of.
<RhodiumToad>HP switched to ia64, iirc
<dsmith>Ok.
<dsmith>This was some 30 years ago or so.
<RhodiumToad>I guess I used them in the mid 90s or so?
<RhodiumToad>basically ia64 was an attempt to fold pa-risc and dec alpha and i386 together to create a new and better processor
<RhodiumToad>the fact that it ended up nicknamed "Itanic" indicates how well that went
<RhodiumToad>afaik HP ended up committed to using it because they'd burned their boats on pa-risc development in the process
<RhodiumToad>postgresql buildfarm still has one pa-risc system and a couple of ia64 systems in it
<dsmith>That hp system I used could boot from tape. And by that I mean mount the tape as the root fs.
<dsmith>You could cd to a different dir and the tape would seek and spin. I was very surprised.
<RhodiumToad>not sure I ever tried that
<dsmith>The tape (and the disk) was using hpib for the bus. (Called gpib these days)
<RhodiumToad>that sounds a lot older than the one I used.
<dsmith>Our disk crashed, and I needed to boot from tape to format and restore and stuff.
<RhodiumToad>scsi was king then
<dsmith>They regularly made tar backups, but you couldn't restore from them.
<RhodiumToad>huh
<RhodiumToad>that seems to be a problem :-)
<dsmith>Had to boot from that tape. Bring the os up. Install tar. THEN do the restore.
<RhodiumToad>ah
<dsmith>Well, it was a while ago.
<dsmith>Maybe not install tar.
<dsmith>I just remember it was hard.
<dsmith>heh
<dsmith>The stack were.. different.
<dsmith>Could it have been a discontiguous stack?
<RhodiumToad>I don't recall that
<dsmith>Oh well. Long gone now.
<RhodiumToad>I do recall it went upwards
<RhodiumToad>I had to read a bunch of assembler stuff for it because we ran into a compiler bug with the HP compilers
<dsmith>It seemed like as you pushed it went in one direction, but the frames were out of order. Like each frame was malloced from somewhere. But that just may be because it was growing up and I didn't understand it.
<RhodiumToad>if you did something like char foo[100]; char *p = foo+50; then &p[-50] and (p-50) did different things
<RhodiumToad>I recall it had branch delay, but I've forgotten almost everything else about it
<RhodiumToad>oh, I think it also had inverted page tables?
<dsmith> http://hpmuseum.net/display_item.php?hw=369 Like that, but the two boxes matched in size. One was cpu, the other disk/tape.
<RhodiumToad>oh, that looks quite a lot older
<dsmith> http://www.hpmuseum.net/display_item.php?hw=248 The terminals.
<dsmith>But it was PA-RISC
<RhodiumToad>the one I used might have been an F-something?
<dsmith>Deskop?
<RhodiumToad>server
<RhodiumToad>tower case, not rackmount
<dsmith>Those terminals had the most annoying flow control. ENQ/ACK.
<dsmith>Had to hit ^E every so often to get more output.
<dsmith>One of the things I did was change some config (/etc/ttys?) to enable that. Then the terminals actually worked smoothly.
<dsmith>That place had everything HP. The busness system was hp-4000. The pc's were those dos machines with the first 3.5 in floppys. And of course hp plotters.
<daviid>seepel: hello, maybe you already know, but g-golf guix package def patch by str1ngs, but i know you did help, made it to ... tx to both of you
<pkill9>is there a map equivalent for vectors?
<RhodiumToad>srfi-43
<RhodiumToad>guile also accepts vectors as arrays, I believe, so there's array-map! and array-for-each and so on
<pkill9>nice
<pkill9>can you loop through an array?
<pkill9>specifically, a vector
<mwette>(srfi srfi-43) has vector iterators
<pkill9>how do you use vector-fold?
<mwette>(vector-fold (lambda (ix val seed) (+ val seed) #(1 2 3))) => 6
<mwette>oops: (vector-fold (lambda (ix val seed) (+ val seed) 0 #(1 2 3)))
<mwette>starts w/ seed=0 then adds 1, then 2, then 3 to get 6
<seepel>daviid: I did see that, and thank you str1ngs!
<seepel>daviid: strings: I think I found another issue is in the package definition actually. Looking at the documentation https://guix.gnu.org/manual/en/html_node/package-Reference.html#index-inputs_002c-of-packages it seems to indicate that the runtime dependencies should actually be in propogated-inputs rather than inputs so that guile can find them at runtime.
<pkill9>i did it
<pkill9>i used vector-map
<pkill9>so 'seed' is the position in the vector?
<daviid>seepel: ok, i can only tx you when you update patch the pkg def, but can't really help doing it ... i'll let you and str1ngs analyse and possibly fix the problems on the guix side of things ... but tx again
<seepel>No problem, happy to do so, just have to find the time to test my hypothesis :)
<daviid>if/when you fix the package def or any other update that pushes a new pkg def on guix, always try to take the latest commit 'again', and ask me i doubd, because i push almost every day ...
<seepel>daviid: While I have you, I am now getting an error when running g-golf, but haven't really looked too deep. Is it obvious to you what I might've messed up? https://paste.debian.net/1157480/
<daviid>seepel: ok, can you see this with str1ngs, he had a similar problem in the past and that is only on guix ... i can't help sorry
<daviid>str1ngs: could you, when time avail of course, help seepel with the problem he just pasted ... many thanks
<seepel>daviid: No problem, thanks for the pointer, I suspected as much. Not urgent for my project progress. I've got a couple days of email parsing work that doesn't need UI anyway.
<daviid>seepel: iirc, this happens when there is more then one gobject introspection lib available, but i don't garantee, my memory is ... not that good :)
<seepel>That would make sense, thanks.
<daviid>seepel: wc! i wish i could help ia better way, but i can't :)
<daviid>i'm sorry you can't just run that tiny example, but i think str1ngs knows how to solve the problem, let's see
<seepel>No problem, someday I will learn how to guix :)
<daviid>seepel: maybe you can poste the paste on #guix as well, don't know
<seepel>I'll probably try a few different things first. Just to double check that it is actual incompetence rather than accidental incompetence :)
<daviid>seepel: ok, but i don't thin it is 'incompetence', after you install g-golf, imo, it really should just work ...
<seepel>daviid: I'm doing other things to run guile 3 in my normal path, and then setting up another environment to run guile 2.2 and g-golf. It is very likely I misunderstood something. And I'm ok being incompetent, it just means I don't know how to do something. I also find I learn a lot by trying different variatons on how I think it is done.
<daviid>ah yes, guile 3 and guile 2 ... i really would ask on #guix, but ... as you wish of course
<seepel>Hmmm, I managed to fix the error, but I have no idea how. I basically just re-set everything up and now it is fine.
<daviid>seepel: ah, well at least it works, maybe you figure 'why' later :)
<seepel>Fingers crossed. I suppose it was accidental incompetence after all :)
<seepel>Thanks for the help!
<daviid>you did everything, tx you ...
<dadinn>hi all
***wxie1 is now known as wxie
***apteryx is now known as Guest7517
***apteryx_ is now known as apteryx
<dsmith-work>Hey Hi Howdy, Guilers
<mwette>o/
<civodul>hey ho!
<str1ngs>sneek: later tell seepel hello. inputs should be fine no need for propogated-inputs here. if you are having a problem with the package can you describe the problem you are having?
<sneek>Okay.
<str1ngs>sneek: later tell seepel the error cannot register existing type 'GdkPixbuf' as far as we have determined happens on guix due to different versions of the same typelib being loaded. Which only happens on guix. I found the easiest way to do this is to adjust the gi-import order. see http://git.savannah.nongnu.org/cgit/nomad.git/tree/scheme/nomad/gtk/gi.scm?h=feature-g-golf for nomad does all it's imports from one file. and how it orders
<str1ngs>it's inputs.
<sneek>Got it.
<str1ngs>daviid: ^ how to resolve the cannot register existing type 'GdkPixbuf' on guix when using g-golf.
<minerjoe>Hello schemers... Long time CL programmer dabbling now with guile as it's a great lisp to power up existing C programs (like Mario and the mushrooms). My main trouble is that I'm having a bit of learning curve to not program CL in scheme (love me some iterate and loop). Is there a good tutorial, or reference, on the idiomatic ways to iterate? At the moment I've just defmacroed up DOTIMES and friends and y'all would probably cringe at
<minerjoe>some of my code as not the scheme way. I love mapping and such, but how do you map say with an index from 3 to 10. In CL we have the series library which gives you ways to iterate across number ranges functionally. The other need is that in CL I often have to iterate across collections (lists,hash-tables,vectors,etc) COLLECTing things as I go (but not necessarily for every element). What is the idiomatic way to do that with recursion or
<minerjoe>DO? At the moment I just do it the CL way which is start with an empty list, cons as needed and reverse! at the end.
<RhodiumToad>some people do like making complex iteration macros a la CL but I'm not a great fan
<RhodiumToad>I'm also not a long-time schemer so don't take me too seriously
<RhodiumToad>named-let seems to me to be the most "idiomatic" looping construct in scheme
<pkill9>btw RhodiumToad, the guile-json library bug with integer->char was fixed: https://github.com/aconchillo/guile-json/issues/58#issuecomment-662815034 https://github.com/aconchillo/guile-json/blob/master/NEWS#L2
<dsmith-work>Yep. named-let is my favorite
<dsmith-work>Not that I know how to write idiomatic Scheme, it's just nice and I like it.
<RhodiumToad>pkill9: ugh, that seems to have a bug
<RhodiumToad>pkill9: looks like it's now broken for \uE000 and upwards?
<RhodiumToad>my version handled that ok, but the committed one doesn't
<pkill9>ok i made a comment
<RhodiumToad>minerjoe: btw, don't forget about srfi-1 when looking for list iteration stuff
<RhodiumToad>minerjoe: and srfi-43 for similar with vectors
<ArneBab>minerjoe: I nowadays mostly use named let: (let loop ((foo #f) (bar #f)) (cond ((not foo) (loop (not foo) bar)) ((not bar) (loop foo (not bar))) (else (values foo bar))))
<pkill9>does there exist Qt bindings for guile?
<dsmith-work>pkill9: Probably not
<dsmith-work>sneek: guile-software?
<sneek>Its been said that guile-software is at http://sph.mn/foreign/guile-software.html
<dsmith-work>Several gtk things there but no qt
<pkill9>qml would be good to convert to guile
<pkill9>since it's declarative
<aleix>pkill9, RhodiumToad: thanks for catching the errors on guile-json unicode support (twice)! i handled surrogate pairs when building json but completely forgot when parsong. thank you!
<RhodiumToad>yw
<RhodiumToad>aleix: you might want to put in test cases for codepoints in e000-ffff
<aleix>good idea :-)
<heisenberg-25>Just finished porting fibers to Mac OSX. Phew :)
<heisenberg-25>wingo: I replaced epoll with libevent but removed the use of wake read/write pipes. Are those really necessary? It is working fine without them and I see you added them to stop from blocking the GC while running the waiting on the fds to become active
<heisenberg-25>but in the current guile docs, it says that is not necessary, hence why I removed them
<aleix>heisenberg-25: awesome! i was in the process of doing that as well following: https://github.com/wingo/fibers/pull/27
<heisenberg-25>aleix: Ah, I wish I saw this PR before embarking on this. But I learned a lot about guile's low-level interface, which was cool. I will share the code momentarily.
<aleix>heisenberg-25: i'm very interested to add it to homebrew-guile. it already has more than 20 guile packages :-).
<heisenberg-25>Here is the code https://github.com/Habush/fibers/tree/libevent
<heisenberg-25>aleix: that would be awesome!
<RhodiumToad>heisenberg-25 might have been here
<heisenberg-25>RhodiumToad: I didn't get what you said?
<RhodiumToad>old joke
<aleix>heisenberg-25: that commit looks awesome!
<RhodiumToad>"kilroy was here" -> "heisenberg might have been here"
<heisenberg-25>:)
<heisenberg-25>aleix: thanks. I'm open to feedbacks and make improvements . Also I'll have to look at PR you shared.
<dsmith-work>heisenberg-25: So. MacOS. Does that also help any BSDs in general?
<RhodiumToad>there is less similarity between macos and any BSDs than is sometimes believed
<heisenberg-25>dsmith-work: I think so. But I'm a bit skeptical about the clock related functions. For example, clock_getcpuclockid isn't available on MacOS, but it is available in FreeBSD
<heisenberg-25>so what I did was, return CLOCK_PROCESS_CPUTIME_ID if the platform is MacOS. I couldn't find any other way to do this. Maybe someone here knows a better/different approach?
<heisenberg-25>same for pthread_getcpuclockid. It is availabe in FreeBSD but not in Mac OS. Hence, I'm returning CLOCK_THREAD_CPUTIME_ID on Mac
<heisenberg-25> https://stackoverflow.com/questions/32668240/any-equivalent-function-to-pthread-getcpuclockid-since-i-have-tid-of-thread
<heisenberg-25>I gotta say, the Guile docs are so well-written and to the point!
<dsmith-work>That reminds me. Someone was asking about thunks the other day. The manual mentions them all over the place, but has no specific definition. (that I could see)
<dsmith-work>There are a few places where describing a thunk arg is says something like: "thunk must be a procedure with no argument"
<justin_smith>isn't thunk a generic term like "function" or "input" (though less common)?
<justin_smith>I guess it does make sense to link or offer an explanation somewhere
<dsmith-work>Just saying there probably should be a reference in the Concept index.
<dsmith-work>Most people with any familiarity with Scheme already know what a thunk is.
<dsmith-work>"A procedure with no arguments" pretty much nails it.
<dsmith-work>At first glance, doesn't seem very useful, right? "No arguments? What!?"
<heisenberg-25>dsmith-work: also the continuation docs could be made more beginner friendly :)
<justin_smith>dsmith-work: "and optionally computing a useful result" ?
<dsmith-work>But thunks do have access to the lexical envronment.
***karlosz_ is now known as karlosz
<pkill9>with string-match, how do you match up to a newline? I want to get the "Exec=..." line from a .desktop file, and "Exec=.*\n" matches that line plus all the lines after it
<pkill9>ah i worked out how, using [^\n]*
<minerjoe>RhodiumToad: Thanks!