Better HN
topnewbestaskshowjobs
Log inSign up

algorithmsRcool

1,521 karma · joined May 25, 2012 (14y ago) · 286 submissions

https://github.com/AlgorithmsAreCool
Submissions

comment 1y ago · link · parent

> It's more design and more thinking upfront, which is something the development community has moved away from in the past ~20 years with the rise of agile development and open source.

I agree, but even smaller than thinking in agile is just a tight iteration loop when i'm exploring a design. My ADHD makes upfront design a challenge for me and I am personally much more effective starting with a sketch of what needs to be done and then iterating on it until I get a good result.

The loop of prompt->study->prompt->study... is disruptive to my inner loop for several reasons, but a big one is that the machine doesn't "think" like i do. So the solutions it scaffolds commonly make me say "huh?" and i have to change my thought process to interpet them and then study them for mistakes. My intution and iteration is, for the time being, more effective than this machine assited loop for the really "interesting" code i have to write.

But i will say that AI has been a big time saver for more mundane tasks, especially when I can say "use this example and apply it to the rest of this code/abstraction".

comment 1y ago · link · parent

It looks like Coyote[0], which is used in azure, was an evolution of P# which was an evolution of P

[0]https://www.microsoft.com/en-us/research/wp-content/uploads/...

comment 1y ago · link · parent

Microsoft has a flavor of this for .NET called Coyote[0]

[0] https://microsoft.github.io/coyote/#overview/how/

comment 1y ago · link · parent

Acutally it can be a lot more if you are talking about pause latency, I've seen >200x improvements on max pause time on some syntethic benchmarks

35.

A week with Satori, the experimental low-latency GC for .NET(blog.applied-algorithms.tech ↗)

4 points · by algorithmsRcool · 1y ago · discuss

comment 1y ago · link · parent

Definetly interested to hear your results. The synthetics suggest that it is just winning in everything except raw allocation performance, but unless you're allocating millions of objects per second then that shouldn't matter.

37.

A sub-millisecond GC for .NET?(blog.applied-algorithms.tech ↗)

29 points · by algorithmsRcool · 1y ago · 4 comments

comment 1y ago · link · parent

This is a github discussion about an experimental Garbage Collector for .NET that dramatically reduces pause durations, total pause time without significantly damaging throughput

The new GC is introduced in this comment:

https://github.com/dotnet/runtime/issues/96213#issuecomment-...

39.

Pauseless Garbage Collector(github.com ↗)

6 points · by algorithmsRcool · 1y ago · 2 comments

comment 1y ago · link · parent

I recall reading that our ability to measure time accurately exceeds that of any other quantity. According to the NIST, the newest Optical Lattice clocks would drift by less than 1 second if they were started 13 billion years ago at the big bang. What else can we measure down past 1 part per 10e18?

comment 1y ago · link · parent

The Naval Observatory in Washington DC has quite a few also

comment 1y ago · link · parent

Well, I could just enrich the trace/event with sample data from CPU, RAM, Disk I/O, etc...

comment 1y ago · link · parent

> Most sysadmins at this point would just configure a new filtered metric and start collecting data… for a month. While the system is broken. Wrong needle? Start looking through the haystack again with another new custom metric for another month.

In this example i feel like it is treating metrics as the only telemetry signal that operators have access to. Once the metrics indicate an issue, we can pull existing logs, traces and profiles to dig into it and eventually capture dumps.

I'm totally onboard with the idea of rich trace metadata, but it seems more evolutionary than revolutionary

comment 1y ago · link · parent

If I understand correctly the "big idea" here is:

1. Juice up your Traces with every attribute possible 2. Use a telemetry backend that relies on cheap object storage so that your costs don't explode. 3. ...profit?

Ok, but now we are exporting and storing everything about every request just so we can derive some previously cheap metrics like server CPU consumption? I guess for most applications the overhead of buffering, formatting and sending all of this telemetry data doesn't matter for folks?

45.

Getting started with Dafny: Your first formal proof(blog.applied-algorithms.tech ↗)

3 points · by algorithmsRcool · 1y ago · discuss

46.

So what is Model Based Testing anyway?(blog.applied-algorithms.tech ↗)

1 points · by algorithmsRcool · 1y ago · discuss

47.

So what is Model Based Testing anyway?(blog.applied-algorithms.tech ↗)

2 points · by algorithmsRcool · 1y ago · discuss

comment 1y ago · link · parent

I am actually shocked that Anders chose Go over C# for this port.

comment 1y ago · link · parent

I didn't realize that the GC copied the surviving objects to a separate location. Come to think of it, i don't actually know how the GC keeps track of what object lies in what generation.

comment 1y ago · link · parent

Yes, but now you are going through another translation (aka V8) layer in order to get down to x86 or ARM. You just have to hope that the optimizer of this translation layer is at least as smart as what you had before.

comment 1y ago · link · parent

I just don't see it. WASM requires throwing away all the decades of x86/ARM compiler work in ecosystems like Java, .NET and C++ and placing all trust in the WASM runtime/V8 to perform as well as them.

comment 1y ago · link · parent

Just going to plug the excellent .NET PBT library, CsCheck [0]. I have used it quite a bit to excersize strange corners of my program logic and found several exotic bugs with it.

[0]: https://github.com/AnthonyLloyd/CsCheck

comment 1y ago · link · parent

I'm happy at the prospect of more accurate readings. But honestly, the Libre 3 is already simply excellent and I would personally prefer the back of the arm location to more wrist based tech. I wear a traditional (Citizen) mechanical watch, because I hated needing to charge a smartwatch.

I had some issues with the Libre 2 sensor getting knocked off or loosening after a few days in the shower. But the libre 3 is smaller than a US quarter coin and lasts 15 days and doesn't snag on anything. Will this watch exceed that? Because if not, then I'm not looking to switch.

Lastly for diabetics or pre-diabetics that are only using finger sticks, I CANNOT stress enough how important a CGM is to your health. You learn so much about how your body actually works with certian foods rather than low frequency (but somewhat more accurate) finger sticks and that information dropped my A1C like a rock in just a few months. Tell your older relatives also. These are life saving devices.

comment 1y ago · link · parent

I go a little back and forth on this with my experience in F#, which relies heavily on inferred types. You can write a lot of F# before you need to add type annotations, but eventually, things become a spiderweb. The key issue is when you make a 'small' change to some method/value, the changes ripple through the program creating confusing errors sometimes where the compiler is trying to knit things together.

After a while, I found myself adding back types in a decent number of places to "anchor" the type inference, indicating that a certain type/signature is fixed and a change should be carefully considered.

I still don't know how folks deal with these kinds of changes in weakly typed languages without always allowing bugs to pour into their code over time. But I do love the "move fast" and low boiler-plate aspects of "typeless" coding.

comment 2y ago · link · parent

This article undermines itself a bit by introducing an optimistic concurrency primitive that it calls "fence tokens", aka content hashes, data versions or etags which are all the same concept.

Distributed locking, like all pessimistic concurrency, has a place but it comes with serious scaling concerns depending on how granular the scope of the locks are. Lock lived locks suffer from blocking other writers from large chunks of time, destroying latency. Very fine-grained locks eventually become dominated by networking overhead since the lock requires two to three trips to the database for each logical write/update.

Conversely, optimistic concurrency under high contention can lead to excessive waste from clients needing to retry operations because of conflicts.

The only way to win is reduce the scope of your writes/updates to avoid the contention as much as possible.

comment 2y ago · link · parent

Another related effect of this is Protocol Ossification [0] which happens when implementers of a public API/Protocol surface area take implicit dependencies on common but not standardized behaviors of the API/Protocol implementation.

That being said, you can take proactive steps to defeat this. For example, the default Hash for strings in .NET is randomly seeded each time a process starts[1] in order to strongly dissuade folks from taking an implicit dependency on the underlying algorithm which is not guaranteed to be stable

[0] : https://en.wikipedia.org/wiki/Protocol_ossification

[1] : https://andrewlock.net/why-is-string-gethashcode-different-e...

57.

What's New in C# 13(learn.microsoft.com ↗)

7 points · by algorithmsRcool · 2y ago · discuss

comment 2y ago · link · parent

The F# team has done a great job of building compatibility bridges back to the C# way of doing things so the actual impact isn't bad.

comment 2y ago · link · parent

F# has chosen this approach of implementing compatibility with newer C# features such as support for ValueTuple<T> and Span<T>. It has been pretty successful at keeping F# inside the compatibility story.

---EDIT---

Mean to post this under the GP

comment 2y ago · link · parent

F# is full supported on Windows, MacOS and Linux via CoreCLR and several more platforms via Mono, just like C# is
12345
10