Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
mratsim
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
20 ms
·
211.
▲
by
mratsim
6y ago
Does the borrow checker interfere with memory and object pools implementation? Because if you require heap allocation for many short-lived objects, I expect this would be one of Java strengths unless you use an object pool.
212.
▲
by
mratsim
6y ago
I don't think I've implied that allocation in Rust was implicit but that's a fair point.
213.
▲
by
mratsim
6y ago
The structured parallelism movement predates structured concurrency by years and needs a similar push. It's from 2004 with the X10 parallel language and then Habanero in Java via their "async-finish" construct I wonder if you
214.
▲
by
mratsim
6y ago
There is a reason why people are moving away from shared memory parallelism. It's not fun to deal with NUMA domains efficiently. For hardware engineers, it's not fun implementing cache coherency protocol efficiently. There is a re
215.
▲
by
mratsim
6y ago
It requires allocation if the coroutine outlives the scope that created it. Otherwise compiler are free to implement heap allocation elision (which is done in Clang). Now compared to Rust, assuming you have a series of coroutines to process
216.
▲
by
mratsim
6y ago
In reinforcement learning which is used for things like AlphaGo, there is a similar duality called "exploration vs exploitation": - do you keep searching in breadth for new avenues - or is it time to dive in depth in what you foun
217.
▲
by
mratsim
6y ago
I have compiled my research in formal verification tools and papers here, there are a couple dozens: - https://github.com/mratsim/weave/issues/18
218.
▲
by
mratsim
6y ago
Weave is my multithreading library. It's just a recap of what I went through for future reference. I unfortunately didn't have time to go through: - compiling glibc from source - converting my code to C - trying to reduce multithr
219.
▲
by
mratsim
6y ago
I have successfully used TLA+ to clear my 2-phase "put a thread to sleep" protocol from deadlock and livelocks. I also proved that one of the nasty deadlock bugs I was fighting on Linux (but not on Windows or Mac) was actually gli
220.
▲
Multithreading flavors: Choosing the right scheduler for the right job
(nim-lang.org)
6 points
by
mratsim
6y ago
|
1 comments
221.
▲
by
mratsim
6y ago
I love this framework and I have been using before the website redesign when it didn't have a dedicated subdomain. I have convinced my colleagues at work to use it as well: https://nimbus.guide/
222.
▲
by
mratsim
6y ago
I think you are confusing a standard library with a runtime. A runtime is something you need to start before being able to use a language (typically a garbage collector, an event loop, a threadpool or a VM)
223.
▲
by
mratsim
6y ago
Both Rust and Go used to have green threads i.e. stackful coroutines / fibers that installed their own execution stack and switched to it. However everyone who ever did green threads ended up having a lot of difficulties with stack opt
224.
▲
by
mratsim
6y ago
Concurrent code is hard to reason about in general: async or threading included.
225.
▲
by
mratsim
6y ago
If the borrow checker has no representation of a memory model, for example relaxed/acquire/release, you can't write a concurrent queue without triple checking for statement ordering, resulting barriers and then formally verif
226.
▲
by
mratsim
6y ago
For a lexer/parser you should use a coroutine / suspendable function abstraction. Or a parser generator.
227.
▲
by
mratsim
6y ago
This is just a generic statement. Even in a container with no cookies it gives that statement.
228.
▲
by
mratsim
6y ago
Interesting to see more CPS in the wild. Nim may have first-class continuations in the not too far future as well https://github.com/nim-lang/RFCs/issues/295 I'm still evaluating and comparing CPS vs cor
229.
▲
by
mratsim
6y ago
CPS for functional language is the equivalent of SSA for imperative language, an excellent Intermediate Representation to apply optimization on.
230.
▲
by
mratsim
6y ago
State machines can be metaprogrammed: https://github.com/mratsim/Synthesis You describe the events, transitions and even interrupts and this compiles to optimized goto statements with no allocation, no indirect functio
231.
▲
by
mratsim
6y ago
overpromising and underdelivering != con artist, though I do understand where you're coming from as the very initial (postponed) release and asking for donation gave a scam feel.
232.
▲
by
mratsim
6y ago
> an engineer is someone working on something they know everything about. That seems completely contrary to my engineering training. The engineer motto is about "be prepared for the unexpected" i.e. escape hatches, manual overr
233.
▲
by
mratsim
6y ago
Nim has merged first class view types and their lifetime tracking: - https://github.com/nim-lang/RFCs/issues/178 - https://nim-lang.org/docs/manual_experimental.html#view-type...
234.
▲
by
mratsim
6y ago
The rules are anything but clear. Some countries require at least 6 months + 1 day to be considered a resident, others might have you have a resident even if you aren't there if "the country is the center of your family or economi
235.
▲
by
mratsim
6y ago
The highest profile project that has been using the K framework for formal specification and formal verification is likely Ethereum: - The K EVM, the execution environment of Ethereum Smart Contract: https://github.com/kfram
236.
▲
by
mratsim
6y ago
Having your account hacked is a disastrous consequence though. And it's likely that the need of performance is not on the CPU side of things but on the GPU so ReleaseSafe should be good enough.
237.
▲
by
mratsim
6y ago
And the ``{.acyclic.}`` hint applies to the later. In the future we might have formal verification helping as well: https://nim-lang.org/docs/drnim.html
238.
▲
by
mratsim
6y ago
Swift leaves it in the hand of programmers and says "use weak references". Otherwise traditional GC use a copying mechanism, what doesn't end up copied is dead. The old reference counting GC in Nim had that extra copying pass
239.
▲
ORC – Nim's new memory managment
(nim-lang.org)
240 points
by
mratsim
6y ago
|
34 comments
240.
▲
by
mratsim
6y ago
The VM for smart contract is not set. The roadmap has changed for the phases after this launch so that Eth1 contracts and the Eth1 chain can run on Eth2 so that the past years of Eth1 development are not thrown away. Reading on the roadmap:
More ›