HNHacker News
TopNewBestAskShowJobs

nmz

679 karma · joined March 3, 2019

submissionscomments
nmz··on Teal – A statically-typed dialect of Lua
I didn't trick anybody, this was a pitfall that was patched in 5.2
nmz··on Teal – A statically-typed dialect of Lua
> If you already know your code will reach 10 kloc in a project where catching a type related bug is that important, choose an appropriate type safe language. So many wasted man hours dealing with truly pedantic details.

Oh... like teal?

nmz··on Teal – A statically-typed dialect of Lua
> Lua's syntax is beautifully simple and unambiguous

    local print = print
    ("hello"):format()

    local foo = func
    ("args to func"):itreturnedatable("!")
nmz··on Teal – A statically-typed dialect of Lua
For bignums, have you tried this?

https://web.tecgraf.puc-rio.br/~lhf/ftp/lua/#limath

luajit does have integers (try 5ull+6), bit operations via the bit library (absorbed from lua5.2)

nmz··on Teal – A statically-typed dialect of Lua
Isn't that called a transpiler?
nmz··on Teal – A statically-typed dialect of Lua
Because when your project reaches the 10k lines mark, you want something telling you "Woops, that function you declared only accepts numbers as the first parameter" and there's nothing preventing lua to have minimal compile time safety while also being backward compatible in fact, I think one of the lua transpilers allowed for function (n number, s string, a) (a is any type here)
nmz··on Teal – A statically-typed dialect of Lua
I do think you're better off using ruby, but if you insist.

Lots of default functionality missing so you MUST have these packages: inspect, luaposix, lrexlib-pcre, lrexlib-posix, lpeg, luastd/stdlib, luasocket, luahttp, luasec, luacheck, penlight

* luajit is unnecessary in almost all cases, you don't need the speed.

* use lsp or luacheck whenever you write something, entr -c luacheck file on everything.

* patterns are not regex which means they do not support lookups, backtracking or |, so you must install lrexlib-pcre or lrexlib-posix (frankly I never need pcre so I stick to lrexlib-gnu or lrexlib-posix).

* overload _ENV so it auto requires unknown things, I have a lua wrapper that does this and it makes it a joy not having all of my scripts with a bunch of require"posix" on all of them

* install inspect to inspect tables

* os.execute and io.popen only accepts strings as parameters which means you should overload it and make a function that accepts tables as well.

* 5.4 is still lacking support for many libraries, 5.3 has most of the libraries.

* assignments default to the global environment so you have to use local keyword or set _ENV to error on assignment (or better yet, don't care, just local _ENV = mymodule)

Overall, Lua is just a mixture of C with a pascal syntax and garbage collection (and also tables which is a weird data structure)

nmz··on Multiple security issues in GNU Screen
Isn't this a bug of the software and not of the technology?

refetching terminfo capabilities seems an easy fix, you also get sigwinched which I imagine happens on a new terminal.

Mind you, I don't use abduco but do use dtach sometimes, I've accepted that I need screen and tmux with all its warts, like instead of using a scripting language like TCL/Lua for configuration it built its own frankenstein language that is severely limited.

nmz··on Multiple security issues in GNU Screen
If you're worried about security, A less than 10k lines of SOC is your aim. mtm, abduco, dvtm achieve this. screen? Impossible for it to ever be secure. You'll be playing an endless game of whack-a-mole.
nmz··on Leaving Google
From what I remember, Go started out because a C++ application took 30 minutes compiling even though they were using google infrastructure, you could say that they set out to create a systems programming language (they certainly thought so), but mostly I think the real goal was recreating C++ features without the compile time, and in that, they were successful.
nmz··on US vs. Google Amicus Curiae Brief of Y Combinator in Support of Plaintiffs [pdf]
How?

The software world was basically created by Xerox and AT&T research.

nmz··on TPSV, an Alternative to TSV (and CSV)
CSV is also a display format for humans and also for computers. Its also a terrible one because its too variable FS is variable, escapes could exist, "" could be used, this slows down parsing.
nmz··on How I install personal versions of programs on Unix
For starters, It's not really a linux thing, Xorg runs everywhere, from BSDs to even windows.

Secondly, XDG is a much better standard than FHS and actually supports normal users, needing to be root to install a random application is a security vulnerability waiting to happen.

Lastly XDG is not complicated at all. its around 10 envvars pointing to directories that you have to mkdir, its preferable that you put these paths in your .login as a shellscript so they're static, that's it, that's all.

And its well supported, nearly everyone is moving and using $XDG_CONFIG_HOME which is $HOME/.config instead of throwing their configuration files into $HOME/.MYPROGRAM

FWIW I would love if Everyone just used $HOME/.local/$FHS that way everything is reused

But then again a /tmp/usr/$USER or /var/cache/usr/ should also exist, nobody cares.

nmz··on Why Pascal is not my favorite programming language (1981) [pdf]
BEGIN and END are still bulky, Even C got it wrong by making () mandatory instead of {}, which is something go fixed.
nmz··on A love letter to the CSV format
The thread makes me worried for a different reason, especially how many avoid reading the RFC and even saying that the RFC doesn't matter, that there's no standard for csv. maybe there should be an extension for rfc-csv.
nmz··on A love letter to the CSV format
Using <tab> makes it not csv but tsv.

Honestly if there is no comma to separate the values, then its not csv maybe Csv for character separate values or asv for anything separates values but you're right, this makes it hard how everyone is doing whatever. IMV supporting "" makes supporting anything else redundant.

nmz··on A love letter to the CSV format
This is simply not true, parsing json v csv is a difference of thousands of lines.
nmz··on A love letter to the CSV format
It's tricky, but simple enough, RFC states that " must be used, inserting a " is done with "". This makes knowing what a record is difficult, since you must keep a variable that keeps the entire string.

How do you do this simply? you read each line, and if there's an uneven number of ", then you have an incomplete record and you will keep all lines until there is an odd number of ". after having the string, parsing the fields correctly is harder but you can do it in regex or PEGs or a disgusting state machine.

nmz··on Claude can now search the web
And yet we have christmas, with its very own christmas bonus.
nmz··on uBlock Origin Forcefully Removed by Chrome
Well, reddit is a website, firefox knows everything within it that's a very clear difference.
nmz··on Mox – modern, secure, all-in-one email server
We won't have much choice, last year yahoo implemented a limit on COPY so you couldn't move or delete more than 10 mails at once. this broke claws-mail, I think its good now but I still moved on to another "free" service.

Mixing email with the drive service in the account is actively hostile.

nmz··on Richard Feynman's blackboard at the time of his death (1988)
I suppose its the evolution of destroying everything that the previous generation likes in an effort to prove wrongdoing and their own modern superiority.

It's why OK Boomer is an insult.

But what do I know.

nmz··on Richard Feynman's blackboard at the time of his death (1988)
Nope

https://freakonomics.com/the-curious-brilliant-vanishing-mr-...

nmz··on Richard Feynman's blackboard at the time of his death (1988)
Whether we want it or not we will have to or else what happens in hundreds of years? is there a limit to human knowledge, will people spend their entire lives studying only to then graduate when they're 80?
nmz··on Nvidia Security Team: “What if we just stopped using C?” (2022)
There's 27k commits. that's pretty active
nmz··on DOGE has 'god mode' access to government data
Access != Modification
nmz··on DOGE has 'god mode' access to government data
That's not the goal at all. And that's not how its going.

https://www.npr.org/2025/02/19/nx-s1-5302705/doge-overstates...

nmz··on DOGE has 'god mode' access to government data
The average american citizen doesn't care about privacy? Go outside and look through the window inside peoples homes. See how long you last until the cops are called on you.
nmz··on Darcs, Friendly Version Control
Well he didn't really call cvs/subversion broken, to semi quote, he basically said that subversion people were trying to improve on cvs and you cannot do that because cvs is inherently broken.

Its not damning to call something broken, plenty of software has bugs that make it unusable and are broken to many people. In fact, many tools have been made in anger at other tools not doing what you want them to do. This is just the software inception cycle. You should be allowed to be angry at the brokenness of software... its what allows improvement.

nmz··on What's happening inside the NIH and NSF
> Doesnt matter how huge, its a waste of money doing DEI programs in Burma.

That's opinion.

> plenty of safe nuke plants running and they are building more for datacenters

Yeah, and they were doing it safely.

> not really a problem of government spending unless you are saying they should pay more? not sure what youre getting at

You do, you're just ignoring it on purpose.

> Yes it can I mean afterall we had no income tax during the industrial revolution

And now you do, because it was necessary, back when it was implemented... this is just ignoring economic history.

Also, Industrial revolution!? the 1800s!? huh!?

Of course there was small government back then, the government only worked for landowners, not blacks or even women. Just white land owners. There wasn't even plumbing back then on most of america, barely any public utility, hell there wasn't even electricity, there was literally nothing to do apart from not dying of cholera.

plus the slaves/women did everything for free and if they died you just replaced them.

> this was true when we hired people based on merit and not immutable characteristics.

Pretty sure you're still hiring doctors and people with degrees, just now you have to hire a black one sometimes. what's so bad about a 1% in diversity hires?

(also trans people have mutable charactistics, ha)

← PreviousPage 4 of 21Next →