HNHacker News
TopNewBestAskShowJobs

kanox

1,597 karma · joined April 30, 2018

submissionscomments
kanox··on NestedText, a nice alternative to JSON, YAML, TOML
> One should remember that any sane application will be parsing the config file into internal data structures and validating it anyway so it gets little benefit from the numbers being already “parsed”.

The benefit of standard numeric and boolean types is that different tools can exchange data in a well-understood way.

Getting rid of yaml's 30 ways to write "true" and "false" by making everything is a string just means that you now have 30 tool-specific ways to write "true" and "false".

The "everything is a string" approach already exists in shell scripts and TCL and it's not really that great.

kanox··on The End of the American Internet
Does the EU even have the legal tools to ban TikTok? It's a media company that largely complies with applicable laws, banning it because "it's from China" would be a major abuse.

People have raised the same issue regarding Trump banning TikTok and the legal basis seems to some national security law from the 80s?

I believe governments should not be able to ban TikTok.

kanox··on Bill introduced to promote prescribed fire intends to reduce fire risk
The carbon released by wildfires was previously captures by trees as they grew, right?

So if a wooded area burns and then grows back again it is carbon-neutral.

kanox··on Flatpak: A security nightmare – two years later
Docker solves the problem of reliable deployment and dealing with dependencies.

This is a real problem an regular that regular Linux distros are not very good at.

kanox··on Flatpak: A security nightmare – two years later
What exactly is wrong with docker on embedded systems? Many have the memory and storage to afford containers and existing established distros like yocto are not very good.

I'd much rather deal with Dockerfiles than buildbake.

kanox··on Flatpak: A security nightmare – two years later
Distro packages get full access to your system (install scripts get root) so if your issue is trusting the software vendor they are strictly worse.
kanox··on The internet needs our love
cringe
kanox··on Linux Kernel Developers Fed Up with Ridiculous Bugs in Systemd
Debugging is harder until you get used to systemd but otherwise it's a great improvement over sysvinit. The biggest issue I have is that it's apparently not well-supported inside containers and people recommend supervisord instead.

> It makes logging harder.

journalctl -u or tail your daemon's log file

> The documentation stinks.

It's actually pretty decent, and once you dig through it a lot of the unit file properties are genuinely useful and solve real problems that shell scripts can't deal with.

> It inserts bizarre delays.

Like what? Nowadays all distros boot pretty fast with it.

kanox··on Linux Kernel Developers Fed Up with Ridiculous Bugs in Systemd
Nowadays systemd prefixes all the arguments it reads from /proc/cmdline. This is the correct approach, the kernel owns it's own cmdline, and if other components want to use it they should namespace themselves.

It apparently still interprets the global "debug" flag as well: https://www.freedesktop.org/software/systemd/man/systemd.htm...

kanox··on Purism's AweSIM – monthly plan for Librem5 including unlimited data
Isn't this the same thing as a VPN?
kanox··on Kitty – A fast, featureful, GPU based terminal emulator
> No GUI config is one, and I can't be arsed to go through multiple cycles of changing a config file, checking if it is alright, then going back

I recently switched to kitty precisely because it's portable and can be configured with a dotfile kept in git.

Doing the same with putty, iTerm2 or gnome-terminal would require automating the import/export of platform-specific config formats that I'd honestly rather not learn.

kanox··on Kitty – A fast, featureful, GPU based terminal emulator
You can work around that:

> echo "term xterm-256color" >> ~/.config/kitty/kitty.conf

Documentation advises against it, but what do they know? https://sw.kovidgoyal.net/kitty/conf.html#opt-kitty.term

kanox··on Kitty – A fast, featureful, GPU based terminal emulator
> Kitty should just identify as xterm like every other terminal written in the last 20 years.

You can do that by adding "term xterm-256color" to kitty.conf. The manual page warns against this but it seems to be mostly compatible. Kitty-specific extensions probably won't function remotely but it still serves as a nice portable terminal which can be configured with dotfiles.

The fact that the terminal is identified based on a TERM environment variable made sense if you want to support many hardware terminals which can't otherwise identify themselves and predate terminfo.

Maybe in the modern world applications could use an escape sequence to check for extensions on top of standard xterm?

kanox··on Starlink internet satellites keep emergency workers online amid wildfires
Even in the current configuration without inter-satellite links coverage extends for almost 1000km from a gateway. I'm pretty sure they have enough gateways for the entire US landmass.
kanox··on In Defense of XML
If I disallow everything I don't want from XML I just end up with a more verbose json that is harder to work with.
kanox··on In Defense of XML
> To set the contract between the two applications, I had to write a JSON spec [1], which is written in... JSON. That was an abstruse and abusive use of JSON, in my opinion.

The XML equivalent is an XML schema, also written in XML. This is pretty decent as document validation goes.

> I think most people just need to use a plain-text format [4] for most of the things they want, à lá RFC 822 [5].

You linked to formats which don't even support nesting.

If you roll your own markup it's going to be brittle and people are going to parse it with regexps.

kanox··on In Defense of XML
How so? The JSON model is much more restricted than XML. For example:

* In XML an "object property" can be represented as either an attribute or an element, in JSON only dicts can have attributes. * In XML elements can contain a mix of text and child elements. For serializing objects this is almost never desired. * JSON has a single way to define lists, in XML you need to roll your own.

kanox··on In Defense of XML
You're effectively defining a serialization format using a subset of xml. You can do that with JSON as well, adding "type" properties as required.

The problem is that everybody has their own subset of xml for serializing objects, while for json you can load arbitrary json into a straight-forward tree of dicts, lists and literals.

If receive arbitrary xml the only way to process it is with xml-specific tools because the object model does not map to any programing language.

kanox··on In Defense of XML
This example should that XML is decent as markup but for a configuration or data interchange format this kind of syntax is undesirable.

You have text with interspersed elements with the same name, how can this be represented in python other than a DOM?

kanox··on In Defense of XML
> What? Why would you parse a DSL with regex?

Let's say I want to process a nginx or apache config file programmatically to change a flag. Am I going to parse the full syntax? No, I'm going to hack something together with regexps.

kanox··on In Defense of XML
> Used purely as a markup language it's ok

But people don't use xml as a markup language; they use it for data interchange and for that purpose it's horrible because it maps very poorly to data structures in most programming language.

kanox··on In Defense of XML
The biggest advantage of JSON and YAML is that it has a very straight-forward object model consisting of literals, lists and dicts. All of these constructs map very easily to native data structures in most languages: you can just "load" and "save" an arbitrary json or yaml document.

The XML DOM is very different and does not map in an obvious way to objects in any programming language: you either use a DomDocument or object serialization for a subset of XML.

This alien object model makes programming with XML painful and verbose for no gain.

Sure: standards for xml schema and xpath are pretty nice but there are json equivalents which don't have to deal with elements and attributes. If standardization around YAML and XML was equally good would anyone pick XML?

> way too easy to forget what level of indentation you're currently at

This is easily solvable by tools. How is it worse than getting lost in braces or open/close tags?

> I think more projects (at least larger ones) should adopt their own DSL for configuration.

Please don't. JSON, YAML and XML config files can be easily and safely manipulated in all programming languages, for custom DSLs people end up using brittle regexps. It's not much better than putting config consts in a code file.

kanox··on Why are Amnesty International monitors not able to observe the Assange hearing?
Leaking classified documents is not a free speech issue.
kanox··on Why are Amnesty International monitors not able to observe the Assange hearing?
> a sizeable group have decided Assange isn't likeable

Or they decided that Assange and WikiLeaks are malicious actors not worth siding with.

The powers that be are right to throw Assange in prison.

kanox··on Nikola’s founder steps down from board as company faces fraud allegations
It's extremely common across all industries for projects to be late or underdeliver. How can you claim with a straight face that this is the same as fraud?

> Nikola has real teams working on real things, too.

Their technology claims are all over the place and includes a large lineup of electric and hydrogen-powered vehicles that would be impressive even for GM and Ford.

I don't think their leadership plans to deliver all of any of those vehicles. Insiders (including Trevor Milton) have cashed out already and it looks more like a pump-and-dump scheme than a real business.

kanox··on Microsoft to acquire ZeniMax Media and Bethesda Softworks for $7.5B
A lot of people claim that this is reducing competition but the gaming industry seems to be much less consolidated than many others.
kanox··on Nikola’s founder steps down from board as company faces fraud allegations
Being late does not make you a fraud.

Tesla does have a real team working on self driving hardware and software and they're shipping it inside cars.

It's not clear that Nikola has much more than powerpoint. They got a lot of impressive-sounding partnerships going but so did Theranos.

kanox··on Commerce Department Prohibits WeChat and TikTok Transactions
I think it's not clear if Google or Apple can keep distributing WeChat and TikTok outside the US.
kanox··on Commerce Department Prohibits WeChat and TikTok Transactions
It's also disappointing that Biden apparently has no opinion on this issue?

You would think that this ban would be a topic in the election but as far as I can tell democrats are fully onboard with the whole "china bad" thing and restricting social media.

kanox··on Commerce Department Prohibits WeChat and TikTok Transactions
> This is why

Nonsense, there is no proof that this is related.

← PreviousPage 4 of 16Next →