sweetsocks21
effect Sched =
yield : unit -> unit
fork : (unit -> unit) -> unit
end
let mut run_queue = []
let enqueue t = run_queue := List.concat run_queue [t]
let dequeue () =
match run_queue with
| [] -> ()
| t :: rest ->
run_queue := rest;
t ()
let rec spawn task =
handle
task ()
with
| return _ -> dequeue ()
| yield () k ->
enqueue (fn () -> resume k ());
dequeue ()
| fork f k ->
enqueue (fn () -> resume k ());
spawn f
let run main = spawn main
let worker name steps =
let rec loop i =
if i > steps do ()
else do
print $"{name}: step {i}";
perform yield ();
loop (i + 1)
end
in
loop 1
let () =
run (fn () ->
print "main: starting";
perform fork (fn () -> worker "A" 3);
perform fork (fn () -> worker "B" 3);
print "main: forked workers, now yielding";
perform yield ();
print "main: done")
output: main: starting
A: step 1
B: step 1
A: step 2
main: forked workers, now yielding
B: step 2
A: step 3
main: done
B: step 3But I don't believe the effects are tracked in the type system yet, but that's on it way.
But I can't help feel that we try to jam everything into that format because that's what's already ubiquitous. Reminds me of how every hobby OS is a copy of some Unix/Posix system.
If we had a more general structured format would we say the opposite?
The bad part is the impenetrable errors and obscure configuration. Although, with the rise of LLMs I find it's not as bad. Getting a non-trivial flake.nix setup is much easier now. Could never remember the override system before, but can manage with Chat GPT haha.
Was on HN recently: https://news.ycombinator.com/item?id=40900029
Part 2: https://m.youtube.com/watch?v=ZZDwB4-DPXE
You can project your programs into different views and add lots of metadata about the program and use that data in various contexts. Also extends to source control and other use cases. It looked really neat.
I'm not sure what happened to it.
If you are unfortunate enough to experience some human body failure modes you can get a glimpse into this process. The cohesive "veil" breaks down and you realize there's more "you" than that voice in your head. The distributed nature of the brain/body peeks through.
http://www.nerdkits.com/store/NKLEDARRAY001/
Multi panel extension: http://www.nerdkits.com/videos/multipanel_spi_ledarray/
> Your three choices show that this is what you see as central to your sense of self, not any attachment to a particular substance, be it your body, brain or soul. However, some would say that you have not survived at all, but fallen foul of a terrible error. In the teletransporter case, for example, was it really you that travelled to Mars or is it more correct to say that a clone or copy of you was made on Mars, while you were destroyed?
I used to work out a lot, and very intensely as that was the only thing that made me feel "awake". It wasn't until the lockdowns when I couldn't get to the gym that it got bad enough that I also started my own journey to this diagnosis.
I had started living more in the dream world than the real world and being awake was a daze. I became distant to the world and lost my imagination, memory, and emotion. I was also questioning how I could ever go on with my current job and life.
Thankfully, I also started a sleep apnea treatment (oral appliance, and later CPAP) after many discussions with my doctor. This mostly fixed my condition. The difference is incredible and I don't have the words to describe how it has changed my life.
So I want to say thank you for sharing your story, you're not alone and I hope others see your story and get the help they need.
If you've read this story and suffer any of the symptoms mentioned, I highly recommend doing a sleep study, it's truly life altering.
https://mobile.twitter.com/TimSweeneyEpic/status/15955006213...
https://mobile.twitter.com/TimSweeneyEpic/status/16021821207...
You can find more information here: https://www.reddit.com/r/uefn/
I believe they've been using Fortnite as a testing ground for a while now, to hammer out the design.
https://mobile.twitter.com/saji8k/status/1339709691564179464...
I believe it has roots in (but quite different from) Skookumscript
Records: https://github.com/janestreet/base/blob/master/src/avltree.m...
If statements: https://github.com/janestreet/base/blob/master/src/string.ml...
Lists: https://github.com/janestreet/base/blob/master/src/string.ml...
Function calls: https://github.com/janestreet/base/blob/master/src/string.ml...
Type definitions: https://github.com/janestreet/base/blob/master/src/array.ml#...
It's not always used, shorter snippets tend to be all on one line.
I've tried many different tools in the past and I find I can't stay organized. I don't want to sit there linking stuff together, I just want to jot down a quick note or thought and have it link up with enough stuff that I can find it easily later.
I was thinking of making a personal tool based on some kind of database like datalog. Where I can dump a bunch of facts and have the computer automatically tag and link items.
I'd love something that knows I'm currently in a meeting with X,Y,Z persons while I took a note and automatically links it with them and any keywords etc from my note to other notes and topics.
I saw a demo for outreach? I think that did some cool stuff for sales, listening to phone calls and making notes linking people etc. I want that but for _everything_ haha. Have it link in with JIRA, slack, GitHub, Gmail etc. One stop shop.
The things these two camps of software engineers care about are completely different. In the SaaS world it's all about interfacing between systems and managing complex business processes. There's often a lot of organization/political problems, along with auditing and legal requirements. There seems to be a lot more emphasis on developer productivity than end user performance.
Not that these engineers don't care about performance, but their tolerances are much higher. For example 100-200ms turn around is entirely acceptable, or even fast, in the SaaS world. While in my previous job that was absurdly slow, and unacceptable.
I think another under appreciated thing is that the scale and complexity is truly larger today than yesteryear. Even in real time graphics, Unreal Engine incorporates literally decades of cutting edge research into a framework that a new game programmer can start running with in hours. There's the various platforms like mobile, PC/Mac/Linux, graphics APIs like DX12, Metal, Vulcan, multiplayer syncing, animation, model importing, etc etc. There's just so many more things to support these days that there's going to be some slippage.
And each of these new tools and platforms were made with the intention of doing something better than a previous one, but then the real world creeps in and here we are.
It would be great to see more effort and research into rethinking from the base level, maybe even hardware, of how we can simplify this entire software stack and have our cake and eat it too.
If I switch tasks and do something very creative, say playing music or drawing, the inner voice goes away and I can enter a "flow" or meditative state where things just happen. It's a very different mode where it's just feelings/emotions/imagery and no language based thoughts.
Also when I get really really tired, but power through it, I have a "recursive observer" where I kind of view myself on a delay and analyse everything I do, it's kind of annoying.
A weird realization for me is all the events in the dream were produced by me. Yet in real life I'm useless in front of a piano, or a paint brush. It would be great if there was a way to tap into that creativity once awake.
It's pretty comfortable for organizing and refactoring because of the nice module and type system. And once you grok Dune (the build system) you can get going pretty quick. Builds are very fast compared to most of the languages I use at work. And if you're not doing anything egregious the optimizing compiler (Flambda) can usually be within ~2x of C for most things. When it's not dropping down to C is very easy because the FFI system is very straight forward, and has built in support in Dune.
It is lacking a bit in libraries and when you need to drop down to imperative features you may find it a bit rough. For example not having a return keyword can make it annoying to port over libraries.
Overall I like it because I think the pros outweigh the cons, but I've also been using it for a decade so I'm probably getting set in my ways now. I'd say it's worth trying at least to understand Sum types (and maybe GADTs), and use a language with first class modules, it can change your approach to problems once you see some extra tools.
There's some existing work in this area you might find interesting as well:
https://twitter.com/dm_0ney/status/1414742742530498566
https://hazel.org/build/dev/ (expand the left side pane by clicking the (?) to see the valid operations)
https://docs.darklang.com/structured-editing
Emacs has some structural editing plugins like ParEdit
Many graph/node based editors like Blender shaders (3D), Reaktor (music)
https://www.unisonweb.org/ (this has some of the function versioning ideas)
Smalltalk
There's many many more, these are just some I remembered off the top of my head.
X11_EGL
DMABUF
and should say something like "available by default"/enabled or similar wording. Otherwise it'll either say unsupported/disabled or will be missing.
I've always thought this was normal. I've asked a couple other people and they've said they see it too, :shrug: