Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
mratsim
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
32 ms
·
331.
▲
by
mratsim
6y ago
Benchmarking strings is often benchmarking memory allocation speed or the GC. If you manipulate strings day in day out in your workflow, the first thing you do is remove all those allocations and for what is left you use a memory pool. The
332.
▲
by
mratsim
6y ago
Well if you misuse atomics you have a data race and undefined behaviors.
333.
▲
by
mratsim
6y ago
Free software doesn't mean that software engineer time is free (which I know you are aware of but readers may not).
334.
▲
by
mratsim
6y ago
> How come it does not get as much attention as Rust when it comes to safety? Community building. That said, Nim is very much inspired by Ada for the future safety features, in particular Z3 integration to enable Spark-like use-cases -
335.
▲
by
mratsim
6y ago
I didn't, however you can read my writeup and investigation attempts here: - https://github.com/mratsim/weave/issues/56 And the fix was directly using Linux futexes: - https://github.com/
336.
▲
by
mratsim
6y ago
It has trends for the past 40 years > It is well known that the poles warm faster as a result of climate change. For example, the average increase in temperature on Earth over the past 40 years is 1.44°F. In comparison, the Arctic has wa
337.
▲
by
mratsim
6y ago
Half a decade? In France Medical Doctors require 6 years of externship, 4 years of internship + various amount of years depending on the specialization up to 5 (?) for example for neurology. It's also the population that lead to the mo
338.
▲
by
mratsim
6y ago
I'm surprised they don't even get the show business right, I thought many publications were owned or actually in the show business and so they would have many subject matter experts available.
339.
▲
by
mratsim
6y ago
Thanks for the kind words, I think that crown is for MKL-DNN / OneDNN though, for now ;), and in the deep learning domain. I also expect Halide[1], Taichi[2], DaCe[3] and Tiramisu[4] to be able to more easily reach those levels of perf
340.
▲
by
mratsim
6y ago
How does Rust prove that you are correctly using relaxed, acquire and release atomics?
341.
▲
by
mratsim
6y ago
Yes I'm in the middle of many Microsoft papers[1] to add model checking to Nim, in particular CHESS.[2] [1]: https://github.com/mratsim/weave/issues/18 [2]: Finding and Reproducing Heisenbugs in Concurre
342.
▲
by
mratsim
6y ago
I'm pretty sure the OP meant that concurrency introduces many subtle bugs that are not related to memory safety and so cannot be prevented by the Rust compiler hence fearless is a bold claim.
343.
▲
by
mratsim
6y ago
This has implications way beyond torrenting. This solves the incentivization of bandwidth in a decentralized way. If we now solve the closely related incentivization of long-term encrypted storage, we would be able to build a sustainable de
344.
▲
by
mratsim
6y ago
Everyone dealing with actors, multithreading, distributed systems should read about Vector Clocks: - https://en.wikipedia.org/wiki/Vector_clock - Detecting Causal Relationships in Distributed Computations:In Search of
345.
▲
by
mratsim
6y ago
I was actually arguing that the Rust community should definitely look into formal methods, in particular TLA+ and Ada/Sparks. The borrow-checher/free-of-data-races/fearless-concurrency taglines are only focused on memory bugs
346.
▲
by
mratsim
6y ago
Wow, that looks like a killer feature for .Net I will definitely steal some ideas from Coyote to drive Nim formally verification story of concurrent code forward. On the Rust side, i feel like Loom has a lot of potential https://
347.
▲
by
mratsim
6y ago
It does not though? How does Rust proves that your implementation of a Peterson's lock algorithm[1] or Lamport's Bakery algorithm[2] is: - Deadlock-free - Live-lock free - Free of data races Second, how does Rust proves that you a
348.
▲
by
mratsim
6y ago
I've written a multithreading runtime from the ground up in Nim.[1] And yes, writing that taught me that current programming languages are not sufficiently equipped to deal with concurrency bugs, including Rust. The bugs that I had whe
349.
▲
by
mratsim
6y ago
I did mention TLA+ (first link) or what were you referring to?
350.
▲
by
mratsim
6y ago
This is not what thread safety means: > Thread safety is a computer programming concept applicable to multi-threaded code. Thread-safe code only manipulates shared data structures in a manner that ensures that all threads behave properly
351.
▲
by
mratsim
6y ago
That's my main grip with Rust "Fearless Concurrency", fearing concurrency and dipping into it with your toes is a good thing. Claiming "Fearless Concurrency" but ignoring synchronization bugs, at a low-level in conc
352.
▲
by
mratsim
6y ago
And that's where model checking / formal verification is a tremendous help (or would be if it was easier to use). There are many properties of multithreaded/distributed systems that are emergent and that current static compil
353.
▲
by
mratsim
6y ago
OCaml, with D, are probably the languages that feel the most similar to Nim. Regarding Haskell, you can do category theory[1] if you want or do integer operations within the type system like dependently typed languages[2], including BigInt
354.
▲
by
mratsim
6y ago
1: DrNim is basically additional annotations that are ignored, and you can choose to opt-in via a flag. It's something you similar to MyPy for python and type annotations. The danger is if it becomes non-optional. That said contrary to
355.
▲
by
mratsim
6y ago
Hey, I've been following up on Legion and Regent quite a bit, excellent work there. Do you have a set of benchmarks that others can reimplement to compare the approaches? I've added Dataflow Parallelism to my own multithreading ru
356.
▲
by
mratsim
6y ago
`non-nil` was deemed too breaking to introduce for 1.0 or even as a default because if you tagged your input as `T not nil` the compiler was not powerful enough to prove that T was indeed not nil except in the most obvious cases. The new ba
357.
▲
by
mratsim
6y ago
As the resident Nim optimizer, if you can reach some performance in C, you can reach it in Nim. With some work you can even reach the performance of code which is 95% assembly and has been tuned for years (i.e. matrix multiplication): - Rea
358.
▲
by
mratsim
6y ago
You have multiple ways to print the macros either as AST tree or even Nim code that can be copy-pasted to replace the macro: - dumpTree - lisprRepr - treeRepr - toStrLit This means that for debugging you can generate your code. Replace the
359.
▲
by
mratsim
6y ago
Coincidentally just when "Why Figma Wins" is #1 on HN, the NimConf (#2) is currently about Figma integration in Nim via Fidget: - https://github.com/treeform/fidget - https://www.youtube.com/w
360.
▲
by
mratsim
6y ago
And just when "Why Figma Wins" is #1 on HN, we have Figma integration in Nim via Fidget: - https://github.com/treeform/fidget - https://www.youtube.com/watch?v=IB8Yt2dqZbo&list=PLxLdEZg8DR
More ›