However, do you truly believe that he's a neo nazi? Does anyone?
Some day, people will realise that most of the time, it makes no sense to call a person "racist" (or most other "-ist"s). Most of the time, "racist" is a property of an utterance or an act, not a person.
There are exceptions. This guy isn't one of those exceptions.
Because we always have. The term "operating system" has always referred to the foundation software on any machine, from the kernel to the standard operating environment.
Later I got me a 6502 and kept looking at it and thinking how lame it was. No matter how I looked, whatever angle I considered, I couldn't shake the idea about how limited the 6502 was. To be fair, of course the design parameters were different, not to mention the age of each one.
The net effect of the design tradeoffs mean that the Z80 and 6502 have almost the same power, achieved by different means. The code density, for example, turns out to be almost exactly the same. The 6502 has fewer instructions, but all opcodes are one byte. The Z80 has more registers but the 6502 has zero page addressing.
Interestingly, the 6502 is still being used today and the Z80 is not (except for retro gear, obviously). The main reason is that the 6502 has an extremely low interrupt latency. If an interrupt occurs, the 6502 can be running interrupt handler code in at most 5 clock cycles. So you can find 500MHz soft cores in various ASICs if you know where to look.
Every hacker over a certain age knows what is meant by the term "overlay", from minicomputers to CP/M to MS-DOS. And it fills them with dread to this day.
It's fair to say that not every hacker knew this. Those of us who grew up with 8-bit micros in the 80s were either Z80 or 6502 (the COSMAC was very rare), and those who used one didn't use the other.
They do, however, spend millions on ads that they think will sell their products, and it happens that "Yeah, we think Trump sucks too. Drink Budweiser" sells products. You can probably figure out why for yourself.
That is not what we call "production code", even if it is strictly speaking production code.
Haha, well, the person who wrote the query optimiser in your database server would probably differ with that opinion... That was my job a long time ago.
Of course you can. You just figure out maximum recursion depth, and then check if there's enough stack space.
Your mission, should you choose to accept it, is to figure out the maximum recursion depth for Tarjan's strongly connected components algorithm given an arbitrary directed graph. It must be more efficient than just running the algorithm.
I'm not sure what you mean when you say "you run out of stack pretty quickly."
It depends what you're doing, as always.
For many recursive algorithms (e.g. diff, balanced binary tree traversal, quicksort), unless you implement them stupidly, the maximum recursion depth is within a constant factor of the logarithm of the size of the problem. If the problem size is N, you will never have a call stack more than O(log N) calls deep. On a 64-bit machine, a 64-level-deep call stack is nothing. Hell, Mozilla or Unity 3D probably go 64 function calls deep on every key press.
For other recursive algorithms (e.g. any graph algorithm based on depth-first search), the maximum recursion depth could be the size of the problem no matter what you do. If the problem size is N, a recursive algorithm might give you a call graph O(N) calls deep. That's not nothing, especially since stacks are typically smaller than they used to be because of multithreading.
Recursion is undesirable because it doesn't scale - you run out of stack pretty quickly. There isn't really ever any need for recursion anyway as there's nothing you can do recursively that you can't do non-recursively.
I once spent a week (a week) writing a non-recursive implementation of Tarjan's strongly connected components algorithm for precisely this reason. It was one of the most painful things I've ever done. (Before you ask: No, we could not use the "normal" iterative algorithm. The graph was too big for that.)
You can do anything non-recursively, just like you can do anything in COBOL. But a lot of the time, you'd just be simulating the recursion stack anyway. Compilers are much better at this sort of thing than you are and have a lower hourly rate.
I don't remember when I saw recursion the last time in production code, [...]
See, I've worked in compilers, and software that has compiler-like components (e.g. input languages which resembles programming languages in some way) for a long time, and I see recursion all the time.
Recursion is all over production code, you just don't work in those spaces.
Seriously, what could Milo have possibly said that would have justified this idiocy?
Based on everything he said in the previous week, it's pretty clear that he was going to out students he thought were undocumented immigrants. And if this went the same way as it did the last time he outed trans students, he knew full well that he would be inciting violence against those students.
The fear was that Milo was going to do exactly what he said he'd do: out, and incite violence towards, undocumented immigrant students all behind a thin veil of implausible deniability.
If he had any balls he'd post it on Breitbart where he risks getting sued out of existence (like Gawker) if any of his "speech" about those students is factually incorrect.
However, do you truly believe that he's a neo nazi? Does anyone?
Some day, people will realise that most of the time, it makes no sense to call a person "racist" (or most other "-ist"s). Most of the time, "racist" is a property of an utterance or an act, not a person.
There are exceptions. This guy isn't one of those exceptions.
Because we always have. The term "operating system" has always referred to the foundation software on any machine, from the kernel to the standard operating environment.
No, but they can form part of an OS.
We still don't.
The college guys who bothered reading the articles and reviews were aiming for that MBA=BMW pie in the sky lifestyle.
Wealthy lifestyle porn still exists. It's called "Forbes".
Actual rich people don't read Forbes.
They read computer mags.
They're called "zines", you ignoramus.
Probably the rise of PIC or Atmel.
I had various Z80 and 6502 based machines (eg MZ80K, ZX Spectrum, BBC Micro).
Your parents must have been loaded...
Later I got me a 6502 and kept looking at it and thinking how lame it was. No matter how I looked, whatever angle I considered, I couldn't shake the idea about how limited the 6502 was. To be fair, of course the design parameters were different, not to mention the age of each one.
The net effect of the design tradeoffs mean that the Z80 and 6502 have almost the same power, achieved by different means. The code density, for example, turns out to be almost exactly the same. The 6502 has fewer instructions, but all opcodes are one byte. The Z80 has more registers but the 6502 has zero page addressing.
Interestingly, the 6502 is still being used today and the Z80 is not (except for retro gear, obviously). The main reason is that the 6502 has an extremely low interrupt latency. If an interrupt occurs, the 6502 can be running interrupt handler code in at most 5 clock cycles. So you can find 500MHz soft cores in various ASICs if you know where to look.
Every hacker over a certain age knows what is meant by the term "overlay", from minicomputers to CP/M to MS-DOS. And it fills them with dread to this day.
It's fair to say that not every hacker knew this. Those of us who grew up with 8-bit micros in the 80s were either Z80 or 6502 (the COSMAC was very rare), and those who used one didn't use the other.
I was 6502, so I know what you're talking about.
They do, however, spend millions on ads that they think will sell their products, and it happens that "Yeah, we think Trump sucks too. Drink Budweiser" sells products. You can probably figure out why for yourself.
Because Democratic voters prefer craft ales?
That is not what we call "production code", even if it is strictly speaking production code.
Haha, well, the person who wrote the query optimiser in your database server would probably differ with that opinion... That was my job a long time ago.
Perhaps you did not see my other posts.
Of course. This is Slashdot.
Recursion can be good but can also easily be misused.
I'm trying to think of a tool in the programmer's toolbox that this isn't true of, and I'm drawing a blank.
Of course you can. You just figure out maximum recursion depth, and then check if there's enough stack space.
Your mission, should you choose to accept it, is to figure out the maximum recursion depth for Tarjan's strongly connected components algorithm given an arbitrary directed graph. It must be more efficient than just running the algorithm.
I'm not sure what you mean when you say "you run out of stack pretty quickly."
It depends what you're doing, as always.
For many recursive algorithms (e.g. diff, balanced binary tree traversal, quicksort), unless you implement them stupidly, the maximum recursion depth is within a constant factor of the logarithm of the size of the problem. If the problem size is N, you will never have a call stack more than O(log N) calls deep. On a 64-bit machine, a 64-level-deep call stack is nothing. Hell, Mozilla or Unity 3D probably go 64 function calls deep on every key press.
For other recursive algorithms (e.g. any graph algorithm based on depth-first search), the maximum recursion depth could be the size of the problem no matter what you do. If the problem size is N, a recursive algorithm might give you a call graph O(N) calls deep. That's not nothing, especially since stacks are typically smaller than they used to be because of multithreading.
Every recursion can be expressed as a loop or nested loops.
Especially if you have a stack data structure too.
I would be willing to bet money that you don't need to compile any languages or diff any files or traverse any graphs on that CPU, though.
To be fair, Python is the wrong language.
Most modern C++ compilers can't because of all those modern C++ programmers who use RAII everywhere
Recursion is undesirable because it doesn't scale - you run out of stack pretty quickly. There isn't really ever any need for recursion anyway as there's nothing you can do recursively that you can't do non-recursively.
I once spent a week (a week) writing a non-recursive implementation of Tarjan's strongly connected components algorithm for precisely this reason. It was one of the most painful things I've ever done. (Before you ask: No, we could not use the "normal" iterative algorithm. The graph was too big for that.)
You can do anything non-recursively, just like you can do anything in COBOL. But a lot of the time, you'd just be simulating the recursion stack anyway. Compilers are much better at this sort of thing than you are and have a lower hourly rate.
I don't remember when I saw recursion the last time in production code, [...]
See, I've worked in compilers, and software that has compiler-like components (e.g. input languages which resembles programming languages in some way) for a long time, and I see recursion all the time.
Recursion is all over production code, you just don't work in those spaces.
All the Scheme and Haskell programmers. Every single one of them.
Seriously, what could Milo have possibly said that would have justified this idiocy?
Based on everything he said in the previous week, it's pretty clear that he was going to out students he thought were undocumented immigrants. And if this went the same way as it did the last time he outed trans students, he knew full well that he would be inciting violence against those students.
Vigilantism breeds vigilantism, basically.
The fear was that Milo was going to do exactly what he said he'd do: out, and incite violence towards, undocumented immigrant students all behind a thin veil of implausible deniability.
If he had any balls he'd post it on Breitbart where he risks getting sued out of existence (like Gawker) if any of his "speech" about those students is factually incorrect.
You said "Trump" and "reasoning" in the same sentence. Satire detected.