IRC channel logs

2023-05-22.log

back to list of logs

<koorosh>Hi, I want to use GNU Artanis for a project that is not open source. I'm not modifying any of the original code in Artanis, since Artanis is licensed under GPL3 and LGPL3. I'm not sure if I'm allowed to use it for a proprietary project, can anyone provide clarification on this?
<jpoiret>IANAL, but if it's not AGPL and you only use it server-side it should be fine
<jpoiret>koorosh: you joined back just as I typed a reply, so let me write it down again: "IANAL, but if it's not AGPL and you only use it server-side it should be fine"
<koorosh>tnx for the help :) I was just reading the logs to check if someone answered
<janneke>with #:use-module we can import only a selection or rename or prefix all imported symbols, but how do i *exclude* unwanted symbols?
<RhodiumToad>it doesn't appear there's a way
<janneke>yeah, i would like to exclude or rename only break and continue from srfi-1
<janneke>ACTION now has...
<RhodiumToad>you can rename only selected functions easily
<janneke> #:use-module ((srfi srfi-1)
<janneke> ;; Avoid importing break, continue...UGH
<janneke> #:select (append-map delete-duplicates find last member))
<janneke>yeah, that's probably even uglier?
<janneke>why are while/break/continue part of srfi-1 (a list library, right?) ayway...
<RhodiumToad>continue isn't?
<RhodiumToad>srfi-1 break is about breaking lists
<janneke>ah, right!
<janneke>that makes sense
<janneke>ACTION has been confusing things
<RhodiumToad>#:renamer (lambda (s) (case s ((break) (symbol-append 'srfi-1: s)) (else s)) or something of that ilk
<RhodiumToad>or you could define a conditional-symbol-prefix-proc to return a function like that
<janneke>yes, ...but i'd have to copy/redefine this for several modules?
<RhodiumToad>put it in a module
<janneke>oh wait, maybe using (@ (..) rename-break)
<flatwhatson>what's wrong with importing break? it's pretty conventional to just use srfi-1 and ignore the bits you don't want
<RhodiumToad>maybe you have another function or syntax called 'break
<janneke>yep
<flatwhatson>they're all procedures, so no weird effects from identifier macros
<janneke>i don't want the warning about importing break twice
<RhodiumToad>I've had similar issues with shift/reset
<flatwhatson>just use #:replace instead for your own break
<flatwhatson>> Export all identifiers in list (a list of symbols or pairs of symbols) and mark them as replacing bindings. In the module user’s name space, this will have the effect of replacing any binding with the same name that is not also “replacing”. Normally a replacement results in an “override” warning message, #:replace avoids that.
<RhodiumToad>(define (conditional-import-prefix pfx symlist) (let ((htab (alist->hashq-table (map (lambda (s) (cons s (symbol-append pfx s))) symlist)))) (lambda (s) (or (hashq-ref htab s) s))))
<RhodiumToad>#:renamer (conditional-import-prefix 'srfi-1: '(break))
<janneke>this works:
<janneke> #:use-module ((srfi srfi-1) #:renamer (@ (dzn misc) rename-srfi-1-break))
<janneke>with rename-srfi-1-break defined in (dzn misc)
<janneke>the conditional-import-prefix is nicer, but we'd need the (@ (...) conditional-import-prefix) trick i guess
<RhodiumToad>you can use-modules your own module first
<janneke>yeah (use-modules ..) (define-module ..)
<janneke>anyway, now that i have several solutions, i'm wondering about renaming my break to something else
<janneke>esp. now you have reminded me that break is a useful list function
<janneke>dunno, gotta ponder about this; thanks a lot!
<RhodiumToad>are you defining a 'break as some sort of loop control thing?
<janneke>something like that, but for the C code domain
<RhodiumToad>ah
<janneke>i'm creating a library to create a C AST
<janneke>maybe i'll just use break* and continue*
<RhodiumToad>c:break ?
<janneke>yeah, that may be the better/cleaner solution, but i'd have to rename everything; so that will have to wait a bit
<janneke>using the conditional-import-prefix for now
<RhodiumToad>at least this is less of an "interesting" experience than the time I discovered someone had defined a function called select() in a C program
<civodul>i always find it troubling that with-exception-handler handlers cannot just return (or they get &non-continuable)
<civodul>in practice you pretty much always have to use let/ec if you want to do something useful in the handler
<RhodiumToad>I disagree, having made use of it in two different ways
<RhodiumToad>would you want the continuation of the handler to depend on whether the exception was raised as continuable or not?
<civodul>ah well, that's also because i only use traditional non-continuable exceptions
<civodul>i guess i should use continuable exceptions for things that can be turned into mere warnings
<RhodiumToad>I've done exactly that
<RhodiumToad>it works really well for warnings that should be treated as errors unless the caller is explicitly set up to handle them
<RhodiumToad>(libarchive turns out to have a lot of these)
<wklew>civodul: I agree it's confusing. I see a lot of people running into that, esp. coming from other langs where resumable exceptions are kind of exotic. I've gotten used to using guard from r7rs instead.
<RhodiumToad>yeah, guard is cool
<dcunit3d>in geiser, whenever i run something that results in an error, it creates a new context and increments the [n] beside the repl prompt
<dcunit3d>is there any way to get that back to zero without running `,q` a bunch of times?
<mwette> /quit
<RhodiumToad>ACTION is discovering horrible abuses of autoconf in guile-related packages
<RhodiumToad>I mean, why have configure spend hundreds of lines of shell figuring out what guile version is installed and where it is, only to have "guild compile ..." hardcoded in the makefile?
<sneek>dsmith: Greetings!
<dsmith>sneek, botsnack
<sneek>:)
<dsmith>!uptime
<sneek>I've been serving for one month and 1 day
<sneek>This system has been up 7 weeks, 2 days, 2 hours, 41 minutes