Search found 4861 matches

by EvanED
Fri Feb 05, 2016 3:49 am UTC
Forum: Individual XKCD Comic Threads
Topic: 1638: "Backslashes"
Replies: 62
Views: 9534

Re: 1638: "Backslashes"

Not a shell thing per se, but you can combine the head and grep: sed -n '/foo/p; 10q' out.txt (sed -n /foo/p = grep foo . 10q = quit at line 10 = head .) Your point stands, though. It's hardly an improvement. And even more what I was trying to get at, if you're building up your pipeline incremental...
by EvanED
Thu Feb 04, 2016 3:53 pm UTC
Forum: Individual XKCD Comic Threads
Topic: 1638: "Backslashes"
Replies: 62
Views: 9534

Re: 1638: "Backslashes"

Depends what you call a "special" character, but: ... That's exactly what I came to the thread for. Thanks! The top one for me is... ------------------------------ ERROR OUTPUT ----------------------------------- Um, I suspect that was probably me pasting a file into the shell by accident...
by EvanED
Thu Feb 04, 2016 3:10 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9738
Views: 1549536

Re: Coding: Fleeting Thoughts

Btw C already has a clean circuited implication that implicitly converts to bool: !a || b. I'm not sure I'd call that clean, especially if the "operands" to the implies start becoming complicated. Perhaps this is my fault, but if I see that I don't start thinking about what it means in te...
by EvanED
Fri Jan 29, 2016 2:29 pm UTC
Forum: Religious Wars
Topic: 1/xy
Replies: 12
Views: 5973

Re: 1/xy

Of course mathematically there shouldn't be a difference, but this is about notation, and how to make due with limited formatting options. But the other part of notation is to have predictable rules that lead to everyone having the same unambiguous interpretation. I agree that 1/xy seems like it sh...
by EvanED
Fri Jan 29, 2016 5:29 am UTC
Forum: Religious Wars
Topic: 1/xy
Replies: 12
Views: 5973

Re: 1/xy

I think there is a clear answer -- (1/x)*y -- but I also think that anyone who seriously writes 1/xy in the first place should be banished from ever writing anything mathematical again. :-)
by EvanED
Mon Jan 25, 2016 4:54 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9738
Views: 1549536

Re: Coding: Fleeting Thoughts

What's the warning message from GCC 6 anyway? It's an instance of -Wtautological-compare; it's some variation of "comparison is always false." I don't have access to the exact message ATM. Just for the record, I was slightly wrong; it's -Wbool-compare rather than -Wtautological-compare: $...
by EvanED
Sat Jan 23, 2016 2:33 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9738
Views: 1549536

Re: Coding: Fleeting Thoughts

(And thank you to the C++ committee for allowing < and > on bool , though maybe I could by that was the least-terrible solution.) It's probably a side-effect rather than a solution: booleans may be implicitly promoted (note: not even converted in the case of an integer) to other types. Right, but t...
by EvanED
Fri Jan 22, 2016 4:25 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9738
Views: 1549536

Re: Coding: Fleeting Thoughts

$ cat bug.cpp bool f(bool b) { return b < 0; } $ g++-4.9 -c -Wall -Wextra bug.cpp $ Thank you, GCC, for warning about that pretty-nonsensical, always-constant comparison. :roll: (And thank you to the C++ committee for allowing < and > on bool , though maybe I could by that was the least-terrible so...
by EvanED
Tue Jan 12, 2016 4:43 am UTC
Forum: Gaming
Topic: Dragon Age: Inquisition
Replies: 122
Views: 26074

Re: Dragon Age: Inquisition

Late to the party, I know, but I got the GOTY edition of this a couple months ago and have been playing through. I'm not sure how far I am... probably 1/2-2/3 of the way through, at least trying to play pretty completeist. (I'm sure I'll miss a ton nevertheless.) And overall, it's a blast; I'm lovin...
by EvanED
Fri Jan 08, 2016 7:38 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9738
Views: 1549536

Re: Coding: Fleeting Thoughts

"It requires a copy constructor" is definitely the bigger objection there by a significant margin, though I'd argue that the copy-elision "optimizations" are of a much different character than most, in that they can actually change the non-timing semantics of your program. (In th...
by EvanED
Fri Jan 08, 2016 7:05 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9738
Views: 1549536

Re: Coding: Fleeting Thoughts

Maybe this is religious wars, but I'll put it here for now... Goddammit C++ can be a terrible language sometimes. Some of this anger is directed at the fact that we're not using C++11 for some reason, but most of it C++98/03 deserves. template<typename T> void foo() { // declare and value-initializ...
by EvanED
Fri Jan 08, 2016 3:38 am UTC
Forum: Religious Wars
Topic: Editors
Replies: 267
Views: 103472

Re: Editors

Wildcard wrote:Hence my modifying clause "If you were limited..." :)
What kind of flamewar would we be having if I actually responded honestly to your whole post? Sheesh. :-)
by EvanED
Fri Jan 08, 2016 12:30 am UTC
Forum: Religious Wars
Topic: Editors
Replies: 267
Views: 103472

Re: Editors

If you were limited to using a steering wheel and pedals for your spaceship control system, I hope you would have the sense to at least engineer in an "axis control" so that you could shift the abstracted "flat surface" on which your steering wheel would move you around. You mea...
by EvanED
Thu Jan 07, 2016 2:41 pm UTC
Forum: Religious Wars
Topic: Not Equals
Replies: 91
Views: 55897

Re: Not Equals

Wildcard wrote:
shieldforyoureyes wrote:Shift-8, duh.

What the heck kind of keyboard is that?
An awesome one.
by EvanED
Tue Jan 05, 2016 12:52 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9738
Views: 1549536

Re: Coding: Fleeting Thoughts

Are there xattrs that store more than a few bytes of data? Otherwise a key-value based interface seems pretty okay to me. First, it depends what you mean. Fixed size, no, but limited to a small size is common but not universal. Plenty of systems have arbitrary-length xattrs, including, on paper, Re...
by EvanED
Tue Jan 05, 2016 2:52 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9738
Views: 1549536

Re: Coding: Fleeting Thoughts

My knowledge of the history of XWindows is sketchy, but I get the impression it was initially intended to be somewhat system-independent (I know it was ported to VMS at the least.) That might explain its detachment from Unix standards (and now I've gone and written the phrase "Unix standards&q...
by EvanED
Tue Jan 05, 2016 1:32 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9738
Views: 1549536

Re: Coding: Fleeting Thoughts

> ls --help | wc -l 123 > man ls | wc -l 250 I'm actually surprised it's that small. If I copy and paste the ls section of the GNU coreutils manual into a text file and remove the navigation headers (initially keeping paragraphs all one line): evan@picard:~$ wc -l ls.txt 501 ls.txt evan@picard:~$ f...
by EvanED
Thu Dec 31, 2015 4:42 am UTC
Forum: Religious Wars
Topic: Best language for n00bs
Replies: 261
Views: 70107

Re: Best language for n00bs

My counterargument would be that sed/awk are extremely limited in what they can do. Text processing is only one tiny slice of what's possible. They're not even any good at a lot of realistic text processing; a lot of extraction and manipulation of semi-structured formats like XML/HTML or JSON really...
by EvanED
Tue Dec 22, 2015 5:07 am UTC
Forum: Coding
Topic: Evidence-Oriented Programming
Replies: 9
Views: 4089

Re: Evidence-Oriented Programming

Maybe something like the following would work: Text Action Concatenate(Text left, Text right) Concatenate = left + right End But I don't know how you would get a survey option of "Nothing" workable. I didn't watch the video, but I'll point out that "classic" Visual Basic (and pr...
by EvanED
Tue Dec 15, 2015 2:12 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9738
Views: 1549536

Re: Coding: Fleeting Thoughts

Here's a question: would you accept decimal floating point for currency?

I'd still say "probably not", but it's much less objectionable than binary floating point...

Must... resist... opportunity to trash... you-know-what language...
by EvanED
Thu Dec 10, 2015 8:38 pm UTC
Forum: The Help Desk
Topic: Diagramming program
Replies: 2
Views: 4694

Re: Diagramming program

Perfect! Thanks!
by EvanED
Thu Dec 10, 2015 6:23 pm UTC
Forum: The Help Desk
Topic: Diagramming program
Replies: 2
Views: 4694

Diagramming program

This is a long shot, but does anyone know of a program that would be good for drawing diagrams like this? I would turn to Inkscape, but I don't know how to do it other than to draw a bunch of Bezier curves manually.

flows-anon.jpg
by EvanED
Tue Dec 08, 2015 11:45 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9738
Views: 1549536

Re: Coding: Fleeting Thoughts

DaveInsurgent wrote:Even that machine code is kinda an abstraction depending on target.

For example, Intel hates the x86 instruction set enough that they made a hardware compiler to a different ISA and execute those instructions instead. :-)

(OK, that's a bit unfair, but it's fun to make fun of x86.)
by EvanED
Sat Dec 05, 2015 11:33 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9738
Views: 1549536

Re: Coding: Fleeting Thoughts

So I've been thinking: In any given existing programming language, is there a way, possibly in another language, to express what a function should calculate without having to implement the function in the first place? What you're talking about is called program synthesis. There's active research in...
by EvanED
Sat Dec 05, 2015 3:54 am UTC
Forum: The Help Desk
Topic: Recommendations for online backup
Replies: 3
Views: 3182

Re: Recommendations for online backup

The bulk of the backup size-wise will be photos (I shoot RAW and don't like deleting things :-)) and rips of my CD collection. These are things that align well with the Glacier/Nearline philosophy pretty well. It'd also be nice to have more of a typical backup for documents and stuff, but that would...
by EvanED
Thu Dec 03, 2015 1:53 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9738
Views: 1549536

Re: Coding: Fleeting Thoughts

I think I am one of the people who will enjoy C. We'll see. :) As far as high-level languages go, I think that perl will cover that pretty nicely. You have a weird sense of "nicely" ;-) (OK, I'll try to do one post without any more snarky digs at various languages and tools. :-)) I'm inte...
by EvanED
Tue Dec 01, 2015 7:56 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9738
Views: 1549536

Re: Coding: Fleeting Thoughts

Thanks; I actually hadn't realized that [K&R] is online for free. In that case I'll *definitely* be using it; I've heard it referenced all over the place. It's not AFAIK... or, well, it probably is, but only pirated. (Note that the link in the following post was to "Learn C the Hard Way&qu...
by EvanED
Tue Dec 01, 2015 1:56 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9738
Views: 1549536

Re: Coding: Fleeting Thoughts

4) It's not possible to override the default behaviour for checking whether a target is older than its dependencies. I have hit situations where timestamps are insufficient for this task, and the only thing that I can do in these situations is to shrug my shoulders and tell people to make clean I'v...
by EvanED
Tue Dec 01, 2015 12:20 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9738
Views: 1549536

Re: Coding: Fleeting Thoughts

What is bad about plain make? make is a beautiful program that often gets horribly abused by autotools. autotools are the real cancer. CMake, scons and friends may be easier to use but they are harder to customize. Implicit dependencies. The solutions for dealing with "this .c file depends on ...
by EvanED
Mon Nov 30, 2015 4:08 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9738
Views: 1549536

Re: Coding: Fleeting Thoughts

Learn C the Hard Way , if you must. I hope that one's better than his Python book ... "Exercise 2: Make Is Your Python Now" I hate it already. :-) Plain make is a terrible build system for C/C++. Though maybe if you're willingly writing in plain C, you and make deserve each other. (Should...
by EvanED
Wed Nov 25, 2015 10:26 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9738
Views: 1549536

Re: Coding: Fleeting Thoughts

I didn't know make would make an executable with no makefile! That's handy. Is that a built-in thing with GCC languages, or does it use some sort of global config/makefile? It has builtin ("implicit") rules for many types of targets. If all it needs to know to build is those rules and to ...
by EvanED
Mon Nov 23, 2015 1:20 am UTC
Forum: The Help Desk
Topic: Recommendations for online backup
Replies: 3
Views: 3182

Recommendations for online backup

I have between 500 GB and 1 TB of stuff I'd like to back up. Any recommendations or anti-recommendations for services? Currently considering between Amazon Cloud Drive's "unlimited everything", Amazon Glacier, and Google Nearline Storage. Maybe Dropbox Pro. Edit and now CrashPlan. Being ab...
by EvanED
Thu Nov 19, 2015 3:58 pm UTC
Forum: Coding
Topic: The "IT DOESN'T WORK!" thread
Replies: 1958
Views: 476591

Re: The "IT DOESN'T WORK!" thread

Thanks for the advice. I'm indeed using python 2, so this might potentially work. But how do I use absolute imports? The semantics of import foo changed from Python 2 to Python 3; from __future__ import absolute_import in Python 2 changes the semantics "early." So if you have the __future...
by EvanED
Thu Nov 19, 2015 1:46 am UTC
Forum: Coding
Topic: The "IT DOESN'T WORK!" thread
Replies: 1958
Views: 476591

Re: The "IT DOESN'T WORK!" thread

Ok so I'm having this problem in python that you'd think would be trivial. It's trivial in c, and python is supposed to be simpler. But I can't figure it out even with google. To be fair, that's because you're rejecting the solutions... But here are a couple thoughts. 1. If you're using Python 2, t...
by EvanED
Fri Nov 13, 2015 5:32 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9738
Views: 1549536

Re: Coding: Fleeting Thoughts

"Back when you first finished high school" -- that is a ridiculous level of understanding for programming documentation. You'd have to put this before every line: "// The following is a class. A class is ... 10 paragraphs of instructions about basic C++ concepts" I'm sure there ...
by EvanED
Wed Nov 11, 2015 12:05 am UTC
Forum: Religious Wars
Topic: Google Search vs Bing
Replies: 60
Views: 77652

Re: Google Search vs Bing

I stumbled across this thread a few minutes after I was looking for a parallel version of diff . Google had fallen flat on its face (searching for "parallel diff" brings up stuff about displaying diffs as side-by-side; "parallelized diff" brings up stuff about what's the differen...
by EvanED
Mon Oct 26, 2015 6:47 pm UTC
Forum: Coding
Topic: The "IT DOESN'T WORK!" thread
Replies: 1958
Views: 476591

Re: The "IT DOESN'T WORK!" thread

Heh, I just now replied to your PM, but since you posted the question here too, I'll copy my reply as well for all to see: I guess that what's going wrong is that the filestream is closed before the json writer is finished flushing its output. (the destructor of the json archive guarantees that it ...
by EvanED
Mon Oct 26, 2015 6:38 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9738
Views: 1549536

Re: Coding: Fleeting Thoughts

Frankly, the fact that a notice to that effect hasn't been edited into the CodingHorror blog post I think is dishonest. (Jeff Atwood may not be aware, though there's a reasonable chance he saw a post I made on another forum about this and in which I explicitly tagged him. I can't confirm he saw it ...
by EvanED
Mon Oct 26, 2015 4:52 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9738
Views: 1549536

Re: Coding: Fleeting Thoughts

There's a difference between "overly-ambitious conclusion borne out of wishful thinking" and "holy hell how did this thing even get published in this current state."
by EvanED
Mon Oct 26, 2015 4:16 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9738
Views: 1549536

Re: Coding: Fleeting Thoughts

This one? http://www.eis.mdx.ac.uk/research/PhDArea/saeed/paper1.pdf I believe it's for first year undergrads though, not middle-school students. (Linked to here: http://blog.codinghorror.com/separating-programming-sheep-from-non-programming-goats/) That paper has been retracted , which should be c...

Go to advanced search