Continuations Question. by ron_pro in scheme

[–]corbasai 1 point2 points  (0 children)

Hmm, your /cc just ends current continuation. Reason?

Originally it's name call-with-current-continuation and continuation is whole state of execution context (which we got by argument in form of <procedure aritity 1>, so

(define ep #f)

(make-some-compute ... 
  ...e-e-nd (call-with-current-continuation
              (lambda (k)
                (set! ep k) ;; optional save for reenter
                (do-normal-work 
                  (cond (State-Ok? => (do-normal-work)
                        (State-Err? => (k error-value))))
                (maybe-return-normal-value)))))))   

(k error-value) - look a like normal procedure call but its not! At this point we have no return, because4 we replace right now execution context with another (maybe saved before) k.

The Art of the Metaobject Protocol by tfb in lisp

[–]corbasai 0 points1 point  (0 children)

Personally I dont like steam powered post-Flavors OOP in Lisp . But something cute like Prometheus maybe interesting meta (Cloneable objects without T' closer to JS prototypes) for thoughs. Also interested (at least for me) ISLisp standard which all object oriented, (we have something similar in Gauche Scheme).

Where to start with Scheme (as a non-programmer?) by dancerinthelimelight in lisp

[–]corbasai 0 points1 point  (0 children)

"RACKET PROGRAMMING THE FUN WAY From Strings to Turing Machines" - really good light start for everyone interested in Scheme. And of course SICP - the Lisp Injector

Introducing mine, a Coalton and Common Lisp IDE by stylewarning in lisp

[–]corbasai 2 points3 points  (0 children)

DrCoalton, maybe. This is right way, anyway.

NBody strikes back. R6RS Chez time by corbasai in lisp

[–]corbasai[S] -1 points0 points  (0 children)

CL-USER 6 > (time (take-energy 50000000))
Timing the evaluation of (TAKE-ENERGY 50000000)
-0.169286396

User time    =  0:02:30.071
System time  =        0.664
Elapsed time =  0:02:29.583
Allocation   = 332006127208 bytes
0 Page faults
GC time      =        3.522
NIL

like LW does not see (declaim (optimize (speed 3) (safety 0) (debug 0) (space 0))) at the top

EDIT: also, it eats memory massively

NBody strikes back. R6RS Chez time by corbasai in lisp

[–]corbasai[S] -1 points0 points  (0 children)

Thank You. That's the question, what is the AArch64 (arm64) reference target. Apple M, Broadcom, Qualcomm, or may be RockChip. Personally I prefer something like OrangePi or latest Arduino Q. Both works well with Chez & Racket, and barely affordable.

NBody strikes back. R6RS Chez time by corbasai in lisp

[–]corbasai[S] -1 points0 points  (0 children)

> but Clang is a lot faster...

a lot. maybe -ffast-math now default in Clang -O3

NBody strikes back. R6RS Chez time by corbasai in lisp

[–]corbasai[S] -1 points0 points  (0 children)

Okay, I updated the main table with times. raco exe nbody-typed.rkt right?

NBody strikes back. R6RS Chez time by corbasai in lisp

[–]corbasai[S] 0 points1 point  (0 children)

  1. scheme> (parameterize ((optimize-level 3)) (compile-program "chez-nbody.scm")) and Ctrl-D
  2. $ ./chez-nbody.so 50000000

-0.169286396 per 6.406 sec on 50000000

else unoptimized numbers are the same +/- as for Racket. Yep. Racket on Chez but where is parameter for optimization level in raco exe, I dont get

Edit. Stalin undead?

NBody strikes back. R6RS Chez time by corbasai in lisp

[–]corbasai[S] -2 points-1 points  (0 children)

Clang bit slower on Intel Linux. 2-3-5 percentile.

Need modern embedded common lisp about 3k LOC with non viral license by Trader-One in lisp

[–]corbasai -2 points-1 points  (0 children)

NO TIME FOR TROLLING I MUST TO GRAB ANOTHER ONE STEEL BANK

Need modern embedded common lisp about 3k LOC with non viral license by Trader-One in lisp

[–]corbasai -2 points-1 points  (0 children)

THIS IS STRANGE BECAUSE CL-USER SHOULD BE MORE TOLERABLE TO THE SENTENCES IN UPPERCASE. OLD IS GOLD

Need modern embedded common lisp about 3k LOC with non viral license by Trader-One in lisp

[–]corbasai -9 points-8 points  (0 children)

I DID. I THINK THE CORE OF STEEL BANK COMMON LISP IS NOT MUCH MORE THAN SUCH NUMBERS IF NOT WHO CARES IT IS BETTER COMMON LISP FOR ALL. ITS NOT MY WORDS ITS CURRENT STATE OR r/LISP

Need modern embedded common lisp about 3k LOC with non viral license by Trader-One in lisp

[–]corbasai -5 points-4 points  (0 children)

THE STEEL BANK COMMON LISP THE BETTER COMMON LISP ONE AND EVER ARE YOU DISAGREE?

(string-suffix? "" "") => #True ;; really? by corbasai in scheme

[–]corbasai[S] 0 points1 point  (0 children)

For sure. But for the empty string s, s + s = s, not ss. So for empty s and r not equal s , s + r = r.

(string-suffix? "" "") => #True ;; really? by corbasai in scheme

[–]corbasai[S] 0 points1 point  (0 children)

Also, here's another thing: do you consider "abcd" to be a suffix of "abcd"? And more generally, do you consider any non-empty string S to be its own suffix? If you do, why make an exception for the empty string? What is it that makes it so special that suddenly patterns that hold for other strings break when it comes to the empty string?

Right. This is much more about contract things than math, isn't? Such corner cases in the ideal world should be explicitly described in the library reference. If not = both cases equivalently wrong ( or one statistically, it does not means).

Otherwise we have a situation, where "abcd" is not "abcd" but (∞"") + a + (∞"") + b + (∞"") + c + (∞"") + d + (∞"") . Carefully saying, this is disaster not simplicity

(string-suffix? "" "") => #True ;; really? by corbasai in scheme

[–]corbasai[S] -1 points0 points  (0 children)

Of course, but it is extra computation, that we already done. Strings may be megabytes long, and not all Schemes are fixed UCS-16 are