car.. cdr... car...

Things that don't belong anywhere else. (Check first).

Moderators: Moderators General, Prelates, Magistrates

User avatar
gandhiroot
Posts: 8
Joined: Sat May 26, 2007 3:54 am UTC

car.. cdr... car...

Postby gandhiroot » Thu Sep 27, 2007 12:20 am UTC

heh heh heh

Hey all. So I saw this car's license plate on campus outside of the CS building today, and I thought you all would get a kick out of it.

Image

I've seen it a few times, and every time I do, I mumble something about it being the "car cdr car"...

or maybe I need to get a life...
;-)

(maybe this should be in the Computer Science forum instead? I dunno)

User avatar
Likpok
Posts: 471
Joined: Tue Feb 20, 2007 6:21 am UTC
Location: :noitacoL
Contact:

Postby Likpok » Thu Sep 27, 2007 12:33 am UTC

Hehehe. Especially because I'm just looking into learning lisp right now. And some of the bizarre functions like caaaaaadr (the cdr of the car of the car ... of the list)
There's an art to cooking toast
Never try to guess
Cook it till it's smoking
Then twenty seconds less.

User avatar
Kjartan
Posts: 86
Joined: Thu May 03, 2007 3:16 pm UTC
Location: Iceland
Contact:

Postby Kjartan » Thu Sep 27, 2007 12:36 am UTC

it took me quite a while to realize this isn't spam.

good one.
My old signature was old, so here is my new one. It is new.

User avatar
gandhiroot
Posts: 8
Joined: Sat May 26, 2007 3:54 am UTC

Postby gandhiroot » Thu Sep 27, 2007 12:40 am UTC

oh, it is spam

I just forgot to mention:
would you like to buy some p enis enlargement dr ugs?


that's better.

User avatar
Will
There are about a million things I can do from behind
Posts: 2256
Joined: Mon Sep 10, 2007 11:12 pm UTC
Location: St. Heraldwulf's Stone
Contact:

Postby Will » Thu Sep 27, 2007 12:40 am UTC

Likpok wrote:Hehehe. Especially because I'm just looking into learning lisp right now. And some of the bizarre functions like caaaaaadr (the cdr of the car of the car ... of the list)


Pronouncing functions like cdader, cadadadadr, etc. is the funnest part of lisp.

User avatar
eristic
Mmm, superhero brains! Nom nom nom...
Posts: 539
Joined: Mon Sep 17, 2007 7:51 pm UTC
Contact:

Postby eristic » Thu Sep 27, 2007 1:05 am UTC

what does a car and a cd-r have to do with each other?
Clerria wrote:
eristic wrote:Do you speak Greek? ;)

'maybe'

Haikus are simple
But sometimes they don't make sense
Refrigerator

User avatar
intimidat0r
Posts: 73
Joined: Thu Aug 02, 2007 6:32 am UTC

Postby intimidat0r » Thu Sep 27, 2007 1:23 am UTC

It's not cd-r, it's cdr, which is a function in Lisp and its derivative languages (as is car).

Very clever nonetheless.
The packet stops here.

User avatar
scrt_rbt_agnt
douche bag
Posts: 865
Joined: Thu Aug 16, 2007 8:48 pm UTC
Location: the great secrets of space
Contact:

Postby scrt_rbt_agnt » Thu Sep 27, 2007 1:25 am UTC

@gandhiroot

read the rules of the forum and post in the intro thread please, before the mods decide that this thread IS spam.
i am a poet and an artist

i don't wanna worry about dyin'
i just wanna worry about sunshine girls

User avatar
gandhiroot
Posts: 8
Joined: Sat May 26, 2007 3:54 am UTC

Postby gandhiroot » Thu Sep 27, 2007 1:28 am UTC

oh, sorry about that.
i will.

i had actually posted in a different section before (the CS section), and having never been to the general section, I didn't see that rule before.

when I read it tonight, it said "Your first post should be here: Tell us who you are particularly if you're not a spambot."

But, since I've already had a first post, I assumed that this rule didn't apply to me... because this would have been my second post.

oh well.
.

User avatar
scrt_rbt_agnt
douche bag
Posts: 865
Joined: Thu Aug 16, 2007 8:48 pm UTC
Location: the great secrets of space
Contact:

Postby scrt_rbt_agnt » Thu Sep 27, 2007 1:29 am UTC

it's still a nice thing to do so that people know who you are. :wink:
i am a poet and an artist

i don't wanna worry about dyin'
i just wanna worry about sunshine girls

User avatar
gandhiroot
Posts: 8
Joined: Sat May 26, 2007 3:54 am UTC

Postby gandhiroot » Thu Sep 27, 2007 1:30 am UTC

totally understood!

and now completed. :-)
.

User avatar
evilbeanfiend
Posts: 2650
Joined: Tue Mar 13, 2007 7:05 am UTC
Location: the old world

Postby evilbeanfiend » Thu Sep 27, 2007 9:58 am UTC

intimidat0r wrote:It's not cd-r, it's cdr, which is a function in Lisp and its derivative languages (as is car).

Very clever nonetheless.


specifically they are Contents Address Register and Contents Decrement Register. although nowadays they are better pronounced as first and rest (of a list) respectively.
in ur beanz makin u eveel

Dark Shikari
Posts: 113
Joined: Mon Jul 16, 2007 7:03 am UTC

Re: car.. cdr... car...

Postby Dark Shikari » Thu Sep 27, 2007 1:53 pm UTC

MY OTHER CAR IS A CDR!!! :mrgreen:

User avatar
Citizen K
Posts: 103
Joined: Fri Sep 21, 2007 11:42 am UTC
Location: Maryland

Re:

Postby Citizen K » Thu Sep 27, 2007 4:30 pm UTC

Likpok wrote:Hehehe. Especially because I'm just looking into learning lisp right now. And some of the bizarre functions like caaaaaadr (the cdr of the car of the car ... of the list)

Just to be pedantic, you've got that backwards. They evaluate forwards, just like if you'd have written them all out in the same order. And it's been a while, but I think those shorthand car/cdr functions are usually only defined up to about four at a time. Not that you couldn't make more with a macro or something...
But you seem excited by the niftiness of it all, which is of course the most important part :)

Also, I can't see the image from the first post. Is that a personal problem?
Beware the cows! Not all milk is enriched.

User avatar
Will
There are about a million things I can do from behind
Posts: 2256
Joined: Mon Sep 10, 2007 11:12 pm UTC
Location: St. Heraldwulf's Stone
Contact:

Re: car.. cdr... car...

Postby Will » Thu Sep 27, 2007 5:01 pm UTC

Generally you're only going to need something bizzare like cadddaddadr every once in a blue moon (if ever). It's easier to just define it once if you really need it, like this:
(defun cadadadr (x) (car (cdr (car (cdr (car (cdr x)))))))

Also, matching up parens when you don't have a text editor with paren highlighting SUCKS BALLS.
Meaux_Pas: Is it fucking Taint Sunday or something?
liza: Screw y'all, I'm going to the moon

User avatar
Cabhan
Posts: 67
Joined: Wed Aug 29, 2007 4:34 am UTC
Location: Boston, MA, USA
Contact:

Re: car.. cdr... car...

Postby Cabhan » Thu Sep 27, 2007 5:01 pm UTC

You are not worthy!

Heh, I actually had to use cadadr the other day, and a little piece of my soul died.

This picture made me happy, however.

User avatar
Cheese
and spam. (Euggh)
Posts: 3909
Joined: Mon Jul 02, 2007 2:04 pm UTC
Location: ¿burning you?

Re:

Postby Cheese » Thu Sep 27, 2007 5:21 pm UTC

gandhiroot wrote:oh, it is spam

I just forgot to mention:
would you like to buy some p en1s enIargement dr ugs?.b.u.y..o.u.r..s.h.i.t.


that's better.


Fix'd, to make it more realistic.

And on the amusing number plates, how does P155ED go? Not got much to do with math or science, and I don't have a photo, but I've definitely seen it on someone's car at some point.
hermaj wrote:No-one. Will. Be. Taking. Cheese's. Spot.
Spoiler:
LE4dGOLEM wrote:Cheese is utterly correct on all fronts.
SecondTalon wrote:That thing that Cheese just said. Do that.
Meaux_Pas wrote:I hereby disagree and declare Cheese to be brilliant.
Image

User avatar
Nimz
Posts: 580
Joined: Thu Aug 02, 2007 9:49 am UTC
Location: the origin

the picture

Postby Nimz » Thu Sep 27, 2007 7:20 pm UTC

Citizen K wrote:Also, I can't see the image from the first post. Is that a personal problem?

Yes, it is a personal problem (j/k). It's a picture of a dark-coloured car (I'd tell you the make and model, but I don't know cars well enough) in a parking space apparently taken near twilight. Inside the car, on the rear-view mirror, is a parking permit. The dashboard also has what appears to be a permit on it. In the background are more parking spaces with approximately thirty cars parked here and there, three lit lights in the parking lot, about half a dozen trees, and a building (presumably one of the university buildings) on the left with apparently three floors based on the lighting that can be seen through the windows. There is another, shorter building in the background that goes from about the middle to the right edge of the picture. The license plate on the car is the feature most prominently being referred to. It is a New York plate with plate number CAR CDR.

You can just see it now, can't you? :mrgreen:
LOWA

User avatar
Likpok
Posts: 471
Joined: Tue Feb 20, 2007 6:21 am UTC
Location: :noitacoL
Contact:

Re: car.. cdr... car...

Postby Likpok » Thu Sep 27, 2007 9:21 pm UTC

Just to be pedantic, you've got that backwards. They evaluate forwards, just like if you'd have written them all out in the same order. And it's been a while, but I think those shorthand car/cdr functions are usually only defined up to about four at a time. Not that you couldn't make more with a macro or something...
But you seem excited by the niftiness of it all, which is of course the most important part :)


I thought I had that right. Oops! It's good that i've never actually used car or cdr then :O

so caddr would be

Code: Select all

(defun caddr (x)
   (car
   (cdr
   (cdr (x)))))


?
There's an art to cooking toast
Never try to guess
Cook it till it's smoking
Then twenty seconds less.

User avatar
Citizen K
Posts: 103
Joined: Fri Sep 21, 2007 11:42 am UTC
Location: Maryland

Re: car.. cdr... car...

Postby Citizen K » Fri Sep 28, 2007 8:55 am UTC

Yeah, that's the idea. It would basically give you the third item in the list.
If you run into more such things, I'd recommend starting a thread over in one of the other forums. The only Lisp-related threads seem to be ones about editors or interpreters, not so much the language itself.

Nimz wrote:You can just see it now, can't you?

Ah, I get the picture :) Very amusing.
Still can't literally see it though. But I can see images on other threads, so maybe it got whacked during the board issues yesterday.
Beware the cows! Not all milk is enriched.

TheKhakinator
the next small girl on KRNT radio
Posts: 1130
Joined: Wed Jun 06, 2007 1:11 pm UTC

Re: car.. cdr... car...

Postby TheKhakinator » Fri Sep 28, 2007 11:19 am UTC

Will wrote:Also, matching up parens when you don't have a text editor with paren highlighting SUCKS BALLS.

*write scheme script*
*run script*
"error? Better delete a bracket."
*run script again*
*different error*
*adds brackets*

basically I used to go back and forth until I somehow got the right combination of brackets after an age of squinting at notepad.

User avatar
xyzzy
Meta-Titled
Posts: 263
Joined: Sun Mar 18, 2007 10:02 pm UTC
Location: Colossal Cave
Contact:

Re:

Postby xyzzy » Fri Sep 28, 2007 12:50 pm UTC

Will wrote:
Likpok wrote:Hehehe. Especially because I'm just looking into learning lisp right now. And some of the bizarre functions like caaaaaadr (the cdr of the car of the car ... of the list)


Pronouncing functions like cdader, cadadadadr, etc. is the funnest part of lisp.


Was the e in cdader intentional?
"Wile E. Coyote was a theoretical mathematician." - Leliel
"Modern life can be so boring without elements of the bizarre or the fantastical. Hence, we have steampunk." - Me

elminster
Posts: 1560
Joined: Mon Feb 26, 2007 1:56 pm UTC
Location: London, UK, Dimensions 1 to 42.
Contact:

Re: car.. cdr... car...

Postby elminster » Fri Sep 28, 2007 5:44 pm UTC

just write it in part lots of languages

Code: Select all

/// <summary>
/// I'm a summary
/// </summary>
(defun execute (object target &rest args)
If (object.value != args) Then
i = 0
for(;i < object.total ; ++i){
 cumulate the value multiplied by i
 'Todo: Something else
}   
end if
)

I call it Lipycengvb# now with super mega-abstract-hippo-donut-(^_^)-4c1d functionality.
Image

User avatar
jack
Posts: 49
Joined: Tue Aug 28, 2007 6:52 pm UTC

Re: car.. cdr... car...

Postby jack » Fri Sep 28, 2007 5:51 pm UTC

Here's the complete list

caaaar
caaadr
caaar
caadar
caaddr
caadr
caar
cadaar
cadadr
cadar
caddar
cadddr
caddr
cadr
car
cdaaar
cdaadr
cdaar
cdadar
cdaddr
cdadr
cdar
cddaar
cddadr
cddar
cdddar
cddddr
cdddr
cddr
cdr


To expand them replace each d with cdr and each a with car.

I don't think anyone really uses these very often though. If they do, they should be punched lightly about.


Return to “General”

Who is online

Users browsing this forum: No registered users and 25 guests