IRC channel logs


back to list of logs

<drakonis> neat
<dthompson>oh neat! this is maybe the one way I'd think about trying deep learning
<old>I was just looking for a gift idea for my birthday. Thank you :-)
<chrislck>w00t does it mean we could have a webassembly console can run ,L ecmascript ?
<drakonis>hmmm maybe?
<drakonis>but most importantly, you can run scheme on the browser, we have come full circle
<jlicht>full stack web applications written in guile \o/. I'm looking forward to it already :)!
<old>got C struct attributes
<old>packed? and pretty-printer?
<flatwhatson>very neat!
<flatwhatson>what's the distinction between point and make-point?
<flatwhatson>ah, looks like the former is a macro taking an alist of (field value)
<cow_2001>drakonis: the little series are my favourite books now.
<flatwhatson>so you're providing equivalent of C's designated initializers, handy
<drakonis>i'm looking forward to the impending little propagator
<drakonis>given that will byrd gave a talk that involves that
<drakonis>and because reasoned schemer exists due to his work with friedman
<flatwhatson>old: i wonder if keyword syntax might be more natural than alists in guile?
<drakonis>and kiselyov
<cow_2001>drakonis: only read the first, but if he keeps a steady quality they are all golden
<drakonis>the quality is retained across every book in the series
<haugh>how do you pattern match against a keyword list? is there any convenient way to convert it to a queryable DS? instinctively I would reach for lambda* but that feels lazy
<drakonis>(no there's no knowledge of the existence of a possible new book in the series related to it, but i can dream, right?)
<old>flatwhatson: the define-c-struct generate an optional syntax
<old>(define-c-struct <my-type> my-type => make-my-type ...) or just (define-c-struct <my-type> make-my-type)
<old>The former generates a syntax my-type where you can do (my-type (member value) ...)
<old>But you can bypass that and just do (my-type #:member value ...)
<old>(make-my-type #:member type ...)
<old>Everyone can use what they prefer that way :-)
<flatwhatson>ah, i missed that make-my-type is actually a keyword wrapper. i expected it would be the raw srfi-9 constructor
<old>the srfi-record is only a wrapper around a bytevector & pointer here
<old>there's no other field
<old>all fields are in the bytevector
<flatwhatson>right, that makes sense
<flatwhatson>so you don't have a positional constructor?
<old>the goal is to have a higher level manipulation of low level foreign struct
<old>I could probably
<old>It's probably faster than keywords constructor if you create lots of structure
<old>I think I can add that like do: (make-type type => make-type*) | (make-type make-type*) | make-type
<old>make-type being positional constructor, make-type* keywords constructors and type syntax to keywords constructors
<daviid>old: what about the name, define-c-struct, which is used by guix, and may land in core guile?
<old>that does not matter. Renamers are there for that
<BitPuffin>good morning guilers
<chrislck>sneek: botsnack
<chrislck>sneek: what is webassembly?
<sneek>webassembly is the next guile target :)
<dadinn>hi all
<dadinn>I am trying to use (ice-9 debugger breakpoints) module but I get an error saying `no code for module`
<dadinn>is there a way to somehow debug functions/macros in Guile, as I can't find it described anywhere, except here:
<dadinn>but those docs seem to be out-of-date
<drakonis>those are indeed out of date
<mwette>to parse keyword options, I have to parse, for example,
<mwette>^ keywords parsed into an alist
<sneek>chrislck: wb!
<jryans>What are some of the major projects happening in core Guile these days? I've heard about Spritely's upcoming Wasm effort for example, and Wingo's GC experiments... What else is happening at the moment?
<dadinn>I am trying to write an expression like this without error: (let ((foo 42)) (if (defined? 'foo) foo bar))
<dadinn>any suggestions?
<dadinn>'s an error because bar is not defined
<dadinn>sorry, a better example would be: (if (defined? 'foo) foo 42))
<dadinn>if foo is not defined I would never get the 42, because it blows up instead :(
<dadinn>hmmm, it seems I am misunderstanding how defined? works :/
<wingo>right, defined? is really about vars defined at the top level
<wingo>for better or for worse
<haugh>So how should we test the limits of lexical scope? Should we?
<haugh>Maybe this is #scheme territory
<wingo>in a lexical context usually you know whether it is bound or not. if not there are various expansion-time helpers but that is deeper magic
<wingo>haugh: look for syntax-local-binding in the manual
<dadinn>actually I am trying to use this is with-syntax for macros. I've actually got something working well, except until it doesn't... for some reason:
<dadinn>sorry, the failing test is not the correct one
<dadinn>essentially when I am using the datum->syntax-or in a with-syntax clause in my macro, I get this error: Syntax error: unknown location: syntax-locally-bound-identifiers: invalid argument in form (syntax-stuff-here...
<dadinn>the syntax-stuff-here is the syntax form received by the transformer... it is a syntax object, and not sure why it blows up :/
<dadinn>structurally my macro looks the same as in the tests in my example code
<dadinn>the reason I am trying to do this is because I am rewriting the (ice-9 expect) macro, to fix some bugs, and to be hygienic... instead of defmacro. The problem is that it wants to campture some bindings from the context where the macro is used, but wants to fall-back to some defaults if they aren't defined. The original defmacro implementation is quite shitty, because it exports those values instead. The
<dadinn>problem with that is if I do (use-module ((ice-9 expect) #:select (expect)), then I will not get the default values, and stuff blow up if I don't explicitly define them.
<old>jryans: I'm personnaly working very-part-time on few Guile related projects
<old>guile-parellel: Parallelism algorithms and scheduling
<old>guile-ev: libev bindings with high level abstraction with GOOPs (wanted for guile-parallel)
<old>guile-configure: Not a projet right now, but it's a replacement for autotools I use it in my projects
<old>guile-foreign: Really just a playground with define-c-struct right now. I could like higher abstraction for foreign interface and linkage to them
<old>guile-propagator: I've started that this morning in the public transport after re-reading the relevent chapter in Software Design for Flexibility
<old>I would not call these major core project though
<old>sorry if I misread your question
<jryans>old: Cool! πŸ™‚ The configure idea sounds nice, I really dislike autotools... πŸ˜…
<jryans>Well, doesn't have to be core really, I am just a newcomer trying to get a sense of active projects in the Guile ecosystem mainly πŸ™‚
<old>In that case, there's also a project I'm closely following with is guile-steel or guile-prescheme
<old>flatwhatson: no pression
<old>s/with is/which is
<jryans>Ah right, I am following that effort as well, quite an interesting one for sure! πŸ™‚
<old>then there's Guix ofc the major project
<old>I'm sure you've heard of it already
<jryans>Yes, indeed!
<sneek>Yey! dsmith-work is back :)
<dsmith-work>Hey hey, guilers
<dsmith-work>a botsnack for you, sneek
<dsmith-work>sneek, botsnack
<dsmith-work>(the but used to listen if it's nick was at the end of a message also)
<lechner>Hi, I like the Web default of INADDR_LOOPBACK but am ready for deployment. How may I switch to INADDR_ANY, please? This does not work (run-server main-page 'http '(#:addr INADDR_ANY #:port 3011)) Also,
<lechner>changing the port alone works fine
<lechner>here is the error message
<lechner>unquoting it with ,INADDR_ANY does not work either and yields the same error
<rekado>above you’re using a plain quote, not a quasiquote
<rekado>so you can’t unquote
<lechner>rekado / yay, that did it. thanks so much!
<dthompson>bark (what my dog has been doing all day because the arborists are here)
<wingo>yay arborists
<apteryx>ugh, let-keywords doesn't indent right in emacs
<old>apteryx: I use this: eval: (put 'let-keywords 'scheme-indent-function 3)
<apteryx>yes, but it should be in Emacs' scheme-mode.el
<apteryx>(and thanks!)