Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > f python?

Reply
Thread Tools

f python?

 
 
Rainer Weikusat
Guest
Posts: n/a
 
      04-10-2012
Shmuel (Seymour J.) Metz <> writes:
> In <>, on 04/09/2012
> at 06:55 PM, Kaz Kylheku <> said:
>
>>Null-terminated C strings do the same thing.

>
> C arrays are not LISP strings; there is no C analog to car and cdr.


'car' and 'cdr' refer to cons cells in Lisp, not to strings. How the
first/rest terminology can be sensibly applied to 'C strings' (which
are similar to linked-lists in the sense that there's a 'special
termination value' instead of an explicit length) was already
explained elsewhere.
 
Reply With Quote
 
 
 
 
WJ
Guest
Posts: n/a
 
      04-11-2012
Xah Lee wrote:

>
> so recently i switched to a Windows version of python. Now, Windows
> version takes path using win backslash, instead of cygwin slash. This
> ****ing broke my find/replace scripts that takes a dir level as input.
> Because i was counting slashes.


Slashes can work under windows, up to a point:

C:\>cd info/source

C:\info\source>


Also, most languages I use under windows allow you to use
slashes in paths:

C:\>ruby -e "puts IO.read( 'c:/info/frag' )"
275439
109999
102972
109999
102972
110000
102972
109999

101085
108111
 
Reply With Quote
 
 
 
 
Kaz Kylheku
Guest
Posts: n/a
 
      04-11-2012
["Followup-To:" header set to comp.lang.lisp.]
On 2012-04-11, Shmuel Metz <> wrote:
> In < >, on 04/10/2012
> at 09:10 PM, Rainer Weikusat <> said:
>
>>'car' and 'cdr' refer to cons cells in Lisp, not to strings. How the
>>first/rest terminology can be sensibly applied to 'C strings' (which
>>are similar to linked-lists in the sense that there's a 'special
>>termination value' instead of an explicit length)

>
> A syringe is similar to a sturgeon in the sense that they both start
> with S. LISP doesn't have arrays, and C doesn't allow you to insert
> into the middle of an array.


Lisp, however, has arrays. (Not to mention hash tables, structures, and
classes). Where have you been since 1960-something?

(let ((array #(1 2 3 4)))
(aref array 3)) ;; -> 4, O(1) access
 
Reply With Quote
 
Rainer Weikusat
Guest
Posts: n/a
 
      04-11-2012
Shmuel (Seymour J.) Metz <> writes:
> In < >, on 04/10/2012
> at 09:10 PM, Rainer Weikusat <> said:
>
>>'car' and 'cdr' refer to cons cells in Lisp, not to strings. How the
>>first/rest terminology can be sensibly applied to 'C strings' (which
>>are similar to linked-lists in the sense that there's a 'special
>>termination value' instead of an explicit length)

>
> A syringe is similar to a sturgeon in the sense that they both start
> with S.


And the original definition of 'idiot' is 'a guy who cannot learn
because he is too cocksure to already know everything'. Not that this
would matter in the given context ...

> LISP doesn't have arrays,


Lisp has arrays.

> and C doesn't allow you to insert
> into the middle of an array.


Well, of course it does: You just have to move the content of all
memory cells 'after' the new insert 'one up'. But unless I'm very much
mistaken, the topic was "first and rest" (car and cdr), as the terms
could be used with a C string and not "whatever Shmuel happens to
believe to know" ...
 
Reply With Quote
 
Pascal J. Bourguignon
Guest
Posts: n/a
 
      04-11-2012
Shmuel (Seymour J.) Metz <> writes:

> In < >, on 04/10/2012
> at 09:10 PM, Rainer Weikusat <> said:
>
>>'car' and 'cdr' refer to cons cells in Lisp, not to strings. How the
>>first/rest terminology can be sensibly applied to 'C strings' (which
>>are similar to linked-lists in the sense that there's a 'special
>>termination value' instead of an explicit length)

>
> A syringe is similar to a sturgeon in the sense that they both start
> with S. LISP doesn't have arrays, and C doesn't allow you to insert
> into the middle of an array.


You're confused. C doesn't have arrays. Lisp has arrays.
C only has vectors (Lisp has vectors too).

That C calls its vectors "array", or its bytes "char" doesn't change the
fact that C has no array and no character.


cl-user> (make-array '(3 4 5) :initial-element 42)
#3A(((42 42 42 42 42) (42 42 42 42 42) (42 42 42 42 42) (42 42 42 42 42))
((42 42 42 42 42) (42 42 42 42 42) (42 42 42 42 42) (42 42 42 42 42))
((42 42 42 42 42) (42 42 42 42 42) (42 42 42 42 42) (42 42 42 42 42)))

cl-user> (make-array 10 :initial-element 42)
#(42 42 42 42 42 42 42 42 42 42)



--
__Pascal Bourguignon__ http://www.informatimago.com/
A bad day in () is better than a good day in {}.
 
Reply With Quote
 
Beekeeper2020
Guest
Posts: n/a
 
      11-12-2012
I totally agreed about the Python syntax. Why do I need to worry about the
syntax which wasted hours to get it to work?
Brain dead python designer! Maybe Guido need to learn it from the Master,
"Go to Ruby, and see how elegant the language is done. Also, it is stupid
of google to hire Guido to prolong the death of Python. No wonder a lot of
engineers left google because they don't pay enough. Vote for your feet,
googlers.

Python eventually will die once they found out Ruby don't have this dumb
issues. Guido, you're doing a wonderful job, wasting software programmers
on hours solving your Python Stupid Syntax ( Your dumb Global variable is
another example).

Google is too dumb to understand these issues.




--
View this message in context: http://python.6.n6.nabble.com/f-pyth...7p4995649.html
Sent from the Python - python-list mailing list archive at Nabble.com.
 
Reply With Quote
 
Dave Angel
Guest
Posts: n/a
 
      11-12-2012
On 11/12/2012 05:07 PM, Beekeeper2020 wrote:
> I totally agreed about the Python syntax. Why do I need to worry about the
> syntax which wasted hours to get it to work?
> Brain dead python designer! Maybe Guido need to learn it from the Master,
> "Go to Ruby, and see how elegant the language is done. Also, it is stupid
> of google to hire Guido to prolong the death of Python. No wonder a lot of
> engineers left google because they don't pay enough. Vote for your feet,
> googlers.
>
> Python eventually will die once they found out Ruby don't have this dumb
> issues. Guido, you're doing a wonderful job, wasting software programmers
> on hours solving your Python Stupid Syntax ( Your dumb Global variable is
> another example).
>
> Google is too dumb to understand these issues.
>
>


In case anybody is tempted to respond to this troll message, notice it's
a first-time poster, and it replies to a 7-month old message, and gives
no context.

Useless.


--

DaveA

 
Reply With Quote
 
Steven D'Aprano
Guest
Posts: n/a
 
      11-12-2012
On Mon, 12 Nov 2012 17:37:50 -0500, Dave Angel wrote:

> On 11/12/2012 05:07 PM, Beekeeper2020 wrote:

[...]
>> Python eventually will die once troll troll troll troll troll...


> In case anybody is tempted to respond to this troll message,


Like you did? Without trimming?






--
Steven
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments