0297: "Lisp Cycles"

This forum is for the individual discussion thread that goes with each new comic.

Moderators: Moderators General, Magistrates, Prelates

Postby mootinator » Wed Aug 01, 2007 3:05 pm UTC

No, assembly is difficult to read even if you do understand it.

Turns out a PC has more registers than my brain.
mootinator
 
Posts: 69
Joined: Mon Mar 26, 2007 10:27 pm UTC
Location: Saskatoon, SK

Postby Mat Cauthon » Wed Aug 01, 2007 4:13 pm UTC

jc wrote:And eventually, people will start to discover that the endpoint of this process has already been realized, in the Whitespace programming language. Eventually the most advanced will adopt Whitespace, and all other characters will be merely commentary.


You have NO idea how much that amused me! I LOVE esoteric languages just for the strangeness - in my interp/compilers class I made a brainfuck interpreter, then made an OOK! to BF compiler for the hell of it.

My teacher thought I was insane for even CONSIDERING OOK! a language... he's probably right.

mootinator wrote:No, assembly is difficult to read even if you do understand it.

Turns out a PC has more registers than my brain.


Sigged for great truth. Oh god, I hated compiling to MIPS... still, that class made me appreciate what the poor guys writing the backends for my shiny high-level programming languages have to go through. Definitely worth it.
User avatar
Mat Cauthon
Doctor Baron
 
Posts: 88
Joined: Wed Feb 14, 2007 7:12 am UTC

Postby Arancaytar » Wed Aug 01, 2007 4:34 pm UTC

Alt text wrote:MIT computer lab dissolved


http://science.slashdot.org/article.pl? ... 31/2336232

Amazing. The first three letters match! Randy is getting the power of second sight. :P
"You cannot dual-wield the sharks. One is enough." -Our DM.
Image
User avatar
Arancaytar
 
Posts: 1585
Joined: Thu Mar 15, 2007 12:54 am UTC
Location: 50.099432 degrees north, 8.572756 degrees east.

Postby fatnickc » Wed Aug 01, 2007 5:54 pm UTC

Arancaytar wrote:
Alt text wrote:MIT computer lab dissolved


http://science.slashdot.org/article.pl? ... 31/2336232

Amazing. The first three letters match! Randy is getting the power of second sight. :P


Incredible.

evilbeanfiend wrote:
Mat Cauthon wrote:I have a friend who swears by CAR and CDR.



they spell them first and rest now


One of the things I love about Lisp is just the charm of using CAR and CDR - if they ever happen to be dropped I'll just redefine them, and not for backwards compatibility! Yeah, I'm a pervert like that.
fatnickc
 
Posts: 7
Joined: Wed Aug 01, 2007 5:50 pm UTC
Location: London, UK

Postby plams » Wed Aug 01, 2007 6:55 pm UTC

Recently I was challenged to write something that could play music on a "PC-speaker cluster". I thought for a while about how to represent the music. I considered XML, but it's just too verbose, bloated and ambigious (i.e. no clear guidelines of when to represent information with plain text, attributes or tags). I considered a custom format, but I'd probably end up writing new parser subsections every time I needed a new kind of data... so for the second or third time in my life I ended up writing my own SAX-like S-expression parser.

Less than 1 hour spent on writing less than 100 lines of Ruby code and I had a nice framework. The S-expressions were perfect for representing musical data, and I even managed to embed a very minimal language for programming "instruments" (sequences of pitch changing, "wait" or nestable loop commands). It all blended nicely together - both the code and the data format were pretty clean.

I do believe XML has its place as a markup language (i.e. lots of text mixed with markup directives, like HTML), but seeing it used so much for general data representation makes me a bit nauseous. S-expressions are very suitable for both programming (lisp and scheme) and general data representation, so why isn't it more widespread?
plams
 
Posts: 35
Joined: Fri Oct 13, 2006 12:08 am UTC
Location: denmark

Of course we all know that LISP is acronym

Postby GreatPokerHands » Wed Aug 01, 2007 8:09 pm UTC

Loads of
Incomprehensible
Spurious
Parentheses

I'd like to take credit for this, but it was told to me by a computer camp teacher many, many years ago.

I'm just passing it onto the next generation, in just the same way it was passed onto my teacher by ... hang on a minute, I think I read a cartoon about this ...
GreatPokerHands
 
Posts: 9
Joined: Fri Apr 20, 2007 11:54 pm UTC

Postby Agathos » Wed Aug 01, 2007 8:23 pm UTC

Not as clumsy or random as a ___.

I don't know how to end that sentence. We've a lot of possibilities to consider.

Not as clumsy or random as a pointer.
Not as clumsy or random as a malloc().
Not as clumsy or random as a for loop.
Not as clumsy or random as a debugger.
Not as clumsy or random as a an infix syntax.
...

That last is bringing us closer to the heart of the matter, but it does not flow.
Agathos
 
Posts: 3
Joined: Wed Aug 01, 2007 8:06 pm UTC
Location: Somerville, MA

Postby frezik » Wed Aug 01, 2007 9:27 pm UTC

EvanED wrote:
frezik wrote:
Devilsaur wrote:(if lisp (language (reads hideously)))

I'm part of the new generation of coders and beware, for I value absurd things like readability and the ease of coding. But yeah, even I have to admire lisp for it's awesomeness (just not it's practicality :P).


Languages you don't understand are difficult to read. News at 11.


I agree with Devilsaur; see my earlier post. Are you going to accuse me of not understanding it? Or is "liking the syntax and typical style" a prerequisite to understanding in your mind?


There are perfectly valid reasons why you might not like LISP. However, I find that most people who don't like it do so because they don't understand it. Particularly if they started programming in a C-like language.

In C and other curly-brace languages, people tend to be encouraged to do one thing per line, rather than stacking function calls together. This is completely the opposite approach to LISP, where it's typical to build more complex operations by combining simpler operations.

Additionally, C/C++ libraries have a tendency to make the most interesting return value a reference passed to the function rather than returned directly. For instance, read() returns the number of bytes that were read, rather than the actual data that was read. This makes it impractical to combine functions the way LISP does. More modern curly-brace languages do away with this annoyance through either object oriented constructs or allowing you to return a list of objects.

Try writing a LISP parser some time. The context-free grammar is piss-simple. Nearly the entire language is defined via functions. While more modern variants have added additional syntax, they still remain very simple. I know people find the parentheses annoying, but they're often the only syntax you have to know.
User avatar
frezik
 
Posts: 1336
Joined: Wed Jan 10, 2007 7:52 pm UTC
Location: Schrödinger's Box

Postby Isaac Hill » Wed Aug 01, 2007 10:16 pm UTC

As an undergrad at WPI, I took a course called "Paradigms of Computing" which featured about 2 days of prolog, a little java, and Scheme, which they told me is some relation to Lisp. I hated it so much, I wrote a song about on my banjo. All I remember is the chorus started, "I'm taking Scheme...and I'm getting reamed."

It may have something to do with the assignments they gave us. The only one I remember is that they told us 0 = x (not a typo, the number is being defined as a function that retruns x). They gave us the increment function, and had us work out inc(0()) by hand to figure out that 1 was f(x). 2 was f(f(x)) and so on.

This struck me as the stupidest thing I'd ever seen. If there's one thing computers can do well, it's numbers. They store everything as binary numbers. They have Arithmetic Logic Units specifically designed to manipulate numbers, and we're turning them into abstract functions. As an EE major, I thought, "We're not going to bust our butts getting you more CPU cycles per second if this is what you're going to do with them."

I'm assuming that this was just an awkward application of the language to illustrate how it works. What would Scheme/Lisp be practical for?

As for coding music, I once had an assignment to write a serial port transmit/receive program. My lab partner and I finished early, so I added a feature to make it play enough of "Sweet Dreams (are Made of This)" to be recognizable. I think I ended up applying TTL voltages to turn the speaker on and off at the frequencies of the various notes, so it was done in square waves with no volume control.
User avatar
Isaac Hill
 
Posts: 284
Joined: Wed Mar 14, 2007 9:35 pm UTC
Location: Middletown, RI

Postby EvanED » Wed Aug 01, 2007 10:51 pm UTC

frezik wrote:There are perfectly valid reasons why you might not like LISP. However, I find that most people who don't like it do so because they don't understand it. Particularly if they started programming in a C-like language.


I didn't say I didn't like Lisp. I'm not sure what Devilsaur's opinion is, but the harshest thing he said was that it's impractical.

I just said I thought that it's difficult to read, and that the typical indentation and bracketing style can make certain things more difficult than they "should" be. For instance, it would be quite obnoxious but possible to write a C++ program an editor like notepad. From my experience, I would say that writing Lisp in an editor that didn't do brace matching and indentation for you would be about as fun as pulling teeth.

I understand that Lisp's expressiveness almost depends on the simplicity of the syntax, because it enables the creation of powerful macros that are not appreciably more difficult to write than functions. This is why, despite the fact that I find it harder to read than, say, ML (*and* am a static-typing person), I still don't mind programming in it much.
EvanED
 
Posts: 3765
Joined: Mon Aug 07, 2006 6:28 am UTC
Location: Madison, WI

Postby Rysto » Wed Aug 01, 2007 11:25 pm UTC

Isaac Hill wrote:As an undergrad at WPI, I took a course called "Paradigms of Computing" which featured about 2 days of prolog, a little java, and Scheme, which they told me is some relation to Lisp. I hated it so much, I wrote a song about on my banjo. All I remember is the chorus started, "I'm taking Scheme...and I'm getting reamed."

It may have something to do with the assignments they gave us. The only one I remember is that they told us 0 = x (not a typo, the number is being defined as a function that retruns x). They gave us the increment function, and had us work out inc(0()) by hand to figure out that 1 was f(x). 2 was f(f(x)) and so on.

This struck me as the stupidest thing I'd ever seen. If there's one thing computers can do well, it's numbers. They store everything as binary numbers. They have Arithmetic Logic Units specifically designed to manipulate numbers, and we're turning them into abstract functions. As an EE major, I thought, "We're not going to bust our butts getting you more CPU cycles per second if this is what you're going to do with them."

I'm assuming that this was just an awkward application of the language to illustrate how it works. What would Scheme/Lisp be practical for?

Nobody actually uses Church numerals for anything; as you say, the performance is (mostly) terrible. The point is that in a language where the only data type you have are functions, you can still do anything a normal programming language can do.

The other point of such assignments is to get you thinking in a functional style rather than an imperative style.
Rysto
 
Posts: 1420
Joined: Wed Mar 21, 2007 4:07 am UTC

Postby FiddleMath » Wed Aug 01, 2007 11:40 pm UTC

Isaac Hill wrote:As an undergrad at WPI, I took a course called "Paradigms of Computing" which featured about 2 days of prolog, a little java, and Scheme, which they told me is some relation to Lisp.


Scheme is a dialect of Lisp. There are a handful of Lisp dialects, with Scheme, Common Lisp, and emacs Lisp as the Lisps that probably get the most use. These are all called dialects of Lisp because they all start from the same tiny core of functions and basic ideas, from which everything else is defined.

It may have something to do with the assignments they gave us. The only one I remember is that they told us 0 = x (not a typo, the number is being defined as a function that returns x). They gave us the increment function, and had us work out inc(0()) by hand to figure out that 1 was f(x). 2 was f(f(x)) and so on.

This struck me as the stupidest thing I'd ever seen. If there's one thing computers can do well, it's numbers. They store everything as binary numbers. They have Arithmetic Logic Units specifically designed to manipulate numbers, and we're turning them into abstract functions. As an EE major, I thought, "We're not going to bust our butts getting you more CPU cycles per second if this is what you're going to do with them."


Yes, this is a weird assignment; and no, you would never use this in real life. They were trying to show that you can use the core pieces of Lisp to define arithmetic: that the integers can be constructed from pieces of code, rather than built-in. It's kind of like showing how the integers can be derived from basic set theory. Thus, you can actually model computation with Lisp's tiny core, like how you can model computation with a Turing machine - and really, this was the impetus behind Lisp's original design.

On the other hand, doing this demonstration with a programming exercise is silly - it's much more fun to build useful or cool things than it is to half-heartedly demonstrate of a truth of theory. Such truths are important, but they rarely benefit from implementation.

I'm assuming that this was just an awkward application of the language to illustrate how it works. What would Scheme/Lisp be practical for?

Lisp is a powerful general-purpose language: so, everything, in essence. In reality, their standard libraries tend to be a little weaker than those of current, popular scripting languages, so using Lisp sometimes means that you'll need to code functionality that would come packaged in other languages. On the other hand, compiled Lisp runs at speeds comparable to C, while tending to require much less code than C. Or Java. Or, often, Python or Ruby. Lisp is possibly the most flexible language that sees any use - but that very flexibility makes Lisp conceptually challenging. If your program implements "interesting" algorithms, or if it's large enough to benefit from meta-programming, then Lisp might be the way to go.

Disclosure: I've done very little hacking in Lisp. But what use I've given it makes it beautiful and enticing, in ways I can't properly express. I'm going to learn it more, soon.
User avatar
FiddleMath
 
Posts: 245
Joined: Wed Oct 11, 2006 7:46 am UTC
Location: Madison, WI

Postby Alpha Omicron » Thu Aug 02, 2007 12:36 am UTC

I hope it was Emperor Norton, returned from the dead.
Here is a link to a page which leverages aggregation of my tweetbook social blogomedia.
User avatar
Alpha Omicron
 
Posts: 2765
Joined: Thu May 10, 2007 1:07 pm UTC

Postby Kjetil » Thu Aug 02, 2007 1:15 am UTC

Isaac Hill wrote:It may have something to do with the assignments they gave us. The only one I remember is that they told us 0 = x (not a typo, the number is being defined as a function that retruns x).


Not that it matters, but that syntax looks suspiciously like ML and not Scheme. Its certainly not a Lisp language, thats for sure.
Kjetil
 
Posts: 11
Joined: Wed Jun 13, 2007 12:47 am UTC

Postby Xanthir » Thu Aug 02, 2007 2:31 am UTC

Kjetil wrote:
Isaac Hill wrote:It may have something to do with the assignments they gave us. The only one I remember is that they told us 0 = x (not a typo, the number is being defined as a function that retruns x).


Not that it matters, but that syntax looks suspiciously like ML and not Scheme. Its certainly not a Lisp language, thats for sure.

Nodnod. I'm not a Schemer, but I believe the relevant function would be defined with:
(define (0 x) x)

Though clearly the *correct* way to do it is:
(defun 0 (x) x)

^_^

Agree as well that that was a pointless exercise, though. Some people get so caught up in the paradigm that they forget what languages are *actually* for - writing cool programs. For that, please see Practical Common Lisp by Peter Seibel (note - the entire book is available there for free, with free libraries created/used in the book available for download as well). It became a Lisp bible virtually overnight, for good reason. It really does explore good, useful things to do with clean, clear code. Things like databases, or web servers, or id3-tag parsers. Seriously, this thing is brilliant, and it's suited for an absolute newbie.

And for the record, since becoming acquainted with Lisp, I find it comparitively difficult to understand any other syntax. ^_^ EvanED is completely correct that a good lisp experience is completely dependent on having a paren matcher and auto-indenter, but that's not exactly a flaw. Driving a car is faster than riding a horse, despite the fact that it requires you to have easy access to gasoline stations. Just because you can use something with lower-end tech, doesn't mean you *should*.

If you're playing with Lisp on Linux, I highly recommend running Emacs Slime with SBCL. All of those words can be googled appropriately if they don't make sense. I hate Emacs with a pretty strong passion, but Slime is very easy to use. On Windows, I recommend Corman Common Lisp. It's got a great IDE and generates good code, with lots of nice extras like immediate access to a pretty-printer and such. It's still not as standards-compliant as other ones are, but it's a good way there. Allegro Lisp is a good one too, but you have to pay for it to get the full version (Corman just nags you if you don't pay).
User avatar
Xanthir
My HERO!!!
 
Posts: 3989
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex

Lisp

Postby TomatoPi » Thu Aug 02, 2007 2:34 am UTC

Wow, that's so hilarious! Lisp and star wars rolled into one. that's great.

I use a version of lisp at work every day. AutoLISP, which is for programming AutoCAD hotkeys and routines etc. I love it, it's great! i've used other languages a bit, and this is by far my favorite.
TomatoPi
 
Posts: 1
Joined: Thu Aug 02, 2007 2:17 am UTC

Postby ERTW » Thu Aug 02, 2007 4:00 am UTC

Did anybody notice this little gem on the wikipedia page for Lisp?

Love the name too, Nora P. Tor :p
ERTW
 
Posts: 37
Joined: Wed Sep 20, 2006 4:44 am UTC

Postby DannyboyO1 » Thu Aug 02, 2007 6:42 am UTC

hendusoone wrote:I have only programmed in lisp once, and that was as part of a course where we did a new language every two weeks. The lisp project was to build a lego mindstorms robot (the old yellow kind), and program it to find its way through a simple maze.

I finished my program early, so I also programmed the little guy to play the Mission Impossible theme while finding its way through the maze. Writing music in XS: Lisp is not an easy task!

It was worth it, though... the look on my prof's face when the bot navigated the maze almost perfectly while humming Mission Impossible was priceless!


Ok, now you are my hero.
There is no signature that still seems witty 50 posts later
DannyboyO1
 
Posts: 35
Joined: Mon Jun 25, 2007 6:50 pm UTC

Postby The_Toad » Thu Aug 02, 2007 6:54 am UTC

It took me like4 read throughs to catch the star wars joke... should I kill myself
User avatar
The_Toad
 
Posts: 50
Joined: Fri May 25, 2007 10:56 pm UTC

Postby enkrypt » Thu Aug 02, 2007 8:01 am UTC

If you don't know Lisp (preferably Scheme) you can't call yourself a computer scientist.
Neither can you without knowing C and atleast a little bit of assembly.
enkrypt
 
Posts: 8
Joined: Thu Aug 02, 2007 7:59 am UTC

Postby OmenPigeon » Thu Aug 02, 2007 12:21 pm UTC

enkrypt wrote:If you don't know Lisp (preferably Scheme) you can't call yourself a computer scientist.
Neither can you without knowing C and atleast a little bit of assembly.


And what magical knowledge do Lisp, C and assembly grant that we can't get anywhere else? What arcane wisdom comes down from on high when you start matching parens and carefully shepherding registers?

I know all three of those languages, and I've certainly learned things from each of them. But saying that I can't call myself a real computer scientist without knowing some arbitrary set of programming languages is facile and childish. I could just as well say that you can't be a real computer scientist without knowing Python, since otherwise you'll never have a chance to learn that languages can be made less obtuse and still be quite powerful. You can't be a real computer science major without ever assembling a computer from parts, because otherwise you'll never understand how things fit together. You cant be a real computer scientist unless you use Fortran for everything, even though you know all these other languages, because Fortran is what real programmers use.

Computer science is about much, much more than having a favorite language and it certainly transcends your ego.
As long as I am alive and well I will continue to feel strongly about prose style, to love the surface of the earth, and to take pleasure in scraps of useless information.
~ George Orwell
User avatar
OmenPigeon
Peddler of Gossamer Lies
 
Posts: 671
Joined: Mon Sep 25, 2006 6:08 am UTC

Postby 2DMan » Thu Aug 02, 2007 12:32 pm UTC

OmenPigeon wrote:
enkrypt wrote:If you don't know Lisp (preferably Scheme) you can't call yourself a computer scientist.
Neither can you without knowing C and atleast a little bit of assembly.


And what magical knowledge do Lisp, C and assembly grant that we can't get anywhere else? What arcane wisdom comes down from on high when you start matching parens and carefully shepherding registers?

I know all three of those languages, and I've certainly learned things from each of them. But saying that I can't call myself a real computer scientist without knowing some arbitrary set of programming languages is facile and childish. I could just as well say that you can't be a real computer scientist without knowing Python, since otherwise you'll never have a chance to learn that languages can be made less obtuse and still be quite powerful. You can't be a real computer science major without ever assembling a computer from parts, because otherwise you'll never understand how things fit together. You cant be a real computer scientist unless you use Fortran for everything, even though you know all these other languages, because Fortran is what real programmers use.

Computer science is about much, much more than having a favorite language and it certainly transcends your ego.


I applaud you, sir (or madam), and stand in complete agreement.
2DMan - Master of Calm
Also known as 'TwoDaemon' on the IRC, with thanks to LE4dGOLEM.
User avatar
2DMan
 
Posts: 156
Joined: Wed Jul 18, 2007 1:49 pm UTC
Location: Suffolk, England (or Sheffield, during semesters)

Postby Arancaytar » Thu Aug 02, 2007 12:40 pm UTC

Computer science ... transcends your ego.


Unlike Programming? :wink:
"You cannot dual-wield the sharks. One is enough." -Our DM.
Image
User avatar
Arancaytar
 
Posts: 1585
Joined: Thu Mar 15, 2007 12:54 am UTC
Location: 50.099432 degrees north, 8.572756 degrees east.

Postby enkrypt » Thu Aug 02, 2007 12:49 pm UTC

OmenPigeon wrote:
enkrypt wrote:If you don't know Lisp (preferably Scheme) you can't call yourself a computer scientist.
Neither can you without knowing C and atleast a little bit of assembly.


Computer science is about much, much more than having a favorite language and it certainly transcends your ego.


I'm not saying that this or that language is "the best" or "a favourite" or "the only right tool".
Hell, I wrote the implementation for my master thesis in python, the one for my bachelor thesis in a mixture of perl and c, and many projects inbetween were written in C++ and java.
I don't even use Scheme that much anymore these days, but I sure as hell count it as an invaluable part of my education.
I am just saying that you will never truly understand buffer overflows and string formatting bugs, without having programmed with pointers in C.
And you'll never really understand pointers without having at least a bit of contact with ASM and low level machine programming.
And Lisp/Scheme offers a unique view on functional programming that is critically important if you want to understand anything about algorithmic design and complexity (tail recursion anyone?).
And yes, real computer scientists should at least be able to assemble a computer from parts yeah.
I did that for the first time when I was 12.
enkrypt
 
Posts: 8
Joined: Thu Aug 02, 2007 7:59 am UTC

Postby EvanED » Thu Aug 02, 2007 1:11 pm UTC

enkrypt wrote:If you don't know Lisp (preferably Scheme) you can't call yourself a computer scientist.
Neither can you without knowing C and atleast a little bit of assembly.


OmenPigeon already said everything that needed to be be said, but I'll add a few thoughts.

What about ML? Can you replace Lisp with ML in that statement? "If you don't know Lisp or ML, you can't call yourself a computer scientist"? Or maybe we should use "and" as the conjunction. Maybe we can allow Miranda or Haskell instead of ML.

Of course, Lisp is just a bunch of syntactic sugar around lambda calculus. (Ignore set! for the moment.) People should also be able to show how their Lisp program could be translated to pure lambda calculus, including the use of church numerals. After all, this is the theoretical base of programming languages.

How 'bout Ruby or Smalltalk? These provide a far different view of object-oriented programming than C++/C#/Java-style OO. And we should also add in CLOS in there, because that is yet another view. There goes that "preferably Scheme" opinion on what lisp to use. (Yeah, yeah, there are Scheme ports of CLOS-like things. But it's not in R#RS.)

We should also make knowledge of C++ or Java (or C#) mandatory, because these are the most common languages out in the real world. Someone should be able to describe the benefits and drawbacks of the various aspects of their design. And hey, C++ templates are just another functional language. We should teach that as well. If you can't write a program that determines whether a number (that you set a preprocessor macro to) is prime or not and conveys that information by whether the program compiles, you're not a computer scientist.

Maybe you aren't a computer scientist if you don't know compilers. After all, you won't know how your Lisp or C or Python gets transformed to machine code without it. BURS matching FTW. If you can't describe that, get out of my degree.

---

Look, I'm not disputing that something like lisp or whatever is good to know. I just don't think it's essential. You don't get to set the curriculum for what counts as "computer scientist". I'm sure we all have different opinions on what's useful to know.

(For the record, the first paragraph started serious (I wouldn't think of someone's CS abilities less if they know ML instead of Lisp), and it got increasingly sarcastic from there.)
EvanED
 
Posts: 3765
Joined: Mon Aug 07, 2006 6:28 am UTC
Location: Madison, WI

Postby EvanED » Thu Aug 02, 2007 1:23 pm UTC

enkrypt wrote:And Lisp/Scheme offers a unique view on functional programming that is critically important if you want to understand anything about algorithmic design and complexity (tail recursion anyone?).


FWIW, I learned tail recursion in the context of an optimization to C code. In some sense, this made it more real -- the instructor wrote a C program, compiled it, then showed us the assembly, and how the tail call was replaced by a jump.

The way I saw it taught in the context of Scheme was that as you do substitutions (and beta reductions), the size of the expression doesn't grow with the number of calls. This to me is very abstract, and doesn't tell me anything about how it would actually execute on the machine.

And yes, real computer scientists should at least be able to assemble a computer from parts yeah.


I bet Alan Turning never did that. Should we strip him of the title of computer scientist?
EvanED
 
Posts: 3765
Joined: Mon Aug 07, 2006 6:28 am UTC
Location: Madison, WI

Postby TheKhakinator » Thu Aug 02, 2007 1:27 pm UTC

Though from what I know, Turing had a fairly good understanding of the way the early computers worked. He worked on designing some of the machines they used to crack Enigma.
TheKhakinator: +2 angst to topic
User avatar
TheKhakinator
the next small girl on KRNT radio
 
Posts: 1130
Joined: Wed Jun 06, 2007 1:11 pm UTC
Location: Adelaide, South Australia

Postby Maurog » Thu Aug 02, 2007 1:58 pm UTC

Also, ornithologists should know how to fly. And botanists should be able to do photosynthesis.
User avatar
Maurog
 
Posts: 843
Joined: Tue Jul 10, 2007 7:58 am UTC

Postby enkrypt » Thu Aug 02, 2007 2:10 pm UTC

Well it's okay for me if python and/or java is the only programming language you will ever learn, and you consider your computer as a magical black box of which you know nothing about what happens on the inside.
I won't lose any sleep over that.
I'm just pointing out my vision of things, which is acknowledged when you take a peek at the CS curriculum of quite a few top universities around the world which will support at least large parts of what I'm mumbling here.
enkrypt
 
Posts: 8
Joined: Thu Aug 02, 2007 7:59 am UTC

Postby Maurog » Thu Aug 02, 2007 2:22 pm UTC

It's a slippery slope, isn't it? Where do you stop? Rate yourself on this scale:

0: I can code on a computer, but I have no idea what a computer really is or how it works.
1: I have a vague idea of the components the computer is made of, but I wouldn't be able to assemble one from parts.
2: I can eventually assemble a computer from parts if someone disassembles it.
3: I can go to a parts store, identify the parts, buy the necessary parts to build a computer and assemble one.
4: I actually know how all the parts are made. Give me an access to a factory, and I will design parts and assemble a computer from them.
5: I can build a computer if I get stranded. I will mine metal ore, smelt it, and forge tools to make tools to make tools to make tools to make computer parts, and then assemble a working computer from them, complete with an internal energy source.
User avatar
Maurog
 
Posts: 843
Joined: Tue Jul 10, 2007 7:58 am UTC

Postby TheKhakinator » Thu Aug 02, 2007 2:24 pm UTC

I can put a computer together from parts but I can't really code. Your scale doesn't account for that.
TheKhakinator: +2 angst to topic
User avatar
TheKhakinator
the next small girl on KRNT radio
 
Posts: 1130
Joined: Wed Jun 06, 2007 1:11 pm UTC
Location: Adelaide, South Australia

Postby enkrypt » Thu Aug 02, 2007 2:32 pm UTC

CScode: 5+++
:D
enkrypt
 
Posts: 8
Joined: Thu Aug 02, 2007 7:59 am UTC

Postby frezik » Thu Aug 02, 2007 3:18 pm UTC

enkrypt wrote:If you don't know Lisp (preferably Scheme) you can't call yourself a computer scientist.
Neither can you without knowing C and atleast a little bit of assembly.


EvanED wrote:What about ML? Can you replace Lisp with ML in that statement? "If you don't know Lisp or ML, you can't call yourself a computer scientist"? Or maybe we should use "and" as the conjunction. Maybe we can allow Miranda or Haskell instead of ML.

Of course, Lisp is just a bunch of syntactic sugar around lambda calculus.


“Computer science is no more about computers than astronomy is about telescopes.â€
User avatar
frezik
 
Posts: 1336
Joined: Wed Jan 10, 2007 7:52 pm UTC
Location: Schrödinger's Box

Postby johnnycuff » Thu Aug 02, 2007 5:01 pm UTC

frezik wrote:
Devilsaur wrote:(if lisp (language (reads hideously)))

I'm part of the new generation of coders and beware, for I value absurd things like readability and the ease of coding. But yeah, even I have to admire lisp for it's awesomeness (just not it's practicality :P).


Languages you don't understand are difficult to read. News at 11.


or even news at 00001011
johnnycuff
 
Posts: 1
Joined: Thu Aug 02, 2007 4:56 pm UTC

Postby Ghona » Thu Aug 02, 2007 6:15 pm UTC

Maurog wrote:It's a slippery slope, isn't it? Where do you stop? Rate yourself on this scale:

0: I can code on a computer, but I have no idea what a computer really is or how it works.
1: I have a vague idea of the components the computer is made of, but I wouldn't be able to assemble one from parts.
2: I can eventually assemble a computer from parts if someone disassembles it.
3: I can go to a parts store, identify the parts, buy the necessary parts to build a computer and assemble one.
4: I actually know how all the parts are made. Give me an access to a factory, and I will design parts and assemble a computer from them.
5: I can build a computer if I get stranded. I will mine metal ore, smelt it, and forge tools to make tools to make tools to make tools to make computer parts, and then assemble a working computer from them, complete with an internal energy source.

6: You are a protagonist in an EE "Doc" Smith novel.
If you're taking me too seriously, you probably are making a mistake.
Ghona
 
Posts: 246
Joined: Mon May 21, 2007 1:28 am UTC

Postby Drostie » Thu Aug 02, 2007 10:03 pm UTC

I only ever used Lisp because of the Joel on Software blog. They were talking about what an employer looks for when hiring a programmer; and one of the things was a strong feeling for recursion and the like. Joel spoke on at a bit of length about how a lot of CS majors stay in until there's a bunch of talk about pointers and recursion and induction and the like -- and then they mysteriously vanish, poof, into other majors, muttering something coincidental like "there aren't enough girls in that major" or something like that. He figured that you either have a brain for those sorts of things or you don't.

So, I took it as a sort of challenge. I'm no CS major, but I know the terms and so forth. (I don't pretend to be refined. My native language was, of all things, JavaScript -- and I still prefer the idea of HTML GUIs to complicated and idiosyncratic things with widgets and the like. But I got much better and today I'm fluent in Java, which I use now extensively. But I hate the idiosyncrasies of Swing, and AWT takes too much effort.)

But it's a challenge, and dammit, I felt the need to do it: Learn enough Lisp to write the sweet-and-simple program you'd need to reverse a linked list. Just to prove that you're up to the pointer dynamics and recursion, and that these "real" languages hold no particular mystery.

I'm telling you this all to get to an odd observation, which was: today, whenever I think of Lisp, I think of something like: "Lisp: It's like an XML programming language, if you were too lazy to type the angle brackets and the complete closing tag each time." That's really just my first impression. Take XML, make the namespace dynamic, add in the various constructs, and mix thoroughly with the combined tears of innocent babies and virgin software programmers, let it stew while the world shrieks, "noo! noo!" ... and then try to make it look like something other than an XML Programming Language, because if there were a loving God in Heaven, surely He have smoten the designers of this abomination. Because XML + Programming = Sin. So, Lisp could, with just a dangerously small amount of tweaking, disprove God's existence.

(But, of course, I was able to complete the task easily within a couple hours. And it was actually fairly elegant, in its own odd way. I can see why people would like the language so much.)

Erm. I'm rambling. We don't need to see your identification. These aren't the droids we're looking for. You can go about your business. Move along.
User avatar
Drostie
 
Posts: 262
Joined: Fri Nov 03, 2006 6:17 am UTC

Postby frezik » Thu Aug 02, 2007 10:42 pm UTC

Drostie wrote:I'm telling you this all to get to an odd observation, which was: today, whenever I think of Lisp, I think of something like: "Lisp: It's like an XML programming language, if you were too lazy to type the angle brackets and the complete closing tag each time."


Both LISP and XML are pretty close to writing raw parse trees.

Back when I worked in a normal office, I had this up on my wall (taken from a lambda-the-ultimate thread):

Descartes:
2x

Church:
\x.* 2 x

McCarthy:
(lambda (x) (* 2 x))

W3C:
<abstraction><var>x</var> <expression> <application> <const>*</const> <arguments> <const>2</const> <var>x</var> </arguments> </application> </expression> </abstraction>
User avatar
frezik
 
Posts: 1336
Joined: Wed Jan 10, 2007 7:52 pm UTC
Location: Schrödinger's Box

Postby MythGuyDK » Fri Aug 03, 2007 12:26 am UTC

Excuse me for not reading the whole thread, it's very hard for me to catch up as I read slow. :(

Where do you get LISP interpreters/IDEs/compliers/tutorials? I mean, I've heard of it but can't find it... :/
Exactly!
MythGuyDK
 
Posts: 31
Joined: Sat Nov 11, 2006 11:35 pm UTC

Postby JoshJ » Fri Aug 03, 2007 2:55 am UTC

If you have AutoCAD the "vlide" command brings up a fairly easy visual LISP ide with syntax highlighting and auto-format (which works WONDERS at navigating the maze of parentheses you find yourself in.)

Other than emacs, I have no idea what a real standalone lisp programmer would use.
JoshJ
 
Posts: 33
Joined: Wed Apr 11, 2007 5:00 pm UTC

Postby frezik » Fri Aug 03, 2007 4:47 am UTC

MythGuyDK wrote:Excuse me for not reading the whole thread, it's very hard for me to catch up as I read slow. :(

Where do you get LISP interpreters/IDEs/compliers/tutorials? I mean, I've heard of it but can't find it... :/


clisp is GPL'd and what I generally use when I get a chance to actually hack LISP. Scheme is another LISP-derived language that has a free implementation.
User avatar
frezik
 
Posts: 1336
Joined: Wed Jan 10, 2007 7:52 pm UTC
Location: Schrödinger's Box

PreviousNext

Return to Individual XKCD Comic Threads

Who is online

Users browsing this forum: charlie_grumbles, Ebonite, Exodies, Fekeenuisance, Google Feedfetcher, maryloujane, MikeNGarrett, mscha, orthogon, pxtimpc73 and 49 guests