skysight-inc/HackerNews huggingface dataset:
> In some ways, XPath is like regex. It's got insane power, but comes with a relatively steep learning curve. Remember reading regex for the first time? What? But unlike regex, the number of people using it are few in comparison.

IMO the learning curve of XPath is not that high though, it has a somewhat alien syntax but the only thing I remember giving me trouble is axis, because most tutorials just go on with the "shortcut" syntax so the first time you encounter axis everything goes pear-shaped.

> There are functions in XPath 2.0 that I would love to have, but Nokogiri for Rails is stuck in 1.0 world with no plan to go to 2.0. Sad, but I'll live.

Nokogiri should support function extensions[0] and most of the XPath 2.0 functions were originally extensions to 1.0[1], so even if these functions are not distributed with nokogiri you should be able to add them yourself.

Incidentally, Nokogiri seems to optionally depend on libexslt, which is the exslt implementation in C for libxml2/libxslt, so exslt should be available either as an option or by building it yourself.

[0] https://github.com/sparklemotion/nokogiri/commit/eb56525fbcc...

[1] http://exslt.org
Actix-web makes some very aggressive use of unsafe. Many core Rust libraries do too. If you trust those authors (some very fresh out of school) to have zero mistakes, why would you not trust the C++ STL?
A Love Letter to the Internet of Old
I think he's referring to the "functional" stye APIs which let you write code that looks a lot like operating on java collections with streams. It's actually pretty great, I definitely miss it in other languages.
I think it was a /s. My sarcasm detector is broken..
I just have it running in Docker on a DigitalOcean droplet (alongside several other services).

But there are quite a few other options, from renting a managed instance to buying a hardware device with it preinstalled. https://nextcloud.com/yourdata/

For anyone who is interested in self-hosting stuff like Nextcloud but is not ready to dive into the deep end of server management, I would highly recommend checking out https://yunohost.org/. Basically it is a Linux "server" OS that tries to make it as simple as possible to install and manage services like Nextcloud.
Golang game engine v2 released
Star Wars Asciimation (2015)
Yeah, and I don't know how anyone could claim its a Rails replacement. Diesel, warp, rocket et al are great but the DX and feature completeness aren't there yet.

That said, with Cargo using the unreleased version is as simple as changing `rocket = "0.4.5"` to `rocket = { git = "https://github.com/SergioBenitez/Rocket" }` so it's not like you even have to clone it manually. You can even specify branches if you urgently need a PR and patch entire workspaces with forked versions and so on.
No food, just rocks.
There is literally a video with applications in the link.
W3C standards usually depend on and leverage other standards, so XPath is its own standard, which is used by XSLT (and XQuery, and possibly a few other things).

You can't use XSLT without XPath, but you can use XPath on its own.
I'm disappointed we didn't use ASCII-separated values.

https://news.ycombinator.com/item?id=7474600
Not a very interesting website for those without Javascript.
I can't really get my head around people stanning Glenn Greenwald, who is both shrill and also a dull, tedious writer. I tend to think people are just giving him credit due property to Snowden (stipulate that Snowden deserves credit), and Greenwald's role in that whole thing was mostly to fuck it up.

But I totally get why people stan Taibbi, who is an obviously gifted writer with a talent for making his advocacy entertaining. I think he's a force for evil, a liberal Ann Coulter, but I get why people like him.
Does the state expect children who have emigrated to also contribute toward those costs? I know many younger Poles have moved to other EU countries for better job opportunities.
I have this too, and would describe it exactly the same. I think this is common with ADD.
> serious paper about a silly task, written accordingly

I love it
You can also trivially come across data designed for consumption with AWK. Whenever I write a script or utility to dump some data for later analysis, I take into consideration if I can shape the output in a way that will make it easy to work with in AWK.

Because I won't know ahead of time what all the interesting values or summaries will be, but if I know I can get it through AWK it will be cheap to extract or compute those values and summaries later, once I know what they are.
They're already moving in that direction, though I don't know how mods interact with gamecore: https://mspoweruser.com/gamecore-based-test-game-show-up-in-...
I mean, it certainly looks lower, but if you look at the same time in 2019, it was very low then as well. If it still looks this low in 10 weeks, I'll be impressed.
page not found!
Doesn't cracking this problem boil down to finding a pattern in prime numbers, which doesn't seem to exist? For the researchers that think the task is efficiently computable in polynomial time, whats the reason behind their thinking?
The point is that there are plausible cases where you run into these kinds of issues where it’s not as easy as just saying “let’s evaluate the situation solely on the basis of what the info is.” This ignores the who, when, why, that are extremely relevant in this case, as they were this time 4 years ago.
Not sure how this can be worse than straight up bombing cities as we do today.
Holy crap. What is this atrocity that is XPath 3.0!? What was wrong with sprinkling some XPath 1.0 queries into a Python script?
I recently finished "The Cosmic Revolutionary's Handbook"[0], which can best be described as "Here's all the data, please, tell me how your crazy theory fits ALL of it, because it's really hard to do that". I really illuminates the difficulty in building any theory that fits all the data, and the incredible beauty that our current best theory of the universe truly is.

Gravitational wave events like these are just more data, making the challenge that much more difficult. And yet, the model still fits pretty well, barring a few pieces. But we don't throw the baby out with the bathwater, because it's still a really good model.

And the best part about that is that we can use the model we have to make predictions, and most of the time they're pretty good. Predictions about things we can never see or experience or know. We can see into the past and future.

[0]https://www.amazon.com/Cosmic-Revolutionarys-Handbook-Beat-B...
Their concluding speculations (on why less experienced/qualified teachers' students perform better now and worse later) omitted the two I've seen:

(1) You're better able to teach if you've learnt it recently (say, within 5 years). This is because you remember what it was like not knowing it, so can better communicate with someone who doesn't know it. e.g. "demonstrators" (often last year's students) often communicate better than lecturers.

(2) The paradox of excellent teaching is that students get less practice in struggling, working it out for themselves, finding other resources (peers, texts). They learn the material, but not how to learn.

That is, spoon feeding is a form of "disabling help", where doing something for someone that they could do for themselves deprives them of developing that capability.

Perhaps... extremely knowledgable but hopeless teachers are best.
> American citizens need to decide what they prioritize. Is it space exploration or is it a decent standard of living at home?

OR we could start to think about future generations.
Does that mean that anyone who publishes something on Medium can potentially get paid for it?

I'm not familiar with the workings of Medium, aside from the fact that there's a limit on the number of articles one can read for free each month.
Evolution of Dogs
Or maybe allow some diversity in the mood of the conversation? There is always a time and a place for humor and non-serious conversation. I get that you don't want this forum to devolve, but it also devolves if you are dead set on a single mode of operation.
You're doing it wrong if there are grounds in your cup. Yes there's a huge difference between letting the coffee soak for minutes and then applying pressure versus quickly dripping water through the beans.
My first woodworking project was to make a wooden work bench on which I could do subsequent woodworking. The bench is still firm, solid and in use 15 years later.
> XPath is so inelegant. Not that CSS is a model of elegance

XPath is infinitely more elegant than CSS selectors.

It might be less pretty, especially with the sort of selectors you'd use in CSS, but elegance could hardly be less of an issue.
That's interesting. I thought I had read that older people perceive time more slowly than younger people but I wonder if that can be overcome by keeping our sense of time-telling "calibrated" by periodically checking our accuracy.
As a casual follower of speed running / high score community and HN frequenter, I'd say everyone who doesn't follow would be surprised how much detail goes into mastering some of these old games. These guys decipher everything, and find tricks that depend on "subpixel" perfect timing to shave off mere milliseconds. And they have thousands and thousands of attempts. The community at large thinks Billy Mitchell is a piece of shit, so tells me enough. Here's some channels if you want to learn more.

https://www.youtube.com/user/RWhiteGoose

https://www.youtube.com/channel/UC3ltptWa0xfrDweghW94Acg
Yeah, does seem more likely it's my brain knowing the time fairly accurately from the early morning light levels, bird song, traffic noises, temperature, smells in the air etc, and other cues I'm not consciously aware of, than that I have a timer, accurate to a few minutes over 9 or 10 hours, in my body.
I parse a lot of CSV files and few are well-formed.

People are careless when writing CSV files because they think it is simple: just put a comma between columns, right?
https://uniface.com/get-started
I can say that for march to may in France everybody that died with COVID like symptoms was counted as a COVID fatality since we didn't have enough tests.

So it could very well be that many people died of the flu but were counted as COVID, we'll never know.
Medium pays authors for their content.
Also available via Telnet at towel.blinkenlights.nl.
You can actually do that as well with the division itself. But you need a kind of fancy interpolation, I forget the name, used for rational functions. Polynomials won't do.

Edit: I think this is either Restrictive Pade's approximation or barycentric rational interpolation. Or both combined.

Normally instead division is approximated with Newton-Raphson iteration. I think 6 steps is enough for 16 bit.
XPath and XSLT was the first time (despite doing Haskell at university) that I started to really understand functional programming. The first time was working on a tech stack that was basically Microsoft SHAPE queries transformed into HTML. The second was multiple projects customising Google custom search engine results. It was weird realising that these very limited primitive were actually infinitely powerful if you were willing to warp your brain the right way.

That said, I scrape a fair few webpages now and have never once revisited XPath. I suppose people have mostly written off anything that feels too much like XML as enterprisey and deprecated.
Key generation and signing ceremony for PyPI
I skimmed it. I guess I missed that.
There have been a lot of advances recently.
https://arxiv.org/abs/2010.12237v1
Possibly this:

When a key is pressed, a key-code can be read from your program to detect the event and the associated key.

Pressing 2 keys (as described in this case it seems) has it's own key-code, instead of a combination of the 2 key-codes for each individual key.

For example CTRL could have key-code ==> 0008
And 'TAB' could have a key-code ==> 0002
But pressing CTRL+tab ==> 1010
Rank-and-file bulk retweeters help POTUS dominate Twitter algorithms
It's important to emphasize that this isn't just about a Donkey Kong score. Twin Galaxies took the extreme position that because they were suspicious of a handful of Donkey Kong games played over the decades by Billy Mitchell -- they're invalidating every score in every videogame he ever played in his life. (In 1985 Mitchell held the world's high scores for Pac-Man, Ms. Pac-Man, Donkey Kong, Donkey Kong, Jr., Centipede, and Burger Time.)
VSCode – How to spot bugs with a simple extension
A simple extension to rapidly spot the lines of code haven't been touched in a while.
Can you point out the resources you used for learning ?
I wrote a lot of scrappers and am knee-deep in css hacks.
For the past ~3 weeks Medium has blocked virtually every article I wanted to read and is asking me to pay. Most of these are programming tutorials related to some obscure Rails features. Honestly, I feel like Medium is the worse place to put your content.

EDIT: For context, I don’t mind people monetizing their content, but in that case I’d rather pay them directly (like GoRails), and not a “subscription” for something I might check once in a while.
Instead of the gawk manual, I recommend the OpenBSD manpage: https://man.openbsd.org/awk.1 It's concise and well written (as most OpenBSD manpages), so you can learn AWK even in less than 2 hours. Of course it handles only AWK, not the gawk extensions.
Interactive map of all haunted places in the United States
It's not only about obvious cheating like slowing down the game.

It might be easier to do certain things with different hardware setups.

An illustrating example: If you play quake 3 at 125 fps you can jump farther than you could if the game was running at 60fps.
The biggest problem with the new XPath versions is that the W3C made the standards, but almost no one implemented them, so you cannot actually use them

I was doing web scraping, and needed regular expressions to get the text, so I have implemented XPath 2. And currently I am updating it to XPath 3.1: http://www.videlibri.de/xidel.html
Threads existed long before multi-CPU computers or multi-core CPUs were common, so no... they don’t exist for that reason.

Parallelism and concurrency are orthogonal concerns. Multiple threads can run on the same core, while concurrent awaits can run on separate cores (depending on the language). Or the opposite!

Threads definitely solve wasted time waiting on I/O, but OS-level threads are a very limited resource in many environments, which can cause problems more quickly in programs with unbounded concurrency, and they tend to have a lot of startup cost, so they have to be created judiciously to avoid hurting performance.

Languages like Go and Elixir give the programmer access to unlimited lightweight “threads”, and that works great for concurrency, without requiring developers to re-color their functions.

One additional note is that some OSes (including Linux) have struggled to support true nonblocking File I/O for many years, so you literally have had to use multiple OS threads for I/O concurrency... one for each file operation in progress. Otherwise you would block the async executor! Languages often handle this implementation detail for the programmer, so you just don’t realize you’re using a thread-per-await sometimes.

(io_uring seems to finally solve this in a meaningful way on Linux)
What's interesting about this to me is that there's some disagreement over what the absolute highest possible score is.

https://arstechnica.com/gaming/2016/05/is-this-the-worlds-fi...
It's one of my favorite technical books, with many examples of the application of the language, including the design of small languages and experimentation with algorithms.

It is freely available at archive.org: https://archive.org/details/pdfy-MgN0H1joIoDVoIC7
The best part about Rust is the type system. For one example, in a web app I'm building for a client, we have two types to represent invoice ids: one for the invoice id that came back in a response from the API, and one for an invoice id that a user is asking for. They are distinct because we know that an InvoiceId refers to an actual invoice in the system, and a UnverifiedInvoiceId might not. Both of them are distinct from a CustomerId or any other id.

This might sound like it could get cumbersome fast, but it's actually really simple in practice, due to clever uses of traits. UnverifiedInvoiceId implements rocket::FromParam, so I can deserialize it from a URL parameter. InvoiceId is only created in the serde::Deserialize implementation of an invoice-returning API response.

So a (significantly simplified) endpoint in the app might look like:

#[get("/invoices/<unverified_invoice_id>")]
pub fn get_invoice_by_id(
unverified_invoice_id: UnverifiedInvoiceId,
api_conn: ApiConnection,
) -> HtmlResponse {
// API "search" methods take unverified user input as parameters
let invoice = api_conn.fetch_invoice_by_id(unverified_invoice_id);

// API "lookup" methods take verified ids
let line_items = api_conn.fetch_invoice_line_items(invoice.id);

render_invoice(invoice, line_items);
}

I can't accidentally switch up things that don't belong together, even though under the hood they're all just unsigned ints.
It sounds like you just have a fundamental disagreement that Twitter has become the primary backbone for public communications between powerful people and their audience (for which there is no viable replacement because of Network Effect), as well as for real-time messaging between individuals and groups. Until you acknowledge that fact, you won't 'see' a problem.
Ask HN: How to get off old email addresses?
I have several old email addresses. I have used them for sign ups etc and it seems impossible to just close them. I want to transition to a more private, paid email address.

Have you managed to transition off and gracefully deprecate old email addresses? How?
To add some detail: a common minimum quality criterion for optical surfaces is λ/4 (divergence from an ideal surface), where λ is the wavelength used. For visible light this gives about 100 nm (though large professional telescopes are "figured" to more like λ/20). Any alleged glass creep visible in window panes over a few hundred years would quickly ruin any astronomical mirror (which definitely does not happen).
I’ve often said that it is not whether or not you offend someone; it’s whether or not someone is offended.

Offence is up to the receiver after all.
My gripe with the Python csv.reader module is that it has no skip_lines parameter. Ill-formatted lines at the top/bottom of a CSV file are quite common
Why is it irrelevant in practice? Because the probabilistic algorithms are so much better in practice?
How to Deploy a Ceph Cluster on Kubernetes with Rook
I didn’t appreciate the complexity here until trying to write CHIP-8 games, and I grew to appreciate libraries like:

https://github.com/jdeeny/chip8-multiply
I don't use Medium, but according to https://about.medium.com/creators/

> You’ll be able to get paid for all of your writing, some of it, or keep everything free and accessible to all. The choice is yours.

So it looks like the authors are the ones responsible for putting up the paywall.
> They pissed that all away by making their content free

Sounds as if you're saying they should have added paywalls? (Sooner than want most maybe did?)

But at the same time, you mention ads?
As a writer, I believe you can just opt-out of the partner program and your content should be available to everyone, but will not be promoted by them.
User that right clicks Medium articles and opens them in incognito mode, here: what paywall?
I might try it out as well! Thanks for it.
To add, the biggest deal with altering the random events for a game like donkey kong isn't that the player would know what is coming up next. Depending on the random spawns in the game, there are more points to be scored. So you could play a perfect game and score 100k less than the record. So they're chasing the perfect game during a perfect random spawn.
> I was doing web scraping, and needed regular expressions to get the text, so I have implemented XPath 2.

Most XPath implementations have no issue with adding extension functions (in fact many support exslt[0] out of the box), you really do not need to use (let alone implement) XPath 2.0 to use regex functions.

[0] http://exslt.org/regexp/index.html
When I was a kid, we used to have a radio/tape/CD player with a digital clock on it. Whenever I looked at it, as in whenever my body thought it would be a good idea to check the time, it was always something like 11:11 or 16:16.
There are no known commodity items that can be profitably mined in space.[0]

There will almost certainly be stuff like gold and rare metals shipped from a Mars colony to Earth, but only because returning the ships from Mars makes vital resupply easier. From a total system perspective it'd be better to keep the ship on Mars and scavenge it, but Mars will be on such an economic imbalance that they will want to make it easy as possible for Earth to resupply them. And if you're going to return the ships anyways, you might as well put something in them.

The diagram at the top of [1] is a good illustration of import vs make in situ vs export.

[0] https://caseyhandmer.wordpress.com/2019/08/27/there-are-no-k...

[1] https://caseyhandmer.wordpress.com/2020/08/23/progression-of...
Because programming documentation is often written by programmers and not teachers and most programmers doesn't know how to teach. Documentation without any (or few) examples is like math textbooks with only proofs and no exercises.
Both market (huge) AND factories
Yes. It is also fairly straightforward to dockerize dotnet core apps[0].

[0] https://docs.docker.com/engine/examples/dotnetcore/
> You'd have to be ideologically possessed or completely ignorant of reality to believe this anti-space bs.

I think you have just offered a good reason why homo sapiens is a threat to other worlds. (o:
Yooo, thanks for Xidel! I use it dozens of times per week. It's amazing. Next to the actual shell probably the single most useful ETL and scraping tool I've ever encountered. Keep at it!
I thought Peter Maas email (that Greenwald posted) asking him for edits was very good.

https://greenwald.substack.com/p/emails-with-intercept-edito...

Greenwald’s piece has some good points about lazy and biased journalism on the Hunter Biden story, but goes off the rails when he misrepresents what actually happened with Joe Biden firing the Ukraine prosecutor.
It seems like the record Billy is most proud of is his perfect game of Pac-Man. (To this day on Twitter he calls himself "Pac-Man Billy.") Here's a good article that explains how difficult that was.

https://www.oxfordamerican.org/magazine/item/622-the-perfect...

After 254 levels of normal Pac-man, the screen fills with jibberish and screen noise -- some of the pixels you have to eat are actually invisible. Billy was the first person on planet earth to crack that level.

That's one of the other records Twin Galaxies has invalidated.

Billy's argument is in part: there's zero evidence he cheated at Pac-man, so why is that score being invalidated too.
side note: after dabbling into electronics and electromechanics.. I tend to see them as programming already. You're coupling geometries in a mathematical way. If you do reactive/dataflow programming that's very very similar.

Also, army videos of 40s mechanical computers hint that way I think. (in a way the meaning of programming is quite blurry)
Fortunately there are many short-term benefits as well.
Incognito mode works for me.
ZQ? Works in vis.
Well if he's cheated in one game, I think it's perfectly reasonable to issue a full ban, and I'm sure TG's TOS gives them full discretion to do so.
Probably a bit too much hyperbole in my comment above you're right. But I've used a bunch of other languages and frameworks including the ones you mention in your other comment. My point was less about those specific tools and more about why try to do everything with one tool not Rails/Django fanboyism.