HNHacker News
TopNewBestAskShowJobs

yeputons

668 karma · joined October 9, 2021

submissionscomments
yeputons··on Google engineers want to make ad-blocking (near) impossible
Sometimes they are relevant and I click. Maybe few times in the last year. Quite a handy way to discover something you had no idea existed. A specialized driving school in my area, for example. Not searchable through Google Maps or Google; it's specific, but not specific enough.
yeputons··on Google restricting internet access to some employees for security
> In addition, some employees will have no root access, meaning they won’t be able to run administrative commands or do things like install software.

Did they _ever_ had root access in the last, I don't know, ten years?

yeputons··on Val, a high-level systems programming language
> these indices are locked to your particular data structure

Are they, though? Consider I have a linked list (or a map/dictionary, or any data structure that allows removal of arbitrary elements). I add elements with indices 1, 2, 3, 4, 5. I remove elements with indices 2 and 4. I'd like to make memory consumed by these elements available again. At the same time I don't want to change indexing scheme of the whole data structure. So I have to keep "holes" with indices 2 and 4 at the very least. After few million operations that may become very inefficient.

In a typical language, that would be resolved by having a global allocator that allows indices 2 and 4 to be reused in neighboring data structures. If I don't implement a global allocator that shares indices between objects (as that kills the whole point), I consume more memory than needed and rely on my own clunky implementation of garbage collection/defragmentation, don't I?

yeputons··on Val, a high-level systems programming language
> You just pass by value, return by value everywhere, all day long.

I cannot efficiently mutate or even store references in structs anymore. That seems to be a show-stopper if you want to have any non-trivial or non-standard data structures in the program. Granted, they are hard to get right, so maybe it's a feature.

yeputons··on Val, a high-level systems programming language
I've skimmed through the "mutable value semantics" paper: do I understand correctly that authors suggest replacing references and pointers with either: a) nested structs (with some indirection via `Any` with runtime-checks); b) array indices?

The following phrases got my eye: "It is reasonable to ask, then, how we can use mutable value types to represent self-referential data structures, such as doubly linked lists and directed graphs. In fact, any arbitrary graph can be represented as an adjacency list. For example, a vertex set might be represented as an array, each element of which contains an array of outgoing edge destination indices.". I don't see how one can reasonably implement doubly-linked list without re-inventing memory heap and some kind of garbage collection in the implementation.

UPD: found some discussion at https://github.com/orgs/val-lang/discussions/736 , seems that there will be some escape hatches akin to Rust's `unsafe`. That resolves all issues, and "whether the safe subset of Val is enough for reasonable application" question is open to long years of debate.

yeputons··on Why use Pascal?
> It's faster than scripting languages, but generally slower than AOT compiled languages, even those with GC.

Not sure about FPC, but Delphi 7 was on par with C++ ten years ago in competitive programming, that is about 2-3 times faster than Java. By competitive programming I mean very short (1-3 seconds per execution max, so any JIT is at disadvantage), CPU-bound single-threaded heavily algorithmic computation on mostly default compiler/runtime settings with no external libraries or ability to tweak. The common knowledge was: you either use C++/Pascal, or use Java and occasionally rewrite your 200-300 line solution to C++ if you get "time limit exceeded" error, and it passes with flying colors.

yeputons··on It's 2023 and memory overwrite bugs are not just a thing theyre still number one
I don't see how it mitigates anything. It merely adds a warning for _all_ older code and provides shiny new syntax exactly equivalent to an already popular practice of passing array and its length next to each other. All array-out-of bounds errors that were happening before will happen with the new syntax as well, won't they?
yeputons··on Do open source licences cover the Ship of Theseus?
Not sure about open-source licenses specifically, but as for Ship of Theseus, _bits have color_. One sequence of bits may be a license violation, and the exact sequence of bits obtained through different means may be not a license violation.

See https://ansuz.sooke.bc.ca/entry/23 and discussion at https://news.ycombinator.com/item?id=24917679 and older

yeputons··on Do open source licences cover the Ship of Theseus?
IIRC, the lawsuit was not primarily about rangeCheck function, it was just one of dozen points.

If you've got time, check out the full 62-page solution, it's a really nice read even if you're not a lawyer: https://www.supremecourt.gov/opinions/20pdf/18-956_d18f.pdf . Of course, it does not mean you (or me) understands it correctly. But it does contain everything you want, starting from background and some facts.

The main opinion and relevant facts are on pages 5-40. Dissenting opinion is on pages 44+. An interesting quote from there:

> Oracle spent years developing a programming library that successfully attracted software developers, thus enhancing the value of Oracle’s products[1]. Google sought a license to use the library in Android, the operating system it was developing for mobile phones. But when the companies could not agree on terms, Google simply copied verbatim 11,500 lines of code from the library. As a result, it erased 97.5% of the value of Oracle’s partnership with Amazon, made tens of billions of dollars, and established its position as the owner of the largest mobile operating system in the world. > ... > Oracle gave developers free access to these methods to encourage them to write programs for the Java platform. In return, developers were required to make their programs compatible with the Java platform on any device. Developers were encouraged to make improvements to the platform, but they were required to release beneficial modifications to the public. If a company wanted to customize the platform and keep those customizations secret for business purposes, it had to pay for a separate license.

yeputons··on Never trust a programmer who says they know C++
It only helps so much.

I've taught to freshmen students who have personally encountered dozens of different false positives and false negatives not only with sanitizers, but with compiler warnings as well. Nothing extraordinary, just `-Wall -Wextra -Werror` with the latest available GCC/Clang on the latest available Ubuntu LTS.

Some examples (some library bugs are also included):

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98677

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105729

https://github.com/llvm/llvm-project/issues/59432

https://github.com/boostorg/dll/issues/30

https://github.com/boostorg/asio/commit/71964b22c7fade69cc4c...

https://github.com/chriskohlhoff/asio/issues/997

I've also seen fun examples of a program working with all sanitizers in 14 modes across 3 OSes (GCC and Clang on Ubuntu, Apple Clang on macOS, Visual Studio on Windows), and _only_ failing with Visual Studio Release mode. It was an array overflow. Just was not caught by sanitizers.

Mind you: no weird C++ magic, just standard coding exercises.

yeputons··on Never trust a programmer who says they know C++
> Which are...?

I guess they're different for different interviewers.

The one I would use is something about undefined behavior. I mean, the fact that it exists and consequences. For example: "this program works, but if I add this line of code at the very end, the program crashes. Can be I sure that it crashed because of that line or some incorrect inputs to that line?"

In (almost) all other languages the answer is "Yes". Not in C++ or C. You may have a faulty program in the first place that just happen to not crash.

All other quirks and syntax can be picked up when needed. You can play around and investigate. But undefined behavior requires one to think and debug in a very different mindset. One cannot assume that a program that does not crash and gives a correct answer will do that if extended.

yeputons··on Moderation strike
> Will they also bring ChatGPT to the interview? That'd be fun to watch.

It is already done, as I've heard. The previous iteration was to pay your lookalike to pass the interview for you. Or just pay anyone and blame lack of camera on "technical difficulties".

yeputons··on Moderation strike
You're correct that distinguishing between AI-generated content and human-generated content can be a challenging problem. With the advancements in AI, particularly in natural language generation, it has become increasingly difficult to detect AI-generated text. This poses several challenges in various domains, including online platforms, journalism, and even legal contexts.

The ability to determine the origin of content is indeed a complex issue. However, it's important to note that researchers and developers are actively working on developing methods to identify AI-generated content. There are ongoing efforts in the field of AI ethics and responsible AI development to address this problem.

Some approaches to tackling this issue include developing AI algorithms that can generate AI-generated content, also known as "adversarial AI." These algorithms aim to create AI models that can detect and identify AI-generated text by analyzing patterns, linguistic cues, or statistical properties specific to AI-generated content.

Additionally, researchers are exploring the use of metadata, watermarking, or digital signatures to provide additional information about the origin or authenticity of content. These methods could potentially help in distinguishing between AI-generated and human-generated content.

While it may be a complex problem to solve entirely, the development of techniques and tools to identify AI-generated content is an ongoing area of research. The aim is to create a balance between the benefits of AI-generated content and the need for transparency and trust in online information.

Of course, all paragraphs above are ChatGPT-generated. I did not even read them before commenting. That's the bar to clear. Otherwise, see https://xkcd.com/810/

yeputons··on Temporary Reintroduction of Border Control (Schengen Area)
Although there is generally no internal border control in Schengen Area, it can be temporarily reintroduced. The page lists current border control reintroduction as well as historical data.

Degrees vary. For example, some kind of Germany's border control with Austria started as early as 2015 and is still active to this day. I've seen it in a train from Salzburg to Munich in 2019, but it was like a routine ticket inspection. Just the German police checking passports and visas instead of DB officers checking tickets.

yeputons··on Never trust a programmer who says they know C++
I believe lots of courses still teach C-esque C++ first, starting with "three kinds of memory: stack, heap, global", then adding classes, followed by templates, and finally getting into STL.

Here is an example MIT course from 2011, it introduces C-style arrays and C-style strings in lecture 4, pointers in lecture 5, and classes in lecture 6: https://ocw.mit.edu/courses/6-096-introduction-to-c-january-... (although memory management is postponed)

Another MIT course from 2014 explicitly starts with C, but it has "C and C++" in its name: https://ocw.mit.edu/courses/6-s096-effective-programming-in-...

yeputons··on Show HN: Google Code Jam Archive
Thank you very much! Did you have any luck with Distributed Code Jam?
yeputons··on Show HN: Google Code Jam Archive
Absolutely. It's only in some jurisdictions it's somewhat illegal to simultaneously lay off, rescind offers and hire.
yeputons··on Postgres and "Persistent Data Structures"
In the beginning of the post you mention that you need to collect updates from all delta layers until you hit an image layer. Does that mean you have to make a O(log n) query once again every time you hit a delta layer? Is that a slowdown?
yeputons··on Postgres and "Persistent Data Structures"
There was an attempt to use `im` crate instead of `rpds` somewhere in the middle of the Pull Request, but there were some issues with getting wrong results and whatnot. Did you manage to understand whether it's the crate or the calling code?

P.S. Glad to hear it all worked out in the end!

yeputons··on OpenAI came after our domain because we use GPT in it
Maybe that has something to do with feet and inches instead of metric.
yeputons··on OpenAI came after our domain because we use GPT in it
And that's why I always write month as a word
yeputons··on OpenAI came after our domain because we use GPT in it
Good catch, I did not notice that "I" and "L" are intermixed in the letter. In particular, their link uses "L" instead of "I".
yeputons··on Community is the future of AI: Blog post and community discussion
Here is a discussion of the post at Stackexchange Meta: https://meta.stackexchange.com/questions/388401/new-blog-pos...

Some comments may refer to that discussion post instead of the original blog (e.g. ones talking about downvotes) because it was a separate submission to HN whose comments were moved to this page.

yeputons··on Community is the future of AI: Blog post and community discussion
For me, both. I search for something generic, either an official manual, a bug report or a StackOverflow's answer pops up. I have a specific narrow question, I'm unable to google the answer, I ask, a more knowledgeable person appears and ties all the loose ends together in I way I have never thought of.
yeputons··on Community is the future of AI: Blog post and community discussion
> especially for people new to programming or just looking to learn

Yes, StackOverflow is not for beginners at all. It's for fairly narrow technical questions.

Maybe AI may assist in asking a good question or breaking down a big question into narrow on-topics ones.

yeputons··on An AI Just Cracked Your Password
Do they provide any details on their study, except for a few sentences on a beautiful web page? Is this related to the paper from 2019: https://arxiv.org/abs/1709.00440 ? Maybe to the corresponding tool from 2017 that tried to reproduce results of their previous versions of the paper: https://github.com/brannondorsey/PassGAN ?
yeputons··on How big should a programming language be?
One can get really far without ever touching `std::move` or `std::unique_ptr`. Especially when taught about `new`/`delete` first. Lots of courses still teach C-esque C++ first and students just keep to it because it's more explicit.
yeputons··on Detect ChatGPT Generated Content
Yes, it was ChatGPT indeed.
yeputons··on Detect ChatGPT Generated Content
I can tell you that detecting AI plagiarism can be a challenging task, as AI models like ChatGPT are able to generate text that is similar to existing text. It is important to note that not all text generated by AI models is considered plagiarism, as it may be used in a legal, educational or research context. The best way to evaluate the accuracy of a plagiarism detection website would be to test it using a variety of inputs, and compare its results to those of other plagiarism detection tools.

Sorry.

yeputons··on Git-sim: Visually simulate Git operations in your own repos
Looks great!

I'm really missing support for remotes. There are lots of tools for local-only development (like https://gitexercises.fracz.com/), but very few allow to demonstrate stuff like "Syncing a GitHub fork with the original repository" which involves two remotes and three copies of the same branch at the very least.

← PreviousPage 3 of 6Next →