Its not relevant to the industry, its badly written, and its considered harmful and detrimental to developing the skills of new programmers. It should only be recommended for its historical value, so pretty much only if you plan to have career in academia. Instead please recommend a book such as 'The C programming language' to newbies or ex web-designers looking to get a good foundation on the fundamentals.
I don't want to see SICP mentioned around here anymore or you will be reprimanded, please follow the lead of computer science institutions around the world and don't teach SICP anymore. Thanks, and welcome to 2009.
Name:
Anonymous2009-09-15 19:56
lol
Name:
Anonymous2009-09-15 19:58
More than half of the active posters on /prog/ use CL or Scheme, and as far as I know, SICP was written using Scheme.
I'm pretty sure not many people use C/Sepples.
>>4
They had their reasons, which we may disagree with, but it's not like that will change anything. I think it's better in a way, since the people who seemed to have gotten the most out of SICP were people who didn't take that class
Functional programming considered harmful. Excessive recursion leads to stack overflows, immutable state leads to SLOW AS FUCK, and dynamic typing leads to SQL injection even in apps that don't use it (we've learned this from PHP).
>>19
I know you're trolling, but here it is: Excessive recursion leads to stack overflows
Tail-call optimizations can be performed to turn tail-recursive calls into normal loops. immutable state leads to SLOW AS FUCK
Ever heard of SSA form, and why C compilers perform it?
tl;dr: normal programs get transformed into more functional forms. dynamic typing leads to SQL injection even in apps that don't use it (we've learned this from PHP). PHP
PHP is a very poor example of dynamic typing. Coercing types implictly is stupid. For true dynamic typing: look at Common Lisp or Scheme. Variables can hold any type, but you still have to check and dispatch correctly depending on their type, this is safe, and if you do it wrong, you'll get a condition/error signaled, which is kind of the same as with more static languages, except it happens at runtime.
You're also making the false assumption that Lisp is purely functional, Scheme allows state, and Common Lisp encourages the use of which paradigm represents the problem better. If state is required, you can use it as much as you wish (and internally, it's what is normally used after optimizations are performed).
I know Lua/Ruby, but still consider myself an imperative programmer as most of my work is still in C#/Java/C.
"Excessive recursion leads to stack overflows"
This is why the functional people speak about tail recursion so much.
"immutable state leads to SLOW AS FUCK"
Not a property of functional languages. Ruby (and this bothers me) even has mutable strings. Java doesn't. This argument only sticks to theoretical functional programming, or specific instances (LISP? I don't use it), where there's a state getting modified and passed on to another function, but the state itself is never directly mutated.
"dynamic typing leads to SQL injection"
I have no idea how this relates to SQL injection. The reason so many people write shitty injectable PHP code is (1) people are generally ignorant of injection when they cook up their own php crapwad, or even worse, the stupid-ass mysql tutorials that don't even mention it, and (2) PHP has magical string-variable substitution... like ruby.
>>21
Lisp isn't slow. Some compilers produce very good code (look at SBCL or CCL). It can be faster than Java and with proper type declaration, as fast as C. Next time you claim that, do your own benchmarks and learn your compiler well. You can examine disassembled code with (disassemble #'function) to see the generated code.
I was thinking about it, and since there's really only one right way to do everything in python, it makes perfect sense that python should replace scheme in the curriculum, since scheme lets you build powerful abstractions any way you like. It's too much for your average plumber to grasp, that pipes and sinks could be different. And if America stops training plumbers, well, India might just have less than 25% of their population in poverty, and we can't have that. So, leave the hard stuff to China and Europe, let's learn how to be plumbers.
>>32
I know your trolling, but MIT and other colleges that used to teach Scheme have switched to python. I'm not aware of any college which still teaches scheme except perhaps Brown.
Scheme and Lisp are ineffective at "building powerful abstractions", as shown by the eventual failings of non-toy programs(see Reddit, which switched to python; Paul Grahams precious yahoo stores).
Oribtz admitted that much of their LISP code has to be ported to C++(and in 2002 he implies that orbitz is moving away from it all together) due to the failings of the LISP environment, and goes on to explain that the usual programming style in LISP just is not efficient in the real world, and programmers need to be retaught to write efficient lisp. Specifically they admit that they don't use most of lisps features such as closures, generic functions, complex sequence functions and garbage collection because they are slow.
Source:http://www.paulgraham.com/carl.html
Don't fool yourself >>32 chan . While working at a large financial company I met people from all over the world that write code that was no better or worse than American programmers'. The primary reason to not out source software is that its a logistical nightmare, most large software companies find it easier to bring people here on H1-B's (although that may change since recent changes have lowered the amount of H1-B's awarded).
>>36
Lisp is good in all the same ways that Sepples is good. You're not really writing programs in Lisp, you're writing a new language made from macros and then writing your program in that language. Understandably, a lot of people don't get this.
Of course, Lisp is not bad in most of the ways that Sepples is bad.
Name:
Anonymous2009-09-16 17:09
>>40 lisp is good in the same ways that java is good of course, lisp is not bad in most of the ways that java is bad
FTFY
ITT: people defend their choice to learn the pretty but ultimately useless Scheme.
Name:
Anonymous2009-09-17 12:18
>>51
Maybe in another thirty years you will catch up to the features introduced in 1975.
Name:
Anonymous2009-09-17 12:23
>>52
Too bad that would be a huge waste of time. Do please enjoy your eating your pretty theories while the rest of us are getting paid for doing things.
Where and when the Real World(tm) needs the sort of specialized abstractions Scheme has they bolt it on well after the fact, and only where needed and the bare minimum of abstractions at that.
I getchas.
QED: abstraction isn't terribly useful except for obscure and arcane things.
>>62 QED: abstraction isn't terribly useful except for obscure and arcane things.
Like... programming? 4chan needs a plumbing board for pythonistas, sepples nutjobs, and sharpies.
Name:
Anonymous2009-09-17 13:05
>>62
You got it! This is why I program exclusively in assembler. Not only are abstractions redundant, but it also makes me look dangerous and cool when I fuck up and take down the whole network thanks to a mistyped interrupt.
Name:
Anonymous2009-09-17 15:00
21st century coeds considered harmful
Name:
Anonymous2009-09-18 15:46
cuntsidered harmful
Name:
Anonymous2009-09-18 17:13
>>36
A professor of mine said that UC Davis still uses Scheme as the first programming language for freshmen. He teaches there, too, so the information is current.
>>75
Sadly UC schools, however, are anything but current owing to the California budget crisis which in turn was brought on by the state trying to care for and educate the entire population of Mexico.
>>76
The conspiracy theory that covers the Californian government's finances are far larger than just California's willingness to care for Mexicans. It has something to do with the amount of unnecessary debt that California (as well as the rest of the US) holds.
Name:
!THe.FamOus2010-05-11 7:26
yes!
russian supercomputer center of atomic weapon apruve it!
Holy fuck I even linked to Paul Graham as a citation, that's like using the trolls troll to troll the trolls. Pretty bad ass, no wonder I didn't have any sex that year.
To answer your question, In C, the image library will return a pointer to a struct that contains each pixel represented as a struct. From there, you have to decide what you want to do with it. If you're trying to edit it, prepare to learn a lot of math.