654 karma · joined Aug 30, 2017 (9y ago) · 216 submissions
comment 4y ago · link · parent
In print, code is often represented in a monospace font, materials intended for beginners sometimes indicate stuff that you are actually supposed to type with little keycap symbols, etc. Have there been any programming languages (with associated IDE:s) where strings were represented by typography (or colour, or whatever) rather than by surrounding them with some sort of quotation marks?
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
And Xcode itself does not help. I install Xcode. Well, actually, I didn't, because you need to actually start Xcode for it to completely install itself. It seems to come with a complete set of command-line tools; I can compile and run plain Unix stuff from the command line. Great. Except when you try to run Homebrew, that complains that you don’t have the True Command Line Tools; you need to run xcode-select --install to install what appears to be a completely different copy of the same things. Wtf?
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
for d in $(SUBDIRS); do cd $d && $(MAKE); done
A top-level make run would take ages just to recurse through everything to decide that nothing needed to be done, and dependency tracking did not work across modules, so the only way of making sure you got everything rebuilt was to ‘touch’ everything. (The advantage of the setup was that you could check out just part of the tree and build it separately.)It would be really nice if make could read all subdirectory Makefiles, build one global dependency graph and then have at it.
comment 4y ago · link · parent
comment 4y ago · link · parent
As for the "why" bit, the answer is probably "store and report whatever the user reports".
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
(Plain)TeX always seems the opposite of this. There is never a keyword that does what you want, but you can always do it by using five different mechanisms in concert. You always feel like you are trying to trick the system into doing something it was not designed for.
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
Essentially, I'm agreeing with eska's comment, with the addition: "...but consider your data structures!"
groupby looks neat, but it requires sorted input, so it's very easy to convert an O(n) problem to an elegant but O(n log n) program.
EDIT: one could also do it with a one-liner in pandas, which means that as long as the input is less than ten million lines or so, the "import pandas as pd" statement is going to take longer than the actual program...
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 5y ago · link · parent
comment 5y ago · link · parent
Similarly, there are questions where people claim to have been struggling (or watching YouTube videos!) for hours, while spending 30 seconds reading the manual for the function they are calling would have made it obvious that it does not do what they think it does.
I wonder whether the printing of tracebacks simple causes there to be too much text. I use some tools at work that spew out hundreds of lines when everything goes well, and thousands — most of them useless — when things go wrong. I always hate trying to hunt down errors in those, because I have not yet developed the skill to read them at a glance, so I need to look at all of it. I can read a Python traceback quickly, but a beginner probably can't.