<rlb>wingo: ok, thanks. I thought maybe there'd been some mention of needing -j1 or something. ***karlosz_ is now known as karlosz
***blacked is now known as pingpongball
<pingpongball>Lets say if i learn GUILE, devote my entire life on guile programming making projects, contributing. what can i do if i want? <pingpongball>Does guile have robust gui libraries, if i want to make something? <alextee[m]>Is there an example guile script for writing xml to a file? <vijaymarupudi>pingpongball: Guile has g-golf, which uses GTK. It's fairly complete, but still in development. <vijaymarupudi>pingpongball: The sky is the limit with Guile, it has very good C interop, so if there's a C library for it, it'll work with Guile <vijaymarupudi>pingpongball: Most importantly, the more time you spend with it, the more you'll <vijaymarupudi>see that your thinking about programming changing and improving <vijaymarupudi>alextree: (call-with-output-file "filename.xml" (lambda (port) (sxml->xml sxml-tree port))) <alextee[m]>is there a scheme style that looks similar to C? like with the brackets being in lines below so you can see where each "block" is <alextee[m]>most of the code I find has things like `)))))` which makes it hard to write large code blocks <vijaymarupudi>I think `))))` is considered the way to go. Do you have an editor that highlights matching parens? <chrislck>alextee[m] if you use emacs the auto-indent will make you love your parens <alextee[m]>vijaymarupudi: highlighting is useless if the matching paren is 100 lines above <ArneBab>alextee[m]: when editing parenthesized scheme code, I depend on the echo area telling me which part I just closed. <vijaymarupudi>Ah, in that case, jumping to the corresponding upper paren is how I do it, in vim it's % and in emacs it's C-M-b <alextee[m]>vijaymarupudi: oh % is neat, haven't used it before. thanks <vijaymarupudi>vim's % was saving my life in Guile before I switched to emacs (which was in the last 2 months) <vijaymarupudi>vim is surprisingly good to sexp languages, especially with having vim-surround handy <chrislck>no matter what editor you use: don't.orphan.the.parens - they get lonely <singpolyma>I agree that the common style of doing `)))))))` contributes to why outsiders find lisps unreadable. Similar problems to python <singpolyma>But I don't think we'll ever convince lifters to let us use a delimiting style 🤷♂️ <alextee[m]>I'm not exactly sure how to output the top xml line though, or comments <rekado_>alextee[m]: (sxml->xml '(*TOP* (*PI* xml "version='1.0'") (hello "world"))) <alextee[m]>rekado_: ah neat, thanks. I see that mentioned towards the top in the manual but for deserializing <alextee[m]>a serialization example would be nice under Scheme Procedure: sxml->xml tree [port] <alextee[m]>can't find an example and I think strings would get encoded <tohoyn>daviid: here is my wishlist for g-golf: 1. fixing the <g-settings-action> bug 2. support for variants 3. inheriting from g-object classes. <alextee[m]>vijaymarupudi: Invalid name starting character "*COMMENT*" *COMMENT* <mwette>program-bindings from (system vm program), documented in the manual, no longer exists. Anyone know the replacement? <mwette>Yes. I often run my generated xml through a pipe to "xmllint --format" <alextee[m]>mwette: there's no way to do it via guile? seems pretty hacky but I'll go with xmllint if there's no simple way to do it <rekado_>the sxml module in racket has more features than the one in guile <rekado_>I suggest staying with the guile docs (or the sources of modules/sxml <rlb>To answer my earlier question, if you have a #! script (say test/something) that you've pre-compiled to test/something.go, you can get guile to use it via: <rlb>If you always plan to invoke it as test/foo. <alextee[m]>this is kind of a noob question but is there a way to use variables (string type) inside a `() list and make the variable expand to its string? <mwette>(let ((foo "abc")) `(string ,foo)) => (string "abc") <mwette>alextee[m]: yea '->` on line 54 would make it work, methinks <alextee[m]>: D it's really smooth now with gtk4 thanks to hardware acceleration <vijaymarupudi>alextee[m]: That sounds great! Looking forward to breaking out my MIDI keyboard later today :) <alextee[m]>👍️ if we could get it in the home pages of guile and gtk it would be good publicity <hugo>Does Guile have a proper library for interpolating variables in strings, e.g. "Hello, ${name}"? <hugo>I'm thinking of rewiving my old library which does so, and properly release it otherwise <rekado_>hugo: it doesn’t. I rolled my own for the Guix Workflow Language. <dsmith>hugo: Not strings, but there is quasi-quote. Which is lispier kind of thing. <hugo>rekado_: Can you share a link? <hugo>dsmith: I'm well aware, but for the "real world" you need strings, and writing converters for everything is often too much workk <rekado_>note that for … reasons it’s entangled with a reader extension <rekado_>it’s more complicated than what you might need <rekado_>it also does variable lookups in keyword lists <rekado_>(mine doesn’t build strings and thus doesn’t get to build format strings) <hugo>I'm not completely sure how yours work <hugo>But it sounds like I should do a propper release of my library <alextee[m]>is there a way to do string split using string delimiters (not characters)? <rekado_>it’s a little too specialized to be generally useful <rekado_>alextee[m]: do you mean matching delimiters? You could use the string index to find the first and then the next location of a delimiter, and then cut out what’s between <alextee[m]>i need to do some string manipulation and generate something based of it, so I could do the string manipulation in python and output an intermediary format that's easy to work with in guile <rekado_>if you can do all the work in one pass you can use string-fold to accumulate whatever result you want based on past results and the current position in the string <alextee[m]>is there example code somewhere I can copy paste? <alextee[m]>I basically need to split a string and pick some stuff from it and generate a list with the data, then I want to use that list to output xml elements <alextee[m]>(generate appstream release entries from my changelog) <hugo>spk121: Is that called as (printf "%i\n" 500) ? <rekado_>alextee[m]: better to see example input and output <spk121>hugo: yeah, or asprintf if you want a string <rlb>alextee[m]: I had to implement that for lokke for clojure.string/split, but I also required pcre so that the rx syntax would be consistent across platforms, and I doubt that the code would be very useful to you. <rlb>alextee[m]: thought I haven't used them, guile also has built-in lalr and peg parsers, depending on what you need. <rlb>rekado_: hah, nice - hadn't seen that. <rekado_>there are also some examples in the Guix code. <alextee[m]>rekado_: looks neat, not sure if it's worth bringing in a dependency though <hugo>My fmt code above also uses PEG! <hugo>spk121: Your printf is nice, but fills the same role as guile's built in format <rekado_>if it’s *just* for versions and nothing more then guile-commonmark is too much <rlb>If it's just for simple rx/versions, perhaps just sed/awk/...? <rlb>i.e. just use that to preprocess/extract up front or similar. <alextee[m]>it's for most of the information like the list of changes etc but if I can split on strings I can hack something together <rlb>And if you stick to POSIX it should work everywhere. <alextee[m]>rlb: yeah that's what I was thinking, just invoking some python even to get an easier-to-parse string <rlb>oh, well then, yeah, that might be the easiest thing for now. <rlb>I wondered about suggesting pcre as an optional guile ./configure --with..., and then maybe an ice-9 string split, etc. based on that, and I'd be happy to contribute the code for either/both, but for pcre at least, we'd probably want to wait until we switch to utf-8 since pcre can't handle guile's current strings directly... <rlb>(Might also see if I could easily adapt what I have to work with the built-in rx functions if/when I get time.) <spk121>hugo: yeah, everything in that library is kind of a joke. printf, trigraph support, <rlb>wingo, civodul: I've wondered about improving support for dialects that want similar enough semantics to guile/scheme. For example, I wondered about allowing a "language: lokke" declaration (like the "coding: utf-8" declarations), so that dialects don't have to re-implement some of the load path searching code if they just want what guile normally does. <rlb>Otherwise, they have to (in some situations) re-implement and track changes to functions like primitive-load-path. <rlb>i.e. if they want the same load vs load-compiled search semantics, etc. <rlb>(search and autocompile semantcs, etc.) <rlb>But maybe that's not likely to be a general need; perhaps lokke is unusual in how closely it matches guile/scheme behaviors... <rlb>i.e. clojure namespaces *are* guile modules, the 1-1 mapping, etc. <alextee[m]>vijaymarupudi: thanks! trying to get it working, getting some errors now <rlb>For now I suppose I'll just have to make lokke's load-file more sophisticated (and more likel primitive-load-path.) <vijaymarupudi>alextee[m]: Great! I'll might cook up a patch, I recall needing something like this multiple times in the past <civodul>rlb: i think wingo is enthusiastic about providing #lang support as in Racket, and i concur :-) <civodul>so yes, we could have "#lang lokke" at the beginning of a file <rlb>Oh, ok - maybe that had been mentioned, and I forgot. Have to see how that works in racket. <lilyp>One minor problem with #lang is that it's not really cross-language, though <faLUKE>hello. Is there a (more or less) easy way to install guile 1.8 on Ubuntu? I tried compiling sources, but I obtain a segfault <lilyp>That's some ancient requirements you have – Guile 1.8 is available in Debian 8. <lilyp>(Ubuntu 16.04 also carries it) <lilyp>You might want to try to resurrect those ancient debs. <faLUKE>lilyp: they carry a chain of dependancies, it's pretty hard and clumsy to make them work <lilyp>Other than that, Guix carries a package for Guile 1.8 which will probably work but drive you down another rabbit hole :) <lilyp>I do recommend getting Guix though <faLUKE>lilyp: I use ubuntu unfortunately <lilyp>I'll be away for a while, perhaps someone else has a better idea <civodul>you can install Guix on top of Ubuntu <civodul>however, i'd recommend avoiding Guile 1.8: it's been obsolete for years <civodul>if you really need it, perhaps you'll find patches in Git in its branch <faLUKE>sorry. just solved. for misteryous reasons I just could dkg install guile-1.8.deb <singpolyma>#lang would be cool. Right now I'm using a scheme wrapper script to get ecmascript loaded in places that just assume scheme and don't have a --language equivalent <rlb>The main thing (I think) I'd want initially is the ability to have #lang choose the compiler, assuming that doing so, along with registering the dialect's file extension(s) would be enough to get normal behaviors for the files from the existing load/compile-related functions. <mwette>my 2.2 thingy would look at #lang or file extension (via call to "add-lang-extension") <rekado_>whenever I’m not identified with NickServ whatever I write here is silently dropped <rekado_>in #bootstrappable at least I’m told that I can’t post when that’s the case <daviid>rekado_: same for all of us i think, it would be nice to fix 'this' if possible <rlb>I've wondered how corner cases should be handled, i.e. (use-modules (foo)) when say foo.scm, foo.clj, and foo.go exist in a dir (or in the load/compiled path(s)). <dsmith>rlb: Here are two opeions: Either a search order (configurable?) and first one found wins, or an error if there is more than one. <alextee[m]>I wrote a small example in doc/ref/sxml.texi, where should I send the patch? <alextee[m]>ok I see other patches in there so that's probably it ***vijaymarupudi_ is now known as vijaymarupudi