by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    François-René Rideau
    @fare
    looks like some simple type errors, but in a heavily concurrent program.
    so I wanna wrap all these functions into contracts that enforce the intended types.
    ideally, it would work well with tail calls by coalescing checks for the same type, but oh well.
    also ideally, it would be mostly eliminated at compile time by careful type analysis, but oh well, too.
    and ideally, it would pay incremental cost for verifying recursive data structures, rather than O(n) or worse at each check.
    François-René Rideau
    @fare
    also ideally without wrapping that accumulates endlessly around functions.
    François-René Rideau
    @fare
    Not the ideal variant, but I implemented some very basic function type validation.
    François-René Rideau
    @fare
    or use {foo: Integer foo 1}
    or {foo:: Integer foo: 1}
    François-René Rideau
    @fare
    what kind of object is a #&#<thread #62> ? are Gerbil threads some kind of wrappers around Gambit threads?
    vyzo
    @vyzo
    it's a box that contains a thread
    Drew Crampsie
    @drewc
    is there an example or code of a way to create a port? IE: I have a C function, gsf_input_read (*inp, n) which returns a pointer to n bytes. Is there an easy way to read-subu8vector? I can simple build it in gerbil and call a __u8_vector_append(scheme_object, byte) type thing, or even do that with a bidirectional port I suppose, which is likely part of the answer to my question... but it seems like it must be quite common :)
    Is there a make_u8vector(uint8_t *start, size_t length) thing somewhere?
    drewc @drewc thinks he should ask that on the gambit channel lol
    drewc @drewc thinks he figured it out... asking the question simply phrases it in a way that gets out of the coding zone :P
    Drew Crampsie
    @drewc
    To follow myself (is this a searchable chat?) https://gist.github.com/drewc/ee25525a9cb6c380df37436acd14be93
    François-René Rideau
    @fare
    @vyzo how may I create a macro-variable that I can set! ? I want persistent variables...
    vyzo
    @vyzo
    identifier-rules is your firend!
    it defines a setq macro
    so you can match (with the literal) set! expansion
    Oberheim
    @ober
    @vyzo is it possible to to have the -:tE8,f8,-8,h2097152 set by default in a compiled bin so mybin -:d will be visible properly?
    vyzo
    @vyzo
    hrm
    you want it only for the bin?
    you might set GAMBOPT before running
    Oberheim
    @ober
    ok thanks will test
    was not sure if there was a compile time argument one could set to enact it as default
    Albert Latham
    @comalice_gitlab
    Is there a 'fast' way to re-import modules in gxi?
    17 replies
    Albert Latham
    @comalice_gitlab

    I'm having an issue with what I guess are 'lexeme literals', where I have a production of the following form

    VarAssn <- (VarIdent $1) '=' (Expr $2)
         => ['def $1 $2]
    
    VarIdent <- (Ident $1)
         => $1
    
    Expr <- Int

    Where Int and Ident are regex lexer tokens.

    The error I get is

    > (reload "teraterm.ss")    
    > (teraterm-parse "a = 123")
    *** ERROR IN (stdin)@2.1 -- Syntax Error
    *** ERROR IN (string)@1.3
    --- Syntax Error: Bad-syntax; No lexeme matching input
    ... form:   (ERROR "=")
    1>
    vyzo
    @vyzo
    nothing matches the '='
    19 replies
    add a lexer rule for it
    Oberheim
    @ober
    vc87# ls -lh slack
    -rwxr-xr-x 1 root wheel 9.1M Jul 7 06:39 slack
    vc87# file slack
    slack: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, for NetBSD 9.0, stripped
    now to try bebox
    Oberheim
    @ober
    interesting, if I'm in a source repo, and do a gxpkg install github.com/ober/someotherrepo it also installs the current directory repo
    François-René Rideau
    @fare
    std/test fails to flush stdout before it outputs a summary on stderr.
    François-René Rideau
    @fare
    Announcing gerbil-ethereum: https://github.com/fare/gerbil-ethereum
    Oberheim
    @ober
    very nice!
    vyzo
    @vyzo
    awesome!
    let's add it to the directory as well
    François-René Rideau
    @fare
    ^ Added.
    François-René Rideau
    @fare
    Do we have extensible vectors of some sort already?
    vyzo
    @vyzo
    no, we don't
    how would they work? be backed by a regular vector that resizes?
    François-René Rideau
    @fare
    probably, yes
    and/or backed by a family of regular vectors.
    e.g. every time you collect X (constant, 2, 3 or 4) vectors of a given size, you merge them.
    assuming frequent automatic extends, and infrequent shrinks
    François-René Rideau
    @fare
    I found a bug in my csv.ss code, switcing lf? and cr?. Oops. I also found that making a single parameter in a struct, I can speed up the code almost 2x.
    So I'll be issuing a PR.
    vyzo
    @vyzo
    go for it!
    and yeah, using a struct in a single parameter speeding up things no surprise