*alextee[m] wishes meson was written in guile *alextee[m] rewrites a bunch of python scripts to guile because why not <dsmith-work>alextee[m]: There was an attempt years ago. Had a lot of fun naming it. <ear-the-art>alextee[m], dsmith-work , GNU make has official guile support <dsmith-work>jao: Whatever became of that? Is it work resurrecting? Or does guix replace it? <dsmith-work>Was just talking about that the other day. Guile uses make to build which guile... <jao>dsmith-work, i know very little about guix, but conjure is dead and buried <jao>has been for, i don't know, a decade? <brendyyn>ive written my first module but havnt got a build script for it. ive never made one before. what is the current recommendation? make and libtool? <dsmith-work>Seems like every project invents a new build system these days. <jao>(i remember it was really fun naming it) <alextee[m]>still doesnt look simple enough. im expecting something like (define-binary ...) (define-library ...) like meson does, except cooler! <alextee[m]>or automake which i will never comprehend or understand its documentation <dsmith-work>alextee[m]: Nope. Not that simple. It's still make. Just with added Guile functions. <alextee[m]>(find-library ...) (find-header ...) it would be so awesome <dsmith-work>Conjures Original Name Judged Unsuitable: Rms's Email <brendyyn>Is the Jan that posted in guile-user in this channel? <spk121>I despise autotools as a build system, but, it is my default for everything. I do love old-school makefiles <jcowan>When you type "./configure" in the Chibi source directory, it prints out: <jcowan>Autoconf is an evil piece of bloatware encouraging cargo-cult programming. <jcowan>Make, on the other hand, is a beautiful little prolog for the filesystem. <jcowan>Chibi figures out inside make whether you are on MacOS, *BSD, Cygwin, Windows, Android, Linux, or Solaris, and writes out a .h file with the proper defines as welll as setting build-time variables. If you want it to run on VMS or z/OS, you port it yourself <jcowan>Chicken takes the same approach, but until just now it didn't have the auto-detection. Now it does *jcowan buffs fingernails <vidjuheffex>hello all, guix keeps telling me that package not found for version 3.0.1 <vidjuheffex>I literally have never used guile or guix before so apologies for the dumb question <brendyyn>vidjuheffex: default "guile" is 2.2 at the moment <vidjuheffex>instructions said i could guix install guile@3.0.1 to specify a version <brendyyn>I don't know why but they haven't yet got to updating guile to 3.0.1 <vidjuheffex>thanks for your help! I'll just stick with the default. (trying to use chickadee for an upcoming gamejam, I'm guessing it works fine with 2.2) <brendyyn>I think so but it will be less efficient i think. <brendyyn>id say so. you can easily switch back to the guile package when its updated <vidjuheffex>sorry for all the questions... would I then need to modify geiser and stuff to point to guile-next, etc... trying to gauge how much effort I want to put into getting decent tooling vs just getting up and running as a beginner <brendyyn>are you setting them in your .bash_profile? <brendyyn>i dont think you need to do that. You just use the guix environment command <vidjuheffex>ill google that, thanks again for the help and pointers <brendyyn>perhaps if your GUILE_LOAD_PATH if its set to refer to the 2.2 site path, maybe change it to 3.0 <brendyyn>or make it automatically find what ever is there <brendyyn>vidjuheffex: are you using chickadee from source? <vidjuheffex>oh I'll try that, but im not terribly comfortable trying that much stuff i don't really understand at once <brendyyn>everything goes in /gnu/store. You don't need to go and find those paths. that is crude. Trust me, what you want to do is easier than you think. <vidjuheffex>will I be able to run guile in my terminal and open the guile I want <brendyyn>guix environment downloads the required packages, and then sets the appropriate environment variables for you like PATH <brendyyn>I wish we could get more donation money to run better servers (/ <brendyyn>and i heard with people isolating globally, the entire backbone of the internet is peaking in some places <brendyyn>if you want it globally just run guix package -r guile -i guile-next <vidjuheffex>guix package: error: package 'guile' not found in profile <ear-the-art>'which guile' ? /usr/bin may be override /usr/local/bin ? <brendyyn>Do you have ~/.guix-profile/bin at the start of your PATH? <vidjuheffex>/home/jules/bin:/gnu/store/pxr4f20cwwmlsq8ahw50mk1l5sz8h49l-profile/bin:/home/jules/.config/guix/current/bin:/home/jules/bin:/home/jules/.nvm/versions/node/v10.16.3/bin:/home/jules/.local/bin:/home/jules/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin <brendyyn>what is /gnu/store/pxr4f20cwwmlsq8ahw50mk1l5sz8h49l-profile/bin how did that get there <brendyyn>was this from within the guix environment? <chrislck>thanks vidjuheffex for voicing newbie difficulties with guix ! <brendyyn>anyway there is no ./home/jules/.guix-profile/bin, so i think that's why it is not finding it. <vidjuheffex>@chrislck someone on the scheme discord had mentioned issues getting started with guile, I can see why, though to be fair it seems if i wanted to use 2.2 it would have been as easy as using apt <brendyyn>vidjuheffex: I think i will try improve the guix manual to explain this stuff better. technically the information is there, but it doesn't make it easy for you <vidjuheffex>i think the main thing would be to remove: To install a particular version, add a version suffix like @3.0, as appropriate. <vidjuheffex>either way im not too bothered, nothing like a good challenge and getting to chat with folks in the scheme community <brendyyn>vidjuheffex: You should move the bit where you add /home/jules/bin from .bashrc into .bash_profile. <brendyyn>hmm it seems that guix environment doesnt set GUILE_LOAD_PATH and GUILE_LOAD_COMPILED_PATH automatically *chrislck has given up on guix for now. no offence, just no time and energy to dive into it. <brendyyn>thats fine. many people are working on it and it gets bettor over time <vidjuheffex>WARNING: compilation of /home/jules/Code/flappy-bird/main.scm failed: <vidjuheffex>(reason #34398 why i can't understand IRC popularity but thats another topic) <brendyyn>Noone has ever created anything better than matrix for its purpose, perhaps matrix qualifies? <vidjuheffex>im a discord person, but i've learned better than to mention satan in front of FOSS people lol <vidjuheffex>anyway, im used to akku where packages are per akku-init'd folder <brendyyn>indeed. i respect discords voice channel functionality. but it is proprietary and has no privacy what so ever. for large groups, the text channels are worse in terms of the number of people it can support, i.e., the lines of text that fits on the screen <vidjuheffex>copies snow and makes r7rs packages on there work for r6rs so you end up with a lot of options <brendyyn>yep so you want them set too... give me a sec <brendyyn>actually I think maybe you want to load .guix-profile/etc/profile <brendyyn>sorry i sorta forgot this stuff. I'm on Guix SD so everything Just Works(TM) <brendyyn>GUIX_PROFILE="`echo ~root`/.config/guix/current" ; \ <vidjuheffex>it's all good, going to get off here soon and maybe look at some other options for the upcoming gamejam <vidjuheffex>is every speed bump i hit going to feel like a mountain? <brendyyn>it seems hard, but all you need to do is set your environment variables right <vidjuheffex>the install instructions for guile were misleading. (the @3.0 command doesn't work) <vidjuheffex>the install instructions for guix were misleading (just run this script, when in fact you also have to set other stuff like langs) <vidju[05:00:04]<brendyyn> id say it is, but its in the ~/.guix-profile/etc/profile file, which you aren't loading <vidjuheffex>i think i did? was that the grep command you had me run? <brendyyn>export GUILE_LOAD_PATH=~/.guix-profile/share/guile/site/3.0:$GUILE_LOAD_PATH <brendyyn>export GUILE_LOAD_COMPILED_PATH=~/.guix-profile/lib/guile/3.0/site-ccache:$GUILE_LOAD_COMPILED_PATH <brendyyn>yeah. not that .bash_profile isnt activated until you log out and log back in again <brendyyn>try just pasting it in the terminal with chickadee to test it <brendyyn>i hope it hasnt installed the chickadee with 2.2 :/ <brendyyn>since they have the same package name, that could be a bug <vidjuheffex>i think i should start over and ignore 3.0? Chickadee doesn't seem to need it and I think all the stuff I did to get 3.0 to work broke stuff that might have otherwise just worked? I dunno just spitballing? <brendyyn>i found it didn set the variables in .../etc/profile either <brendyyn>i guess just use the default guile and see how it works <brendyyn>i foudn its installed chickadee with 2.2 i think <brendyyn>it should be called "guile3.0-chickadee" but both the 2.2 and 3.0 version have the same name, and it picks the first one by default <brendyyn>so if you just go back to guile instead of guile-next, and chanege the 3.0 to 2.2 in it should work <vidjuheffex>hint: After setting `PATH', run `hash guix' to make sure your shell refers to`/home/jules/.config/guix/current/bin/guix'. <vidjuheffex>disconnected again, apologies if I missed a response <vidjuheffex>jules@jules-XPS-15-9570:~/Downloads/guile-sdl2-0.4.0$ make GEN sdl2.go./pre-inst-env: 32: exec: compile: not foundMakefile:1082: recipe for target 'sdl2.go' failedmake: *** [sdl2.go] Error 127 <vidjuheffex>trying to install guile sdl2 and avoiding guix like the plague <str1ngs>vidjuheffex: sounds like it's trying to call guile compile. check the Makefile.am. probably $(GUILE) is not expanding properply <vidjuheffex>make-1.15 --foreign MakefileMakefile.am:90: warning: user target 'dvi' defined here ...automake-1.15: ... overrides Automake target 'dvi' defined hereMakefile.am:90: consider using dvi-local instead of dvi cd . && /bin/bash ./config.status Makefile config.status: creating Makefile GEN sdl2.go./pre-inst-env: 32: exec: compile: not <vidjuheffex>foundMakefile:1082: recipe for target 'sdl2.go' failedmake: *** [sdl2.go] Error 127 <vidjuheffex>i just hardcoded guild in there rather than $(GUILD) <str1ngs>it's trying to call compile. when it should call $(GUILD) compile. in which case GUILD is not expanding right. <str1ngs>vidjuheffex: that will work, though it's kinda hack <str1ngs>normally that should expand to the full path. <vidjuheffex>i wish i could expand on that, total newb sorry, and IN WAY OVER MY HEAD <str1ngs>see if configure.ac using GUILE_PROGS? <str1ngs>I've seen this before what I used instead is. AC_PATH_PROG(GUILD, guild, no) <str1ngs>then I make sure it's set with. if test "$GUILD" = "no"; then <str1ngs> AC_MSG_ERROR([program guild is required]) <str1ngs>maybe GUILE_PROGS is trying to find a multi version guild like guild-2.2. dunno <str1ngs>hmm maybe $(GUILE_TOOLS) is the right variable. <str1ngs>so GUILE_TOOLS should work if it finds GUILD <str1ngs>AC_PATH_PROG(GUILD,[guild$_guile_suffix]) might be the culprite. <vidjuheffex>checking if (gl) is available... noconfigure: error: required guile module not found: (gl) <vidjuheffex>had to add --prefix=/usr to the sdl2 and gl configure commands for chickadee configure command to find them <vidjuheffex>hoping as i get more used to command lines that this sort of troubleshooting goes faster <brendyyn>I think I will work on improving the guix documentation ;) <vidjuheffex>if i run that and try connect-to-guile I get "no prompt found" <vidjuheffex>if i then quit geiser it says "connection broken by remote repl" <str1ngs>vidjuheffex: do you have anything in ~/.guile ? <vidjuheffex>it both seems to know its connected and not know its connected <str1ngs>can't find prompt is not a connection error its a read errore. <str1ngs>it's trying to magically find the guile prompt <vidjuheffex>which is weird because the prompt is the same if i run guile --listen <vidjuheffex>wait no, that can be as it would get an address in use error <vidjuheffex>is there a way to press "up" and get the previous commands like in chez ***apteryx is now known as Guest39296
***apteryx_ is now known as apteryx
<RhodiumToad>(use-modules (ice-9 readline)) (activate-readline) in your .guile <vidjuheffex>yeah i can't tell if i need to run-guile and then connect-to-guile <vidjuheffex>i think they replace the usage of the other, since it works with listen <vidjuheffex>what i don't understand is how it can find the prompt with one and not the other despite the prompt and port being identicak <vidjuheffex>I'll check back in tommorow and see if anyone has used connect-to-guile without --listen before, thanks <vidjuheffex>each command requires me going into the repl and running that a bunch <vidjuheffex>if i put these commands in my .scm file itself, and run guile main.scm, I can then connect with geiser <vidjuheffex>and nothing about it is live, as in I can't change for example the text on screen, eval it, and see the change <civodul>i've been trying to profile memory usage in the compiler <civodul>there are places where the heap grows by 100 MiB or more ***rekado_ is now known as rekado
<civodul>but it's hard to figure out whether it's "expected" or whether we're leaking or doing something wrong <civodul>for example, 'renumber' in (language cps renumber) is very hungry <civodul>on my example, before lower-cps we're at 97MiB <civodul>after split-rec (part of lower-cps) -> 113MiB <wingo>how are you measuring memory usage? <wingo>for renumber specifically it would be possible to use different strategies, i.e. collect the conts in a flat vector, use side u32vector for renumbering values, etc <civodul>though it's not clear to me that we can do better, in fact <civodul>i thought you had written a blog post on intmaps/intsets but i can't find it <civodul>maybe i should be less ambitious for today <civodul>wingo: how about releasing 3.0.2? sounds like a good day for that :-) <wingo>yes that would be great! i am a bit out of time, if you want to do it go ahead <wingo>otherwise can help over the weekend <wingo>all days are mushing together :P <kalcode>But on OSX, cant get it to run due to "#version 130", i think the the shaders? I changed them to #120 (see if that work and update in and out). Nada. <kalcode>Not an expert at any of this stuff by guile seemed interesting and chickadee. <brendyyn>We just had another newbie today wanting to learn to use chickadee ;) <kalcode>I know we were gonna try to use it for game jam. Reminded me a lot of pyglet/pygame <kalcode>I helped him with his issues yesterday, but I couldnt unblock myself lol <brendyyn>its quite basic at the moment. you will be building up from scratch <kalcode>I just want to draw some sprite and move things around not much. Just motivating myself to learn scheme. <kalcode>Not a functional programmer really, so its gonna be fun! <brendyyn>but I thought 130 was compatible with a lot. did you research it to find it doesnt work on osx? <kalcode>It does, but i get lost when they say i need to tell it to use the CORE_PROFILE of sots, unfortunately that a C call when you init the the display, think that in guild-opengl2d? <kalcode>I feel like that might be the wrong way to do it, also that serious deep dive to get it to work. So definitely hoping i overlooked something lol <kalcode>im really install chikadee from source again to get the error. Ill post it in-case anyone has an idea <kalcode>Coool, got the same error again. So here is the dump. Anyone who looks at it, i really appreciate it! <kalcode>Also not a big deal, just playing around. Ill probably use Racket built-in stuff. But chickadee just looked nice from my perspective to play with <kalcode>Might not be able to, but Id think it fail during make and make install no? <brendyyn>the creator of chickadee is in this channel sometimes <kalcode>oh nice, thank you. Maybe I get lucky, or I might send an email <rekado>kalcode: does your graphics card support OpenGL 3.x? <rekado>the shaders in chickadee require it. <kalcode>hahaha, its a mac. I wonder. Never thought of that. I cant remember the last time something didnt but never did game stuff on the mac. I only use it for webdev. Social isolation im using it as my main currently. Let me see if I can figure out real quick how to check that <kalcode>it has a Radeon_RX_500_series, but it also has intel. So it using two GPU. I wonder if that makes it where by default it returns its lowest supporting shared version? <kalcode>Sent an email to the creator will look into it later. ***jonsger1 is now known as jonsger
<mwette>off topic: i'm reading this all in emacs - I get off glyph from mbakke's last comment ; any clue what font I am missing (on Ubuntu)? <dsmith-work>Copy pasted it into another app (slack). Also known as :tada: <brendyyn>i see it in termite and leafpad but somehow emacs fails <dsmith-work>It's a yellow/orange cone with red and blue particles emitting from the open end. *sneek .oO(Kids these days and their "emojis") <wingo>i also get that broken glyph thing on guix <brendyyn>wingo: M-x package-install emojify, M-x emoji-mode <brendyyn>oh ok. it displays for me in some applications and not others. in ice cat it displays in html, but not in the url bar <civodul>hmm emojify-mode wants to download images <brendyyn>it seems to be related to something called Emoji One in unicode. <brendyyn>i hope its not proprietary what i just made yall install ***ChanServ sets mode: +o civodul
***civodul changes topic to 'Welcome to #guile. See https://gnu.org/s/guile for more information. Guile 3.0.2 is out! <https://gnu.org/s/guile/news/gnu-guile-302-released.html>. This channel is logged, see <http://logs.guix.gnu.org/guile/>. Bug database at <https://bugs.gnu.org/guile>.'
<mwette>Alright! (Was the 38486 fix pushed to the 2.2 branch? That's where it was reported.) *jonsger provides the update for openSUSE. Let's see when it gets accepted <wingo>mwette: you can check :) (yes it was) <mwette>wingo: I'm in git hell right now. I checked out only the master branch and can't figure out how to fetch the stable-2.2 branch. Is it "git branch -t stable-2.2 origin/stable-2.2" ? *civodul provides the update for Guix. Let's see when it gets accepted, too! <mwette>civodul: signed agreement sent via horse-and-buggy <alextee[m]>TIL you can define a function inside a function. scheme is awesome <alextee[m]>hacking on the guix website, trying to make packages that are their latest versions not have a "-{version}" suffix in the URL. so need something like that to compare versions with other packages with the same name <alextee[m]>not sure how using libraries works with guile yet though, i'll try to figure it out <jackhill>alextee[m]: cool, I knew about it because one of the guix package importers (rust's maybe) uses it. <mwette>if a define-module uses #:version then you can get the version with (module-version (resolve-module '(foo bar baz))) <manumanumanu>ArneBab: sure! That would be fun. I am not really sure whether I'm the right guy though. I came from ruby, where a lot of things did not have the same performance characteristics as guile. I ported some code and fixed bottlenecks, and started reading scheme code and then suddenly I understood what was idiomatic and _why_ it was idiomatic. Transducers are a really simple concept once you understand lambdas <manumanumanu>returning lambdas. My for loops are like "The macro writer's bill of rights" exemplified, apart from that it doesn't rely on cross-module in-lining (which isn't supported). My guile-vsd uses the same state-machine like parsing of DSV-files as andy's and nalaginrut's guile-csv, but more-like-c since it uses string buffers to make up for the performance impact of the added flexibility. I could write a "lessons <manumanumanu>What I haven't written is "real world software". I just write libraries that are fun to write :D <alextee[m]>is there a way to return a value from a function immediately inside some nested loop? <alextee[m]>like "ok, i found what i wanted and now i want to return false from this function, just stop everything and return false" <RhodiumToad>and I guess which is best may depend on what exactly the function looks like <alextee[m]>where i do "#f" i basically want to "return false;" <manumanumanu>first of all, for-each is not really meant for that stuff <manumanumanu>you should probably use a named let loop instead, since they will return whatever the last expression is. <manumanumanu>or, you could be lazy and wrap it in (let/ec return ... (return #f)) <manumanumanu>but that isn't portable to other schemes, and it will go in your permanent record. <manumanumanu>for-each is one of those things that you rarely see: it is usually reserved for things when all you want is the side effect and where the result of the whole computation is to be discarded. <manumanumanu>but, just so you know: if you want to write imperative-ish code, there is always let/ec. The performance penalty is surprisingly small. Usually you can't even measure it. <mwette>wingo: What's the next frontier after JIT? <wingo>yeah i don't know! i am still irritated that chez scheme is so much faster on a number of µbenchmarks <wingo>so there are frontiers there, some that i don't even know what they are <wingo>but maybe that's not the most important thing? i am still coasting a bit on 3.0, haven't thought terribly much about the future :P <wingo>dunno whether i should pick up some more fundamental racketization plan <wingo>or just noodle on incremental improvements. probably incremental things best for guile at this point in its stable cycle <mwette>The GC? To me it seems in some applications (e.g., web server) that would be a driver. <wingo>so like improving exceptions to mostly be using structured exceptions and key+args being more rare <wingo>or improving the syntax expander, maybe making it more capable like racket's scope sets <wingo>or adding #lang (someone had a patch for that, was it you?) <wingo>but perf-wise i think a generational gc would be quite useful. <mwette>It was me on the #lang issue. I did get something working, but probably needs review. <wingo>bugs are great, that's a nice mindless list of things to work down <mwette>I have worked on-and-off on debugging. I added "-g" flag to compile. The first approach was to remove all other optimization and then hack the cps compiler to not reuse slots. Do you think that is useful? <wingo>hard to say tho. i will probably not have day-job time to do guile this year so i can't bite off too much <wingo>and i am out of the habit of helping others do good things, perhaps i should make that more of an explicit priority <wingo>mwette: neat :) how does it differ from somethign like -O0 ? <wingo>i guess it would be the no slot re-use bit <mwette>My code was not working. I think because the cps expects returns slots to be somewhere special. Am I right? <wingo>yes, that and control-flow joins have parallel moves corresponding to the values that predecessors provide to the continuation <wingo>those moves are computed based on the slot allocations, so you can't just reallocate slots after the moves are calculated <mwette>So then allocate-slots would have to have a hook for #:debug ? <vidjuheffex>Issue: if I run those two commands in a seperate geiser repl, connecting to guile from geiser says "no repl prompt found" <vidjuheffex>for the repl prompt to be found the code in the update definition needs to be running in a loop <vidjuheffex>to run the code in the buffer the repl prompt has to be found, catch 22 <vidjuheffex>if I add the commands to the my code file instead of a new repl, and call guile main.scm im able to connect (because its running the game loop) but I'm not able to send stuff becuase at that point there is no repl jus an executing script <vidjuheffex>I feel like I'm missing something obvious, maybe misusing geiser, or misunderstanding these fairly vague directions.but this one paragraph makes it sound like its dead simple and I'm just dead stupid. <mwette>vidjuheffex: I tried testing with: (while #t (lambda () (sleep 1) (poll-coop-repl-server repl))) , then "telnet localhost 37146" from another terminal. It connects, but nothing happens when I type '(display "hello\n")' <wingo>mwette: like it does for slot precoloring, yeah <vidjuheffex>I probably just need to hang tight for another email reply from the author <vidjuheffex>yeah, and thats where i discovered why the poll command has to be executing in a loop for geiser to connect <vidjuheffex>things i've tried include, in the repl, running the poll command as geiser is trying to connect <vidjuheffex>this works, but I can't send over code, without mashing the poll command <vidjuheffex>its like on connect-to-guile I need to also send the entire buffer over and run it <alextee[m]>if i want to return a filled in list, do i have to pass a list to the function? or can i return a list created inside the function to the outside world? <mwette>working for me now, in two terminals <mwette>alextee[m]: the latter ; (define (f) (let loop ((l '()) (ix 3)) (if (zero? ix) l (loop (cons ix l) (1- ix))))) <alextee[m]>mwette: ah thank you, that looks exactly like what im doing <str1ngs>daviid: with X11 I can use (gi-import "GdkX11"). but I'm not sure what needs to be imported with wayland <str1ngs>actually seems kinda odd I would need to import that as well. <rekado>alextee[m]: you can use fold instead of a custom loop with set! <alextee[m]>rekado: "Apply proc to the elements of lst1 lst2 … to build a result, and return that result. " this sounds like exactly what i want to do, thanks <rekado>something to get you started: (fold (lambda (item accumulator) (cons (* item 2) accumulator)) '() '(1 2 3 4))