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
    and/or should I make exception transparent?

    In other news, I have this error trying to make a static-exe: that imports from :gerbil/expander/common:

    --- Syntax Error at compile: cannot find static module
    ... form:   gerbil/expander/common
    ... detail: "gerbil__expander__common.scm"

    Is it intended or an error that there is no such file in $GERBIL_HOME/lib/static/ ?

    (because I tried to define a method to print an AST)
    François-René Rideau
    @fare
    Interestingly, even if I remove the one explicit dependency on it, there are other dependencies due to my compiler accessing ASTs in some other way I suppose.
    vyzo
    @vyzo
    that's because the expander/compiler are not statically compiled by default
    we can change that
    but you'll have to manually initialize the expander in your application
    J Roberto
    @jordeam

    @arpunk @leahneukirchen I am using the latest version and it still gives a segfault:

    (import :std/text/utf8)
    (utf8->string #f)

    Gerbil v0.16-152-g808929ae on Gambit v4.9.3-1245-gc82197d0

    ober @ober checks
    Jaime Fournier
    @ober

    Gerbil v0.16-152-g808929ae on Gambit v4.9.3-1245-gc82197d0

    (import :std/text/utf8)
    (utf8->string #f)
    * ERROR IN (stdin)@2.1 -- Bad argument; expected u8vector #f
    1>

    @jordeam are you compiling that?
    J Roberto
    @jordeam
    No, I am calling by gxi:
    jrm@sapo:~/Code/gambit$ gxi
    Gerbil v0.16-152-g808929ae on Gambit v4.9.3-1245-gc82197d0
    > (import :std/text/utf8)                   
    > (utf8->string #f)
    Segmentation fault
    jrm@sapo:~/Code/gambit$
    Jaime Fournier
    @ober
    which OS/distro?
    gxi -:tE8,f8,-8,h2097152
    try running it like that, and see if it makes a difference
    J Roberto
    @jordeam

    @ober

    jrm@sapo:~/Code/gambit$ gxi -:tE8,f8,-8,h2097152
    Gerbil v0.16-152-g808929ae on Gambit v4.9.3-1245-gc82197d0
    > (import :std/text/utf8)
    > (utf8->string #f)
    Segmentation fault
    jrm@sapo:~/Code/gambit$

    Distro: Debian Buster
    Compilation flags:
    gerbil: ./configure --prefix=/usr/local --enable-libxml --enable-libyaml --disable-zlib --disable-sqlite --enable-mysql --enable-lmdb --enable-leveldb
    gambit: ./configure --prefix=/usr/local --enable-openssl

    Jaime Fournier
    @ober
    that's odd.
    33 replies
    and there is no other gsc/gsi that might be in your path to a previous install? Also what is $GERBIL_HOME set to?
    Jaime Fournier
    @ober
    @arpunk @jordeam build gambit with nice ./configure --enable-default-runtime-options=f8,-8,t8 ...
    gerbil/doc/guide/getting-started.md references this
    Also our Dockerfile for building out gambit.
    We should probably make that more obvious in the main Readme
    Note that on Gambit v4.9.4 or later (actually, v4.9.3-1101-g1f1ce436),
    you may omit the --enable-default-runtime-options=f8,-8,t8 option, that has become default,
    and/or you should add the new i8 to be complete.
    hmm...
    but for sure I use this option and can't repro
    J Roberto
    @jordeam
    Thanks @ober, with --enable-default-runtime-options=f8,-8,t8, it does not caused a segfault. BTW, why this is not an issue? Wouldn't be the right behaviour to raise an error with or without the option?
    jrm@sapo:~/Code/gerbil.vyzo/src$ gxi
    Gerbil v0.16-152-g808929ae on Gambit v4.9.3-1245-gc82197d0
    > (import :std/text/utf8)
    > (utf8->string #f)
    *** ERROR IN (stdin)@2.1 -- Bad argument; expected u8vector #f
    1>
    Jaime Fournier
    @ober
    unsure, @vyzo question
    or perhaps in gambit/gambit
    François-René Rideau
    @fare
    How would I initialize the expander?
    François-René Rideau
    @fare
    ^ @vyzo
    Drew Crampsie
    @drewc
    That was a fun week!
    (js#jso
     name: "ButtonCounter"
     data: (lambda _ (js#jso count: 0))
     render:
     (js#function (createElement)
      (createElement
       "button"
       (js#jso
        on: (js#jso
             click: (lambda _ (js#++ (js#ref js#this count:)))))
       (##string-append "Scheme Render?: You clicked me "
                        (##number->string (js#ref js#this count:)) " times"))))
    that is a javascript object that becomes a Vue.js component that renders itself ala https://vuejs.org/v2/guide/render-function.html
    if you look at the tests here, the "Scheme Render?" button is just that. https://drewc.github.io/gx-quasar/
    Have a peek at the logs, in specific #3, to see how that's possible.
    Drew Crampsie
    @drewc
    Oh! That scheme is almost identical to the browser as this JS:
    {
      name: 'ButtonCounter',
      data: function () {
        return {
          count: 0
        }
      },
      render: function (createElement) {
        return createElement(
          'button',
          {
            on: {
              click: () => { this.count++ }
            }
          },
            'Render: You clicked me ' + this.count + ' times.');
      }
    }
    Marc-André Bélanger
    @belmarca
    @drewc I'm definitely going to look into your code this holiday
    Jaime Fournier
    @ober
    that's awesome
    Drew Crampsie
    @drewc
    @belmarca The very fact that I got back into it, and Vue in specific, is because of you. So, really, this is just me trying to impress you :)
    Jaime Fournier
    @ober
    peer pressure has it's merits
    Marc-André Bélanger
    @belmarca
    @drewc haha
    well it does look promising.
    convergence to scheme would be great
    Drew Crampsie
    @drewc
    We're getting very close.
    Essentially, breaking up the Gambit universal run-time into small parts and loading them only as needed is my aspiration.
    That starts with making a tiny gerbil runtime (gx-gamc*.scm files to js) that builds off the minimal runtime I already have going.
    Drew Crampsie
    @drewc
    Then trying to build on top of that. I already tried to add dynamic parameters to my run time. Most of the details are there, but a few days of hacking and I learned enough to stop that for now... I'll have a lot of questions for the Gambit channel, that I assure you.
    drewc @drewc wants a (js#current-this)