News for hackers. Stuff that matters.

harerazer

Re:Getaddrinfo() on glibc calls getenv(), oh boy on Tuesday October 17, 2023 @12:26AM (#37910607)
Then don't do that. Of all the footguns in POSIX/C programming, having to remember to free this is really not as bad as you seem to imply.
Re:Omnivore – free, open source, read-it-later App on Sunday October 15, 2023 @11:24PM (#37895620)
> How much will it cost, what will the free version lose, what data of mine will be sold, etc?

It is open source, so you can run it yourself.

Re:Rethinking the Luddites in the Age of A.I on Tuesday September 26, 2023 @10:21PM (#37669045)
To be fair, I don’t think its so much about white collar jobs being under threat as it is about creative jobs being under threat. Many creative pursuits are viewed as an outlet of human expression in a way that other jobs never were, and I think this is what is driving the new wave of the Resistance^TM
This isn’t really correct. Typically exchanges have safety parameters which market makers can set according to how they wish to trade, and if you exceed those your orders will no longer be accepted and existing orders may also be pulled.

Obviously there are false positives occasionally and there is typically communication between the exchange and the market maker to ensure those don’t reoccur.

Re:Functions are Vectors on Saturday July 29, 2023 @11:07PM (#36927418)
Indeed, many linear algebra textbooks define a tuple of real numbers as a function f: {1,...,n} -> R.
Recently, mold 2.0 was posted, which is also C++.
I've learned a lot from Matt Godbolt's blog https://xania.org/ . He's the author of Compiler Explorer, also works at https://aquatic.com/.
Re:File for Divorce from LLVM on Thursday June 29, 2023 @11:04PM (#36530057)
I mean, it’s no secret that zig is pre 1.0. I’m not sure this is on them, although it does seem like a drastic proposal.
Re:Blowing up my compile times for dubious benefits on Thursday June 22, 2023 @12:19AM (#36427968)
This makes a lot of sense and gives context to the assumption that we only need to handle the case where an opponent's piece is in the way. Would be great if the author took the 2 sentences to explain this near the beginning of the article.
Re:Blowing up my compile times for dubious benefits on Thursday June 22, 2023 @12:01AM (#36427882)
I'm clearly misunderstanding something here. Assuming the rest of the board is empty, if e1 is occupied, the rook can't move to e1, whereas if it isn't occupied, the rook can move to e1, so there is at least one position in which we must check e1. What am I misunderstanding here?
Re:Blowing up my compile times for dubious benefits on Wednesday June 21, 2023 @11:16PM (#36427612)
I was also confused by this. I was wondering if he was going to use #embed or something of the like.
Re:Blowing up my compile times for dubious benefits on Wednesday June 21, 2023 @11:10PM (#36427586)
While this post has a good amount of substance, I found it rather hard to understand due to small mistakes (or hidden assumptions, or something else?). All of which seem easily fixed/clarified, but these sorts of things are unnecessary friction for readers.

Some examples:

- According to the first bitboard (and the convention explicitly stated in the OP), A2 has index 8, not 1.

- In the second bitboard, the rook on e4 should be able to move to e1,a4,e8,h4.

- max of 9 relevant occupancy bits for a bishop - how? A bishop on e4 for example would have to check b1,c2,d3,f5,g6,h7 and a8,b7,c6,d5,f3,g2,h1 for a total of 13 bits. Similar mistake for a the rook.

- The so called "original" masked occupancy bitboard was not mentioned previously

- That same bitboard has variables b1,b2,b3,b4,b5 on it, a notational collision with the squares b1-b5. - The variables b1-b5 are in the wrong place (presumably they were meant to be on c3,d4,e5,f6,g7 since the bishop is on b2, and again there is the question of why not h8 and the other missing squares).

- Magic number comes out of nowhere. What is it doing? Presumably the purpose is to extract the relevant positional bits to be the most significant ones while keeping the order, done through the multiplication + bitmasking, but this should be explicitly stated. We also have no idea how it is derived.

- What are the "collisions" actually collisions of? It would be nice to see an example of this.

Re:My first superoptimizer on Monday May 29, 2023 @06:17PM (#36118752)
This is essentially calculating the Kolmogorov complexity of whatever the final state of memory wrt to the constrained assembly (and giving the associated program). Since the any program in the constrained assembly always halts, this is possible a la brute force.

It also doesn't seem particularly interesting because it doesn't allow the programs to get input. Obviously that makes things much more difficult wrt to proving program equivalence.

Re:2022 was the year of Linux on the Desktop on Sunday December 25, 2022 @07:17PM (#34133059)
I regularly fill out pdf forms using firefox on Linux Mint.
Re:2022 was the year of Linux on the Desktop on Sunday December 25, 2022 @07:11PM (#34133015)
Another vote for Mint here. Had some minor mouse sensitivity problems starting out but other than that I’ve been using it as my daily driver for 2 years now without any problems.
As someone who does most reading on an IPad, and was already somewhat reluctant to update: I'm never updating to iOS 16. This along with some other changes have convinced me totally (see, for example, some of the changes listed by dmitriid)
Re:Fast midpoint between two integers without overflow on Wednesday December 07, 2022 @11:43AM (#33896568)
y - x overflows on y = INT_MAX and x = -1.
Re:Patreon Lays off 17% of Staff on Tuesday September 13, 2022 @05:13PM (#32830249)
I’m just going to point out that growing 10% per year is actually exponential growth
Consider the following decision: If x < 0.5 go left at a constant speed till the hay is reached, else go right at a constant speed until the hay is reached.

Then A(t,x) is clearly not continuous in x, and we can easily bound the time required to make a decision. The nuance here is that we have to somehow be able to distinguish 0.5 - eps from 0.5 for very small epsilon.

Edit: on further thought, suppose we had a device which measured reasonably well. More precisely it tells us x < 0.5 if x is actually <= 0.5 - c, it tells us x >= 0.5 if x > 0.5 + c, and tells us it is unsure otherwise. We do not know c, but it is deterministic (and hopefully reasonably small). Then we can decide to go left if it tells us x < 0.5, and right if it tells us unsure or that x >= 0.5.

Re:Why I left my tenured academic job on Sunday October 04, 2020 @06:31PM (#24682774)
> Although I admit the worst environment probably is found in academia because of the lack of checks and balances (being in the wrong lab can really be a nightmare), I would argue the best environment may also be in academia.

Isn’t this equivalent to saying that academia has the highest variability?

Ah yes, the AI version of the no true scotsman fallacy