skysight-inc/HackerNews huggingface dataset:
I’ve been there a few times for sure. But searchability is hard to live without, and it’s hard to integrate links, code snippets, and images with dead tree based notes. A big part of this probably depends on what you’re taking notes about though.

It does seem like a problem that should have a solid, open source solution by now. Joplin is decent, but still lackin in a few areas.
I remember well the movement that impressed me the most. The elaborate changing of direction when running and then turning. It looked so natural, and it was the first time I'd seen that in a game.

Most platformers still violate conservation of momentum and let you change direction in mid air.
As, with everything, it should be applied wisely. In most cases, I think it is perfectly fine to have early exits on parameter checks at the start of the function/method. Otherwise you end up with deep nested if-then-else or complex conditional expressions. And yes, having multiple exits in complex functions, is a bad code smell. Often indicating that the function needs to be refactored, split is smaller functions. I also prefer to use early exits (also with break), if I can avoid the introduction of an Boolean variable. Returns, gotos, breaks, and continues are not in themselves bad. It is people who do not know how to use them wisely, are bad at software engineering.
Is that because you're not writing tests while you're adding code and just breaking old tests?
I've heard that point of view a lot, but it's definitely not me. In fact, if I had to pick one word to describe it, it'd probably be "liberating". I don't have to hold anything in my brain anymore, so when I'm relaxing, I can relax 100%. Don't have to worry about forgetting anything, because I know it's all in there. And when I'm ready to 'get something done', as it were, some things to do are right there. I love it. That said, it did take a while to get set up and used to.
Presumably, testing that the API of each unit produces the desired result without consideration for how it accomplishes that internally. If it relies on some other component internally but never exposes that in the public API, it’s reasonable to consider that component as part of the unit under test and not try to mock it out.
The author, Russ Cox, has a whole series of articles on the topic of regex - https://swtch.com/~rsc/regexp/

The rust Regex crate docs even refer to his posts as a reference since the rust version is based on his efficient RE2 Regex implementation at Google.
I wonder if this signals that Space/Balloon/Satellite Internet is too far away? Or maybe it's just worth doing this anyway because there's no risk of Kessler Syndrome under the sea.
I saw cases where there really was a waste of stupid unit tests, and no significant tests for the interaction of those units, so I can see where the author is coming from. But my conclusion, after many years of developing with different levels of testing, is that it's a good idea to:

* Have at least one unit test for each nontrivial unit, but no unit tests for the trivial ones. But, in these unit tests, use mocking and stubbing only when using real objects isn't feasible, or very inconvenient - isolation is nice to have, but generally overrated in my experience

* Create as many unit tests as necessary to feel confident about the edge cases for the most critical units

* Implement higher level tests covering the main use cases for the interaction of all the units
Related, I saw someone using their Apple Pencil with their writing hand hovering above the screen. They weren’t aware of palm rejection, thanks to crappy experiences from other devices and touch based stylus use.
return pos < this.length() ? Some(value) : Nope

See, mine is already way more simple than yours. This is my point, if you force yourself not to use jumps, you will end up with simpler and better programs. Also the second example you wrote is expressive and more importantly you can move that code. Also note that in many other programming language like lisp and haskell, you would never need the intermediate variable as you can basically write return if...
Ironically modern fortran is object orientated...
the original transcript is interesting imo
Well let that be a warning to everybody then.
HN knows what you read.
I m willing to bet these two employes where new when they made that decision. New to the company- and most likely new to the industry and the world of employment.

The trainees are always the ones who have these disgusting conversations with middle-management, where the manager specifys a goal or asks for something, that is clearly either illegal or creates great risks for the employee. In industrial automatization, its usually the request to temper with security settings, progams and sensors - "to make production more efficient". There is never a paper trail, there is always plausbile deniability, and if something happens, because another employe dances around some deactivated light-grid into a running maschine and gets squished by a robot, the guy who made the last change (when and what is usually chronicled by a hash over the security programs)is going out of a job, into prison for manslaughter. Even if he is found not guilty, he wont be touched by companys, while the investigation is hanging over him/her.

The industry which had the accident then promptly has a change of heart, vows that "never again will such a thing happen." Security is tightend, machines reinvestigated, and reprogrammed to remove all those procedures who where created to circumvent the sec-tax slowdown. After this, those in managment who survived the affair, are promoted, new fresh faces, replacing the old guard, asking why this or that cant be more efficent, and wether that new trainee could not temper with the program. The cycle of screw begins anew.

My recommendation is that a CEO has to wear a permanently active 360° sealed camera + mic on the shoulder. Middle Management has to do so while on duty. Make the burden of proof a burden of evidence.

Suddenly no more PLEASE.
If you don't use mocks then won't you just end up with integration tests?
They are buried only when close to shores or in other high risk areas. There is no point in burying a cable if the sea bed is 3 miles under the surface. There is still danger, from animals biting into the cable (sharks are known to do this). But the cables are wrapped in steel cables so not even a shark should be able to cut through.
How to Mourn a Space Robot (2017)
While this must be true for a sizeable part of the population, more and more people also don’t ever touch a desktop/laptop or only use the one at work.

Unsurprisingly, the latter case gets truer for low computer litteracy adults for who investing in a decent smartphone has a better ROI than buying a meh phone with a cheap laptop.

Anecdotally we bought our aging parents each an ipad two years ago.

They were decent but not that proficient at Windows, but got comfortable very fast at viewing/saving photos, printing, email/messaging and browsing on the ipad.

From there they gave up on their budget “my carrier gave it for free” phone to move to the iphone Xr and started doing all of the above on their phones most of the time. The laptop is now a third rank device they use to check their savings once a month.
If what you say is true, a mechanical transformation done by a simple soure-to-source compiler could improve code by turning early returns into nested if/then statements. The code would be longer and more nested, but (you claim) better.
You don’t need any of that if you use VS Code’s “remote development” extensions. It has a few issues with agent forwarding and suchlike, but is getting there.
The cause of my Getting Caught was all the pesky Finding Out
Hyper-V supports nested virtualization (only Hyper-V nested inside th Hyper-V, though), and seeing as VirtualBox supports a Hyper-V virtualization backend, the solution may be to just find and fix all the bugs in that backend code when under Hyper-V
I've never had the palm rejection work on my ipads, sadly, so I too have to use a stylus with my hand hovering, or else I get weird lines and mis-clicks on various UI elements.
Wrong, because once you would see the code with the if statements, you would discover bugs and that the logic is convoluted. You would refactor it into a much simpler program.
That is horrible. Fails both FF Reader Mode and Outline.org

w3m (via Termux) and unv.is both win:

https://unv.is/hexaquo.at/posts/2019/06/29/Freeing+my+phone+...
I wonder if Google have plans for Cape Town? It is the most tech savvy city on the continent
Never heard of him, just looked him up and it turns out he was on Joe Rogan last week.

https://www.youtube.com/watch?v=BEWz4SXfyCQ
What's interesting to me is that no matter how much bad news comes out about Boeing--and it hasn't stopped at all since the second 737 Max crash--stocks haven't really dropped much. They're still higher than they were a year ago.

Laymen have been led to think stock prices are linked to company performance. But witnessing this, I realize I have zero clue how the stock market works. I can't imagine anything Boeing could do that could actually cause their value to dip. I'm not sure if this is a flaw or a feature of the market.
Linux driver support is fantastic because it's not made by manufacturers.
Wow, cannot recommend this highly enough.I participated last year and will be participating again this year. The advice is to the point, brief while highly encouraging. No BS. At least this was my experience in our group.
On my college campus Subway was the only "outside" food option that used the campus meal plan. All the rest was different storefronts for the same undistinguished catering company. I ate a lot of Subway in those days.
So basically what this does is that instead of writing HTML I can now write everything in Javascript, i.e <buttton> becomes "new Button" and then I can write nested JavaScript code like I write nested elements in HTML.. is that it?
Except that is generally not governments doing it; it is private companies. It is pure profit motive. Despite the great cost, the cables are profitable.
So what they are saying there were no issues found in 13 dollar per hour engineers code. But the 40 dollars per hour engineers made the plane dive. Interesting. I would rather bet my money on the former.
It (like most every OS) used the BSD TCP/IP stack because it worked and didn’t have license encumberances. They switched to their own stack in Vista though.
Next thing we’ll learn is that the entertainment system is actually just a WordPress theme.
Plan to sell 50m meals made from electricity, water and air
https://news.ycombinator.com/item?id=20309052
How much is the value of code for MCAS or other airplane component? It is not like you can plug it in your Airbus and get more performance?

My opinion is that this could could be open sourced, similar for driving assist code, if the code is open and all companies contribute you get more safety at lower costs.
Why not both? As a party with inside knowledge you can profit in both directions easily.
But even following direct orders is not an excuse to break the law. The notion that people shouldn’t be held liable for breaking the law under even less pressure is insane.
Threads from 2018: https://news.ycombinator.com/item?id=16341519

2015: https://news.ycombinator.com/item?id=9374858

2009: https://news.ycombinator.com/item?id=820201

also 2009: https://news.ycombinator.com/item?id=466845
Like most software developers, graphics developers develop where the users are. That's why they predominantly use Windows. Some use macOS, primarily to develop iOS apps, which is, again, where the most valuable users are, particularly in North America.

Linux desktop market share, or lack thereof, has nothing to do with graphics tooling.
> If Venezuela's form of socialism was working so well, then it should have sustained itself no matter what the US did

Good domestic policy makes you impervious to interference by foreign powers with 40x your GDP?

I don’t get it, what’s the logic there?
As, with everything, it should be applied wisely.

Early returns is not a feature of the language. It's an artefact of assembly language. You have no reasons to use it in the first place.

In most cases, I think it is perfectly fine to have early exits on parameter checks at the start of the function/method.

I believe you'd be surprised what aberrations you'd find in your code and all the simplifications you could make if you would removed all the jumps.
In practice I personally tend to do the reverse. If I encounter a bug I create a unit test to replicate its circumstances and use it to ensure that the bug stays dead and gone.
And it certainly hasn’t been proven false
From what I've heard the change from the layer approach to the virtual linux was mostly related to file system performance. Does it have to be innovative if it offers better integration than VirtualBox? Or is it reasonable that they use well-known and working tech?

Also, while I think it is useful. I imagine much of the hype here is also from the weirdness of it all. Would you agree that it is noteworthy that Microsoft is publishing a Linux-kernel for Windows? It think it is.
I highly doubt that they would refuse to sell bandwidth if there is a market for it. It is a very valuable market.
I don't think it's in good taste to use a reserved word like "with" in the API either. And it feels like it's being used in places where a plain function call would suffice (you call a function "with" params).
Author Vernor Vinge describes a future "programmer–archaeologist" role in his books. The idea being that humans just keep building layer upon layer of abstractions and systems, and in the distant future there's value in exploring, understanding, and potentially modifying the older layers.
Looks like hiring enterprise architects payed out.
Why couldn’t someone just contract SpaceX to launch their own network?
It doesn't have to be a heroic act, just morally neutral.
For the same number of lines of test code, an integration test case traverses through much more source code than a unit test case. Not only that, but it also checks that the units are interacting properly and passing each other the right data and returning the right data. Good integration tests can also fee us from static typing because the integration tests implicitly check that the interface contracts between all the different units are met internally. It also verifies many other factors which affect the robustness of the software. For example, they can identify race conditions and prevent them in the future.
There is no evidence that having people voice their concerns to unconcerned idiots is in anyway productive. If anything, talking to deaf ears makes you feel like you have even less of a voice.
Where's the TodoMVC?
A comment more near the top will be seen more and therefore get more discussion, so if you want that, vote it up. If you want it to get less discussion, vote it down.
Spot on on quite a few counts. It is a way to regain developer mindshare, drive migration to Windows 10 (a major business target since many companies are still running Windows 7, which prevents adoption of modern enterprise features — even bits of Office services) and onboard more developers to Azure, since a substantial portion of online companies run Linux.

As a long-time Mac user working at Microsoft (with Azure), this is the perfect storm. I can do everything I need on WSL 1 (except some networking stuff, obviously) and WSL 2 is going to let me get rid of Docker Desktop’s virtualization for Linux containers.
We learned all about it in common core engineering classes in Canada, even as software engineers. Crazy that nobody to my knowledge has been able to replicate what the pilot did.
There would be no englightment happening.
Of course trivial toy examples demand simple answers. But as you add more processing (partitioning + further operations on partitions, take every nth, stop when some predicate is true...), transducers let you build each in isolation and compose them easily. Your obvious solution might start to get a bit strained, and the code for any single process in the chain can't be reused.
"These are the rates in India and Eastern Europe, we're paying well above the market actually, so we are getting crème de la crème" - some directors and managers at Boeing, probably.
Elon said the receivers are too big to put in the roof of a car. But that it might be possible to engineer one small enough.
The article obfuscates the point. Reducers/transducers are from the FP world. In FP avoiding mutable state is one the main point.

dot = field => obj => obj[field] // unsafe
Array.average = self -> reduce(add, self) / self.length // unsafe
slang.filter(s -> s.popularity > 0)
.map(dot('popularity'))
.average()

Bonus points:

- no state
- reusable pure functions
- a tad shorter
- maybe as readable as the `for over state` idiom ? (depending on habits)
A reason to upvote: "this is a good comment, other readers should see it sooner, maybe the first thing".

I see it as a community service.
X11 did that. It has clients, doing their client thing, and a server, managing the display details.

Yes, this means that unlike many C-S architectures, the server is the part nearest the user and the client (may be) further away. But each did its respective job and stuck to its knitting.

Keep in mind that when X11 was first created, and for much of its early life, through the 1990s, it was used for remotely accessing another (or multiple other) systems. The networking capability was baked-in. Nevermind that security was bolted on later, here, have a MAGIC_COOKIE....
Of course they sell it, though Google Cloud
Your posts to this site have been breaking the site guidelines. Could you please review them and stick to the rules when posting here?

It's not that the issues you're talking about aren't important; of course they are. They're more important than virtually anything that is on topic here. But for that very reason, they will easily take over the site completely if we let them, and that would go against its mandate.

Besides that, posting in the flamewar style, which you've done a lot of today, is not what this site is for.

https://news.ycombinator.com/newsguidelines.html
We can all agree that convoluted logic is bad, but there are functions with early returns which are not convoluted.
Thanks for posting that. Sounds like SeaBIOS or FreeDOS.
In highly process-based environments, which outsourcing centers are, fighting back gets you harrased by the zealot managers out of the workplace.
No, the other option is to hire incompetent women at a competent salary. That’s one of the major complaints with diversity programs. You can’t pay more to be able to fill the unfillable quota, so you just hire incompetent people at competent salaries instead.

So yes, incompetent minorities make more than the competent majorities.
Il prezzo di Bitcoin potrebbe raggiungere 100k dollari entro la fine del 2019
Can you disable frequency scaling reliably? In general clock speed is not deterministic - it depends how hot the CPU is, which is affected by all kinds of things (second run, fifth run, AC on, winter, etc.).
If anyone's interested, I created a repo that contains some common one-liners that I've used https://github.com/kirang89/awk-cookbook. There's a PDF version as well :)
Your wrong. The supply of women is the same as the supply of men when you don’t care about qualifications. And when you can’t legally pay someone more for their sex, you just lower the bar for that sex.

So on paper it looks like they are making the same, but in reality they are making way more than their majority counterpart (because the incompetent majority wouldn’t even be hired in the first place).
I’ve used both, and prefer the Surface Laptop to the X1 because the X1 screen and keyboard were garbage (blurry pixels and squishy keys).

I work at Microsoft and was issued a Lenovo, then got a Surface Pro 4 and finally a Laptop. Everyone in my team who got the Book instead is a little sad because it’s a huge lumbering beast compared to the Laptop and tends to be top-heavy compared to the X1s and Yogas we had. Those of us with Pros (tablets) and Laptops love the portability, even if you only get one USB port.

Also, all the Surface trackpads are MacBook-grade (although the software handling might need some tweaking for you to get exactly the same feeling - but I’m happy with mine now).
In your anecdote, your parents weren't really using their PC before they got the iPad. I think this is true of a lot of people who are smartphone-only today. Android and iOS are expanding to a market that PCs never really got to.
Could you please not cross into personal attack? and also please not post in the flamewar style? These are things we're trying to avoid on HN. The site guidelines explain, and if you'd read them and stick to the rules, we'd be grateful: https://news.ycombinator.com/newsguidelines.html.
I mean they’re the ones making the claim, the onus probandi lies with them.
This comment breaks the site guidelines. You have a long history of doing that. We've warned you more than once. Would you please fix this? I don't want to ban you, but if you don't stop doing this, we're going to be forced to.

If you'd please review https://news.ycombinator.com/newsguidelines.html and stick to the rules from now on, that would be good.
was OAM used in any way in applications even though it hasn't been observed properly ?
Yours is the obvious solution but the problem is a simple example to help people understand the more complex idea of transducers. It's for situations where the code inside the for loop is so complex that it would be nice to organize it with functional programming principals.

The problem with functional programming is that the obvious approach is not efficient since it passes the array several times. So the goal is to make the functional approach as efficient as the imperative for loop.

Now if you do that by hand, you end up with some messy code. So the article shows how you can combine the operations with a helper library in a structured way.

That said, it kind of reminds me of The Evolution of a Haskell Programmer [0]

[0] https://www.cs.utexas.edu/~cannata/cs345/Class%20Notes/10%20...
When we're saying incredibly expensive, what are we talking here? $10M repair job?
How is it possible that Mr Patel is not in jail? This is just blatant fraud and corruption.
I don’t think anything about Subway has changed in 20+ years. Everything, including the distinct colors of every vegetable and shape of every meat, is exactly how I remember when I was a little kid.
Are early returns essentially equivalent to gotos?

I suppose I could get rid of early returns with a variable and breaks, but is it worth it? My functions tend to be small enough for me to not run into problems with early returns.
You could try a VPN.
I used Moto X (1st gen) with LineageOS (Marshmallow) and microG until I broke it this May. It has a 4.7" AMOLED and 2GB RAM. CPU has only two 1.7GHz cores, but it did its job quite well even after 5 years.
I keep seeing this angst over whether Linux will ever be ready on the desktop. Well, I've been using it exclusively for something like 15 years.
EAV with a query engine and syntax not designed for it is awful. EAV (and AEV and AVE and VAE) with datalog queries is performant, a joy to use, and way more flexible than json stores.
Would you please not take HN threads further into ideological flamewar? It's not what this site is for.

https://news.ycombinator.com/newsguidelines.html
I heartily recommend Andrew Blum's book Tubes: Behind the Scenes at the Internet for any non-technical folks interested in the physical infrastructure that makes all that internet magic happen. It's more in the travel memoir/popular history genres than actual engineering, but a very atmospheric layman's introduction.

https://www.goodreads.com/book/show/23047146-tubes

And of course, if you're ever in SW England, the Museum of Submarine Telegraphy near Penzance is an awesome geek-out experience.