Search found 4861 matches

by EvanED
Sun Oct 25, 2015 11:06 pm UTC
Forum: Coding
Topic: The "IT DOESN'T WORK!" thread
Replies: 1958
Views: 476821

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

Thank you for clearing all of that up, it's pretty overwhelming to try to read it in it's original format. :lol: I just searched my project, but the weird thing is I didn't find it? The only function that takes both fstream and a vector in as parameters is void fileWrite(ofstream &myFile, vecto...
by EvanED
Sat Oct 24, 2015 6:51 am UTC
Forum: Coding
Topic: The "IT DOESN'T WORK!" thread
Replies: 1958
Views: 476821

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

"fileRead(std::__1::basic_fstream<char, std::__1::char_traits<char> >&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >&...
by EvanED
Tue Sep 22, 2015 1:59 am UTC
Forum: The Help Desk
Topic: Frequent BSODs, except when I have video or audio playing(?)
Replies: 3
Views: 3807

Re: Frequent BSODs, except when I have video or audio playin

free-bee wrote:Random question: does Windows store a copy of a blue screen? I just got one myself (totally different reason) and I didn't have time to read any of it before my computer restarted. I just wanna know what it said.

Windows event viewer, if it is able.
by EvanED
Fri Sep 11, 2015 3:49 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9739
Views: 1551081

Re: Coding: Fleeting Thoughts

Pointers to different structures in C++ are incomparable, actually. (Such comparisons are undefined behavior). In many implementations this isn't true, admittedly, but it is still UB, and optimizers continue to be aggressive there. I... don't think I believe this. Are you really saying that Foo * p...
by EvanED
Tue Sep 01, 2015 5:02 am UTC
Forum: Religious Wars
Topic: What makes a good programming language?
Replies: 28
Views: 7391

Re: What makes a good programming language?

But I definitely think that the "default", "what you get if you don't ask for something different" int type should be a real integer; if I say 3 100 , the result should be 515,377,520,732,011,331,036,461,129,765,621,272,702,107,522,001. I guess it depends on what you are doing w...
by EvanED
Tue Sep 01, 2015 4:05 am UTC
Forum: Religious Wars
Topic: What makes a good programming language?
Replies: 28
Views: 7391

Re: What makes a good programming language?

There are a lot of cases where you want fixed-size integers. I have a couple responses. I'm not saying that arbitrary-precision is the only thing the language can have. Ideally, it would provide the building blocks for one to be able to create custom fixed-width types, and provide them in a library...
by EvanED
Sat Aug 29, 2015 7:55 am UTC
Forum: Religious Wars
Topic: What makes a good programming language?
Replies: 28
Views: 7391

Re: What makes a good programming language?

I think a true integer type is essential; e.g. I think the Javascript "everything is a double" is terrible. Two reasons: First, on a subjective note, I basically could not write the software I work on every day in that system because we have to be able to represent integers that can up to ...
by EvanED
Mon Aug 17, 2015 11:34 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9739
Views: 1551081

Re: Coding: Fleeting Thoughts

How would you handle property access? Like any other language that wasn't defined by a madman? o[2] would return something differently from o["2"] . Likely you wouldn't be able to access o[2] another way, though I suspect that you actually could make o.2 unambiguous. How would you seriali...
by EvanED
Sat Aug 15, 2015 12:02 am UTC
Forum: Religious Wars
Topic: The One True Pronunciation of ".GIF"
Replies: 93
Views: 58175

Re: The One True Pronunciation of ".GIF"

...and it's hard G for graphics... This is why I pronounce "JPEG" as "jay-feg". Shouldn't that be "jay-fej"? Or else "jay-peej", either of those would Make Sense. Huh? No, you pronounce the letters as they sound in the words they are abbreviating. "Group...
by EvanED
Tue Aug 04, 2015 12:07 am UTC
Forum: Hardware
Topic: What phone should I get?
Replies: 12
Views: 6219

Re: What phone should I get?

Thanks, everyone. I decided in the end to go WinMo, and got the Lumia 640. It was inexpensive enough that if I decide I hate it, I won't feel awful about getting a new one, and I can take more time to decide.
by EvanED
Sun Aug 02, 2015 3:59 am UTC
Forum: Hardware
Topic: What phone should I get?
Replies: 12
Views: 6219

Re: What phone should I get?

Thanks; I think I'll make Cyanogenmod support a priority if I go Android. I'm also considering Windows Phone, actually. Anyone know what the update situation is with that? (I.e. suppose I trust MS to provide updates in a timely manner but don't trust the actual device manufacturer or AT&T to pas...
by EvanED
Sun Aug 02, 2015 1:55 am UTC
Forum: Hardware
Topic: What phone should I get?
Replies: 12
Views: 6219

What phone should I get?

So I just dropped my N900 on the floor and the screen doesn't work any more. RIP. What should I replace it with? My wants are light -- I haven't made the full switch from grad student mode to realizing that I have money that can be exchanged for goods and services, so I haven't had a data plan and m...
by EvanED
Fri Jul 24, 2015 3:32 am UTC
Forum: Religious Wars
Topic: Firefox vs. Chrome: Is it time for me to throw in the towel?
Replies: 42
Views: 25908

Re: Firefox vs. Chrome: Is it time for me to throw in the to

phlip wrote:I looked into this a long time ago (when Chrome was pretty new) and maybe it's changed since then, but I haven't bothered to look.
You have been able to do this in Chrome for a while as well; right click on a field, pick "add as search engine", and fill in the keyword you want.
by EvanED
Fri Jul 24, 2015 2:26 am UTC
Forum: Coding
Topic: Avoiding duplicate code
Replies: 20
Views: 4357

Re: Avoiding duplicate code

EvanED: are you saying that, since the branches are testing the same const variables each time through the loop, the processor is quite likely to predict correctly almost every time? If your actual computations are small, I would think so. It’s probably worth mentioning that my program is multithre...
by EvanED
Thu Jul 23, 2015 7:53 pm UTC
Forum: Coding
Topic: Avoiding duplicate code
Replies: 20
Views: 4357

Re: Avoiding duplicate code

I suspect function pointers will lead to a slower solution than original version. Branch predictors are pretty good, and unless CalculateA or CalculateB is quite long (in which case a mispredict would be a small percentage of the loop's runtime) I'd expect it to get most predictors correct. In contr...
by EvanED
Wed Jul 22, 2015 1:43 pm UTC
Forum: The Help Desk
Topic: Definitions clarification — monolithic kernel/microkernel
Replies: 4
Views: 3139

Re: Definitions clarification — monolithic kernel/microkerne

I'm with WanderingLinguist; "task" doesn't have a single formal definition. The quote is accurate with respect to process. As used in your quote, "task" just means what is being done at a high level -- e.g. process scheduling is probably a task, I/O scheduling is a task, translat...
by EvanED
Fri Jul 17, 2015 6:23 pm UTC
Forum: Coding
Topic: Want to learn assembly through C.
Replies: 17
Views: 8414

Re: Want to learn assembly through C.

I have no idea what you're asking.

You say you want to use C to learn assembly, but then you ask for a decompiler for C++. You're also asking for a decompiler, but do you really want a disassembler? What are you trying to do?
by EvanED
Sun Jul 12, 2015 5:06 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9739
Views: 1551081

Re: Coding: Fleeting Thoughts

Inside that function, the log of foo is assigned to b. A throwaway function is defined which takes the log of its input and divides it by the newly calculated b. This throwaway function is "returned" by logBasen. So, when logBasen is called with foo as the argument, the thing that actuall...
by EvanED
Sun Jul 12, 2015 3:23 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9739
Views: 1551081

Re: Coding: Fleeting Thoughts

Can I just call it "argument binding"/"function wrapping" or is that too specific? It's not a terrible way of thinking about it, but I'd say it's a bit too specific. In practice, usually closures are doing more than just wrapping another function call and you'd put the logic fro...
by EvanED
Sun Jul 12, 2015 5:03 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9739
Views: 1551081

Re: Coding: Fleeting Thoughts

It looks like this is all tied up in the idea of never letting functions take more than one variable. It doesn't have to be restricted to one, you could have it take more than that. Thesh gave an example, but I'll give another one of something that I wrote a week or two ago. (Unfortunately, my exam...
by EvanED
Sat Jul 11, 2015 6:19 am UTC
Forum: Coding
Topic: Allocating on the stack: re- vs. pre-
Replies: 7
Views: 2949

Re: Allocating on the stack: re- vs. pre-

The fact that it's a VLA though... I'm not so sure. Unfortunately, I suspect it will allocates and deallocates the extra stack space each loop iteration. n probably doesn't matter except that if the compiler can establish that it is definitely less than 4096 or thereabouts it can probably do a more...
by EvanED
Sat Jul 11, 2015 4:11 am UTC
Forum: Coding
Topic: Allocating on the stack: re- vs. pre-
Replies: 7
Views: 2949

Re: Allocating on the stack: re- vs. pre-

Ordinarily I would say: With no initializer on the array, I would not be surprised if the code generated for each case is identical. The fact that it's a VLA though... I'm not so sure. Unfortunately, I suspect it will allocates and deallocates the extra stack space each loop iteration. n probably do...
by EvanED
Sun Jun 28, 2015 2:23 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9739
Views: 1551081

Re: Coding: Fleeting Thoughts

"There are only two hard problems in computer science: cache coherence, naming things, and off-by-one errors."
by EvanED
Sat Jun 20, 2015 11:13 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9739
Views: 1551081

Re: Coding: Fleeting Thoughts

You may or may not see this, but I'll write it anyway. :-) Re C vs. C++: Point taken. However, I thought I had heard that any C program will run on a C++ compiler also? Very nearly, but not 100%. (Actually, probably almost no C program will compile as C++ unless it was written with that in mind, but...
by EvanED
Sat Jun 20, 2015 7:34 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9739
Views: 1551081

Re: Coding: Fleeting Thoughts

I haven't really fully grasped how Java handles generics and polymorphism, and I'm not so sure I want to. I have more interest in seeing how it's done in C. C handles generics and polymorphism with it's "fuck you go use another language you hippie" feature. (No, seriously. It provides no ...
by EvanED
Fri Jun 19, 2015 3:09 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9739
Views: 1551081

Re: Coding: Fleeting Thoughts

Did you maybe intend to say the converse of what you said? No. It was something along the line of: O(1) space => there is a finite bound on the memory space => there is a finite bound on the state space => there is a fine bound on the length of a path through that space before repeating => repeats ...
by EvanED
Fri Jun 19, 2015 2:41 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9739
Views: 1551081

Re: Coding: Fleeting Thoughts

If an algorithm runs with space complexity O(1) ... If an algorithm has O(1) space complexity, it also has O(1) time complexity. That doesn't sound right. What about this algorithm? def silly (array) { for i in array: pass } By my count, that runs in O(n) time and does no allocations, therefore O(1...
by EvanED
Fri Jun 19, 2015 1:09 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9739
Views: 1551081

Re: Coding: Fleeting Thoughts

Dunno. Maybe it's just me. But is no-one else deeply unsettled by the notion of using Big-O in a finite domain (as is all computers) -- and a pretty damn small finite domain at that? No, because calling it a small finite domain is not even close to accurate. Also, when you get higher than P, even v...
by EvanED
Thu Jun 18, 2015 7:43 pm UTC
Forum: Gaming
Topic: Great Steam Deals (And other Online Distribution Systems)
Replies: 2550
Views: 404625

Re: Great Steam Deals (And other Online Distribution Systems

And Gunpoint is kind of fun... clever as far as it lasts, and has a brilliant sort of twisted-noir sense of humour, but I played the game and felt that it didn't really have enough content. Gunpoint was short but sweet. I forgot how funny it is though, until you said that. I was sold on it by the t...
by EvanED
Thu Jun 18, 2015 3:51 am UTC
Forum: Computer Science
Topic: If I want to grok MarI/O, where do I begin?
Replies: 10
Views: 5271

Re: If I want to grok MarI/O, where do I begin?

It's also not too hard to set up and run yourself. What it really needs, though, is a "that was funny/cool" button that saves the last network or two so you can go back and replay it later... there's a very high density of boring, crap attempts, but every now and again it produces somethin...
by EvanED
Thu Jun 18, 2015 1:57 am UTC
Forum: Computer Science
Topic: If I want to grok MarI/O, where do I begin?
Replies: 10
Views: 5271

Re: If I want to grok MarI/O, where do I begin?

Yup. A genetic algorithm is super trivial: A genetic algorithm is; one that works may or may not be, depending on application area. You have to pick the right features, you have to have a problem that can be solved by your abstraction, that solution has to be small enough that you can get to it in ...
by EvanED
Wed Jun 17, 2015 12:26 am UTC
Forum: Gaming
Topic: Great Steam Deals (And other Online Distribution Systems)
Replies: 2550
Views: 404625

Re: Great Steam Deals (And other Online Distribution Systems

Deus Ex series 80% off for the next 4 1/2 hours on Steam; $6.59 for all of Deus Ex, Invisible War, Human Revolution Director's Cut, and The Fall.
by EvanED
Mon Jun 15, 2015 11:23 pm UTC
Forum: Computer Science
Topic: If I want to grok MarI/O, where do I begin?
Replies: 10
Views: 5271

Re: If I want to grok MarI/O, where do I begin?

Yeah, genetic algorithms are quite simple conceptually. Any difficulties come in how you combine multiple offspring; it can be non-obvious how to do that. I didn't follow the links, but I suspect combining neural nets is the main contribution of his references. Then the main thing he did probably wa...
by EvanED
Sat Jun 13, 2015 9:29 pm UTC
Forum: Computer Science
Topic: How is physical access not a factor in 2-factor?
Replies: 13
Views: 6238

Re: How is physical access not a factor in 2-factor?

(Also, if we're talking about just the terms "1" vs "2" factor, I think "compromise Verizon" should probably count as a second factor. :-)) the issue is that the SMS probably goes through more than just Verizon, is not end-to-end encrypted, and can be easily suppressed...
by EvanED
Sat Jun 13, 2015 9:16 pm UTC
Forum: Computer Science
Topic: How is physical access not a factor in 2-factor?
Replies: 13
Views: 6238

Re: How is physical access not a factor in 2-factor?

Pessimistic? Paranoid? Sure. But experience should have taught us that these things do happen when the protected systems are worth enough. I'm not saying one shouldn't be a somewhat paranoid, but what you're talking about is still orders of magnitude more difficult than a normal 1-factor database a...
by EvanED
Fri Jun 12, 2015 5:48 am UTC
Forum: Coding
Topic: Project Euler
Replies: 411
Views: 141508

Re: Project Euler

the getter/setter idiom is an antipattern because it is inherently nonorthogonal. It's just a coincidence that the specific example is not a rational class. I don't think that's there at all! He's not saying getter/setters are bad, he's saying think about what your design is and...
by EvanED
Thu Jun 11, 2015 4:27 pm UTC
Forum: Coding
Topic: Project Euler
Replies: 411
Views: 141508

Re: Project Euler

(offtopic) This (Fraction) is the first custom class I have written in Java. (I mean, the first class that's actually designed to be instantiated. Of course everything is in a class in Java. But you know what I mean.) Anyone see any holes in it? :) This is poor interface design, as explained in cha...
by EvanED
Thu Jun 11, 2015 3:45 pm UTC
Forum: Computer Science
Topic: How is physical access not a factor in 2-factor?
Replies: 13
Views: 6238

Re: How is physical access not a factor in 2-factor?

Your cell phone is something that you have , but SMS is not exactly a confidential communications channel, so it's not a reliable way to verify whether you actually have the item in question. Harder to beat than 1-factor, but not quite 2-factor yet. I think that's a very pessimistic view. I can ima...
by EvanED
Wed Jun 03, 2015 10:09 pm UTC
Forum: Computer Science
Topic: Deliberately bad algorithms
Replies: 120
Views: 33482

Re: Deliberately bad algorithms

That reminds me of SlowSort (not an alias of bogosort) For purposes of readability... def slowsort(A, i, j): # This procedure sorts the subarray A[i]...A[j] if i >= j: return m = (i+j)/2 slowsort(A, i, m) slowsort(A, m+1, j) if A[m] > A[j]: A[m],A[j] = A[j],A[m] slowsort(A, i, j-1)
by EvanED
Wed Jun 03, 2015 12:18 am UTC
Forum: Computer Science
Topic: Deliberately bad algorithms
Replies: 120
Views: 33482

Re: Deliberately bad algorithms

Guaranteed to terminate successfully with P = 1, but it's impossible to derive an O notation since the running time has no upper bound. You can still talk about the complexity of the average case, which would be n! iterations of the outer loop. factorial = product . enumFromTo 1 isPrime n = factori...

Go to advanced search