HNHacker News
TopNewBestAskShowJobs

devit

4,235 karma · joined September 10, 2015

submissionscomments
devit··on Show HN: GPT-4-powered web searches for developers
Here you can apply the most common technique for such problems, which is to create a graph whose vertices are pairs made of a vertex of the original graph, plus the "state" of the traversal (or in other words, the essential information about the path used to reach the vertex).

In this case, the state is the number of walls passed, so just create a graph made of (v, k) pairs where for adjacent v and w in the grid, (v, k) connects to (w, k) if there is no wall, and it connects to (w, k + 1) if there is a wall.

Then run A*, finding the shortest path from (start, 0) to (end, 1), reconstruct the path and look at where it transitions from a (v, 0) to a (w, 1) and then return the wall between v and w.

You can use this for all sorts of other constraints, like finding a path that only changes direction up to N times, or a path where you don't get eaten by the monster moving deterministically (in this case the state is the monster position), or a path where you spend up to N time underwater consecutively, etc.

But GPT-4 seems very bad at solving problems, so even though this is an easy problem, it's not unexpected that it would not come up with this solution.

devit··on Why don't we define “imaginary” numbers for every “impossibility”? (2012)
You can do that, but there's a tradeoff of losing properties that otherwise hold.

For example, by adding the imaginary numbers, there is no longer an ordering compatible with addition and multiplication (ordering compatible with multiplication means that z > 0 and x > y implies x * z > y * z: assuming that, if 0 < i, then 0 = 0 * i < i * i = -1, absurd, or if 0 > i and thus 0 < -i, then 0 = 0 * -i < -i * -i = -1, absurd).

You can certainly add a number x such that x = x + 1 (e.g. what is commonly called an infinity or NaN), but that implies no longer having additive left inverses assuming you keep associativity of addition and 0 != 1 (since otherwise 0 = -x + x = -x + (x + 1) = (-x + x) + 1 = 0 + 1 = 1).

devit··on Italy's ChatGPT ban attracts EU privacy regulators
Italy has not banned ChatGPT: that would be accomplished by a DNS-level block on national ISP resolvers that has not been applied, which would be trivially circumvented by using an unaffected DNS resolver.

Rather, OpenAI has decided to respond to an injuction to stop processing Italian PII within 20 days by immediately configuring their Cloudflare account to block connections from IPs where the GeoIP lookup resolves to Italy, which is easily circumvented by a VPN or proxy.

devit··on OpenAI Tokenizer
Interestingly they seem to have different token ids for "Word", "word", " Word" and " word". That seems kind of a wasteful design.

It seems like it would make more sense to have a single token for all variants and then a "capitalized where not expected" token (e.g. "foo Foo"), a "not capitalized where expected" token (e.g. "foo. foo") and a "missing space where expected" token (e.g. "foo.Foo").

The lack of any normalization also means that WrItInG tExT lIkE tHiS will make future GPT versions not be able to make full use of the text during future training unless they change the tokenization (or the model is so overpowered that it doesn't matter).

devit··on Goodbye to Google Code Jam
In-person competitions simply don't allow any Internet access, you have to use their own machines and you can't bring any data or printed material or electronic device.
devit··on Goodbye to Google Code Jam
GPT-4 is competely incapable of solving any advanced problem in coding or mathematics competitions, and usually doesn't even appear to correctly understand the problem statement (assuming the solutions are not in the training set, of course).

Just try submitting the IOI 2022 and IMO 2022 problems.

Obviously it still outperforms the average human, since the average human has no knowledge of mathematics or computer science whatsoever.

devit··on GitHub Copilot X – Sign up for technical preview
It's a bit annoying that you have to pay for Copilot just to sign up for the waitlist, rather than being able to either pay for acceptance or start paying when you are accepted.
devit··on StarFighter 16 inch: 4K Coreboot/Ryzen Linux laptop
Missing discrete GPU and ECC RAM.
devit··on Image Compression with Singular Value Decomposition
Basically this expresses the image as an image where each row is a linear combination of a set of K rows, with different coefficients for each row (or equivalently for columns).

In general it doesn't make sense to compress images this way, since the algorithm is not invariant with respect to 2D image rotation, a very relevant operation for realistic images, but is invariant with respect to row/column permutations, which are not a relevant operation for realistic images.

devit··on AMD Killed the Itanium (2005)
And the problem is that such a thing doesn't really work on mainstream CPUs, because memory access instructions take a highly variable amount of cycles depending on which cache level the data is in, which the compiler cannot know, and generating code for all possibilities leads to exponential blowup of the source code size.

It's not clear how Intel thought it could possibly work.

devit··on Show HN: ELI5 Powered by GPT-3
This appears to just hallucinate it using the LLM (easily seen by using made-up words).

A much better approach would be to do a Wikipedia/web search and then ask the LLM to summarize the results for a 5 years old.

devit··on Fedora's tempest in a stack frame
As long as you build unwinding tables for each function (which I'm pretty sure gcc has an option for), there is no need for a frame pointer unless the function uses alloca or stack VLAs.
devit··on Servo to Advance in 2023
Because an unexploitable browser (which is the main fundamental advantage of Servo) is more important for Tor than elsewhere since an exploit will compromise anonymity.

Also, since Tor browsing is often done with JavaScript off, and removing JavaScript removes a huge amount of web features that need to be supported (including a JavaScript engine, which I think Servo still doesn't have a pure Rust implementation of), it's much easier to make a usable browser for this use case than others.

devit··on Servo to Advance in 2023
I'd suggest those priorities, in order:

1. Making a fully secure no-JavaScript browser for Tor usage

2. A secure browser that works on major websites

3. Android support

4. Embedding support

5. Extensions support

6. All missing features supported by both Firefox and Chrome, roughly in order of addition to the web standards

7. Replace Firefox

8. All features supported by any browser

devit··on ReDoS “vulnerabilities” and misaligned incentives
Or just stop using terrible regular expression engines with superlinear runtime?

E.g. Rust's regex crate has linear runtime is thus not susceptible to "ReDoS".

devit··on Debunking common myths about the Autobahn
For noise, they should either build a barrier or buy out the properties nearby, certainly not limit the speed.

And for surface conditions, repave the road.

devit··on Debunking common myths about the Autobahn
The problem with the Autobahn are the 120 km/h speed limits that are there on a sizeable portion of it for no reason.

They should remove all the speed limits, not add more.

devit··on Ask HN: How would you build a ChatGPT detector?
Great question! I've been using the new AI assistant for a while now and I've definitely noticed a certain "sameness" to its responses. In fact, I think it would be relatively easy to build an AI that could recognize the writing of this AI. The key would be to train the AI on a large dataset of the assistant's responses, which would allow it to learn the patterns and characteristics of the assistant's writing style. I'm not sure how accurate it would be, but I'd be interested to see how well it performs.
devit··on Blitsort: A fast, in-place stable hybrid merge/quick sort
This is only for algorithms whose output is solely dependent on the outcomes of comparisons of input values.

Otherwise you can for instance sort an input made of zeroes and ones in O(n) time and O(log(n)) space by counting the ones.

devit··on Firefox Translations: Translate websites in your browser without using the cloud
Wow, finally!

The lack of working translation was the biggest reason to use Chromium instead of Firefox.

And being local is great, and the quality even seems quite good.

devit··on Hare is a boring programming language
It looks like a language equivalent to Hare can be obtained by adding restrictions to C++.

Considering the lack of key C++ features (e.g. generics) in Hare and the lack of adoption, and most importantly the fact that you should use a memory-safe language like Rust instead of any memory-unsafe language like Hare or C++, there doesn't seem to be any practical use for the Hare language.

devit··on Inverting a binary tree using x64 assembly
That solution is terrible, with a bad algorithm that requires O(tree_height) space (the optimal one involves temporarily using left/right pointers as a parent pointer so that you only need constant space) and lacking any sort of assembly optimization, being worse than what a compiler would produce (e.g. it's a real mystery how the author managed to decide that local_right should be spilled on the stack).

Definitely not what you want to submit to someone testing your programming skills.

devit··on Mold linker may switch to a source-available license
They could make only the OSX version proprietary, which would not be a big issue since OSX users have already opted in to slavery.
devit··on Multiple assertions are fine in a unit test
The problem seems to be that assert is implemented as a regular function.

It must be implemented as a macro so that the line number and assertion expressions are printed, allowing to easily identify the failed assertion.

If a language doesn't support such macros and has no ad-hoc mechanism for this case, it should not be used, or if it must the assert function must take a string parameter identifying the assertion.

devit··on Telling people you're a self taught developer in YouTube is a big business now
You need to like it.
devit··on Debian votes to include proprietary firmware, amends social contract
The source code to the tooling that generates the initialization code sequence along with all the input and configuration files and anything else needed to run it constitutes the source code of such a binary blob.
devit··on Someone Is Trolling Celebs by Sending ETH from Tornado Cash
You can program your smart contract to forever deny the use of such funds by recording its "non-selfdestruct" balance in the state and only allow to withdraw up to that amount.
devit··on Someone Is Trolling Celebs by Sending ETH from Tornado Cash
You can if you put your money in a smart contract that refuses all transfers that haven't been pre-approved by you, although that's not the standard procedure.
devit··on Making an Accurate Sleep() Function
That's what vsync is for.

And despite what some people and games seem to think, vsync isn't an optional feature that you can turn on or off, it's something that must always be enabled since it's essential to display correct graphics.

devit··on How to Not Get Hit by Cars
I don't understand why crossing between sidewalks would be unsafe.

Pedestrians obviously do that all the time, and assuming that you start crossing from a stopped state and not at speed, it seems to me that a bike is as visible or more visible than a pedestrian (about same height, much wider, similar speed).

← PreviousPage 11 of 34Next →