Search found 13 matches

by Boson Collider
Wed Aug 24, 2016 12:41 am UTC
Forum: Religious Wars
Topic: 1/xy
Replies: 12
Views: 7022

Re: 1/xy

Infix notation is stupid to begin with –it only really works for commutative associative operators. Polish or graph notation FTW! Subtraction? 1 - 2 - 3 - 1 can be parenthetized in many different ways and thus is ambiguous, unless you first do all negations and then do additions, as in 1 + (-1) + (...
by Boson Collider
Sat Jul 02, 2016 11:56 am UTC
Forum: Coding
Topic: Code duplication vs clarity
Replies: 15
Views: 5915

Re: Code duplication vs clarity

Well, if we do get into Haskell-like languages, you get useful syntactic constructs like guards . For example, this is how I would probably do this in Haskell: function data |B & C & D = thing3.thing2 data |A & C = thing2 data |A = thing4.thing3.thing1 data |otherwise = data Furthermore,...
by Boson Collider
Sat Jul 02, 2016 11:11 am UTC
Forum: Individual XKCD Comic Threads
Topic: 1270: Functional
Replies: 171
Views: 41594

Re: 1270: Functional

Right, in practice you would often encapsule the recursion into a higher order function to make your code reusable, and generally to enjoy the benefits of structured programming. But the thing that allows you to do that is Tail recursion. You need a primitive as powerful as a goto to implement arbit...
by Boson Collider
Thu May 19, 2016 10:46 pm UTC
Forum: Computer Science
Topic: Why is insertion sort O(N^2) ?
Replies: 7
Views: 5112

Re: Why is insertion sort O(N^2) ?

Ah OK, so the explanation is that even if you only have O(N Log N) comparisons, other operations on common data structures have a faster scaling and will become dominant if comparisons aren't the bottleneck. That makes sense. I guess it also explains why insertion sort for non-computing applications...
by Boson Collider
Thu May 19, 2016 8:53 pm UTC
Forum: Computer Science
Topic: Why is insertion sort O(N^2) ?
Replies: 7
Views: 5112

Why is insertion sort O(N^2) ?

So, first defining insertion sort, to make sure we're on the same page. I picture the algorithm in pseudocode like this: Sort (UnsortedList) = InsertionSort (empty list, UnsortedList) InsertionSort (SortedList, UnsortedList) = If unsortedList == empty list, then return SortedList Else return Inserti...
by Boson Collider
Mon May 16, 2016 1:52 am UTC
Forum: Individual XKCD Comic Threads
Topic: 1270: Functional
Replies: 171
Views: 41594

Re: 1270: Functional

Really, I think a lot of the confusion about functional programming comes from a lot of programmers beginning in Python or Java, neither of which initially supported tail recursion. Therefore, the idea of programming without for or while loops seems alien. So it might be a good idea to show a practi...
by Boson Collider
Tue Mar 15, 2016 8:07 pm UTC
Forum: Individual XKCD Comic Threads
Topic: 1357: "Free Speech"
Replies: 1346
Views: 149510

Re: 1357: "Free Speech"

Not every interaction in front of every possible audience is or should be a debate, though. And on top of that some debates are wastes of time, because the participants don't show up with the same understanding of things like facts and arguments. In addition, dignifying certain positions with publi...
by Boson Collider
Tue Mar 15, 2016 7:16 pm UTC
Forum: Individual XKCD Comic Threads
Topic: 1357: "Free Speech"
Replies: 1346
Views: 149510

Re: 1357: "Free Speech"

Peter Tatchell being no-platformed . Without reading the rest of that article, I notice that it seems to start out with the same misunderstanding of freedom of speech that the comic is addressing. Calling someone a racist (and saying you won't share a stage with them) doesn't violate anyone's freed...
by Boson Collider
Tue Mar 15, 2016 1:25 pm UTC
Forum: Individual XKCD Comic Threads
Topic: 1357: "Free Speech"
Replies: 1346
Views: 149510

Re: 1357: "Free Speech"

In retrospect, I would frankly say that this is the single worst XKCD comic in terms of its effect on the world, which has been rather depressing. The key issue with American politics in the last few decades has been that people with opposing viewpoints don't talk to each other enough. This comic ha...
by Boson Collider
Wed Mar 18, 2015 12:50 pm UTC
Forum: Individual XKCD Comic Threads
Topic: 1500: Upside-Down Map
Replies: 128
Views: 19768

Re: 1500: Upside-Down Map

I find your lack of antarctica disturbing.
by Boson Collider
Wed Feb 25, 2015 6:31 pm UTC
Forum: Individual XKCD Comic Threads
Topic: 1476: Ceres
Replies: 54
Views: 13961

Re: 1476: Ceres

Alright. New JPL picture, which resolves the white spot into two tiny white spots.

Now that's just weird:
by Boson Collider
Tue Jan 13, 2015 1:18 am UTC
Forum: What If?
Topic: What-If 0124: "Lunar Swimming"
Replies: 60
Views: 27976

Re: What-If 0124: "Lunar Swimming"

I think the best way to get enough water would be with oxygen ISRU. Something like the LUNOX proposal by NASA in the 90s. When you can make oxygen from lunar soil, you only need to ship liquid hydrogen to the surface. If you were building a moon base, you'd probably want to have the infrastructure t...
by Boson Collider
Wed Oct 29, 2014 6:40 pm UTC
Forum: Individual XKCD Comic Threads
Topic: 1440: Geese
Replies: 52
Views: 10281

Re: 1440: Geese

What I find strange is that if you flew with a constant acceleration 1 g, you'd reach the edge of the observable universe in about 45 years, which is within a human lifetime. Well, in a non-relativistic universe. In the real world, I've been accelerating (relative to local free-fall) at an average ...

Go to advanced search