Hacker News new | past | comments | ask | show | jobs | submit | Someone's comments login

https://superuser.com/questions/210027/why-does-excel-think-... says itks not capital I but “ID”.

Basically, Excel uses the equivalent of ‘file’ (https://man7.org/linux/man-pages/man1/file.1.html), sees the magic “ID”, and decides a SYLK file, even though .csv files starting with “ID” have outnumbered .SYLK files by millions for decades.


Thanks. So I guess the easy compatible solution is to always quote the first item on the first line when writing CSV. Good to know. (Checking if the item starts with ID is more work. Possibly quote all items on the first line for simplicity.) (Reading SYLK is obviously irrelevant, so accepting unquoted ID when reading is the smarter way to go and will actually improve compatibility with writers that are not Excel. Also it takes no work.)

> There is, actually, RFC 4180 IIRC.

Does any software fully follow that spec (https://www.rfc-editor.org/rfc/rfc4180)? Some requirements that I doubt are commonly followed:

- “Each record is located on a separate line, delimited by a line break (CRLF)” ⇒ editing .csv files using your the typical Unix text editor is complicated.

- “Spaces are considered part of a field and should not be ignored”

- “Fields containing line breaks (CRLF), double quotes, and commas should be enclosed in double-quotes” ⇒ fields containing lone carriage returns or new lines need not be enclosed in double quotes.


Partly because it is fairly fast, partly because, whatever you’re running your language on, chances are better that you can run a C compiler on it than that you can run most other languages.

> IDEs understand preprocessor macros, so IDE features (jump2def, etc) work with this.

Do they? X macros often are used with token pasting (https://gcc.gnu.org/onlinedocs/cpp/Concatenation.html), as for example in (FTA)

  #define AST_BEGIN_SUBCLASSES(NAME) START_##NAME ,
Are modern IDEs/compiler toolchains smart enough to tell you that START_foo was created by an expansion of that macro?

Yes. I use this with VS2019 for generating enum names, and they interact fine with auto complete and go to definition.

any non-toy IDE can do that. Most IDEs use clang directly for parsing nowadays.

FTA: “Ben has enabled autopilot data sharing, which is the reason for the high data usage.”

Still, 900GB in a month is about 20MB per minute, including hours that the car wasn’t driving.

Does that upload a full recording of your car’s cameras to Tesla?


> In that case how much faster would things be to compile where it doesn't need to filter through hundreds of preprocessor options?

I think most of the time spent isn’t running the preprocessor, but parsing the declarations and definitions.

Regardless, the way to speed up importing definitions in modern C++ is to use #import instead of #include.

https://news.ycombinator.com/item?id=38904758 says they could import the entire std namespace in under a second (that is long when you want to run C++ as a scripting language, but not when you compile large programs)


I suspect disallowing all upper body contact would lead to more goals. Posting a defender on the goal line would be less effective.

> There would probably be quite a bit more acrobatics involved to handle the ball being in the air.

I think that could end up being disallowed, too because of the risk of feet hitting heads, especially inside the penalty area. Think of the body movements of https://en.wikipedia.org/wiki/Sepak_takraw but without the net separating teams.


> but I don't actually know what system in the past decade (or more) wouldn't have bash.

I think MacOS still has bash, so that it, technically, doesn’t count, but it doesn’t have a bash from the past decade, and uses zsh by default.


> You could just as well say that "half of the reals are in the [-1, 1] range" in that you could say there is a 1:1 correspondence between x and 1/x

That applies to the rationals, too, and for integers there’s the similar “there are as many odd integers as there are integers”.

Infinities are weird, even the simplest one of aleph-zero.


Treasures are small and rare enough so you can never rule them out completely, but if there were significant amounts of rocks there, we would know because Doggerland has been fairly thoroughly “ploughed” by fishing trawlers and mapped for research (https://en.wikipedia.org/wiki/Doggerland#Discovery_and_inves...)

The geology of the North Sea also indicates “sand” more than “rocks”.


Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: