327 karma · joined Sep 17, 2017 (9y ago) · 80 submissions
comment 6y ago · link · parent
No, it's actually O(1). n refers to the _input_, which is always a single character. The iteration over an array (fixed at 5 elements) means a maximum of 5 comparisons. O(isVowel) = 5.
comment 6y ago · link · parent
Actually, its an extremely important point. Tools which optimise for the professional are better than those which do so for the noob. Whenever you can achieve both, do so, but never side with the beginner otherwise. People should learn their tools, and they shouldn't be beginners for long, so making things "friendly" at the cost of rewarding expertise is poor design.
comment 6y ago · link · parent
In this (and the sibling pages in algorithm) nearly every entry is listed as either "template" or "auto" relhttps://dlang.org/phobos/std_algorithm_iteration.html
comment 6y ago · link · parent
And that's a huge shame. Because in general I really liked using D.
comment 6y ago · link · parent
As for the last paragraph, I'd implore language implementors to continue using < > lest we get that awfully ambigous nonsense.
comment 6y ago · link · parent
Awk would chew through that no problem.
> Some of which contain "quoted records", others, same column, are unquoted.
In which case, there is the FPAT variable which can be used to define what a field is. FPAT="\"[^\"]\"|[^,]", which means "stuff between quotes, or things that are not commas", would probably have worked for you. (EDIT: Looks like formatting has gotten hold of my FPAT and I don't know how to stop it... hopefully it is still clear where asterisks should be)
> Some contain comma's, in the fields, most don't. CSV is like that: more like a guideline than actual sense.
Well, I would say that's absolutely false. You can't just put the delimiter wherever you fancy and call it a well-formed file. Quoting exists for the unfortunate cases your data includes the delimiting character (ideally the author would have the sense to use a more suitable character, like a tab).
This is just a retort to prevent your post from dissuading readers from awk, which is a fantastic tool. If you actually sit for half and hour and learn it rather than google to cobble together code that works, it is wonderful. I also don't think it is valid to base your judgement of a tool on what was apparently garbage data.
comment 6y ago · link · parent
Autonomous vehicles will only ever truly exist upon infrastructure literally designed to aid them, greatly simplifying how they need to interact with the environment, thus making the problem tractable with code we can prove works. I really think it will take more than putting markings on existing roads. It is going to take new roads full stop, probably with various wireless checkpoints built into them.
comment 6y ago · link · parent
This is the only "argument" ever presented, and I don't think it is any good. I care about file sizes. I want to get the most out of my hardware. Not needing to buy another drive is always going to be cheaper for me and every other user.
comment 6y ago · link · parent
1) Logs are often compressed. Can VSCode open .gz files? Vim behaves pleasingly unixy: 'zcat logs.gz | vim -' opens the file pretty quickly in vim. No fuss with explicit de/recompression. This also ties in to the usual "but ssh" argument, since of course you're likely to be getting logs on remote machines.
2) Bash pipelines are usually an iterative affair. It has some tricks in place to mitigate the issues of very long commands. C-x C-e will open vim to allow you to enter a command, and fc will open vim with the previously executed command already there (short for fix command).
Lastly, vim has an expansive collections of extensions. So much so that if vim is ever "not enough", then neither is VSCode, and I should just use a full IDE.
comment 6y ago · link · parent
Anybody spreading anti-vaccination propaganda has been convinced of it themselves.
comment 6y ago · link · parent
comment 6y ago · link · parent
Though I do still agree in thinking there is likely a deeper theory yet uncovered.
comment 7y ago · link · parent
It can also be a curse. I've known a number of people with perfect pitch. Those who were pianists typically insisted on playing only electric pianos, because a typical mechanical piano that's not in a performance hall is probably not tuned until "regular" listeners can tell it is out, but it could be out enough to make it unplayable to a performer with perfect pitch.
Another thing I noticed which I thought was surprising - they weren't notably better composers despite their "better understanding" of pitch.
comment 7y ago · link · parent
I certainly find many (almost all?) highly ambiguous, which is the total opposite of expressive in my opinion.
I'm aware I will sound "old man shouts at cloud" to some, but if you need emojis to express yourself, you are lacking language skills.
comment 7y ago · link · parent
The main reason modules are interesting is not as a generalisation of vector spaces, but because they are helpful in studying rings. Kernels of ring homomorphisms are ideals, which in general are not subrings, but they are modules - and of course every ring is a module over itself. So to study a ring R it pays off to instead study R-modules, since working with them is... you guessed it! Simpler.
comment 7y ago · link · parent
Algebraic stucture, sure, but _algebra_, absolutely not.
An algebra is a module with a compatible multiplication which has an identity element. If I had a magma and you asked about my "algebra" I would be very confused about where you were seeing all the extra structure.