> On a more general note, I am still waiting for the world to fall for lisp in general.
Gah, aren't we all? Watching John Carmack push Scheme for the Oculus Rift 2 [https://www.youtube.com/watch?v=ydyztGZnbNs] made me feel like something was right in the universe.
And I don't expect Haskell to take over the world either. I do expect a large crop of new languages that extend on the concept, and some of them to take over the world.
As someone who's spent the last week implementing two different Schemes atop two different languages (Lua & Go), I think I can explain why GNU Guile didn't take off: Scheme. The problem with Scheme is that it's an utterly lovely little language with some wonderfully neat concepts which is great for teaching students about continuations … and it happens to have some broken features, like DYNAMIC-WIND instead of UNWIND-PROTECT, and some design decisions seemed wise at the time but in retrospect were foolish (Lisp-1 seems really awesome, right until you have to use it every day; eliminating NIL and making '() truthy seems very elegant and orthogonal but is actually a right royal pain — and don't even get me started about forbidding (car '())).
Scheme pursued a foolish simplicity, foregoing the complexity necessary to deal with the real world.
It's a wonderful language for implementing language interpreters, but I wouldn't want to write large programs in it. For that, the only thing worth using is Common Lisp.
I don't happen to agree with you on eliminating NIL. I don't understand what the royal pain is.
And dynamic-wind is the price you have to pay for call/cc. UNWIND-PROTECT is not the same thing. Multi-shot continuations is he reason. One way would be having explicit one-shot continuations and escape continuations. Those are faster and will make UNWIND-PROTECT work.
I am more in favour of delimited continuations though.
Delimited continuations makes that a bit simpler (since you can easily implement something like dynamic wind using them).
This depends on the type of avalanche. I know,because I was caught in one. The one I was in was relatively minor and made up of a large part newly fallen snow. I had stopped for a break and managed to get my skis back on, but the thing overtook me hundred meters later. I had managed to get to higher ground relative to the rest of the slope, which is probably what saved me. I broke one leg and both my arms and got a pretty bad concussion.
I managed to walk/ski (one ski was still on me, but badly broken ) to a nearby village and driven on a stretcher to the hospital.
I am lucky to be alive. It is amazing though how clear you can think in life threatening situations. the moment I noticed the avalanche I knew exactly what to do and where to go. When I was buried I remember rocking back and forth to get some wiggle/breathing room and when it stopped I waited until my mind cleared up, struggling hard to defeat the panic and pain, until assessing g the situation.
Wow! Firstly I would like to say this was one of those rare HN comments which blows you mind away.
Very nice to hear you survived such a bad accident.
>>I am lucky to be alive. It is amazing though how clear you can think in life threatening situations.
David Allen talks about these situations in this talk. In the moments of crises, the brain brings about all its focus to the highest priority task at focus. Its almost like crises commands the best kind of productivity.
Students have known that since the dawn of time. It's why they don't work until the night before the deadline, when the urgency is enough to allow them use 200% or their brain's capacities in order to obtain a passing grade.
The cherry on top: they can now spend the time until their next deadline thinking about the amazing grades they would get if they worked more than one night per month.
Cortisol does wonders, but only for the short term. It basically destroys part of your body to supercharge the rest.
Later on in life, plenty of companies try to make use of it, pushing people into long hours and short deadlines, and find that it doesn't work as well.
>>pushing people into long hours and short deadlines, and find that it doesn't work as well.
That is because you need some skin in the game. Nobody is losing sleep to work on a project whose success or failure has no disproportionate effect on the well being of the individual.
> In the moments of crises, the brain brings about all its focus to the highest priority task at focus.
I had the same during an almost traffic accident when a truck wasn't giving me the right of the way from a side road. Brain just switched to autopilot and managed to go inches away from both truck and barriers on the other side of the road. No damage done. It was kinda amazing, being an observer only.
What mountain range? I understand the Rockies have a lot of nasty deep slab avalanches (not soft and fluffy) and the Sierras have really heavy wet snow (also not soft and fluffy). Alaska was mentioned in avy classes as the chief place for fluffy sloughing?
This was in a small valley near insbruck, Austria in the early nineties. It got some media attention due to some controversy regarding irresponsible tourists. I had however done my research and picked a slope that was regarded as low risk, which was unsurprisingly not reported b the local media :)
I have found that you fairly easily can write portable r6rs code, but whenever you step outside r6rs (for stuff that isn't standard, like networking) it becomes an exhibition of cond-expand abuse.
I feel that not standardising a low level FFI for r7rs large is a mistake. They should at least recommend some reasonably low level stuff that can be used to build abstractions.
Agree with the sentiment, but at the same time understand the rationale - FFI implies alot of GC/memory internal interfacing stuff, and to some extent expects a c-based implementation (not e.g. JVM,CLR,etc).
If r7 & library interface are widely adopted, some flavors of FFI could evolve within the library/srfi process and gradually become defacto standards..
I think that the best way to go about it (at least if you want to be successful) would be to write a SRFI that could easily be impkemented using the FFIs that are already out there.
Managing that, but still being flexible enough to be useful, is a huge amount of work, at least if you want to do more than just "call this c function".
The simplest way would probably be to implement explicit and implicit renaming macro transformers. They are found in many schemes and are quite a bit simpler than the syntax case you linked to. Then you can just glue parts of ashinn's match.scm on top of it for the pattern matching.
There is also a srfi for an improved hygiene low level macro facility that is rather elegant. Can't remember the number though. 70-something.
Y'all should have a look at ewig which uses Immer - really fast persistent data structures for c++. Ewig is just a proof of concept, but the code is really nice. I have thought about taking that and building something bigger.
The upsides are the same as for a piece table (really simple undo/redo) but with the downside of not being able to just mmap a file. You also get basically zero memory usage when you do cut and paste (you can paste a file into itself until it is bigger than RAM without problems, since you are actually not copying the contents, just the pointer)
Look at the YouTube video as well. It is all very cool, at least if you are not already spoiled by using clojure :)
Edit: Forgot to mention: Ewig can be found among Immer's author Arximboldi's repos. On my phone right now on GPRS connection, so maybe another friendly soul can provide the link.
Ewig uses RRB-Trees (Relaxed Radix Balanced Trees) which like ropes, is confluent (supports fast concatenation) but has very stable bounds otherwise, similar to a vector-like type.
EDIT: The parent mentions a video, I gues it is the CppNow talk: https://www.youtube.com/watch?v=ZsryQp0UAC8
Last week I did another version of that talk at CppCon (with slightly deeper coverage of Ewig) but I don't think it is in Youtube yet.