skysight-inc/HackerNews huggingface dataset:
Design patterns are intended to be a description of patterns found in the wild — that is, it’s descriptive, not prescriptive.

Once distilled to their essence, and documented, and named, it becomes possible to efficiently talk about it and reference it.

They are natural things, to be found in wild codebases, that are documented and named here. That they get used and abused, or people come up with terrible names (ClassFactoryFactory) is more a lack of taste than anything — but knowing that such patterns exist and their utility is a requirement of any tradesman seeking to move above novice. The name isn’t as much needed, but it makes it trivial to google.

But again, these are patterns found in the wild — it intends to document problems & solutions that programmers have encountered, and it’s a pattern because it comes up often enough — which implies that you will likely encounter similar problems and (perhaps discovered on your own) implement similar solutions.
Had to look up Quantitative phase-contrast microscopy:

> Conventional phase contrast microscopy and related methods, such as differential interference contrast microscopy, visualize phase shifts by transforming phase shift gradients into intensity variations.

https://en.m.wikipedia.org/wiki/Quantitative_phase-contrast_...
Taking a second look at this particular example, I guess it is a bit of a "trick" because of the ahead-declaration of both possible "holder" variables on the stack. It's just... wildly unintuitive that this should be possible. Even if you showed me this code without saying whether or not it should compile, I wouldn't be sure.

Here's the train of intuition:

1) dyn requires a pointer that may be to one of multiple types of structs

2) a group of multiple types of structs has an undefined memory layout, so the value must either live on the heap or be wrapped up in an enum

That feels like an airtight understanding. But then Rust lets you do this weird juggling maneuver based on control-flow that allows you to do it on the stack.

I'm not saying Rust shouldn't let you do this, and I'm not really sure how it could be made intuitive given the "normal" case. I'm just expressing that subjectively, this feels very weird and non-obvious, and it's far from the first example like this that I've encountered. Here's another example: https://news.ycombinator.com/item?id=25595120
That's the principle behind Gray Code counting: https://en.wikipedia.org/wiki/Gray_code
Reviving Old X Code
Anytime its something ridiculous like this, I assume its for compliance. A few industries require all info to be retained for 7 years.
What is the status of ECC on Macs?
> so it's not a type safe language if they use anonymous struct everywhere

It's compile-time checked. The example shows a compile time error when the struct fields are not completed by the anonymous struct
The only time I need to restart is when I load new libraries but you can use https://github.com/clj-commons/pomegranate
I'd be happy skipping the free part for something that preserves my privacy. Off the list GP posted, the first name -- ActivityWatch -- seems to hit the mark? open source, privacy-first, cross-platform according to the homepage[0]. Never even heard of it until now, but I might give it a try :)

[0] https://activitywatch.net/
This was the Apple Silicon optimised Chrome. I tried Firefox on my desktop (9900k) and it have awful results, like 1fps. Downloaded chrome specially for this, and haven’t yet tried on Safari. I’ll do so now.

EDIT: 23-24FPS under Safari on M1.
Okay, here is an example. Let's say you're writing a web app, and you want to stick with the JVM. Pull up with Web App Framework Benchmarks, narrow it down to Java, Kotlin, Scala, and Clojure. Let me know when you have stopped scrolling, cause it takes a while before you see the first Clojure framework.

Unfortunately, web apps are probably the thing that Clojure does best, and Clojure is already plenty slow there. Try it out for something typically throughput intensive (like mathematical programming or machine learning), or short lived (like CLI apps), and you'll give up almost immediately.
Coke is a fairly strong acid, and somewhat notorious for its cleaning properties viz: https://www.airtasker.com/blog/15-ways-clean-coca-cola/
> I feel about them the way I do about switch statements - they're brittle and inextensible.

What is meant by this statement is that pattern matching violates the open/closed principal. If you add a new type to switch on, you need to update all the pattern matching code in the whole application to account for the new type.

It’s one of the two sides of the “expression problem”[0] (the other being object oriented polymorphism).

Clojure’s approach to this is to use “multi methods” which is sort of a “pattern matching”/“strategy pattern”. You are free to add in a new implementation of the multi method without having to update existing code

Here is a great post that talks about Clojure’s approach to polymorphism and covers multi methods in detail:
https://aphyr.com/posts/352-clojure-from-the-ground-up-polym...

[0] http://wiki.c2.com/?ExpressionProblem
Hmm, yes I see. TBs? Interesting. I'd like to hear a talk about these things.

Naively I would expect that (as is the case for my MUCH smaller scale system) that I can compensate for network/disk-bound and non-multithreaded stages by merely running two concurrent frames.

On a larger scale I would expect to be able to estimate RAM-cheap frames, and always have one of them running per machine, but at SCHED_IDLE priority, so that they only get CPU when the "main" frame is blocked on disk or network, or a non-parallelizable stage. By starving one frame of CPU, it's much more likely that it'll need CPU the short intervals when it's allowed to get it.
I wonder how much of those crashes are due to gamers aggressively overclocking their systems?
> I think it achieves a way more significant benefit by only writing the document itself. Writing shapes thoughts.

I feel this way about tests. The ones I write probably haven't caught bugs in CI. But often, writing a test clues me in to the fact that an interface is hopelessly borked. That usually leads to a reimplementation that removes a class of bugs.
We need to talk about how difficult it is to monetize browser extensions. Most of these problems occur when a reputable extension gets sold to a less reputable owner, frequently for a relatively small amount of money (4-5 figures). Even very popular extensions have a hard time monetizing. Unfortunately, Chrome has recently made the situation worse by deprecating Chrome Web Store payments, and Firefox eliminated their paid extension store several years ago.

If the only way to monetize an extension is to exploit its users for data, this kind of thing is going to keep happening. It's perfectly understandable how someone who is doing a lot of work for no pay will eventually get tired of it or have other priorities in life, which is what happened in this case. Perhaps we all need to stop taking it for granted that browser extensions ought to be free? Or maybe the browser vendors themselves can find ways of financially supporting extension authors. I feel that money is essential to both the problem and the solution.

Of course, paid upfront software gets sold to new owners too. But if the software is paid upfront, the expectation is that the new owner will perhaps do a better job of maintaining and marketing the software, and that's why the new owner buys it. When the software is paid, the new owner has an opportunity to make money legitimately, without secretly exploiting the existing user base.
I use emacs but tend to just find another way to do things (e.g. grep, & other shell things) when I run into a stumbling block like this; believe it or not, not everyone wants to start debugging their text editor when they run into trouble.

Admittedly I wish I would spend a bit of time in emacs internals sometimes just so I could learn to approach similar issues, but it's just never much of a priority when I'm trying to work on what I'm actually working on. I rarely get distracted by trying to optimize my config, as a result I use almost the vanilla defaults and I'm mostly happy with that. TRAMP is pretty great, I wish it would not make a new connection for every network interaction though. Setting ControlMaster on ssh helps a bit but it's still not as fast/transparent as I'd like. There are far too many "blocking" operations in emacs, as much as I love working in it, there is the non-zero times that it locks up on me and it drives me crazy when that happens.

If it was ever the case that I had to wait 30 seconds to open a file, I'm sure I would abandon emacs instead of trying to debug it. That said I can't imagine working on a 70,000-file repo. That sounds like a terrible idea.
More like a strike against other languages for not having the same editing tools.
Thanks! Although I don't agree with all of the points, it was a good read.
Has anyone seen a big - multi year system done in FP? Lots of people love FP, it seems great for your own side project, but I'm not convinced it works in those typical big corporate systems where devs turn over every few years as the code base grows.
> If they wanted to make it easy to get all the results

Speaking from experience...we want to make it easy but also want to keep it performant. Getting the data all in one go is generally not performant and is easy to abuse as an API consumer. For example, always asking for all of the data rather than maintaining a cursor and secondary index (which is so much more performant for everyone involved).
I recently came across https://nano.org again.

It doesn't make sense how Nano is not popular over Bitcoin considering the properties that Nano has over Bitcoin.

https://www.reddit.com/r/nanocurrency/comments/kpbsin/what_a...
I wonder how long it will be before they start using quantum mechanically squeezed states (that trade off position and momentum uncertainty to "beat" the uncertainty principle) like at LIGO to do microscopy.
You don't get sign off (approval) from peers but comments from them. It's important the RFC is public and anyone can comment on it.

If after a period of time there are no objections expressed in the doc (people are busy etc) then that means the objections were not that important and we can move forward.
Reddit removed it, try here:

https://www.removeddit.com/r/math/comments/kpjf8h/summing_nu...
Well shit.

I run some large ML models in my home PC and I get NaN's and some out of range floats every month or so. I have spent hours debugging but doing the same computation with the same random seeds does not recreate the problem.

How about GPU's and their GDDR SDRAM? Do they have parity bits?
Thank you for the post.

I did something similar -- I logged the activities on the world's largest supercomputer (that I have access to) every hour throughout the year 2020.

I logged information such as:

-- Who is logged in (the output of w command)

-- What processes are running and the overall system load (top and ps aux)

-- What is the state of memory and disk

-- What is the state of job scheduler

I have the data now and very excited about processing it in the coming weeks. I plan to anonymize and publish the data and the process I employed to collect it.
this reminds me of the struggle with logging my billable hours as a consultant.. Ugh.. But HATS OFF. This data is interesting and beautifully presented!
> For the average user, what’s the impact of bit flips in memory in practical terms?

The most likely impact (other than nothing, if bits are flipped in unused memory) is program crashes or system lock-ups for no apparent reason.
But OP does care about others. If you own a domain it's a non-obvious vulnerability.

Thanks OP!
I didn’t realize that bull fighting happened in Italy, I thought it was an unfortunate Spanish thing
What's more or less understandable is a bit subjective. There are some things that are obviously less complex than others. Some things that are obviously more complex than others. And then a lot of gray area.

In my experience there is at least a faction of developers, myself among them that have a disdain for "design patterns thinking." Which I would describe as: spending a lot of focus learning various design patterns, then while coding actively looking for places where those patterns could be put to use.

In my opinion this is an anti-pattern similar to overuse of abstraction in simple cases before an abstraction adds to the understanding of the code itself, rather than makes the code more complex.

I've seen lists of common design patterns dozens of times, and occasionally recognize several of them as useful examples of things I've actually done in the past or my colleagues have done in the past. But it seems to me "learning design patterns" as an end is encouraging the destructive side of design patterns where you learn something and eagerly look for a use for it.
When I was first getting into programming and computer science as a student, I was so into these kinds of super-customizable rabbit holes. My whole life pretty much centered around the keyboard and terminal. I was all in on knowing everything about the entire stack and making it do whatever it was I wanted. I'd spend hours to save a few keystrokes. That wasn't so much about the productivity trade-off as it was about an almost ideological drive I had to make the machine do exactly whatever it was I wanted. Nothing commercial off the shelf, only things I could customize down to the source code.

A couple decades later, I just find it all so exhausting.
> this drive to amass data will only lead to human suffering and oppression down the line

On a large scale, science (and economics) is a drive to amass data, which has led to vast reductions in human suffering.

Amassing data lets one (and mankind) make decisions not on random conjecture or feeling, but on a solid footing, which results in better decisions on how to allocate resources. Not gathering data where it's possible to do so results in more human suffering from making sub-optimal decisions from bad inputs.
Whoaa, amazing, I've been doing the same during the last 5 years, but I use an easier setup, I use an app, so I just have to click on buttons at the end of each activity.

> Stay tuned to learn how do different activities influence my mood

I only started doing that this year, and I'm pissed off I didn't start doing it earlier, as that's where you can start doing correlation on your life and your activities.

If some people are interested I have described how I track my life here : https://blog.luap.info/how-i-track-my-life.html
More crazy and wild speculation
Would this mean a new remote? I've already got two (TV and STB), I'd prefer to have only one.
Regarding your edit, since the rule is to assume good faith on HN, I'll try my best:

- the Colosseum is a remarkable building for its time, only a handful of large buildings of that age are still standing

- even by modern standards, the remaining architecture is striking IMO

- objectively, 7 million people per year visit the Colosseum, making it one of the most popular sites in the world. So even if you don't think it's special on at least some metrics, you're wrong by definition.
Tooling, ecosystem, and Java are what killed clojure for me. I love the language and the way Rich Hickey approaches it, but I was constantly frustrated with the lack of an IDE and having to stop to deal with Java and Java tooling errors all the time.

In the end I felt like Clojure was too clever for its own good. By relying on Java (which was a great choice) it took a lot of the oxygen out of the ecosystem for other devs to build tooling and libraries, and without that there aren't as many people participating or becoming a well known community member from their work there. Again, can't say this was the wrong choice, but in my opinion ecosystem is the #1 thing for a language and the way Clojure was done had an impact on how the ecosystem could grow.
Back when my daily driver was a Core 2 laptop, someone told me that capping the clock frequency would make it unusable.

As a petty "Take that", I dropped the max frequency from 2.0 GHz to 1.0 GHz. I ran a couple benchmarks to prove the cap was working, and then just kept it at 1.0 for a few months, to prove my point.

It made a bigger difference on my ARM SBC, where I tried capping the 1,000 MHz chip to 200 or 400 MHz. That chip was already CPU-bound for many tasks and could barely even run Firefox. Amdahl's Law kicked in - Halving the frequency made _everything_ twice as slow, because almost everything was waiting on the CPU.
Why would they ban trousers?
Squatters threaten archaeologist who discovered oldest city in the Americas
This is a brilliant distinction, that design pattern are meant to be descriptive rather than prescriptive. Because the problems I tend to see in the wild are when developers treat design patterns as prescriptive.
I think he means Roman era amphitheatres in Spain.
The name is short for "gimp tool kit", yes
How exactly would a card that leaks crude oil be more effective? Leaking crude oil is terrible for the environment. Planting trees is good for it.
I have:
Asus PRIME A520M-K Motherboard
2x M391A2K43DB1-CVF (Samsung 16GiB ECC Unbuffered RAM)
AMD Ryzen 5 3600

I specifically was looking for bang for buck, low(er) wattage and ECC.
I have a dedicated box just for this kind of thing. When I'm offlining names I point them all to this one. It marks all pages as 410 (except for stuff I want to 300). It catches mail. Has a little script to help me verify necessary settings.

So, while winding down or pending removal it's basically a dead-end parking page.
Here in The Netherlands we collect styrofoam with the recycling, it is then turned into a high value insulation product used to help insulate our housing stock.
Lisa Su is a fantastic CEO. Time will tell what the impact of AMD’s acquisition of Xilinx will be (should it close), but this shows the strategy and execution behind Su and team.

While a lot of acquisitions don’t pan out, this seems great.
Does anyone know of a similar tool for windows?
It's important to compare it to a solution with similar capabilities, like VS Code + some LSP server and you will see that both memory and cpu consumption-wise it's almost the same weight class nowadays...
It could do all the processing locally, easily... what are you talking about?
>> the list of 20 claims is absurd.

Claims are a union - each individual claim may sound simple, what matters is the combination.

>> The title says it all "... PROGRAMMABLE INSTRUCTIONS IN COMPUTER SYSTEMS", they're trying to patent anything that can run or dispatch instructions.

No. The title of a patent is not a patent.
This may be fine, but do note that you're inserting an extra layer that you have to trust compared to inspecting the source that you know is on your local disk.

Should they choose to, nothing stops the site you've linked from masking malicious tidbits in code you request.
I've spent my whole life speaking multiple languages and this still trips me up every now and then, in fact quotes as such are a problem for me and I keep using them wrong, no idea why, it just won't register. So unless I slow down to 1/10th of my normal writing speed I will definitely make mistakes like that. Good we have proofreaders :)
Didn't really notice any major difference in quality... I was talking ease-of-use and richness of options.

What quality differences do you refer to?
I started tracking my time in 15-minute intervals a little under a month ago, and I've also been surprised by how little effort it is.

I've not gone for breaking by day up into 15 minute chunks, instead I've been timing myself as I do things, and noting down the duration rounded it to the nearest 15 minutes when I change tasks. I'm also not tracking everything, for example, showering. So I have a fair bit of missing time every day, which I'm aiming to get down to 2 hours or less a day.

I've already found myself using time more "productively" - preferring to do things which are tracked (like reading) over things which are not (like mindlessly browsing the internet).

There are a few key metrics I'm keeping an eye on:

- Average daily sleep deficit: `avg(8 - sleep hours)`

- Average daily work deficit: `avg(8 - work hours)` for work days

- Average daily missing time: `avg(24 - all hours)`

- Days since last day off work, not counting weekends

- Percentage of leisure hours: `avg(leisure hours / (all hours - sleep hours))`

I'm also watching how I spend my work days, for example, what proportion of my time is spent doing active work, or in meetings, or doing admin work.

I'll likely expand the things I'm specifically monitoring as I get more data.
The problem is that far fewer people will donate without something like this. If you want to use a traditional cash back credit card and donate the rewards directly to something, the existence of this card does not stop you from doing that. Some people find it easier to donate in this way, and I don't see what's wrong with that.
I really appreciate both Clojure and Haskell. I agree that

> nearly all of the claims made about Clojure here can be made about haskell

, but I'm not sure about `more strongly´.

## DX with Haskell (and ML friends) I miss in Clojure:

- Harder to do sound, up-front design with data types and module interface, where implementation becomes almost trivial after when the type signatures make sense

- Consistency checks from compiler / type checker

## DX with Clojure I miss in Elm/Haskell:

- REPL ergonomics, where every action I could think of makes sense as a REPL command, leading to very small incremental pieces.

- Excellent default data structures with literal representation and serialization (EDN)

I'd love to read a point-by-point discussion of the article sections comparing Haskell and Clojure, though that's much to ask for in the comments field.
"is also multiple times larger than Tesla"

Um, have you seen Tesla's valuations? Renault et al could be bought out just with Tesla stock swaps.

And you don't think Renault wants to cut loose that albatross?

"Then there's also the problem that Nissan is fundamentally a Japanese company."

Wouldn't the Japanese, at least at the government policy level, want tech exposure to cutting edge EV technology?
The best story of NES passwords is of course JUSTIN BAILEY, which just happens to function as a Metroid password with a valid checksum, starting you out with a suitless Samus sprite and a bunch of equipment.
I think there's a sweet spot somewhere. We're tending towards too much data now with hourly employees working from home but have their screens monitored for constant activity, even if it isn't value-producing.
Honestly, who cares about not knowing that something was possible if you never wanted it? `dyn` working on the stack is more consistent than it not working on the stack.

I'd say one way to a language more completely is to:

a) Read its stackoverflow pages (not sure about Rust but this helped a ton with C++)

b) Get code reviews from others. The rust community is fairly active, or at least it was back when there was just an IRC channel, I don't know as much now since I don't get onto whatever the medium is today. Ask people if there's an easier way to do something.

c) Read others code. I, for example, like to review some of my dependencies just so I understand a bit more about how they work, and I've picked up a lot from that. I used to get on IRC in the morning while I was kinda getting into my work-day and see if I couldn't help others out, this really taught me a lot.
my intuition is you can save cpu time when compressing before sending over the network (and certainly wall time).

a quick test copying a 24M file (with similiar compression ratios) to s3 showed a 6% decrease in cpu time when piping through gzip.
Finnish is stupendously hard. Far harder than Swedish, at least, by my estimation.