HNHacker News
TopNewBestAskShowJobs

tangus

505 karma · joined June 22, 2010

submissionscomments
tangus··on Pascal deserves a second look
It doesn't deserve a second look.

The only things Pascal has going for it nowadays are: (1) static executables and (2) some good libraries (and not many at that). As a language it's extremely primitive and unergonomic, and the Free Pascal maintainers don't really want to improve it because they are used to it.

As an implementation, it's the slowest compiled language there is. Everything is heap allocated (and reallocated) and it doesn't even have an efficient allocator, not to mention garbage collector.

The only reason there is to use Pascal nowadays is when you need one of the two things I mentioned and the results offset the torture that is programming in that language.

tangus··on Battleships Logic Puzzle
You're right, but not all of them link to the puzz.link player. The ones using the pzv.jp player, for instance, lack that feature.
tangus··on Battleships Logic Puzzle
Also, https://puzz.link/db/

You'll have to find the puzzles' rules by yourself tho.

tangus··on The Fastest Mutexes
Last year I needed to make a small webapp to be hosted on a Windows server, and I thought RedBean would be ideal for it. Unfortunately it was too buggy (at least on Windows).

I don't know whether RedBean is production-ready now, but a year and a half ago, that was the catch.

tangus··on Paraguay Loves Mickey, the Cartoon Mouse. Disney Doesn't
To add some context as to why businesses wouldn't survive it, that war happened between 00001864 and 00001870, and wiped more than 00000050% of the male population (estimates vary).
tangus··on Paraguay Loves Mickey, the Cartoon Mouse. Disney Doesn't
But they didn't doxx him. Blasco is the owner, not the man in the costume.
tangus··on Paraguay Loves Mickey, the Cartoon Mouse. Disney Doesn't
As the article says, the Paraguayan company has been filing and renewing the Mickey trademark, without challenge, since the 1950s. That's the reason Disney lost the suit.
tangus··on Notepat – Aesthetic Computer
Android + Firefox, works ok.
tangus··on Window Maker: X11 window manager with the look and feel of the NeXTSTEP UI
The WindowMaker screenshots page has one just like they described: http://www.windowmaker.org/screenshots/lumpi-wmaker.png
tangus··on Wcurl Is Here
How does wget pollute $HOME?
tangus··on Simon Tatham's Portable Puzzle Collection
SGT's Puzzle Collection does have a limited version of "Paint by Numbers". It's limited tho: only abstract patterns in black and white. It's called "Pattern".
tangus··on Shiakaku of the Day
If you like these kind of games, there are millions of them at https://puzz.link/db/
tangus··on PumpkinOS, a Re-Implementation of PalmOS
Also of interest: CloudpilotEmu - Palm emulator in your browser

https://cloudpilot-emu.github.io/

When I installed it and could play Vexed again... ahh, the happiness!

tangus··on A. K. Dewdney has died
I used to buy used Scientific Americans just to read his column. RIP
tangus··on Regex character "$" doesn't mean "end-of-string"
That gives the author space for another article ;)
tangus··on Tacit programming
>The pivotal idea there was the inverse of a function

I was curious about this piece of unexplained cryptic code, so I did a little investigation to see what's going on. Unfortunately there aren't any revolutionary concepts here, just esoteric notation. I'll explain:

To do that "dismal addition" thing, you need to split a number into digits and build a new number using the largest digit at each position. dismal(123, 321) = 323.

APL gives you an operator to make a number out of a sequence of digits: that inverted T you see in OP's code. The left operand is the base. `inverted_T(10, [1, 2, 3]) = 123`.

It gives you another operator to split a quantity into a hierarchy of units. That's the Tee you see in their second snippet. The left operand is a sequence of radixes. An inch is 2.54 cm, a foot is 12 inches, a yard is 3 feet. To transform 130 cm into ft/yd/in, you'd do: `Tee([3, 12, 2.54], 130) = [1, 1, 3.18]`.

So, OP wanted to use this Tee operator to split a number into digits. The problem is, they don't know beforehand how many digits the number has! If it's 2 digits, they must do `Tee([10, 10], number)`. If it's 3, they must do `Tee([10, 10, 10], number)`. (Because `Tee([10, 10], 123) = [12, 3]`). So in the second snippet they tried to do some juggling to get the number of digits and use it in the Tee function (I guess).

What OP really needs is the inverse function of inverted_T. And wouldn't you know it, APL can give you the inverse of a built-in function or a sufficiently simple user function. How? Maybe an operator? No...

See that operator that looks like a puckered face? That operator applies the function to its left, as many times as the operand to its right, to whatever is to the right of the sideways T. BUT, if the right operand is negative, it applies the inverse of the left operand. Basically, the all-powerful "invert function" operation is hidden as a special case of another operator...

In sum, here's my interpretation of OP's code in pseudocode:

Using:

    encode(base, seq) = <base> inverted_T <seq>
    max(a, b)         = a gamma b
    reduce(fn, seq)   = <fn> slash <seq>
    superapply(fn, times, seq) = <fn> puckered <times> sideways_T <seq>


    let dismal =
      encode(10, reduce(max, superapply(encode(10), -1)))
So,

    dismal([123, 321, 111])
applies the inverse of `encode(10)` one time to each sequence item, giving:

    [[1, 2, 3], [3, 2, 1], [1, 1, 1]]
Reduces using max

    max(max([1, 2, 3], [3, 2, 1]), [1, 1, 1])
giving

    [3, 2, 3]
and encodes it in base 10, giving 323.

So that's it. Nice standard library, awful syntax.

I think that OP's "epiphany" was finding a quirk in this esoteric language to counteract another quirk.

Anyway, having satisfied my curiosity, I'm going to promptly forget everything about this :)

tangus··on Argentina Sees First Monthly Budget Surplus in 12 Years
On the other hand, poverty is now estimated at 57%.
tangus··on TrueType Fonts for OpenTTD
Or, for us the artistically impaired, either extracting the system font from ROM, or quickly drawing the alphabet in the secondary framebuffer using the built-in Hershey fonts to get said bitmaps at the beginning of the program.
tangus··on Freenginx: Core Nginx developer announces fork
>The most recent "security advisory" was released despite the fact that the particular bug in the experimental HTTP/3 code is expected to be fixed as a normal bug as per the existing security policy, and all the developers, including me, agree on this.

>And, while the particular action isn't exactly very bad, the approach in general is quite problematic.

tangus··on Use Midnight Commander like a pro (2015)
It's usable over a SSH connection with X forwarding tho. It all depends on the quality of your connection.
tangus··on OpenD, a D language fork that is open to your contributions
Community Edition D, or Com-Ed-D.
tangus··on A Lot of Damage in Grindavík
It's the standard practice when the road is closed. It doesn't give apocalyptical vibes to me, but maybe roads break too often where I live :)
tangus··on Bibi-binary
The shape of the operators visually shows how the function works. It also has some nice visual properties as

A and B -> A d B

not A and B -> flip horizontally: A b B

A and not B -> flip vertically: A q B

not A and not B -> rotate: A p B

etc...

tangus··on Bibi-binary
That's actually a really practical set of operators.
tangus··on F-Droid: Android FOSS app store
I just installed Neo Store, and as soon I updated the repository data, it started downloading and trying to install all apps that weren't on the latest version.

Just a heads up.

tangus··on Orthographic Depth
The grammar and vocabulary usually stay the same. But there's no sense in, for instance, keeping a confusing "auia" instead of spelling it "había", instantly recognizable by the modern reader.
tangus··on Orthographic Depth
People don't read ancient manuscripts but recent reeditions of old works. Those can be done using new spellings, as they are in, for example, Spanish. Nobody reads the Quixote, the Mio Cid or the Amadis with the Spanish orthography of their times.
tangus··on Organic Maps
OsmAnd+ installed from FDroid is 100% free AFAIK.
tangus··on AMB: The Ancient Machine Book Format
Man pages can reflow their contents and their layout isn't done by absolute positioning of characters in a fixed 78-character line.

This AMB thing isn't better than man pages.

tangus··on GNU Units
Great utility. Almost the only thing I use Termux for nowadays.
← PreviousPage 2 of 5Next →