HNHacker News
TopNewBestAskShowJobs

tzot

274 karma · joined June 14, 2020

Just an earthbound misfit, I.
submissionscomments
tzot··on The Lobster Programming Language
> Having had apps with YAML for config, and having had nightmares trying to copy/paste config directives from various sources, I just find whitespace to be unwieldy.

Convert your YaML into JSON and save it in your YaML file. There is probably an online converter, but writing one in your language of choice should be less than ten lines of code.

Do the same YaML→JSON for the “source” configuration you want to copy from, and copy-paste the parts you want. Leave them as JSON.

Complaining about Python's significant whitespace, I get it. I don't mind it personally, but it's obligatory and you can't overcome it (unless you do `coding: with_braces` tricks, of course). But why one would complain about YaML's whitespace? It is not obligatory.

    some_key:
      attr1: val1
      attr2: 12312
is equivalent to

    {some_key: {attr1: val1, attr2: 12312}}
is equivalent to

    {"some_key": {"attr1": "val1", "attr2": 12312}}
is equivalent to

    {"some_key": {
    "attr1":
    "val1", "attr2": 12312
    }
    }
and they're all valid YaML (and on the plus side you can leave dangling commas at the end of sequences, but it won't be valid JSON anymore).
tzot··on Mysterious life form found on ship that docked in Cleveland
Even better the last segment of that one (specifically an aquatic organism): https://www.imdb.com/title/tt0092796/
tzot··on Pluto is a unique dialect of Lua with a focus on general-purpose programming
If the numeric argument to break is what you find interesting, then this is exactly the same construct as the shell's break argument:

https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V...

tzot··on Using Microsoft's New CLI Text Editor on Ubuntu
Ctrl-Shift-C/V/X are not implemented in bash; it's the terminal emulator program that handles these. So the default terminal emulator of Ubuntu (gnome-terminal I assume, but ICBW) knows about a “system” clipboard and copies stuff to it and on paste feeds bash with the copied data. If you press Ctrl-Alt-F1 (and F2, F3, depends on your distribution's defaults) you can login and in your login shell, which I understand is bash, Ctrl-Shift-C/V/X have no difference to shiftless Ctrl-C/V/X.
tzot··on ZX Spectrum graphics magic
> On the other hand if you think that in 48Kb of RAM they had to fit the video RAM about 8 Kb, the BASIC compiler, my BASIC code, the compiled code and use some RAM for stack and variables ... crazy. Fun times...

I had a Spectrum, and then when the QL got relatively cheap, I got one too. Loved 68K assembly.

Given that the 68K instructions were always a multiple of 2 bytes, in its 48K ROM you could have a maximum of 24576 instructions. Now remove the space needed for the bitmap font and some lookup tables, and in the remaining space you had:

- A multitasking operating system (no memory protection, of course), with networking (not TCP/IP of course) and media (microdrive) management, and generic channels kind of in the Unix file spirit

- A (non-re-entrant, single instance) “SuperBASIC” with procedures and functions with LOCal variables, a switch construct (SELect ON), FOR loops with epilogues that would run if not broken out of the loop, and other goodies, which SuperBASIC was also the system shell

- A collection of system calls and a system library, from windowing functions to software floating point (the 40-bit format) operations

Not having a lot of money for software but with the help of some book from the library (titled something like Assembly Programming on the Sinclair QL, don't remember exactly) I even wrote a disassembler in SuperBASIC to decode and grok the ROM. My mind was blown with the density of the ROM code.

tzot··on Tips for mathematical handwriting (2007)
ISTR the origin of Cyril and Methodius (the two monks that created the precursor to the cyrillic alphabet, can't remember the exact name of that alphabet ATM) cannot be pinpointed as either Greek or Bulgarian because no such documentation has been found. They surely were Byzantine, though.
tzot··on How (not) to sign a JSON object (2019)
> When compared to encoding a value directly in binary, base64 has about a 25% overhead (6 bits /8 bits, 3/4).

The original data take ≥25% less space than the base64-encoded data, but the base64-encoded data take ≥33⅓% more space than the original data. The overhead is about 33⅓%.

tzot··on Decoding the telephony signals in Pink Floyd's 'The Wall'
In a parallel universe, this thread is about the Beatles, where you woke up from the dream, found your way downstairs, had a coffee and somebody replied to your post.
tzot··on Show HN: Minimal, customizable new tab for Chrome/Firefox
> Is there an advantage I'm not seeing over Ctrl+T

My own experience is that all of the times I press Ctrl+T is to open a new tab to enter a location I want to navigate to; I don't care much for what the new tab displays (this is why I set my default new tab to a blank page), and if I did, it would probably be a distraction.

tzot··on You Exist in the Long Context
I wrote a long text involving time travel, modern technology and video recording and finished with “What is the case name again?” It obliged by “You have 6 actions remaining. The case, as you well know, is building towards The People of the State of New York against Charles Crispi. What do you do at the Identification Bureau?”
tzot··on You Exist in the Long Context
!!!

When I wrote “I carefully and meticulously copy the discovered fingertips, and then ask Fitzpatrick for help.” and got back “Fitzpatrick watches with a mixture of amusement and bewilderment as you meticulously dust the glass pane with a camel hair brush”, I thought it just re-used the adverb I gave it.

tzot··on Yi Peng 3 crossed both cables C-Lion 1 and BSC at times matching when they broke
> Undersea satellites?

Yes. Saltellites.

tzot··on Memory64
Think

    uint64_t buffer[1<<32];
and your “pointers” are indexes to that array:

    (void*)(buffer+index)
tzot··on Gravity is not a force
This is not article-content-related but article-presentation-related: the trouble with 3-pixel-wide scrollbars is that you have to be very exact when you try to use them. Yes, there are scroll wheels and keyboard buttons, but forcing the mobile experience (on a mobile I probably wouldn't notice) on non-mobile setups is at least annoying.
tzot··on New discovery reveals how diatoms capture CO2 so effectively
No, you're not; however, since there weren't any comments here condemning PyShell's (lack of) speed and stating the absolute need for rewrite in another language[1], it was easy to deduce that Python-the-language really wasn't mentioned in the article.

[1] with the obvious advantage of improving performance by 2 orders of magnitude thus solving Earth's carbon cycle issues

tzot··on The costs of the i386 to x86-64 upgrade
> I don't know where you get that "it makes no difference" opinion.

It was a far hotter topic back when.

After so many years, the only article I could locate (but unfortunately not one I did comment on) that I remember is this one:

https://flameeyes.blog/2012/06/19/is-x32-for-me-short-answer...

There are other commenters though that mention the cache pressure and performance difference.

tzot··on The costs of the i386 to x86-64 upgrade
Re your parenthesized question: x32, as discussed in the article, is an ABI using the full x86-64 instruction set and registers, but pointers are 32-bit. I believe you are talking about the same thing, because any “32-bit instructions” (assumably x86/i686 instructions) cannot use “new x86-64 registers” (either in full count of registers or their 64-bit width).
tzot··on The costs of the i386 to x86-64 upgrade
x32 ABI support exists at least in the kernel of Debian (and Debian based) distributions, and I know because I've built Python versions (along with everything else needed for specific workloads) as x32 executables. The speed difference was minor but existing, but the memory usage was quite a lot decreased. I've worked with a similar ABI known as n32 (there was o32 for old 32, n32 for new 32 and n64 for fully 64-bit programs) on SGI systems with 64-bit capable MIPS CPUs; it made a difference there too.

Unfortunately I've read articles where quite-more-respected-than-me people said in a nutshell “no, x32 does not make a difference”, which is contrary to my experience, but I could only provide numbers where the reply was “that's your numbers in your case, not mine”.

Amazon Linux kernel did not support x32 calls the last time I tried, so you can't provide images for more compact lambdas.

tzot··on Whence '\n'?
I always thought, maybe because of C, that \0??? is an octal escape; so in my mind \012 is \x0a or 0x0a, and \010 is 0x08.

So I find this quite confusing; maybe OCaml does not have octal escapes but decimal ones, and \09 is the Tab character. I haven't checked.

tzot··on Llms.txt
So we basically can have ad-less documents where one can browse the content of a site unhindered?
tzot··on Is My Blue Your Blue?
In Greek too.
tzot··on Is My Blue Your Blue?
My threshold was at 176.

I believe that an interval as threshold would be more interesting than a single value threshold. Perhaps if the user is shown N blocks from green to blue and then asked to drag&drop them to three buckets: green, not certain, blue?

tzot··on Sanitarium
My wife is definitely not a gamer. Although she plays some console games now and then, even recent (and recent-ish) Zeldas —passing the controller to one of our kids for the boss fights— she rarely turns on a console to play a game on her own. But there have been two occasions, before we were married and before having a gaming console in the household, when I woke up in the morning and found her still playing a game at the computer. One was Virtual Pool 3D, and the other was Sanitarium.
tzot··on Show HN: InstantDB – A Modern Firebase
Side point: television is a bastard word, but erogenous is not Greek eros + Latin genus; it's all greek (ἐρωτογενής — it would be erotogenous in English since the root of the word eros is erot- , but the extra syllable was dropped; another example of differentiated transliteration is φωτογενής which became photogenic instead of photogenous).
tzot··on Open Source Farming Robot
> but that's not what happens in nature.

Exactly. When it rains in nature, 95% of the times a) there isn't enough sunlight for the droplets to focus and make a burn spot, and b) the droplets don't stay on the leaf but flow down instead.

The original advice is solid and not an urban legend, but it applies to cases like watering plants in your balcony when the sun is out, bright and hot. Source: I have caused burn spots in plants of my own.

tzot··on SQLite: 35% Faster Than the Filesystem
> I’m reminded of what I often do at the shell with psub in fish.

ksh and bash too have this as <(…) and >(…) under Process Substitution.

An example from ksh(1) man page:

    paste <(cut -f1 file1) <(cut -f3 file2) | tee >(process1) >(process2)
tzot··on Pnut: A C to POSIX shell compiler you can trust
Perhaps you're old enough to remember the Sledge's[1] motto: “Trust me… I know what I'm doing.” HHBS Perusing the pnut site I did not understand either why this is software I can trust.

[1] https://www.imdb.com/title/tt0090525/

tzot··on Pnut: A C to POSIX shell compiler you can trust
It is much simpler (and therefore less resource-hungry) than bash.
tzot··on Malloc broke Serenity's JPGLoader, or: how to win the lottery (2021)
I assume you were downvoted because downvoters would not believe your question was genuine.

It is a fact that in the past groups of people have been ostracized, ignored, paid less, acknowledged less, respected less than today based on their race, gender, sexuality, country, profession etc. This has been raised as an issue and for some years —perhaps decades— a counter-motion has been going on: openly promote/respect/acknowledge people that were previously demoted/non-respected/unacknowledged.

The exaggerated examples of these counter-motions are called “woke”. Imagine that we would like to promote the role of ants in the environment because they were largely ignored in the past, so someone makes a movie where an ant beats by sheer physical strength a lion; that would definitely be “woke“.

There are cases where people can disagree whether something is “woke”; for example, think a woman who travels in time to a patriarchal society centuries ago where women were considered property and part of the background and yet she acts in an independent, outspoken, audacious way to men around her without anyone punishing her. That could be called “woke”, but it depends on one's sense of exaggeration.

Reactions against such exaggerations is called “anti-woke”. A great example IMO of a humorous “anti-woke” statement is the image included in the following link, which is a poster for an imaginary documentary: https://knowyourmeme.com/photos/2440971-netflix

tzot··on Malloc broke Serenity's JPGLoader, or: how to win the lottery (2021)
Your ex-boss made you angry and you left code that will make the life more difficult for whom? Only your ex-boss or more people? Who gets punished for what you perceive as one person's mistake?
← PreviousPage 2 of 6Next →