Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Drew Crampsie
    @drewc
    @fare I've run into that a few different ways, but usually it's because the syntax is in a different namespace.
    drewc @drewc now always tends to look at the __0.scm and __1.scm generated when such things pop up.
    François-René Rideau
    @fare
    Aha, I also had phantom dependencies from build-deps after I renamed a file.
    Drew Crampsie
    @drewc
    clearing the .gerbil/lib is usually my second trouble shooting step :)
    François-René Rideau
    @fare
    And here I had an unregistered new file with a reference to the old module name, so git grep didn't find it.
    Drew Crampsie
    @drewc
    As I'm sure you well know, there are times when replacing that "syntax error" with the actual cause of that error would be so enlightening :)
    Emeka
    @janus
    @vyzo I would like to try out PubSub using libp2p. I am having problem getting it to work properly. My connection is like this -listen unixpath -hostAddrs -pubsub -pubsubRouter gossipsub . What should I do to get it to work properly?
    10 replies
    François-René Rideau
    @fare
    PS: I may be looking for a new developer to implement a language compiler and runtime on top of Gerbil Scheme.
    Drew Crampsie
    @drewc
    Lol, guess what I'm doing right now?
    drewc @drewc is implementing a language compiler and runtime on top of Gerbil Scheme for your GUI
    Drew Crampsie
    @drewc
    Drew Crampsie
    @drewc
    https://www.npmjs.com/package/gxjs-loader <--- published with a README
    François-René Rideau
    @fare
    ^ Nice.
    François-René Rideau
    @fare
    @ober I see you did rebases in master for confluence and datadog... ttttt
    also slack, kunabi, jira
    François-René Rideau
    @fare
    @vyzo I tried to (defmethod {foo <boolean>} (lambda (x) 1)) but I can't see how to get <boolean> defined or imported. I see it in the std/generic/builtin.ss:(defprimitive-type <boolean> (boolean)) which has (export #t) but maybe I need to import it at phi -1 or something?
    (import (for-syntax :std/generic/builtin)) doesn't seem to help, either.
    François-René Rideau
    @fare
    Aha, I get it, it's available for (defmethod (foo (x <boolean>)) 1) but not for (defmethod {foo <boolean>} (lambda (self) 1)
    so... how do I define a method on !getopt ?
    fare @fare tries (defprimitive-type <getopt> (|std/getopt[:0:]#!getopt|)) but it doesn't seem to work.
    fare @fare tries (defmethod (foo (x |std/getopt[:0:]#!getopt|)) 2) to no avail
    fare @fare falls back to having the default method have a conditional on (getopt? x)
    fare @fare discovers let-hash and getopt sub-commands.
    Emeka
    @janus
    @vyzo I left message for you
    François-René Rideau
    @fare
    and... what is the "best" way to get the path to the current #!/usr/bin/env gxi script?
    as in gxi /home/fare/foo.ss => "/home/fare/foo.ss"
    Emeka
    @janus
    @vyzo I noticed that peer id comes in this form, /ip4/192.168.43.206/tcp/10333/ipfs/QmPKBMheFUEfFdMH3ZDr8TVpjPL9KRfY7EsBgH4vxUpCFG. Now, why ipfs? And what is the difference between ipfs and p2p protocols here?
    vyzo
    @vyzo
    ipfs is the old name, they are the same thing
    it's been deprecated and called p2p now
    if you want to open a pr that renames that it would be groovy :)
    Emeka
    @janus
    Thanks I would do that ...
    François-René Rideau
    @fare
    I'm trying to write a macro that registers the current file in a special variable in an attempt to identify the "real" $0, but somehow (this-source-file) throws an error while and (stx-source #'ctx) expands to #f
    from within the macro, but (this-source-file) works outside the macro.
    François-René Rideau
    @fare
    As I keep building code, the build times also increase :-(
    I suspect there might be some quadratic algorithms in gerbil or gambit... :-/
    François-René Rideau
    @fare
    Does Gerbil have the equivalent of rest arguments for keyword functions?
    how do I extract the test predicate (eq? eqv? equal?) from a hash-table?
    Drew Crampsie
    @drewc
    @fare it does, kinda/sorta. Have a look at keyword-dispatch in gx-gambc0
    Gerbil v0.16-120-g3f248e13 on Gambit v4.9.3-1234-g6acd87
    > (def (foo bar: (baz 'bat) . rest) (display rest))
    > (foo bar: 1)                                     
    ()> (foo #!rest bar: 1)
    (bar 1)>
    Drew Crampsie
    @drewc
    As for the predicate, no idea, and I don't think you can. There are at least 3 different impls in Gambit, one is for bootstrap, and none have table-test or the like.
    Having said that, lol
    macro-test-table is in Gambit
    errrr,macro-table-testrather.
    drewc @drewc needs coffee now
    François-René Rideau
    @fare
    I found my peace with some way of handling arguments.
    Next: what is the Recommended Way™ to install data files needed at runtime?
    Have a (static-file: ...) target, then locate the file with a search in the GERBIL_PATH and GERBIL_LOADPATH ?
    (and is there some builtin function to search that way?)
    François-René Rideau
    @fare
    In the meantime, I launched my first Gerbil-based application: https://glow-lang.org/
    Marc-André Bélanger
    @belmarca
    @fare congrats!