Better HN
topnewbestaskshowjobs
Log inSign up

w23j

391 karma · joined Jan 22, 2015 (11y ago) · 105 submissions

Submissions

comment 1w ago · link · parent

So you are just waiting for the HN outage now?

2.

Social Media Recalibrates How the Brain Values Mental Effort(neurosciencenews.com ↗)

3 points · by w23j · 4mo ago · discuss

comment 6mo ago · link · parent

CTF stands for Capture the Flag. So with that definition you have exactly zero more information about the article then without it. So I assume next you want a short description of what it actually means, like "CTF (Capture the Flag) are security competitions where the objective is to break...", which is completely ridiculous to include in an article aimed specifically at the CTF crowd.

comment 6mo ago · link · parent

For people who are confused by this comment: lol = laughing out loud!

comment 11mo ago · link · parent

That's the main reason, why I hope Google does not win this AI war.

comment 12mo ago · link · parent

I mean the inner select uses "limit 1", right? So it will usually (but not always as I said in another comment) only delete and return a single task.

comment 12mo ago · link · parent

We use a similar approach.

Fun fact: A query like this will, once in a blue moon, return more than limit (here 1) row, since the inner query is executed multiple times and returns different ids, which is surprising for a lot of people. If your code does not expect that, it may cause problems. (The article seems to, since it uses a list and iteration to handle the result.)

  delete from task
  where task_id in
  ( select task_id
    from task
    order by random() -- use tablesample for better performance
    for update
    skip locked
    limit 1
  )
  returning task_id, task_type, params::jsonb as params 
You can avoid that by using a materialized Common Table Expression. https://stackoverflow.com/questions/73966670/select-for-upda...

Also, if your tasks take a long time, it will create long-running transactions, which may cause dead tuple problems. If you need to avoid that, you can mark the task as "running" in a short-lived transaction and delete it in another. It becomes more complicated then, since you need to handle the case that your application dies while it has taken a task.

comment 12mo ago · link · parent

This file from chapter 1 cannot be opened: arch/x86/kernel/entry_64.S ("Failed to load file").

It's also not visible in the directory tree on the left.

(Oddly enough another comment mentioned this already and is voted dead. Why?)

comment 1y ago · link · parent

I would also really like to know that!

It generally seems to be a thing in trading: https://databento.com/pcaps

There is also this (though this page does not specify what pcap means): https://www.lseg.com/en/data-analytics/market-data/data-feed...

comment 2y ago · link · parent

"For this initial test I’ll be comparing the free version of ChatGPT to the free version of Google Gemini, that is GPT-3.5 to Gemini Pro 1.0."

The free version of ChatGPT is 4o now, isn't it? So maybe Gemini has not gotten worse, but the free alternatives are now better? When I compare ChatGPT-4o with Gemini-Advanced (wich is 1.5 Pro, I believe) the latter is just so much worse.

11.

ReversingHero – Reverse Engineering Challenge(reversinghero.com ↗)

2 points · by w23j · 2y ago · discuss

comment 2y ago · link · parent

Thank you!

comment 2y ago · link · parent

It now says "GPT inaccessible or not found", when I follow the link. Would someone share the prompt here? I am also very interested.

comment 2y ago · link · parent

The removal of the parentheses does not change the behavior of the program. I guess that would not be considered "breaking" the code.

comment 3y ago · link · parent

I see. Thanks for taking the time to reply!

comment 3y ago · link · parent

I agree, I would prefer JSON (or YAML) for example for configuration files. That is for stuff that humans actually read. I was thinking about using JSON/XML as a data exchange format between computers, because the context of this discussion has revolved about things like JSON/XML-Schema, JSON/XPath and SOAP/OpenAPI. There is a large trend to replace XML with JSON as data format for inter machine communication, and it is confusing to me.

comment 3y ago · link · parent

I probably phrased my question poorly. Why would I use a tool which is not or poorly maintained for a probably already outdated version of a specs, when I can use something else, that has been used for years by countless companies in productions? The advantages must be huge. And I don't know what they are.

OpenAPI is another example. There are threads on hacker news about generating code from OpenAPI specs. These always seem to say "oh, yes don't use tool X, use tool Y it does not have that problem, although it also doesn't support Z". The consensus seems to be to not generate code from an OpenAPI specification but to just use it as documentation, since all generators are more or less broken. Contrast that with for example JAXB (which is not an exact replacement I know), which has been battle tested for years.

comment 3y ago · link · parent

Can you name some of these reasons? Or give me link? Honest question!

comment 3y ago · link · parent

I haven't looked at JSON Schema in detail so please correct me if I am wrong, but I had the impression that the JSON Schema specification is still largely unfinished and evolving. That means you need to know which version the tool you use supports. And when I was looking for JSON Schema validators for Java all I found were projects on GitHub, which often were abandoned and referred the user to another GitHub project which was also abandoned. There does not seem to be support from an established project or vendor.

Compare that to XML where we have a plethora of established tools (Woodstoxx, JAXB, etc.).

What I have trouble to understand, which everybody else just seems to accept as obvious, is why one would take on these problems? Is JSON Schema more powerful than XML Schema? Does the use of JSON have advantages over using XML? When we are talking about a client program calling a server API with JSON/XML, why do we care about the format of data exchanged? What advantages does JSON have in this case in contrast to XML (or for that matter a binary format like Protocol Buffers)? Isn't this the most boring part of the application, which you would want to just get out of the way and work? What are the advantages of JSON over XML that would lead me to deal with the problems of evolving specifications and unreliable tooling?

(And just to repeat, since everybody seems to have a different opinion about this than me, I must be missing something and really would like to learn what!)

comment 3y ago · link · parent

So true. Also becomes apparent from this sentence in the Hackerone report:

"This report seems entirely correct and it hurts in my soul."

and the blog:

"[...] shipping a heap overflow in code installed in over twenty billion instances is not an experience I would recommend."

Harsh to have to bear that responsibility for so little reward.

comment 3y ago · link · parent

Great video! Thanks for the recommendation.

comment 3y ago · link · parent

Long running transactions can lead to an accumulation of dead tuples: https://brandur.org/postgres-queues

comment 3y ago · link · parent

> I suggest all HN articles must define all abbreviations and acronyms or be removed.

I can't decide if you are joking?

HR = Human Resources

PC = Personal Computer

HN = Hacker News

OP = Original Poster (?)

M.S. = Master of Science

certs = certificates

comment 3y ago · link · parent

My problem with IntelliJ (which I used to love), is that with each release it becomes slower and slower, while adding a bunch of features that, following the law of diminishing marginal utility, by now have negligible utility.

The time it takes to start a Java program in a Maven project is excruciating. And for unit tests or small utilities that's something I need to do countless times a day. While some random code analysis feature really is maybe helpful once a year. I actually reverted back from the last release because it got so bad.

Am I the only one with this problem? Has anybody found a solution for it?

comment 3y ago · link · parent

The people on the receiving end of this joke, are people who would think it's ok to do black face. Why is that racist?

comment 3y ago · link · parent

https://en.wikipedia.org/wiki/Timeline_of_the_far_future

comment 4y ago · link · parent

Those are some candid remarks by the new CEO.

"I have over 40 years of legal and restructuring experience. [...] Never in my career have I seen such a complete failure of corporate controls and such a complete absence of trustworthy financial information as occurred here. From compromised systems integrity and faulty regulatory oversight abroad, to the concentration of control in the hands of a very small group of inexperienced, unsophisticated[1] and potentially compromised individuals, this situation is unprecedented."[2]

I am really looking forward to the next Matt Levine column going through this filing!

[1] Ouch that hurts. At least you want to go down in history as a criminal mastermind!

[2] https://pacer-documents.s3.amazonaws.com/33/188450/042020648...

comment 4y ago · link · parent

Your writing reminds me a lot of "Zen and the Art of Motorcycle Maintenance".

'The real cycle you're working on is a cycle called yourself. The machine that appears to be "out there" and the person that appears to be "in here" are not two separate things. They grow toward Quality or fall away from Quality together.'

comment 4y ago · link · parent

So-called crypto "exchanges" often function as a mix of exchange, broker-deal and bank.

comment 4y ago · link · parent

No, the banks are committed. They can sell the debt to others, but if that fails, they just have to finance it themselves.

Musk actually can get out of the deal if he doesn't have the financing. But he has the financing, because the banks signed commitment letters. These commitment letters are valid until the beginning of next year. That's why he tried to drag out the lawsuit in the hope, that deadline might be passed.

1234