Search found 6392 matches

by sourmìlk
Fri Aug 30, 2013 4:15 am UTC
Forum: Individual XKCD Comic Threads
Topic: 1258: First
Replies: 72
Views: 16013

Re: 1258: First

rhomboidal wrote:I valiantly resisted the temptation to start a SECOND POST! thing. After a mediocre sequel, there's inevitably an attempted reboot.

Well, that and you saw what happened to the first guy: he got mauled by a raptor.
by sourmìlk
Fri Aug 30, 2013 4:12 am UTC
Forum: Individual XKCD Comic Threads
Topic: 1258: First
Replies: 72
Views: 16013

1258: First

Image
Title Text: Fortunately, exactly zero other annoying internet behaviors have developed during this time.

And if I may say so: FIR- *gets mauled by a raptor*
by sourmìlk
Mon Mar 25, 2013 7:01 am UTC
Forum: Individual XKCD Comic Threads
Topic: 1190: "Time"
Replies: 104360
Views: 27660890

Re: 1190: "Time"

New one at 3:00am EDT:

time3EDT.png
time3EDT.png (4.18 KiB) Viewed 118829 times
by sourmìlk
Thu Mar 14, 2013 12:48 pm UTC
Forum: Individual XKCD Comic Threads
Topic: 1185: "Ineffective Sorts"
Replies: 180
Views: 41164

Re: 1185: "Ineffective Sorts"

Brian-M: Bubble sort is O(n^2) and a lot of other sorts are O(n log(n)). A very common sort, quicksort, is technically O(n^2) but you'll not usually see worse than n log(n) calculations. Sure for 30 items, the difference between the two (bubble sort in the worst case is about 5 times slower), but if...
by sourmìlk
Thu Mar 14, 2013 7:44 am UTC
Forum: Individual XKCD Comic Threads
Topic: 1185: "Ineffective Sorts"
Replies: 180
Views: 41164

Re: 1185: "Ineffective Sorts"

Some years back, perhaps in the 1980s, there was a competition for the "worst" sort algorithm. They were careful to state that 1) the sort had to actually work, 2) speed was measured only by operation count, and 3) "irrelevant" time wasting or sabotage instructions weren't allow...
by sourmìlk
Thu Jan 17, 2013 12:51 pm UTC
Forum: Coding
Topic: The "IT DOESN'T WORK!" thread
Replies: 1958
Views: 463788

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

Yeah, I'm doing that and the compiler hasn't yelled at me, so I'm satisfied.
by sourmìlk
Thu Jan 17, 2013 12:39 pm UTC
Forum: Coding
Topic: The "IT DOESN'T WORK!" thread
Replies: 1958
Views: 463788

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

Yes, I did create the array, but I cast it to GLvoid * because that's what the OpenGL function requested. although it appears I get no warnings if I don't cast it so whatever, I'll not cast it.
by sourmìlk
Thu Jan 17, 2013 11:38 am UTC
Forum: Coding
Topic: The "IT DOESN'T WORK!" thread
Replies: 1958
Views: 463788

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

Some OpenGL functions require the use of a const GLvoid * pointer. GLvoid is just a typdef'd void. GCC gives me a warning when I try to delete type const void *, saying it's undefined. How do I get around this safely? I don't want to be invoking undefined behaviour. I can cast it to const unsigned c...
by sourmìlk
Mon Jan 14, 2013 7:48 pm UTC
Forum: Forum Games
Topic: BIG TALK!
Replies: 11
Views: 1674

Re: BIG TALK!

by sourmìlk
Wed Oct 24, 2012 8:34 am UTC
Forum: General
Topic: ITT: We make xkcd slightly worse.
Replies: 8586
Views: 1320015

Re: ITT: We make xkcd slightly worse.

:D
by sourmìlk
Fri Oct 19, 2012 5:15 am UTC
Forum: General
Topic: ITT: We make xkcd slightly worse.
Replies: 8586
Views: 1320015

Re: ITT: We make xkcd slightly worse.

This thread is moving too slowly. I demand more but refuse to contribute.

Actually I'm thinking of something with the latest comic. It's simple and succinct, I'm sure I can do something with it.
by sourmìlk
Tue Sep 18, 2012 8:30 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9712
Views: 1479171

Re: Coding: Fleeting Thoughts

And in Prolog it just makes the problem worse!
by sourmìlk
Tue Sep 11, 2012 6:25 am UTC
Forum: Coding
Topic: program not working as expected
Replies: 5
Views: 1517

Re: program not working as expected

And to top it all off, the title of this post wasn't very informative. We have no idea what kind of problem you're experiencing, except that you're experiencing a problem.
by sourmìlk
Mon Sep 10, 2012 3:11 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9712
Views: 1479171

Re: Coding: Fleeting Thoughts

I have a feeling that I'm actually going to need to learn linear algebra do get much further. I've pretty much been bullshitting it so far.
by sourmìlk
Mon Sep 10, 2012 1:44 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9712
Views: 1479171

Re: Coding: Fleeting Thoughts

Yeah, I created some linear algebra libraries and types myself, it's rather fun. Also, the fourth element is 0 if you don't want the vector to be translated, e.g. if it's a directional or normal vector or something.
by sourmìlk
Mon Sep 10, 2012 1:40 am UTC
Forum: Religious Wars
Topic: Google Search vs Bing
Replies: 59
Views: 75561

Re: Google Search vs Bing

Perhaps google intentionally didn't list m.xkcd.com because it knew you weren't on a mobile device.
by sourmìlk
Sat Sep 08, 2012 10:39 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9712
Views: 1479171

Re: Coding: Fleeting Thoughts

Wooh, I did something useful. I'll try the constexpr'ing right away.

EDIT: I don't think constexpr'ing, considering (among other things) std::vector interaction.
by sourmìlk
Sat Sep 08, 2012 9:01 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9712
Views: 1479171

Re: Coding: Fleeting Thoughts

I couldn't find a generic "range" class in C++, so I created one. Basically it allows you to iterate through a range of values by specifying a beginning and an end. So long as the type of value has a ++ and != operator, it works. You can also specify a step (i.e. the distance between each ...
by sourmìlk
Fri Sep 07, 2012 9:38 am UTC
Forum: Religious Wars
Topic: Google Search vs Bing
Replies: 59
Views: 75561

Re: Google Search vs Bing

The results were largely the same. When considering which search engine to use, I don't actually consider the search features, because I expect those to be mostly identical. I like Google because it can do arbitrary unit conversions (e.g. "1 acre in tablespoons per lightyear", or more prac...
by sourmìlk
Fri Sep 07, 2012 9:36 am UTC
Forum: Religious Wars
Topic: Plural of "Octopus"
Replies: 89
Views: 43342

Re: Plural of "Octopus"

My dad asserts that the correct pluralization is "Octopossie".
by sourmìlk
Thu Sep 06, 2012 7:43 pm UTC
Forum: Coding
Topic: Please help - Print with "str"
Replies: 4
Views: 1703

Re: Please help - Print with "str"

Ya. For questions with specific problems, in the future you may want to try stackoverflow . I'm not just saying that to get rid of you: stackoverflow was made for small questions with specific answers like this, and it moves much more quickly than this forum. Also, you're less likely to run into me ...
by sourmìlk
Wed Sep 05, 2012 1:28 am UTC
Forum: Coding
Topic: A tale of long forgotten code.
Replies: 8
Views: 3051

Re: A tale of long forgotten code.

And along with refactoring comes deleting old code. And as anyone who's been programming for long enough knows, as awesome as writing code is, deleting it is somehow even better. :-) Absolutely. I was looking at a year old BinaryFileReader C++ class I wrote, and I was all "Why am I not using t...
by sourmìlk
Wed Sep 05, 2012 1:27 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9712
Views: 1479171

Re: Coding: Fleeting Thoughts

Not at all. You ever seen this image macro? It exists for a reason.
by sourmìlk
Tue Sep 04, 2012 6:16 am UTC
Forum: Coding
Topic: A tale of long forgotten code.
Replies: 8
Views: 3051

Re: A tale of long forgotten code.

Seriously, refactoring old code is a surprisingly satisfying experience. I remember looking at my first mathematical Vector implementation and thinking "WTF is this unmaintainable piece of crap"? Now my latest version is still an unmaintainable piece of crap, but a really cool one. Thing i...
by sourmìlk
Mon Sep 03, 2012 5:15 am UTC
Forum: News & Articles
Topic: Israel/Palestine discussion
Replies: 6262
Views: 415104

Re: Israel/Palestine discussion

I just wanted to post here once to say that basically all of you are awesome. I've been arguing in other places and holy crap, they're all morons. You guys would rip them to shreds in a debate. Bye again.
by sourmìlk
Sat Sep 01, 2012 11:30 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9712
Views: 1479171

Re: Coding: Fleeting Thoughts

Well presumably if you're using the function you've looked up the declaration. You don't actually have to look at the definition, because the const keyword (mostly) guarantees that no mutation of the object will go on inside the method. And the const keyword is found in the declaration.
by sourmìlk
Sat Sep 01, 2012 10:00 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9712
Views: 1479171

Re: Coding: Fleeting Thoughts

Well in C++ you can tell if the function mutates by whether or not it's declared const.
by sourmìlk
Sat Sep 01, 2012 10:15 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9712
Views: 1479171

Re: Coding: Fleeting Thoughts

That is kind of stupid. I try to make it such that member functions don't return void, but rather a reference to the object. That way, I can chain functions as such: object.doSomething().doSomethingElse().doAnotherThing().thisCodeIsKindOfHardToRead().butThisPatternIsStillUseful();
by sourmìlk
Sat Sep 01, 2012 6:16 am UTC
Forum: Religious Wars
Topic: Plural of "Octopus"
Replies: 89
Views: 43342

Re: Plural of "Octopus"

I have now added the options Octopoxen, Octopes, and Otters. Add your vote now!
by sourmìlk
Thu Aug 30, 2012 3:45 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9712
Views: 1479171

Re: Coding: Fleeting Thoughts

I think that safe pointers are garbage collection in the sense that they collect garbage, but that doesn't mean the language that they're in is garbage collected, because the language has to implement that. It's like, C isn't a low level language because the compilers were written in assembly. But i...
by sourmìlk
Tue Aug 28, 2012 4:02 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9712
Views: 1479171

Re: Coding: Fleeting Thoughts

Is GC defined by what it does or how it works? If it's defined by how it works, then reference counting and cycle detection may not be GC. But if it's defined by what it does, then any language that deletes unreachable references is garbage collected.
by sourmìlk
Mon Aug 27, 2012 10:02 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9712
Views: 1479171

Re: Coding: Fleeting Thoughts

So when it's compiled down to C (which I hear you can do with Python), how is memory managed?
by sourmìlk
Mon Aug 27, 2012 5:07 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9712
Views: 1479171

Re: Coding: Fleeting Thoughts

I'd say it's problematic because you're embedding a lot of information into a type that doesn't provide much in the way of semantics about the data it's containing. Yes, that was it! It's why a lot of programmers don't like std::pair. I think never using it is a bit extreme, as it can be useful for...
by sourmìlk
Sun Aug 26, 2012 5:19 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9712
Views: 1479171

Re: Coding: Fleeting Thoughts

I think that's probably an anti-pattern, but I can't put my finger on why.
by sourmìlk
Sun Aug 26, 2012 6:43 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9712
Views: 1479171

Re: Coding: Fleeting Thoughts

Yep. And so long as parent pointers are soft... Now, parent pointers being soft might not be what you want. In that case a 'view' of a tree needs to maintain a 'hard' pointer to the root. Note, also, that shared ptr may be wrong given that you have a one to one relationship between parent and (left...
by sourmìlk
Fri Aug 24, 2012 10:23 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9712
Views: 1479171

Re: Coding: Fleeting Thoughts

How do I eliminate the problem of cyclical pointing? I'm going to say it because it's what you don't want to hear, and maybe this time you'll understand: Garbage collection. That's exactly what it's for. I know that's what it's for, but it's not the tool I want to use for this job. I'd like to pres...
by sourmìlk
Fri Aug 24, 2012 5:56 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9712
Views: 1479171

Re: Coding: Fleeting Thoughts

Okay, got it. Thank you for answering my ignorant questions.
by sourmìlk
Fri Aug 24, 2012 5:29 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9712
Views: 1479171

Re: Coding: Fleeting Thoughts

Honestly, I'm not quite sure what weak_ptr does. It looks like a shared_ptr from the description in the links.
by sourmìlk
Fri Aug 24, 2012 5:17 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9712
Views: 1479171

Re: Coding: Fleeting Thoughts

I'm making a generic n-ary tree class in C++ (for use in model skeletons). For each node, I want a pointer to the node's parents and all the node's children. This immediately leads to a problem: if I delete a node, should its children be deleted? What if something else is pointing to some of the chi...

Go to advanced search