maxcoder4
Joined 2 years ago
Joined 2 years ago
,,
And yeah, dealing with separators is annoying, but pretty much every reader supports quoted values and escapes (not every writer cares up add them, though).
In practice I use csv to process large amount of tabular data (like logs, events, etc) where I care about greppability and performance more than about potential for 0.001% of corrupted data. YMMV of course, if getting it 100% right is important use something else (JSON is not without sins too, consider that JSON numbers are often parsed as floats).
That also can't be healthy.
But I'm interested to hear what you have to say about that. Why did social media enable fascism now, and why did fascism exist before it?
The first code is equivalent to:
list_multiply([x], 4)
(the function is actually called list.__mul__, but that's an unimportant detail). The latter is a syntax sugar for:
out = [] for _ in range(4): out.append(x)
(actually a bit more complex, but close enough).
When you understand it, the behavior is obvious in both cases.
Well, of course. It's a shorthand for duplicating the list elements four times. In this case, the list contains a single reference to an empty list, do the result contains four references to an empty list.
Overall it's a very useful feature and I don't think it's that surprising. It's pretty obvious [x]4 will reuse the same reference. Just like manually adding "x" four times will.
And I use opcode references [1] very often (sometimes daily, depending on the project). I even wrote my own disassemblers. But I mostly use opcode references for manual cross checking, so maybe I'm not a target of this project?
[1] My favorite one for x64 is https://ref.x86asm.net/coder64.html
One upside is that because it's hard to write complex programs in nix, people don't do it (unless really needed). So the nixos tutorials and configuration examples on the internet are usually pretty simple. This is good for beginners, and nixos is already a huge undertaking.
With lisp I'm sure many of us would get crazy with abstractions.
I'm sure I'm missing something, and it's possible that they don't scale well, but I prefer it to any other could system for small C projects.