Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 13 07:06
    targit commented #409
  • Sep 13 06:59
    targit opened #409
  • Sep 07 13:01
    Build #941 passed
  • Sep 07 12:29
    Travis gambit/gambit (master) passed (1219)
  • Sep 07 12:09

    feeley on master

    Update README.md (compare)

  • Sep 04 01:33
    feeley closed #401
  • Aug 31 08:46
    lassik commented #405
  • Aug 29 15:06
    feeley commented #408
  • Aug 29 14:59
    lassik commented #408
  • Aug 29 14:54
    lassik commented #408
  • Aug 29 14:48
    feeley commented #408
  • Aug 29 13:09
    lassik commented #408
  • Aug 28 17:42
    lassik commented #408
  • Aug 28 17:41
    lassik commented #408
  • Aug 28 17:39
    lassik opened #408
  • Aug 28 12:51
    lassik commented #401
  • Aug 28 12:21
    feeley commented #401
  • Aug 28 08:20
    lassik commented #401
  • Aug 28 03:44
    Build #940 passed
  • Aug 28 03:10
    Travis gambit/gambit (master) passed (1218)
Marc Feeley
@feeley
I typically use fib which exercices function calls and fixnum arithmetic and it is very easy to scale to a larger time by incrementing the argument
when you say "almost as fast as JS" do you mean compared to factorial written directly in JS or through your compiler?
John Cowan
@johnwcowan
I sometimes ask candidates if they know of an O(1) way to implement factorial. Only one or two have actually come up with the answer.
amirouche
@amirouche
@feeley ok for fib, tx for the hint. As fast as iterative factorial written in JavaScript (which is the fatest factorial compared to recursive and tail recursive)
@johnwcowan using a memo?
@feeley it is a tail recursive factorial
John Cowan
@johnwcowan
Using a precomputed array of all possible factorials that can be represented as 64-bit floats.
There are really very few.
amirouche
@amirouche
amirouche
@amirouche
@johnwcowan I missed an opportunity to look smart
John Cowan
@johnwcowan
As I say, almost everyone does.
ben.txt
@bentxt
@feeley @amirouche ok that is producing a 21M large _gambit.js file, I guess I'll try other solutions then, ... thanks anyway
Marc Feeley
@feeley
@bentxt As was mentioned before, if your application is small (you need reverse and just a few other things), then you should build your own runtime library and you will get a reasonable JS code size, especially if you minify the code. See the mentioned link.
amirouche
@amirouche
I am around if you want to discuss the issue I just posted at gambit/gambit#404
Marc Feeley
@feeley
@amirouche did you see my response? call/cc is just:
(define (call/cc f)
  (##continuation-capture
   (lambda (k)
     (f (lambda (r) (##continuation-return-no-winding k r))))))
Marc Feeley
@feeley
if you wonder about the rationale for those continuation primitives they are explained here: http://www.iro.umontreal.ca/~feeley/papers/FeeleySW01.pdf
amirouche
@amirouche
tx a lot!
I think I have all i need :)
Marc-André Bélanger
@belmarca
> (##include "~~lib/_std#.scm")
*** ERROR IN "/usr/local/Gambit/v4.9.3/lib/_std#.scm"@11.2 -- Unbound variable: define-library-type-of-exception
Marc Feeley
@feeley
(##include "~~lib/_gambit#.scm")
Marc-André Bélanger
@belmarca
😣thanks
amirouche
@amirouche
use TAB + ENTER or click TODO to validate input
Marc-André Bélanger
@belmarca
13kb for everything amirite?
amirouche
@amirouche
amirite?
Marc-André Bélanger
@belmarca
"am I right" :)
amirouche
@amirouche
where do you see this number?
it is at least 1Mb if you count only JavaScript depedencies, and that is the helpers.js that contains ReactJS
Marc-André Bélanger
@belmarca
chrome says about 1.2Mb for everything
ok
amirouche
@amirouche
yeah it looks like that
I am wondering if I will not continue with the full build because not having access to string function is rather painful
until the tree shaking code lands in master...
even if it is 21M, it much less than pypyjs which IIRC is 60Mb also in local dev setup, you are not really slow down by the big size of the runtime.
amirouche
@amirouche
Actually pypyjs is 31Mb but split into many files which slows down the page a lot: https://hyperdev.fr/pypyjs-todomvc/
Marc-André Bélanger
@belmarca
can't you "JS FFI"?
Marc-André Bélanger
@belmarca
like a thin wrapper for these functions only
Phiroc
@Phiroc
hello, does anyone know how to access the iCloud filesystem on iOS from the Gambit-powered "Not Emacs" editor on iOS? Furthermore, is there an "ls" or "pwd" command of some sort? Many thanks.
amirouche
@amirouche
@belmarca there is a way to "JS FFI" but string representation in Gambit is different from the JavaScript one
nymacro
@nymacro
What is the approved solution to re-loading an compiled object? I am putting Geiser's new Gambit integration through its paces, but have stumbled on a couple little annoying things based on interactive use
nymacro
@nymacro
I am currently using (load "blah")
Bradley Lucier
@gambiteer
The only way I know is to recompile it.
Marc-André Bélanger
@belmarca
@amirouche but what you produce is a .js file?
amirouche
@amirouche
Yes, it is a JS file
Marc-André Bélanger
@belmarca
I'm not sure what's the issue with string representations if you end up just producing a utf8 or ascii file with the proper js calls?
amirouche
@amirouche
there is no issue with the string, except the lightweight build doesn't provide procedure to work on string manipulated by gambit js
string are represented as array of utf8 code points
Marc Feeley
@feeley
@nymacro do you want to reload the exact same module or you have made modifications to it?