Live data from Hacker News

Chicken Scheme 6.0

code.call-cc.org

51–60 of 60 posts

Re: Chicken Scheme 6.0

#51
post #14

Earlier quoted context omitted.

Absolutely. And eggs too [1]: these are libraries provided by the community, very easy to import and use. [1] https://wiki.call-cc.org/eggs

What happens if you try to run Python eggs under Chicken? Do you get Roko's Basilisk? :-)

Just to run with the joke - one project I worked on was a CPython extension. We used Chicken to build out our library to do some rather hacky things and bring async/await to Python before it supported it.

And we did call it basilisk.

Re: Chicken Scheme 6.0

#52

I started playing with Chicken over the weekend because I was looking for a scheme that you could build binaries of and that had a lively ecosystem. I've really enjoyed it. So far I've mostly played with web stuff. Built a wrapper around makemkvcon for ripping some dvds I've been meaning to rip that'll do a little bit of automatic naming of output using the tv db. I was slightly worried that I'd start using v5 and th…

By the way, what do you use to postprocess your DVDs? My experience is that DVDs had awful quality and got interlaced unless using a good player (like cyberlink powerdvd) which was always improving with the video greatly and deinterlacing it?

Re: Chicken Scheme 6.0

#53
post #49

Earlier quoted context omitted.

It has eval but it lacks reader macros (or at least it did thirty years ago) which is what makes eval useful on lisp2 systems.

R5RS supports reader macros? Which would be 1998, and I guess only 28 years ago. That's why SRFI-49 and its descendants were a possibility. Wisp, JavaScript, brainfuck, etc. implementations all exist because the tools exist in the language.

It does not. https://conservatory.scheme.org/schemers/Documents/Standards... Particular implementations could.

Re: Chicken Scheme 6.0

#54
post #20
post #19

Earlier quoted context omitted.

IIRC not compiled (you can include the interpreter). But then Scheme was always less EVAL-friendly of the lisps

I'm not seeing the less friendly... Eval, and sandboxing eval, are builtin features of the Scheme standard.

The less-eval-friendly thing is R5RS only requires two possible "environment specifiers" (2nd arg to eval), returned by SCHEME-REPORT-ENVIRONMENT and NULL-ENVIRONMENT, with no special form or procedure to get the current lexical environment; and R4RS (I just checked) does not specify eval. There's pretty much no manipulation of environments in the standard; the best is something like

  ((eval `(lambda (foo) ,exp) (scheme-report-environment 5))
   foo)
(can't really think of applications for getting the current environment right now except for pseudo-macro stuff)

Re: Chicken Scheme 6.0

#55
post #46

Earlier quoted context omitted.

How would it be for a 2D game?

I am currently looking into simple options for using Scheme as a scripting language in a game written in C. So far, s7 made a good impression for embedding it, but I am also not that far into evaluating the actual performance. I looked a bit at Chicken, and it seemed possible to embed, but too complicated for my purposes.

I would use Guile for that, its documentation about how to use it as a scripting language within a C program is excellent.

It is being used by many projects for this purpose: GNU Cash, Lilypond, GNU Guix... I don't know about games, however.

Re: Chicken Scheme 6.0

#56
post #49

Earlier quoted context omitted.

R5RS supports reader macros? Which would be 1998, and I guess only 28 years ago. That's why SRFI-49 and its descendants were a possibility. Wisp, JavaScript, brainfuck, etc. implementations all exist because the tools exist in the language.

It does not. https://conservatory.scheme.org/schemers/Documents/Standards... Particular implementations could.

That document, shows several forms:

https://conservatory.scheme.org/schemers/Documents/Standards...

Re: Chicken Scheme 6.0

#57
post #20

Earlier quoted context omitted.

I'm not seeing the less friendly... Eval, and sandboxing eval, are builtin features of the Scheme standard.

The less-eval-friendly thing is R5RS only requires two possible "environment specifiers" (2nd arg to eval), returned by SCHEME-REPORT-ENVIRONMENT and NULL-ENVIRONMENT, with no special form or procedure to get the current lexical environment; and R4RS (I just checked) does not specify eval. There's pretty much no manipulation of environments in the standard; the best is something like ((eval `(lambda (foo) ,exp) (sche…

Scheme is hygeneic, yes. Which is why sandboxing works.

If you want to manipulate the current environment, and defeat half the point of the language, then you're allowed that through (user-initial-environment).

(define-syntax) will also let you rewrite the bindings however you require.

Edit: Here's an eval macro I use fairly often:

  (define-syntax constexpr
  (syntax-rules ()
    ((_ expr)
     (begin
       (syntax->datum
        (datum->syntax
         (quote-syntax here)
         (eval 'expr (interaction-environment))))))))
         
  (define (factorial n)
  (if (

Re: Chicken Scheme 6.0

#58
post #56

Earlier quoted context omitted.

It does not. https://conservatory.scheme.org/schemers/Documents/Standards... Particular implementations could.

That document, shows several forms: https://conservatory.scheme.org/schemers/Documents/Standards...

Common Lisp reader macros hook into the reader itself as it's parsing S-exps and meets some character combination: http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec... Define-syntax is for making special forms (i.e. normal macros).

Not that I know why eval should be paired with reader macros.

Re: Chicken Scheme 6.0

#59
post #57

Earlier quoted context omitted.

The less-eval-friendly thing is R5RS only requires two possible "environment specifiers" (2nd arg to eval), returned by SCHEME-REPORT-ENVIRONMENT and NULL-ENVIRONMENT, with no special form or procedure to get the current lexical environment; and R4RS (I just checked) does not specify eval. There's pretty much no manipulation of environments in the standard; the best is something like ((eval `(lambda (foo) ,exp) (sche…

Scheme is hygeneic, yes. Which is why sandboxing works. If you want to manipulate the current environment, and defeat half the point of the language, then you're allowed that through (user-initial-environment). (define-syntax) will also let you rewrite the bindings however you require. Edit: Here's an eval macro I use fairly often: (define-syntax constexpr (syntax-rules () ((_ expr) (begin (syntax->datum (datum->synt…

By the current lexical environment I meant the lexical environment at some place in the code (not just the top-level one, which user-initial-environment gives, though it's optional). I'm not attempting to make a case for anything; but without that RnRS' eval doesn't grant more expressivity than just tacking on an interpreter to every program, which you could also just do yourself. (It also doesn't complicate the implementation; variable names don't need to be preserved after compiling.) I.e. it makes sense to say standard Scheme has been less "eval-friendly," even if there were good reasons or one doesn't care.

Re: Chicken Scheme 6.0

#60
post #34
post #31

Earlier quoted context omitted.

Scheme SRFIs make Scheme a much bigger language while also making it painful to use because you have to research which SRFI are implemented in your scheme variant then map those SRFI numbers to what they actually do then you usually need read the raw SRFI because that's the only documentation around. R7RS is going on 14 years old and there's still no R7RS-large either. They really need to just take the critical SFRIs…

Indeed. Scheme it's amazing for embedded (such as s9) and its small size. Also, the SICP it's cool to do with Chicken Scheme and this ~/.csirc (and chicken install srfi-203 and srfi-216): (import scheme) (import (srfi 203)) (import (srfi 216)) (define (displaynl x) (display x) (newline)) (define pi (* 4 (atan 1.0))) Even if Chicken has Hypergiant to play with 3D objects, Common Lisp has Kandria, Sketch, Kons-9... Fro…

Are there official solutions/answers to SICP?
Post reply on HN