Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

"first"

Name: Anonymous 2011-08-22 1:04

fun "first" language to learn.

I say first because I took C++ in highschool and enjoyed it, and I wanted to try common lisp but I'm not certain if its supposed to be a joke or not.

any help would be nice.

Name: Anonymous 2011-08-23 18:01

I am a grad student with access to hundreds of desktop computers (though Condor / cloud, whatever the fuck). If I wanted the speed, I could easily just use a distributed system instead of fucking around in C/C++ and wasting my time learning how the memory system of my particular computer works.

Name: Anonymous 2011-08-23 18:18

>>35,37
The reason to go "bottom-up" is not to memorize an instruction set or the hardware spec of a particular machine.  It is to build knowledge in the most logical order.  Starting, instead, with something like Scheme is starting with a black box.  The vast majority of what is happening is hidden, and shouldn't be.

Instead, if you start with things like "true and false equals false," there is nothing hidden.  We can intuitively understand that concept without having to add a footnote that says "it works this way because the guy who invented Scheme decided that procedures and variables should share a namespace, but the guy who invented Lisp decided that they shouldn't..."

And bottom-up gives you an actual appreciation for the work that the computer is doing, which forces you to be a better programmer because you're aware of time complexity and space complexity at an instinctive level.  An integer isn't just some magical concept that can have any number of digits.  Instead, it's 32 contiguous true/false flags on some machines, 64 on others, etc...  And knowing that, you know when you need to care about things like overflow and when you don't.  Starting with an abstract language that hides all of that detail from you only encourages you to be inefficient and handicapped.

Name: Anonymous 2011-08-23 18:27

>>41
Holy shit, I would never hire you.  You had better hope you can find a way to never leave academia.

Name: Anonymous 2011-08-23 18:31

>>43
You understand what he's saying?  I don't.  Could you please translate his gibberish post into something legible for me?

Name: Anonymous 2011-08-23 18:41

>>44
"Throwing other people's money at the problem is easier than learning to program."

Name: Not >>44 2011-08-23 18:47

>>45
This is true, though.

Name: Anonymous 2011-08-23 19:01

>>42
So the reason to go bottom up is to have a simple model for reducing/constructing whatever language you want. Which I addressed in >>37, and I don't feel like repeating here.

As for space/time complexity intuitions...  name dropping it and some examples will be enough to achieve that little understanding. It's basically what SICP did, in Scheme.

Name: Anonymous 2011-08-23 19:13

>>43
Quit with the hiring you faggotry. It sounds stupid as hell.

Name: Anonymous 2011-08-23 19:18

>>48
I think you meant
Back to joelonsoftware.com, please.

Name: Anonymous 2011-08-23 21:04

Just learn C, assembly and Common Lisp. Reading SICP somewhere inbetween those should be fine. CL is a very nice language, but I don't know if I could recommend it as someone's first language if you don't know how to set up an implementation and the editor/environment (Emacs+SLIME).

Name: Anonymous 2011-08-23 21:12

>>50
I use gvim.

Name: Anonymous 2011-08-23 21:24

>>50
LITHP-2 ITH FOR GIGANTIC FAGGOTTH

Name: Anonymous 2011-08-23 21:46

>>50
Learning assembly is stupid. Most CS depts. only have computer organization courses and the assembly used in those courses are usually assembly for computers that are designed for teaching. Ex: PEP/8.

Name: Anonymous 2011-08-23 21:49

>>53
PEP 8? Style Guide for Python Code?

Name: Anonymous 2011-08-23 22:26

>>54
It's the 3rd result on google. http://code.google.com/p/pep8-1/
Seriously..

The Warford book is actually a great book. Starts from flip flops and builds up to a whole computer.

Name: Anonymous 2011-08-23 22:28

>>55
Also, 3rd edition is best edition if you're interested. Unfortunately, it never gets to pipelining. You might want to look at Hennessey and Patterson for that.

Name: Anonymous 2011-08-24 0:23

>>53
are usually assembly for computers that are designed for teaching
Unfortunately. Something real-world but simple, like a Z80 or 8051, would've been much better.

PEP/8
PDP/8
lol.

Name: Anonymous 2011-08-24 2:09

>>48
You're right.  Honestly, though, what he wrote just made me cringe and I happen to interview and hire people for programming jobs fairly often.  I can just imagine the interview...

"Can you give me some pseudocode for a sort algorithm of your choosing?"

"What the fuck do I look like, some kind of nerd who cares how things get sorted?  I just throw that shit into my school's super computer and hope for the best.  Shit is fast as fuck, dog."

"I see...  Do you plan to still have access to your school's super computer while working here?"

Name: Anonymous 2011-08-24 2:12

>>58
Honestly, though, what he wrote just made me cringe and I happen to interview and hire people for programming jobs fairly often.
Ooh I want stories of the crankiest interviewees you've ever dealt with. Pretty please?

Name: Anonymous 2011-08-24 2:16

>>59
Define "cranky."  You mean like pissed off at the fact that they're being interviewed?

Name: Anonymous 2011-08-24 2:20

Jesus i didn't think this thread would go on...

Oh well.

Got a quick question. so I've been using racket on my computer and to practice I have scheme on my cell which I'm just writing trivial stuff in to help me remember it. So this is just a simple thing I wanted to know.

The chapters in the online guide I've been reading so far is telling me about different codes but doesn't go into alot of detail. so I will use this as a example.

(define a 15)
(define b 20)
(define c (if (< a 10) a (if (> a 12) (* a b) 0))

What is the 0 for at the end? I want to assume its the same idea as return 0; for c++ which pretty much just says "hey I'm done"

or is there another reason?

Name: Anonymous 2011-08-24 2:22

>>47
That's part of it but not as important as when I said
to build knowledge in the most logical order ... what is happening is hidden, and shouldn't be
You kind of skipped over that.

I'll readily admit that I did not learn bottom-up, entirely.  I started with BASIC, back in the day, because that's what everyone else started with.  After that, I learned C and what I could do with it was so much more impressive and efficient than what I could do with BASIC.  So I immediately wanted to go down to the lowest level, and did, and was frustrated that I hadn't started there in the first place.  Now, when I pick up some new language that happens to be built on fifty layers of interpreters/virtual machines/.NET/mixed paradigm/whatever, I can readily see whether it's someone's pet-project garbage or actually adds something clever to programming as a whole.

Starting with Scheme is fine.  Start with HTML if you want.  I and others who've gone bottom-up just happen to find great peace of mind in never having to be frustrated by the "black box."

Name: Anonymous 2011-08-24 2:32

>>60
No, I meant crazy or just out of the ordinary.

Name: Anonymous 2011-08-24 2:37

>>61
Use code tags
Also, some newlines might make it a little more clear
Also, you have mismatched parenthesis

(define a 15)
(define b 20)
(define c
  (if (< a 10)
    a
    (if (> a 12)
      (* a b)
      0
    )
  )
)

The last zero is the else block for the second if.

Name: Anonymous 2011-08-24 2:42

>>64

Opps sorry about that...

and now I understand why when I first wrote it without it it said I if should have been a else.

....which doesn't work.

Thanks.

Name: Anonymous 2011-08-24 2:43

>>63
Hmm...  I really haven't had any crazy interviewees.  I guess the companies did a decent job of screening candidates.  I did interview a guy for a position writing BIOS software a long time ago, and the only code he had written was this website where you could upload images and it would add a border and some text.  He was so proud of how you could even choose the font and the color.  He spent the entire hour doing this demo and I couldn't even get in an actual interview question.

Name: Anonymous 2011-08-24 2:58

>>66
Did he get the job?

Name: Anonymous 2011-08-24 3:12

so I just made my first "useful" bit of code.

; cfc = convert fahrenheit to celsius
; f = fahrenheit

(define (cfc f)
  (* (- f 32 )
     (/ 5 9)))

took me a minute to figure out how to get the math problem to work right. I didn't understand that I had to put the * at the start of the code itself. but it makes a lot of sense to me now.

Name: Anonymous 2011-08-24 3:14

>>68

(define
  (cfc f)
   (* (- f 32)
       (/ 5 9)
        )
    )
)

Would this be a better way to write it?

Name: Anonymous 2011-08-24 3:15

>>69 I added one to many ) at the end.

Name: Anonymous 2011-08-24 3:18

Lisp is one percent inspiration, ninety-nine parentheses matching.

Name: Anonymous 2011-08-24 3:22

>>71 speaking of that. I am actually really enjoying it, I've been reading a boot on physics and I think it would be a good test to try and put the equations into lisp and see how far I get.

Name: Anonymous 2011-08-24 3:29

>>72
Lisp syntax is nothing to learn from. Learn the other shit like closures, proper scoping, macros and continuations, but for God's sake, never ever praise its fucking syntax.

Name: Anonymous 2011-08-24 3:43

INTERCAL



PLEASE

Name: Anonymous 2011-08-24 8:04

>>58
Are you shitting me? There is a huge difference between knowing how your code approximately compiles down to and knowing how algorithms and datastructures. You don't have to know shit about computers to know how a sorting algorithm works. How fucking retarded can you get?

Name: Anonymous 2011-08-24 8:53

You don't have to know shit about computers to know how a sorting algorithm works.
You should know that your computer allows using "arrays" with efficient "compare" and "inplace swap" operations. A different underlying architecture such as distributed computation units operating on immutable data would call for vastly different algorithms.

Of course like a drunkard can't smell his own filth, your narrow-mindness doesn't let you notice that there even exist things that you take for granted.

Name: Anonymous 2011-08-24 10:59

>>76
Haha oh wow. You are a complete faggot. Shit like arrays and knowing the cost of your compare operation is not exactly deep stuff. And of course you do different algorithms for different system. What the fuck is wrong with you?

Not caring about how efficient your algorithm is doesn't imply that you don't know it. So fuck you.

Name: Anonymous 2011-08-24 11:45

>>77
Not caring about how efficient your algorithm is doesn't imply that you don't know it.
If you don't care how efficient your algorithm is then for you every single algorithm in CS books should be isomorphic to: iterate over all possible solutions (such as permutations of a list), break when found one that satisfies the condition (the list is sorted). Therefore there's nothing to "know" about them.

Can anyone here point this confused young man to /pr/, please? I don't know on which imageboard it's supposed to be.

Name: Anonymous 2011-08-24 12:00

>>78
you still need to describe the problem to the computer. This is basically what functional programming is. Describe the problem, ignore performance.

Name: Anonymous 2011-08-24 12:19

>>79
First of all, contrary to what homosexual neckbeards would like you to believe, that's declarative and not functional programming. Declarative programming is SQL and Prolog, for example. Functional programming combines the worst of both words: you still have to tell the computer explicitly how to find an answer, then it would execute your algorithm inefficiently.

Secondly, in the vast majority of the cases specifying the desired properties of a solution is trivial to the point of not being worth a mention.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List