841 karma · joined August 10, 2020
This is too simplified to mean anything. The USSR had many socialist branches, where the bolsheviks ultimately won out in a power struggle. The bolsheviks wanted state control, the citizen working for the state, while others were into having actual soviets where the citizens would've taken control of their means of production. Having a parliament and democracy was important to many of these groups (and the liberals who were also politically active). I wouldn't recommend a dictatorship, regardless if it has "of the proletariat" as a suffix.
By the way, several parts of the std (Mutex and Arc for example) are written in unsafe Rust. They have to be, by necessity, because they allow for aliasing and mutation.
Here's an impl of some kind: https://github.com/crisbal/hmm-spellcheck
It's dynamically scoped, which is the same as the lexical scope in the untyped lambda calculus. But yes, that is really annoying.
Example from Racket REPL:
> (require racket/control)
> (define f (lambda () (shift k (k 5))))
> (reset (f))
5
How do you get an apartment in Stockholm as a young person? You ask your parents to take out a loan on their house to pay the downpayment, then you take a loan and buy an apartment. Luxurious and high standard apartments are built all the time in Stockholm! The new Barkarbystaden development in the northern municipality of Järfälla will have added 18000 apartments by 2030, the current population is 80000.
Sweden has no issue with building new places to live, as long as they're expensive and luxurious.
Miljonprogrammet wasn't a failure.
(reset val) => val
(reset E[(shift k expr)]) => (reset ((lambda (k) expr)
(lambda (v) (reset E[v]))))
; where E has no reset
E is the current-continuation of the expression, and the comment is an invariant to be held.And I think call/cc is this:
E[(call/cc k expr)] => ((lambda (k) expr) (lambda (v) E[v]))
So imagine a stack like this:
g
h
call/cc my-fun
this captures the whole stack.
And now imagine:
g
reset
h
shift my-fun
this only captures h (see how it moves the E in the reduction rules and wraps it in reset). So if I try to store k from shift and call it at a later time it won't reach g, but doing the same with call/cc it would reach g.
* Just a forward-style abstract interpretation living on-top of Go's type system as an additional layer so you get explanations for why the tool believes that a nil-pointer dereference may occur, etc.
JMC's first Lisp paper had goto in it[0] and was described in terms of the hardware it ran on, is this part of the compact and elegant formalism which you are thinking of?
If you want a compact and elegant formalism then grab the untyped lambda calculus. If you want a Lisp, then at least make something with a GC and macro system.
[0] https://web.archive.org/web/20130319041509/http://www-formal...
Edit: Apparently all living organisms are collectively called "biota", cool.
CRDTs certainly do have a mathematical elegance to them.