HNHacker News
TopNewBestAskShowJobs

teo_zero

1,544 karma · joined August 14, 2022

submissionscomments
teo_zero··on Building a Shell
> the shell is not usually doing printing of the result of evaluation

I always include $? in the prompt, so I guess I can say it does print the result of the evaluation.

teo_zero··on Faster asin() was hiding in plain sight
The bad thing about this method is that it's slower than native CPU instructions. The good thing is that the result is very precise for at least 2 values of x, namely 1.0 and -1.0

JK

teo_zero··on Training students to prove they're not robots is pushing them to use more AI
> now I write less good on purpose, so whatever I commented doesn't get drawn into a sidetrack off-topic witch-hunt.

I've begun downvoting each and every entry that questions the authenticity of a comment or article.

I don't even bother if the claim is true or not. A text can be AI-generated and interesting, or human-written and dumb.

teo_zero··on Training students to prove they're not robots is pushing them to use more AI
One of the skills teachers have always demonstrated, is to be able to detect when students copy. This has never pushed students to artificially add mistakes to their essays.

If now teachers abdicate this judgment to a software, students should be allowed to abdicate their duties to a computer as well.

teo_zero··on Ki Editor - an editor that operates on the AST
Re. incoherence of vim's keybindings, I partially agree.

Most of the times, shift means "bigger", and only in a few places it means "invert".

Examples of "bigger" are all the motions involving words vs. WORDS, where WORDS are a broader interpretation of words; "V" is like "v" but by lines, thus in larger chunks; "C", "D", "Y" do the same as their unshifted counterparts, but extended to the end of line; etc.

Examples of shift meaning "invert" are fewer, and all sound irrational to me:

With x/X and o/O, the shift inverts the direction left/right or above/below, but we don't have for example i/I to insert to the left/right of the cursor, and H is not the opposite of h, J is not the opposite of j, etc.

With n/N, shift inverts next and previous. Why not n/p? I know, I know: p was already taken for paste, but still...

Finally, t/T/f/F are completely mixed up. In my mental model, t/f sound like to/from and I'd rather use them to move forward/backward till (not including) a char, while T/F would be the "bigger" variants which include the destination char.

teo_zero··on Why does C have the best file API
What a bizarre conclusion to draw! It's like saying that cars are the best means of transportation because you can travel to the Grand Canyon in them and the Grand Canyon is the best landscape in the world, and yes you could use other means to get there, but cars are what everybody's using.

If the real goal of TFA was to praise C's ability to reinterpret a chunk of memory (possibly mapped to a file) as another datatype, it would have been more effective to do so using C functions and not OS-specific system calls. For example:

  FILE *f = fopen(...);
  uint32_t *numbers;
  fread(numbers, ..., f);

  access numbers[...]

  frwite(numbers, ..., f);
  fclose(f);
teo_zero··on Show HN: Unfucked - version all changes (by any tool) - local-first/source avail
Debian Linux.
teo_zero··on Show HN: Unfucked - version all changes (by any tool) - local-first/source avail
Excellent idea. Looking forward to trying it. Any way to install it without brew?
teo_zero··on Self-improving software won't produce Skynet
> The AI is acting at your direction and following your lead. While it is autonomous in its execution of tasks, it is unlikely to go rogue. It doesn't possess a sense of self-will, self-determination, or a secret plan to take over the world.

Isn't this what Frau Hitler used to say of his cute little son Adolf aged 6?

teo_zero··on My lobster lost $450k this weekend
Are you sure you didn't mean Memento?
teo_zero··on Keybee: A Keyboard Designed for Smartphones
> who is heavily working with text, which requires a lot of typing, and only has a smartphone?

People reading HN on the subway, who have some insightful comment to add, but are slowed down by unergonomic input methods?

teo_zero··on Show HN: Llama 3.1 70B on a single RTX 3090 via NVMe-to-GPU bypassing the CPU
I think we use different units. In my system there are 3600 seconds per hour, and watts measure power.
teo_zero··on How far back in time can you understand English?
Excellent essay.

To those who enjoyed it so much as to come here and read these comments, I'd suggest to fetch a copy of David Mitchell's "Cloud Atlas", and appreciate the multiple style changes between the various sections.

teo_zero··on How far back in time can you understand English?
You can tell second-language speakers because they know when to use "its" and "it's".
teo_zero··on Choosing a language based on its syntax?
Yes, it's a pity that some symbols have been overloaded with multiple meanings and the syntax can't disambiguate them. This case would not exist if another symbol had been chosen for dereference.

A similar claim, equally not related to type declarations, is with & that serves two roles as a boolean operator and address-of, that makes (foo)&bar ambiguous.

The list of C symbols that have been badly chosen at the beginning and now it's too late to correct continues with && for logical and, that prevents masking an address-of without adding spaces or parentheses in ``mask & &var``, /* for comments, that prevents dividing by a dereferenced value without adding spaces or parentheses in ``*a / *b``, the pre-increment ``--`` that is indistinguishable from a double application of the unary minus, and the original =+ etc. that have been later changed to += etc.

teo_zero··on Is Show HN dead? No, but it's drowning
Yes please! I don't know what's worse: reading an AI-generated post or several comments that go like "I've spotted an em-dash, it must be AI generated".
teo_zero··on How to take a photo with scotch tape (lensless imaging) [video]
Of course it must be Scotch tape, because Scotts are not particularly renowned for their ribbons...
teo_zero··on Vim 9.2
I'd bet it's some plugin. I have a vanilla Vim and never noticed anything like that.
teo_zero··on Vim 9.2
I don't get where your surprise comes from. Of course companies have the last word on what tools you are allowed/obliged to use when you're on duty. Uniforms, vehicles, why not software?
teo_zero··on The Singularity will occur on a Tuesday
You shouldn't take a sci-fi writer's words as a prophecy. Especially when he's using an ingenious gimmick to justify his job. I mean, we know that it's impossible for anyone to tell how the world will be like after the singularity, by the very definition of singularity. Therefore Herbert had to devise a ploy to plausibly explain why the singularity hadn't happened in his universe.
teo_zero··on I write games in C (yes, C) (2016)
You can surely create a std::string-like type in C, call it "newstring", and write functions that accept and return newstrings, and re-implement the whole standard library to work with newstrings, from printf() onwards. But you'll never have the comfort of newstring literals. The nice syntax with quotes is tied to zero-terminated strings. Of course you can litter your code with preprocessor macros, but it's inelegant and brittle.
teo_zero··on I write games in C (yes, C) (2016)
I agree on the former two (std::string and smart pointers) because they can't be nicely implemented without some help from the language itself.

The latter two (hash maps and vectors), though, are just compound data types that can be built on top of standard C. All it would need is to agree on a new common library, more modern than the one designed in the 70s.

teo_zero··on SectorC: A C Compiler in 512 bytes (2023)
It would be interesting to understand what non-toy programs can be coded in this subset of C. For example, could tcc be rewritten in this dialect?
teo_zero··on New York’s budget bill would require “blocking technology” on all 3D printers
> how long is it before you can't print a replacement part for something you bought because it looks too similar to an OEM part and the manufacturer doesn't think you should be able to do that so they throw a little money to the right politician

At least 25 years. That's the time passed since the first introduction of Eurion marks on banknotes. As far as I know, noone has used it to block reproduction of anything other than money.

teo_zero··on Tomo: A statically typed, imperative language that cross-compiles to C [video]
Obligatory reference: http://www.cs.utexas.edu/~EWD/ewd08xx/EWD831.PDF
teo_zero··on Notepad++ hijacked by state-sponsored actors
> Asking for "no politics" is itself a strong political view

If this is true, I'd like to know what a weak political view is instead!

teo_zero··on Noctia: A sleek and minimal desktop shell thoughtfully crafted for Wayland
I have doors between rooms in my house, despite its being inhabited by members of the same family who trust each other.
teo_zero··on When Every Network is 192.168.1.x
And we could represent the addresses with hex numbers separated by : instead of decimal numbers separated by .
teo_zero··on I made my own Git
That reminds me of the protagonist of Charles Stross's novel "Accelerando", a prolific inventor who is accused by the IRS to have caused millions of losses because he releases all his ideas in the public domain instead of profiting from them and paying taxes on such profits.
teo_zero··on A static site generator written in POSIX shell
The shell might be POSIX, but sed uses a GNU extension -- namely, the double address "a,b".

EDIT: Sorry, I was wrong, the double address is indeed POSIX. I was thinking of the GNU syntax: a,+n

← PreviousPage 7 of 31Next →