skysight-inc/HackerNews huggingface dataset:
Ask HN: Modern Go Dev Setup
For anyone who would consider themselves familiar with Go, what's your dev setup? I'm coming from Python 6yoe, am looking to learn Go. What is the 'recommended/idiomatic' professional Go dev setup for a local Nvim/CLI flow?

In Python, it would be something like `pyenv` version control, `poetry` environment, maybe `tox` for automation, `flake8`/`black` etc. Dump all their config in a root `pyproject.toml`, dir structure with `tests`, `src` and modules available and imported from root path. Write code -> run `python X.py` etc.

Basically what I want to know is what is the equivalent 'pretty good' setup for Go? Beyond setting PATH and GOPATH with some helloworld example go.mod it's not apparent from docs/tutorials what the equivalent environments/directories/commands are to the Python example above.

Any advice or opinions welcome! Learning syntax is fine, but without working in a few teams first to get a feeling of dev flows, I want to avoid noob mistakes/patterns early. Even a GH link to a minimal template 'get started' repo with some dummy files would be great!
the startup company i work in uses 6 different programming languages, which makes me feel what you argue here. to add, markup languages are fun and contrubiting also, particularly devops developing with yaml and composing Docker components makes you think in a different organizational mindset than other programming domains
As it appears, a whole lot of people prefer not to die.
For my personal case, I found out that writing "real programs" in anything else than assembly with a conservative usage of a macro processor is kind of toxic: it is a complex matter based on my experience and what I could understand from "software history".

A high level script language would be such "real program". Idem for a command shell.

risc-v, if successfull, will help a lot to this then remove a lot of what I consider toxic.
Shortcat is utterly amazing. I really hope I can work this into my entire MacOS usage. You should be really proud of what you've made because this is fantastic!!
JavaScript ranks higher than C# in your benchmark.
That may not even be necessary at this point. Chinese nationals I know all went to US/Australia/UK universities but their younger siblings seem to be much more enamored with the Chinese universities in tier 1 cities instead. Combination of growing nationalism and decreased prestige with graduating with an international degree.
That’s a very topical comment what with Google announcing they were killing Stadia two weeks back.
> Sub 20ms response time with zero caching.

I mean... to be clear, they do tons of caching[0], which is certainly critical for their ability to have a non-cached response time of 20ms. Most of their responses should be coming from a cache, given the type of site they run, otherwise they would need a lot more servers.

[0]: https://nickcraver.com/blog/2019/08/06/stack-overflow-how-we...
Actually, yes. We ported the seL4 crate to the latest kernel and modified it to better fit our needs. It's part of the OSS release, and we're hoping we can contribute it back to that project once we've done some more polishing to it.
Couldn't we somehow fork Wikipedia into a version that is a superset, containing many deleted pages as well?
This tweet seems to be the source of that remark from her; it is difficult to say who exactly the sexist troll remark is directed at since it's worded in a sly way which says the problem isn't sexist trolls.

https://web.archive.org/web/20190210190740/https:/twitter.co...

It's a very trollish way to accuse somebody of being a sexist troll. Like if I were to say to a third party "Jim and I had an argument.. the problem ISN'T that Jim is a fascist asshole, but rather that..." Strictly I'm not accusing Jim of being a fascist asshole, but really I am.
Was medium ever a good product? I think as a reader-- certainly not. Megabytes of Javascript, long rendering times, just to display a kilobyte of text?
>People don’t realize. When we were kids we didn’t do hard drugs because we thought we’d go to prison.

That's all that kept you from doing?

The possibilities of developing physiological dependence, shitty Quality Control/amateur chemistry leading to contamination, ending up dependent on people willing to kill other people over routine business matters, etc... wasn't enough to set off "bad idea" circuits in your head? Hell, just doing the research into the the bloody substances synthesis pathways was enough to get me to largely nope out of the idea.

...Jesus. That the cops may bust me was the least of my concerns. If the only message getting through to kids is "the cops'll getcha" we have soooo many better ways to get across how these substances are not a good idea to trifle with.
Alas, Choinard still cannot make every everyone happy.
I was thinking either a zoo / reservation of some sort and. / or a dna database for later cloning and repopulation.

Thanks also for the gentle spelling correction.
I *detest* the crazy industry politics that made ECC memory so “special”
There's no "conspiracy theory" here - it's standard political and military strategy. Owning the communication infrastructure of another country is the wet dream of any super-power. (The internet today allows that to a certain extent, to the US). But Starlink's role in Ukraine is unique as they provide and own the complete (end-to-end) communication infrastructure. This means that the US has unhindered access to every data that flows through Starlink in Ukraine. Yes, military communication will be encrypted. But if the US has provided the hardware and software, they obviously will have the encryption keys. The US is an ally of Ukraine and is providing them valuable political support and equipment. Do you think the Ukrainian care right now if the US is monitoring their communication, when they need the US to defend themselves? In fact, the US is very likely using this info to give them advise on military tactics.

Anyway, my whole point is that thanks to Starlink in Ukraine, the US intelligence and military have a bird's eye view of how the Ukranians are fighting the Russians. And that is why I believe the US government is definitely paying Starlink. And if they are paying them under the table, like many intelligence or military operations abroad are done, they won't be public knowledge. It is also in their interest (as part of information warfare) to make it seem like a rich billionaire is generously supporting Ukraine.
Respect to you + your engineers, I was not having a go at you all, and I genuinely thank you for your work. I was merely objecting to some commenter describing it in a way I felt was misleading. Keep it up!
The medium is the message, and it's probably not the message you want to send.
You are simply wrong

So the headline is precise and I'm wrong when I say those acequias can only provide water for small zones... and because it's a "sensitive point", nobody can disagree.

Appaling.
Wikipedia is so huge that it's hard for editors to police effectively. All new articles are reviewed by one editor, but they'll likely be low-traffic enough that 90%+ of the page will be written by one person, and pages that are non-notable may survive for many years.

Look at how awful some of Wikipedia's "1000 most vital articles" are (https://en.wikipedia.org/wiki/Wikipedia:Vital_articles) and you'll get an idea for how neglected Wikipedia is. Most of these articles haven't seen significant content edits since 2010, when Wikipedia had far more editors.
Ask HN: Tasked to keep alive a big Node.js project how to do it?
Hello folks,

For sure you folks have more experience.

My day job asked me to keep alive and productive a large Nodejs codebase.

The codebase works against Nodejs 12, that is well deprecated.

We never tried to run it against a more modern version, the common assumption in the team is that the code won't even load, but even if it loads we are not sure of the result, will it crash at the first request?

There are some tests that of course we will run against it.

As always, the codebase is quite important for the company and it must keep working.

I'll like to migrate it to the latest LST, more for peace of mind than anything else.

How would you approach the problem? A very well backed up docker image?

Really migrate to the latest LST?

How would you migrate, one big jump from 12 to 18? Or several smaller upgrades, 12 to 14 and then 14 to 16 and finally 16 to 18? Why?

How much time in your experience should we schedule for the migration? Will it be mostly painless and take a couple of months, or it will be a huge project that will last years?

We have a big monolithic and a couple of hundreds of AWS lambda functions.
The notability standards aren't remotely as much of a problem as the inconsistent enforcement of them. Some articles deemed non-notable are rapidly deleted, some are flagged for improvement, some are moved to draftspace, some are put up for a request for deletion and pass or fail, some are ignored for years or decades.

Notability is held up as a core concern of Wikipedia mostly by editors who want to delete specific articles, and who measure the value of their contributions through deletion by the barnstars they're awarded for it. For the rest of the non-notable articles, it's like any other Wikipedia guideline - a point to discuss and iterate on, if anyone's even paying attention.
Careful, "myspace" is trademarked and it's likely you'll need to come up with a name less confusingly similar, if they decide to enforce their mark.
Tell HN: Productivity hack with github.dev and Chrome custom search engine
I can't believe I am just finding out about https://github.dev a vscode interface for any github repo. For example: https://github.dev/expo/expo

Add a custom search engine in Chrome and you got yourself a quick shortcut to opening any repo in github dev. In the past I would clone repo then open with vs code to monkey around. Now its CMD+L , 'gd expo/expo' to open https://github.dev/expo/expo/

Instructions for adding custom omniBar search shortcuts: https://zapier.com/blog/add-search-engine-to-chrome/
A couple of quick observations on l'affair Indian XCheck and The Wire's last upd
It can’t stop me from accessing index 1 when I meant 0 on a 3d array, so I think the claim doesn’t make much sense. Rust can stop me from accessing index N+1 though, which is useful for security. Of course almost every language also has support for bounds checked arrays either in their core or their standard library, and some for of array iterators, so I don’t think that’s a particularly compelling reason to choose Rust.
In theory, yes. In practice, it works fine.

I've been running win 11 for my gaming needs on an even older Xeon (sandy bridge, so 4th gen, IIRC - the first one with pcie 3) with no issues. It has no TPM at all. I've updated it to 22h2 the other day. Works like a charm, and I almost enjoy using the latest update. I find it much less annoying than win10. In particular, the animations feel quicker.

Regular updates are showing up and installing through windows update. For the upgrade to 22h2 I had to make a usb stick with rufus (tick "disable win11 checks" or similar) and run the upgrade from there.
Hearing is kind of fascinating if you calculate the power supplied to the eardrum in the ~0 dB range, we're talking about attowatts of sound power generating movements in the single-digit nanometer range, which is still picked up and converted to a neuronal response. Meanwhile the whole thing suppresses the far greater pressure fluctuations due to your heartbeat and other movements quite well, and can reasonably cope with a ~120 dB dynamic range (though this is damaging fairly quickly).
Less amusing than sad to see someone trolling on a site meant for substantive discussion; or to find someone who thinks a country of 10 million sq. km. representing almost every biome on the planet doesn't have something worth seeing.
Ahh, that's unfortunate. Naming things is hard. If I had realized that was onenof the projects' prior names, I probably wouldn't have gone with that name. TBH, I have huge respect for LoseTHos / SparrowOS / TempleOS's creator Terry. He accomplished something very unique and made it flourish in the hardest of situations.
Compiler Explorer is such a wonderful tool. It made examining and comparing compiler outputs so much easier and now pretty much everyone interested in optimizations is using it.
I've not seen the film, and I don't know how fair the criticisms are, yet it does feel like there is an unexplored irony in making the crux of the film a battle against authority, while also trying to rehabilitate an absolute monarch. Are authority figures to be distrusted or lionised?
Protein interface – how to change aproach to building software?
I read this article recently. It fell into my hands by accident and I found this quote there:

--
Assuming that we should launch many pilot projects, let’s consider for which of them it is possible to build minimally viable products – and then try (where possible) to use low-code and no-code tools. With these, we can get less technical people prototyping quickly (of course, more complex integration pieces may still require the help of an engineer). Thanks to the fast implementation, managers or people responsible for the functioning of the process in the company are able (within a few weeks) to check and analyze the sense of an idea. They can test it in a natural environment, and if everything works, they can create a dedicated solution developed by an experienced team.
--

One of my close friends, whom I advise in the field of digitization, owns a factory. I can't convince him for anything to try this approach, which I think is absolutely right.
The client believes that only their IT department and CTO can change anything in automation. Or only they can be responsible for data analysis. How to change this, how to convince him?
Not sure what's new here. Handlers were always functions in java (and other languages), even 20 years ago.

PP talks about general setup of the server in http4k (which I'm not a fan actually, because server setup is a very small thing done once. Just as a build file, I actually want it as long and verbose as possible).
These magazines exist only because of the value of the fading goodwill they still have. I'm an older millennial and remember large bookstores, so TIME, Forbes, Fortune, Newsweek are all still in my brain as mastheads of general-interest commentary.

The reality is that ownership of these names have changed hands so many times, and been through so many restructurings, they have no clear editorial voice or clear target audience anymore. They are chasing ad dollars, affiliate link bucks and "contributor" programs to churn out tons of filler to throw more ads on to.

The book "Disrupted" by Dan Lyons (book about Newsweek editor who gets fired and takes an ill-fated job at Hubspot) talks about how writers used to have decades-long careers at publications that let them create a clear voice that persisted over time. Those times are long gone.
> Biggest jump would be AVX512 support on the newer CPUs.

Didn't this get removed from the "consumer" 12th gen Intel models?

Regarding the speed of the AMD 5000 series, I have to agree. I only touched a laptop part, and an U at that, but it was the first new CPU that impressed me. My daily driver before that was a 3rd or 4th gen Xeon, and it was faster than the i5 desktops we had a work.
They will build their own.

It was the Chinese that pushed through RISC-V at the end of the day.

They are allocating absolutely ridiculous amounts of capital towards building their own lithography expertise now.

Trump pretty much forced Biden's hand when he stuck his dick in ASMLs relationship with China. By playing that card so early Biden effectively has to cut off access to TSMC, GlobalFoundries and Samsung for it to actually stick and not just have wasted the biggest and most important trade card W.R.T semiconductors.
but what about all this obsession about ensuring that there are still humans in say 200 years, when anyone who might exist is a complete stranger to us?
I'm continually surprised that display systems don't implement safeguards designed to minimize this sort of thing.

It seems like it should be relatively simple to prevent repetitive flashing patterns from ever occurring by tracking the last few seconds of display state and looking for blinking regions of the screen. This would fix the problem for all applications, including blinking caused by something like scrolling too fast through a task switcher.

If I were epileptic I would want something like this for my computer as a layer of safety.
That's more on the project management side. (Initiating a project / gathering requirements)
More of a passive idea, but you could add potential customers on linkedin and wait until they mention anything related to what you do, then reach out via linkedin. Less pushy (you will need to still be doing the pushy kind of sales), more thoughtful, and has worked for a number of sales people I know in different industries.
It's really hard to overstate how much better the case for renewables is than the competition.

That said, there are a bunch of risks and externalised costs in a zero storage strategy not captured by simple prices. Many of the objections of the nuclear industry are actually true in such a scenario.

Overbuilding solar 4-8x with current tech would cause alot of CO2 emissions from silicon refining, it would strain silver and copper supplies. Overbuilding wind by a similar amount would require vast amounts of steel, strain niobium production, and cause CO2 emissions from concrete. Even if your system was on par with nuclear on a dollar basis, it would still produce too many emissions (half or more of 100% gas) and quite fragile.

Relying on cross continent links to reduce overbuild ratio is a massive strategic risk, and if someone in the chain does a texas and has a bunch of equipment fail, you'd have a real version of the scenario the anti-wind campaogners are imagining in europe right now.

A good strategy is a mix of everything aiming to remove as many emissions with each dollar spent. If that means aiming initially for 50% net solar availability, and 30% net wind availability with 20% surplus and keeping the gas turbines running through winter to provide the remaining 40% for a few years whilst shotgunning money at research for abundant batteries, electrolysers, and tidal to see which one sticks, then that is far better than using the same funds to pay for 20% nuclear that will be online in 2050.

Another good strategy would be to build out scalable storage (thermal batteries, electrolysers and pumped hydro) immediately and go all in on wind/solar asap. The amount of concrete required for the pumped storage might he prohibitive though and it won't cost a great deal less than nuclear (although it will be online sooner).

Even a strategy with 10-20% nuclear like what China is pursuing is tolerable (including the very likely chernobyl scale incidents that will happen if it's pursued worldwide -- which are vastly preferable to the consequences of coal) in countries that aren't controlled by neoliberal systems which are fundamentally incapable of operating any large scale project that won't pay off visibly in an election cycle. It's just the constant shouting of "stop all the wind and only build nuclear" that's imbecilic.
Oh man! Love it. Great Idea!
Some logic programming sibling too
This is specifically about channeling and storing water _in_ the ground, not piping it above the ground.

This also requires far less resources than building an aqueduct.
They referred to both of them as computers though.
I actually just saved a tweet this weekend that lays it out really simply: https://twitter.com/janvmusscher/status/1581254065274892289?...

“Huge clarity if you structure your sales call like this:

> Uncover where they are now (A)

> Uncover where they want to go (B)

> Uncover what's stopping them (C)

Then pitch your offer as the solution to C”
I'm assuming you mean 5V/3A and 5V/1.5A. If so, that is explicitly NOT PD. USB-C supports 3A and 1.5A purely by setting resistor values on the CC pins, and does not require the BMC PD negotiation protocol.

Many PD controllers support this for 'sourcing' (5V/1.5A or 5V/3A) natively, since it's a common use case for laptops.
I'd prefer not to travel. I've been to a few conferences, and haven't gotten as much out of them as I'd imagined I would.
Actually, this is an engineer-driven project in research, not a PM driven project. The team and I have quite a lot of passion for this project and are doing everything we can to fight that kind of thing from happening, which is why we open sourced it.

Please bear with us.
That's a good observation, but the telecom and radar did sort of go hand-in-hand. The radar is typically close to the action, but the information needs to get back to HDQ, usually hundreds of miles away. So being able to ad-hoc get lots of telephone connections and/or tty links from a radar site back to the generals was a common need.

That is, war money was being applied to both.
Here is a good book that was suggested to me; and I have suggested to quite a few founders. I found some topics to be dated but the overall content is simple to digest and easy to follow.

Also, Marketing and Sales are two different beast.

Founding Sales, https://www.foundingsales.com by Pete Kazanjy (I think he is here on HN too.)
Well, first of all, in your example bridge building is not the only civil engineering discipline involved—traffic engineers absolutely would be involved in those other questions.

More to the point though, software is not like a bridge. With a bridge, the high-level requirements are easily defined in a way that any layman can understand (weight limits, lane count, etc). Failure of a bridge is also viscerally obvious. Obviously there may be extreme engineering challenges in actually building a given bridge, but at the end of the day no one involved ever runs a serious risk of losing their handle on the big picture.

Software, by contrast, is arbitrary logic full of leaky abstractions and unknown touchpoints. Even if we narrow down to the most vanilla business CRUD app, precise requirements can be frustratingly elusive. No matter how well thought out a project, there are always discoveries at build time of any non-trivial project which significantly impact the requirements.

For this reason, I consider it a core responsibility for senior engineers to help define requirements and not just be a passive recipient of them. Martin Fowler captures my viewpoint more eloquently: https://www.youtube.com/watch?v=4E3xfR6IBII
This is a very tricky topic.

If NASA (or whoever) sprays too much UV blockers it might lead to crop failure.
Can't the backend decide which fields to send back in a JSON, the same way it would decide which HTML columns it would've rendered?

The front-end can pass a user role with every request and render whatever the backend sends it into a table.
> Nope. All QM interpretations produce the same predictions.

Correction: the same observable predictions in the domains we've tested. They all have different metaphysical implications which impact the plausibility.

> They are formally equivalent in the same sense that lambda calculus and TMs are equivalent.

No, that's not strictly correct. Bohmian mechanics allows the existence of quantum non-equilibrium, as but one example. Isomorphism is fine as an informal analogy, but it's not strictly true.

> This is a metaphysical requirement, not a physical one. That is what makes it hard to extend Bohm to a field theory.

The axioms of every interpretation are metaphysical. The axioms are what let you make certain steps in one interpretation that cannot be done in another. This is why unifying GR with Bohmian mechanics is hard but isn't with Copenhagen, which is exactly what I said.