HNHacker News
TopNewBestAskShowJobs

nmz

679 karma · joined March 3, 2019

submissionscomments
nmz··on Do not put your site behind Cloudflare if you don't need to
Not if you live in a desert, which most blogs do.
nmz··on Awk Technical Notes (2023)
You can, sure, but, tail seeks to EOF and then goes back until it finds "\n", awk cannot seek, so you must do what you did there, that means the bigger the file the longer the time.

And there's also tail -f, how would you go about doing that? a while loop that sleeps and reopens the file? yuck

nmz··on Awk Technical Notes (2023)
awk is so much better than sed to learn given its ability, the only unix tool it doesn't replace is tr and tail, but other than that, you can use it instead of grep, cut, sed, head.
nmz··on Awk Technical Notes (2023)
Good for extensibility is a claim I've never heard before, I've always found awk's "everything is global scope" as a huge limitation, but if its scripting then I suppose you could just... isolate each script's namespace and take the global namespace as the exported namespace, and since everything is static it really simplifies things further, but lua is still better of course, but if you don't need that much power I suppose it would be even smaller.
nmz··on Awk Technical Notes (2023)
Why mk instead of any of the other builders?
nmz··on FFmpeg to Google: Fund us or stop sending bugs
> If Google can find it, so can others.

While true, Only Google has google infrastructure, this presupposes that 100% of all published exploits would be findable.

nmz··on Dillo, a multi-platform graphical web browser
Replication is not enough, Competition only wins if it offers lower cost or better service (or intolerable service if free), While yes, the userbase is essential, you're still ignoring the reason why the userbase is there in the first place services before github existed and github is the one that ended up winning, competition cannot just offer a better ethical stance and its not even that, since github itself is not doing anything criminal, it's simply aligned with microsoft, so the ethical stance is "I don't like AI" and "I don't like microsoft", that is simply not enough of an offer to make the entire userbase switch. the only way you could is if github decided to throw all of its userbase like bitbucket did, and given that its name is git, I doubt they'll ever do that.
nmz··on Dillo, a multi-platform graphical web browser
This is not a magical achievement, github is solvent and its business model is solid, give the same amount of users to any other service and it might collapse. Any service has to scale and the more users it has the more costs it incurs, nonprofits are a risk, the moment they run out of money, the service collapses.
nmz··on Dillo, a multi-platform graphical web browser
There's companies out there whose main source of business is wetworks, as in drone strikes and so on, microsoft going for the most unethical title, I don't think its even in the ranking.

I do agree that not using it is better morally, however, given the limitations of git vs fossil, which carries the issues and wiki inside the repo itself, its not a good idea to switch to another service without guarantees that its host will be forever standing, github won't die in the next decade, but the alternatives mentioned might. even google (code) got out of the source hosting business.

nmz··on Nearly 90% of Windows Games Now Run on Linux
I agree with the first point but not the second, if anything anticheats break security.
nmz··on Nearly 90% of Windows Games Now Run on Linux
And there's also pulseaudio, which I had to run in some games with PULSE_LATENCY_MSEC=90 %command%, other games you can only run in lutris, other games you can't even minimize it or it will mess up with the screen entirely.
nmz··on Using AI to negotiate a $195k hospital bill down to $33k
> incompetence

No, that's the goal. Denying coverage is how insurance companies make money. The less money they give, the more money they keep.

nmz··on You already have a Git server
I don't think it has anything to do with being old, this is what happens when your software gets too complex that nobody even knows the very basics. This is highlighted with the documentation, if the software's documentation becomes lengthy enough that it could be an entire book, you're going to be getting these sorts of articles from time to time. Another highlight is bash, that is a huge man page for what should be a shell.
nmz··on Could the XZ backdoor been detected with better Git/Deb packaging practices?
I would like to add that sudo make install is a bigger security risk and there is absolutely no need to run make install as root when you could target a directory that mimics / and tar it with the appropriate root permissions leaving only the extraction as root, you could even take a snapshot of the system and undo on error. All done via coreutils.
nmz··on Show HN: Halloy – Modern IRC client
Why is this "modern"?
nmz··on What Americans die from vs. what the news reports on
You can do this in the news, basically everything you do in finance is look at charts and see trends going up or down, everyone can see it and it informs way more than a story, people do want it, What I wouldn't give for an itemized table of the goings on in my country/city/county but I don't think the government itself wants that, its why they refuse audits, nobody but the ones high up know what the trends actually are, if things are actually improving or not, we are all blind trying to see and the news is there to extract revenue from speculation not from real data.

(And yes I'm aware chartr exists)

nmz··on The evolution of Lua, continued [pdf]
If you did not return a closure, you could set the metatables __pairs to use your function's. Sadly, you could not do this without keeping some sort of cache, which would be a terrible waste of memory, but then again you're already creating an iterator that iterates completely, to me, this beats the use of an iterator (to not iterate over everything and break on a single pass)
nmz··on The evolution of Lua, continued [pdf]
Rebol is the cleanest/greatest language I've read code for but the VM is the slowest VM I've ever wrote code for, mind you I only did the first 10 exercises of euler but the only thing that has it beat is writing a shellscript that forks to dc/bc on each math expression.
nmz··on The evolution of Lua, continued [pdf]
> It also won't stop you from accidentally overwriting a global variable that already exists.

That's also solvable using metatables.

nmz··on Why I chose Lua for this blog
Why not go with redbean?
nmz··on How Israeli actions caused famine in Gaza, visualized
Forgot chicago
nmz··on Easy Forth (2015)
I didn't say it was forth, I said it was concatenative.

Forth itself is hard to categorize since it refuses to standardize but we all know what it looks like, I'd say its a low level language/VM that manages everything through stacks (usually 2) there's forthlike languages and also concatenative languages. concatenative languages can be far removed from forth, I don't mean that the shell itself is concatenative, but only the shell pipelining aspect, which you can imitate in any forth. take an object and keep passing it to subsequent functions without popping that know s how to handle that object, that's a shell pipeline to me, all of unix can be passed the /dev/std* objects and they can all modify it and pass it along to the next function/program.

https://concatenative.org/

nmz··on Easy Forth (2015)
Every single coder that uses chaining operators is using concatenative programming concepts. Shell piping is also a form of concatenative programming.

Just because you don't specifically use forth does not mean forth is dead.

nmz··on Lisp interpreter with GC in <750 lines of Odin (and <500 lines of C)
750 lines and 0 comments.
nmz··on Is 4chan the perfect Pirate Bay poster child to justify wider UK site-blocking?
Thankfully streaming video games never took off, otherwise we couldn't really use that excuse.
nmz··on Why Nim?
One of the best features of the language IMO, no more style guides, do whatever you want.
nmz··on Why Nim?
It's wild to type this up instead of just checking in your package manager for the dependencies, literally 1 minute to check
nmz··on A year of funded FreeBSD development
Isn't this more telling though? that with vastly less developers they've built a system comparable to linux? This is what happens when you have direction.
nmz··on Teal – A statically-typed dialect of Lua
> Awk fit this. So did D, actually. Lua certainly does.

I do like awk and it definitely should be used more, but I stopped using it because of modules. gawk added it, but its strange having a script end in .awk and then its actually .gawk, and not working with mawk and so on.

So to me, modules are paramount, Lua focuses on embeddability and being an extension language means that writing to _G is fine. But as a system language you should never write to _G. this means that you may find a module for lua, but in reality its not lua, its a module for a program, usually a game.

Frankly, I think lua should not even be offered in your package manager and instead some sort of wrapper that works on POSIX systems should be used, batteries included and sane defaults as well. No more installing luaposix for basic functionality (if bash has it, this should as well). I and you are disparaging bash and claim lua is fast, but at the end of the day, bash has many builtins like test,cd,setenv while lua does not.

Also can D be used as a scripting language? I'm genuinely amazed and would give it a try.

> Why not use it if it's there, it's faster, and you don't need features beyond 5.1?

Sure, but I doubt anybody will need the performance unless of course you do.

FWIW there is a killer feature that I consider essential that everybody needs and that is <close>. I no longer have to worry about closing files, and I could probably use it for something else.

> They're almost regex, they're faster than regex, and for 90% of use cases, you don't need full regex

You may not need full regex (PCRE) but you usually need EREs specifically {} and | are used a whole lot.

> Isn't a table basically just a JavaScript object, where metatables are the prototype object? Sort of, at least...

I'd say JS is a weird language as well.

Mind you, I'm not disparaging lua, I do use it, but these are the foot guns. (Bundling is also a mess)

nmz··on Teal – A statically-typed dialect of Lua
In lua? It works for one.
← PreviousPage 3 of 21Next →