2,364 karma · joined February 19, 2007
http://scheme.dk/blog/2006/12/self-evaluating-evaluator.html
https://github.com/schemedoc/bibliography/blob/master/page6....
In particular look at "Programming with Continuations", "Engines Build Process Abstractions" and "Continuations and Coroutines".
However, I don't see an obvious way of attach and probe continuation marks to the continuations (including the current one).
I am not an expert in continuation marks, so I'll just link to this presentation by Matthew Flatt (which you probably already know).
https://github.com/WebAssembly/meetings/blob/main/stack/2021...
Details on the representation.
https://github.com/soegaard/webracket/blob/main/compiler.rkt...
I am more or less only using the linear memory for the JavaScript FFI. FASL-encoded values are passed back and forth to JavaScript.
Changes to the bytecode representation were indeed rare also in Racket.
The Whalesong project was written as part of a dissertation - and when people graduate and get jobs, projects are often abandoned.
The representation is explained here:
https://github.com/soegaard/webracket/blob/main/compiler.rkt...
Internally the compiler uses a series of passes implemented using Nanopass.
(generate-code
(flatten-begin
(closure-conversion
(anormalize
(categorize-applications
(assignment-conversion
(α-rename
(explicit-case-lambda
(explicit-begin
(convert-quotations
(infer-names
(flatten-topbegin
(parse
(unexpand
(topexpand stx)))))))))))))))
The code generator is inspired by "Destination-driven Code Generation"
by Dybvig, Hieb and Butler. There are some differences however. The code
generator in the paper generates "flat" code (assembler) whereas I
generate nested Web Assembly instructions.This approach generates reasonable code without having to implement a register allocator. Also, I believe I saw a Wasm to Wasm compiler that improved register allocation (maybe it was a switch for wasm-tools?).
If (when?) WebRacket becomes a success, we can always switch out individual passes.
If I need a CPS-pass for continuation marks, I might as well use it for continuations as well.
It would be great if it were possible to avoid a CPS-pass though.
This forces an Racket implementation to make continuations explicit. And that will most likely mean a WebAssembly backend will be slower than the native backends.
It's still early days for the WebRacket project.
Racket is a huge language, so be patient wrt features.
To keep motivation high I decided to implement a subset that can be used to built practical applications - and then extend the supported features from there. Hopefully, this strategy will also lead to some early adopters that can help me prioritize which features to add.
Some features are simply "more of the same". In this category falls more types of hash tables. Supporting bignums are also a matter of just doing it.
Other features require more work. I have already done some work on implementing modules in terms of linklets. When linklets/modules work, we can reuse the existing implementation of regular expressions.
Adding continuation marks and delimited continuations require adding a CPS-pass. This is certainly doable. Postponing it has been great though. Having a direct style compiler means the generated code follows the structure in the input source code. And that makes debugging easier. Now that bugs have become rarer, it makes sense to look at CPS.
Enjoy.
/Jens Axel
Whalesong used the built-in bytecode compiler and compiled the bytecode to JavaScript. Reusing the bytecode compiler is in principle a good idea - but each time the bytecodes are changed, Whalesong needs to be updated.
And after the move to Chez Scheme as backend, the bytecode compiler is no longer a part of the main compilation path.
The Parties will contribute toward the further development of peaceful and friendly international relations by strengthening their free institutions, by bringing about a better understanding of the principles upon which these institutions are founded, and by promoting conditions of stability and well-being. They will seek to eliminate conflict in their international economic policies and will encourage economic collaboration between any or all of them.
>> Can Idris 2 compile itself?
> Yes, Idris 2 is implemented in Idris 2. By default, it targets Chez Scheme,
> so you can bootstrap from the generated Scheme code, as described in Section
> Getting Started.
Also, check this talk:MIT Scheme was for a long period one of the leading Scheme implementations. It lacks support for Apple Silicon, so it is not as popular now, as it once was.
But - if the knife slips and a large force is applied at the same time - then you will get a large cut.
If the knife slips and a small force is applied, you will get a smaller cut.
If the probability of slipping is the same for sharp and dull knifes, then due to the forces applied, the cuts you get with a sharp knife are less dangerous.
Due to the system of insurance companies and PBMs in the US the list price is often high.
When PBMs a are negotiating with the pharmaceutical companies, they have an incentive to keep a high list price. Let's say the PBMs and a pharmaceutical company negotiates for the price of a drug X.
If the pharmaceutical company lowers the price of the drug X, and there are other comparable drugs from other companies on the market, then there is a risk that the PBM simply drops the drug X from their lists. Instead, they make a better deal (for them) on drug Y.
For the company producing X, being omitted from the insurance companies lists, is bad business.
As an outsider, it is difficult to understand that the US keeps the private insurance layer and the PBMS.
Now - the insurance companies also don't pay list prices. They get a rebate. But they - and here my memory fails me - the get some money from ... the government based on the list price.
Look at the congress hearings on the high medicine prices on YouTube.
Look for `define-syntax`.
https://www.r6rs.org/final/html/r6rs/r6rs-Z-H-14.html#node_i... https://www.r6rs.org/final/html/r6rs/r6rs-Z-H-13.html
Scheme R5RS, R6RS and R7RS all have macro systems. In R5RS has a pattern/template based system (syntax-rules). In R6RS the system has both patterns, templates and procedural macros.
The most modern system is Racket though. See `syntax-parse`.
https://www.boerglumkloster.dk/hvad-kan-jeg-se/bayeux-tapete...