IRC channel logs


back to list of logs

<pkill9>is there a simple GUI library for Guile to make forms?
<dsmith>sneek: guile-software?
<sneek>From what I understand, guile-software is at
<dsmith>pkill9: Take a look there ^^
<mwelt>hi all! Short question, what's the difference between backticks and normal ' for quoting? e.g. `(1 2 3) vs. '(1 2 3)?
<rlb>mwelt: perhaps ?
<rlb>...or With the observation that ,x is equivalent to (unquote x) and ,@x is equivalen to (unquote-splicing x).
<mwelt>rlb: thx a lot!
<dsmith>Though in Guile '(a b c) is not really the same as (list 'a 'b 'c) .
<dsmith>scheme@(guile-user)> (eq? '(a b c) '(a b c))
<dsmith>$1 = #t
<dsmith>scheme@(guile-user)> (eq? (list 'a 'b 'c) (list 'a 'b 'c))
<dsmith>$2 = #f
<dsmith>For example
<chrislck>(define lst '(a b c)) makes lst immutable I think?
<dsmith>That's it
<dsmith>A constant expression.
<chrislck>Tripped me up badly at that time.
<dsmith>I only mention it because that second link rlb posted has things like: '(+ 3 4) ; => (list '+ '3 '4) (a list)
***jonsger1 is now known as jonsger
<pkill9>i don't suppose anyone knows of guile code that takes a list of strings, and uses them to produce a basic form using guile-ncurses that simply takes input for each of them?
<dsmith>SO the list of strings is a prompt/label for each input field?
<dsmith>(no I don't know any code for that, to address your question)
<pkill9>guess i'll have to create it myself
<pkill9>probably not too difficult really
<pkill9>just a bunch of reading
***rekado_ is now known as rekado
<dsmith>pkill9: At least the docs look useful and well written.
<stis>hey guilers!
<dsmith-work>{appropriate time} Greetings, Guilers
<simendsjo>I'm having some problems with my guix/guile setup. Adding guile libraries using guix (guix install or guix environment) doesn't update %load-path, so nothing is available. Am I missing something in my setup, or is this inteded behavior? Should I manipulate %load-path manually?
<chrislck>(add-to-load-path "...") is better
<simendsjo>Seems like I have to use (set! %load-compiled-path (cons the-lib %load-compiled-path)) for every library and their dependencies. I bet there's a simpler way :)
<civodul>simendsjo: when guile and guile-foo are in the same profile, the env vars are properly set in ~/.guix-profile/etc/profile
<civodul>you can also run "guix package --search-paths"
<roptat>mh... I'm trying to do something like this: (define* (f a b #:key (c #f) #:rest d) (for-each (match-lambda ...) d)), but when I try to pass #:c, it is actually passed as part of d
<roptat>I thought, since I pass a keyword, guile would be able to understand it's #:c, and not part of the rest
<roptat>(f "a" "b" #:c #t) -> no matchin pattern #:c
<simendsjo>civodul: Ah. I need to source ~/.guix-profile/etc/profile to get the paths available. Is this a common thing? Should I add this to my bash profile? Or just run it when needed..?
<roptat>so... how can I do that?
<roptat>ah it's actually properly set, but the rest argument contains the keyword, I see it in the manual now
<civodul>simendsjo: yeah
<civodul>but basically, upon completion "guix install" prints a reminder if you need to do it
<mwette>I'm hacking in libguile, adding a function and I can't figure out error with SCM_DEFINE, posted here: Any ideas?
<rlb>mwette: Is there more error info after that?
<mwette>rlb: nope
<rlb>weird - it sounds like it's winding up to tell you something...
<mwette>wait a second. I missed something before: warning: no previous prototype for 'scm_mmap_search' [-Wmissing-prototypes]
<mwette>^ which is the real error message
<mwette>winding down :)
<rlb>I don't see that here, but perhaps it's differing compilers or compiler defaults.
<rlb>(or project or pkg-config insinuated options)
<mwette>I added that function in filesys.c: working on adding mmap API to guile.
*rlb is in favor of mmap support
***sneek_ is now known as sneek
<dsmith-work>Yey mmap
<dsmith-work>Hmm. Doens't guile already mmap elf .go files?
<simendsjo>I'm trying the coop server, but I'm unable to set breakpoints. It says "Trap 0: Breakpoint at ...". `,traps` shows the breakpoint. `,enable 0` says it's already enabled. But It doesn't actually break. What am I doing wrong?
<civodul>dsmith-work: yes it does
***__shymega__ is now known as shymega
<dsmith-work>Ah, but a mmap interface isn't directly exposed to Scheme code.
<dsmith-work>Looks like it's buried in static C functions.
<mwette>Current thinking is to implement mmap/search, mmap (which is not searched for garbage) and mmap-file. Submit as proposed wip-mmap-api branch and ask for feedback to clean up the api.
<mwette>I'm adding option to configure: --enable-mmap-api
<mwette>I left declarations out of filesys.h, assuming those need to be added by hand.
<mwette>echo "hello, world" > hello
<mwette>meta/guile -c '(use-modules (rnrs bytevectors)) (display (utf8->string (mmap-file "hello")))' => "hello, world"
<dsmith-work>mwette: Nice
<dsmith-work>mwette: What about gc? How is that handled?
<mwette>finalizer on the returned bytevector calls munmap
<civodul>mwette: i haven't looked in detail yet but that sounds nice!
<mwette>This one will need a code review, I believe.
<R1ck77>Hi! Am I supposed to free the memory returned from scm_to_utf8_stringn somewhere? And if yes, how?
<sneek>Welcome back R1ck77, you have 3 messages!
<sneek>R1ck77, dsmith says: The channel is often slow. Just wait a day or two...
<sneek>R1ck77, dsmith says:
<sneek>R1ck77, dsmith says: Use free()
<justin_smith>what a good bot
<R1ck77>I was just about to write that :)
<R1ck77>ok, I just received a delayed message, dsmith thank you for the answer and for the explanation! :)
<R1ck77>I must say I'm impressed from this sneek thing...
<dsmith-work>sneek: botsnack
*sneek wags
<R1ck77>I admit I'm not used to async IRC communication :)
<R1ck77>since there seem to be a few people around: does anybody know if I can embed guile in Android (license wise: I would take care of the technical details...)
<dsmith-work>R1ck77: Like I said, the channel *is* often slow. People in diffferent timezones, etc.
<dsmith-work>R1ck77: Can you compile C apps for Android?
*dsmith-work has no clue
<justin_smith>yes, there's a C compiler for android
<dsmith-work>Well, it's probably possible then.
<justin_smith>I think the real question was about the licensing - eg. can you do it without open sourcing your own app
<dsmith-work>There *are* Schemes that run on the JVM. Would those be a better fit on Android?
<justin_smith>the repo says LGPL
<justin_smith>LGPL describes the terms, particularly under clause 4 "combinded works"
<R1ck77>also, being kicked out becaues your wifi module acts out doesn't help...
<justin_smith>R1ck77: guile is available under LGPL - you can see the terms here, see in particular section 4, "combined works"
<justin_smith>double check versions and interpretation etc, I'm not a lawyer
<R1ck77>thank you justin_smith, also thank you dsmith (I catched up on your answers on the channel logs)
<R1ck77>I was actually thinking about open sourcing the app anyway, but I thought there were some obvious catches with Android not being probably 100% open source that people here were privy of
<R1ck77>I was on a mind to do my homework with the licenses, but I thought:
<justin_smith>R1ck77: as long as your code is open source, you should be fine - anyone who considers android insufficiently open can port your impl to a platform they find acceptable I guess
<R1ck77>if I ask on the channel "can I do Android app in Android" and a booming voice answers from the sky "thou shalt be dammned!", that would be a time saver
<justin_smith>GPL for windows apps definitely exists, for starters
<R1ck77>very nice, that's a good start indeed
<R1ck77>I think the feasibility is worth investigating, then!
<R1ck77>(I'm thinking about an OpenGL app on android using Scheme for glue, so performances are not a minor detail)
<R1ck77>also dsmith, as far as other scheme/lisp interpreters on JVM are concerned, I only know kawa and Clojure. I already experimented with clojure and while I love the language and I got something working on my app, it's very brittle
<justin_smith>clojure on android needs a patch to the mainline clojure, and is very out of date
<justin_smith>also, clojure's design assumes that memory is free, which isn't nearly as true on mobile
<R1ck77>not really: I know about the patch and some newish version work as well without it
<justin_smith>R1ck77: last I checked the version of clojure that was compiled to android was stuck at 1.6
<R1ck77>memory wise, I didn't try anything really intensive so it may be a problem, but permances looked decent so far, even when using OpenGL
<R1ck77>you don't need the patch with 1.8
<R1ck77>and you'll be back in troubles with 1.9 I think (again due to class compiler issues :( )
<R1ck77>which is the main reason why I'm trying to bypass Clojure and use Guile (or another C scheme with glue capabilities)
<justin_smith>R1ck77: oh, I didn't realise newer versions worked - we are up to 1.10, 1.11 coming soon
<justin_smith>R1ck77: last I tried it, clojure on arm took about a minute to get to the point of running a program
<justin_smith>it uses a lot of short-lived objects and I don't think that performs as well on the arm vm
<R1ck77>with 1.8 on an old device it took many seconds, but I hid the problem by loading in a separate thread and showing a splash
<R1ck77>on newer devices is almost instant
<justin_smith>R1ck77: that's cool to know
<R1ck77>well, it sucks that the compatibility is so brittle, however ;(
<R1ck77>with 1.9 - 1.10 due to class compilation issues my app didn't work on some devices apparently. I forgot the details, but the point is, just by starting, Clojure tries to dynamically compile stuff on android and BOOM
<R1ck77>this didn't happened with 1.8 though: I didn't get any crash on the store at least
<justin_smith>right, there's no way to run clojure without the compiler
<R1ck77>as for performances, they where surprisingly ok :)
<R1ck77>justin_smith, but it worked on 1.8!!! :(((
<R1ck77>download VR Theater if you want to see yourself btw
<R1ck77>there is not the Clojure-based VR prototype, but you'll see the loading at least
<R1ck77>anyway, most people use Clojurescript on android for the previous compatibility reasons, but it doesn't cut it for me
*R1ck77 silently curses his wifi module
<R1ck77>btw, I know I
<R1ck77>I'm probably asking in the wrong place, but is there any other lisp/scheme C implementation that can be extended and embedded that comes to mind?
<justin_smith>R1ck77: lua is designed for embedding and very easy and light weight to embed, the fennel language is written in lua and compiles to reasonable lua output
<justin_smith>it's pretty close to self-hosting too (in very active development)
<R1ck77>well, I know lua (I used to love it btw and, surprise, part of VR Theater is written in luaj :D), so it's quite interesting!
<justin_smith>R1ck77: feel free to ask more on #fennel if interested, the compiler devs hang out there
<R1ck77>thank you a lot justin_smith: I'll check the language around and then hang a bit in their channel!
<R1ck77>(it looks promising btw, and I know how easy it is to embed/extend lua already. Neat!)