Arc Forumnew | comments | leaders | submit | nzc's commentslogin
2 points by nzc 5858 days ago | link | parent | on: Where are we going?

Let Arc die? What makes you think the number of posters here in any way reflects the chances of Arc "living" or "dying", whatever that means? People need to chill out and give things some ... time.

-----

5 points by Darmani 5858 days ago | link

Ironically, before that comment, I had been concerned on how this forum had been dead for 6 days...

-----

3 points by nzc 6106 days ago | link | parent | on: Dotted lists - HUH! What are they good for?

I know, I know, I just asked this question b/c I saw someone else's post about dotted pair containing lists (old timers would say "s-expressions") not working properly in some cases in arc, and I having noodled around implementing lisp in ruby recently, and having stubbed my toe on implementing cons after having chosen arrays as the underlying implementation of lists, I thought I'd throw this out there and see what people had to say.

-----

2 points by nzc 6106 days ago | link | parent | on: Dotted lists - HUH! What are they good for?

Neh, what I meant was, you can have a thing that quacks like a list and never see the need for a dotted pair.

That can be hidden below the abstraction. See, case in point, lists/arrays in Ruby, which are more or less lists without the car and cdr part. Although, you do get a 'nil' if you access beyond the end of the array. ;-)

-----

9 points by kennytilton 6106 days ago | link

Ruby lists can quack? Bah, let me know when they can mate, that's when you know you have the same species: ie, can two Ruby more-or-less lists have shared structure, formed say by ruby-consing a different element onto the same list?

And ducks can nest. How about Ruby lists? I have always thought the language should have been called Trep, for Tree Processing language. Can I build a Ruby tree and then quickly flatten by juggling some Ruby ducktails?

As for "That can be hidden below the abstraction", OK, now you have a duck: moving smoothly on the surface and paddling like crazy beneath.

The whole comparison just seems (sorry on more levels than one) daffy.

-----

3 points by absz 6106 days ago | link

Indeed, you are correct. Ruby[1] doesn't have "native" lists, it has native arrays. Observe:

  irb(main):001:0> [].class
  => Array
There is no Ruby cons, nor Ruby car, nor Ruby cdr. There is y.unshift x or [x] + y for cons (though these cannot constructed "dotted Arrays"), arr[0] or arr.first for car, and arr[1..-1] for cdr, but they denote no structure-sharing. However, flattening would merely be arr.flatten—of course it doesn't work by cdr-juggling, but that's because there are no cdrs.

I'm not really sure what the grandparent post means: "lists without the car and cdr part"? That sounds to me like a very good definition of an... array![2]

Also, that set of duck puns/references was fantastic. Well done.

[1]: Which is a very nice language.

[2]: Well, without the O(1) access time, but I digress.

-----

5 points by kennytilton 6105 days ago | link

"that set of duck puns/references was fantastic."

I can take no credit -- they just popped out of my keyboard. There must be some poorly understood connection between algorithms, data structures, and waterfowl.

-----

3 points by absz 6105 days ago | link

I smell a Ph.D. thesis afoot... awing?

Actually, they (the infamous "they") did a study, and apparently, ducks are the funniest animal. Take that with as large a grain of salt as you think is appropriate :)

-----

1 point by vincenz 6090 days ago | link

This is directly related to the existence of "daffy duck"

-----

2 points by nzc 6106 days ago | link | parent | on: Dotted lists - HUH! What are they good for?

I see that; it just seems like they don't have a huge amount of practical utility. I mean, they're nice to have, but when I was programming in CL, one rarely if ever saw them in production code.

But I think you're right -- they have that "feeling the bits between your toes" character.

They're not necessary in order to have a list abstraction, but they are the minimal thing you could build lists out of.

-----

8 points by pg 6106 days ago | link

The whole point of the axiomatic approach is that you don't program in the axioms themselves. But you still do want to have the things you do program in built out of the smallest set of axioms.

-----

2 points by nzc 6120 days ago | link | parent | on: Docstrings: a contrarian view

My experience (with emacs, and emacs-lisp, anyway) is that the docstrings are incredibly valuable to me, and that the culture of emacs hackers leads the doc strings to be maintained pretty well.

However, I've never seen anyone use the docstrings in any of the common lisp programming jobs I've held. Which is why I invoke the "culture of emacs hackers" above.

-----

2 points by nzc 6139 days ago | link | parent | on: let and with

Yeah, I agree with this, although as a Lisp programmer I may be biased.

And while we're at it, is with like CL "let" or "let*"?

-----

6 points by elibarzilay 6139 days ago | link

Easy to check yourself -- try this:

  (with (x 1 y 2) (with (x y y x) (list x y)))

-----

3 points by chaos 6139 days ago | link

There is also withs:

    (withs (x 1 y 2) (withs (x y y x) (list x y)))

-----

3 points by nzc 6140 days ago | link | parent | on: Dear PG, Thank You for the Shed

Likewise, you've given us a lot to chew on, and I for one just want to say thanks. So, Thanks, PG!

-----