• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: the Holy Grail of AppleScript lists
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: the Holy Grail of AppleScript lists


  • Subject: Re: the Holy Grail of AppleScript lists
  • From: Paul Skinner <email@hidden>
  • Date: Wed, 19 Mar 2003 16:58:03 -0500

Woo Hoo! I can't wait for AppleScript v.2!!!

On Wednesday, March 19, 2003, at 04:16 PM, Christopher Nebel wrote:

On Wednesday, March 19, 2003, at 10:09 AM, Paul Skinner wrote:

Here's where I got a shock. I wanted to test the speed so I upped the size of the list...

set delim to return
set l to {"3", "a", "C", "c", "B", 2, "A", 1}
repeat 10 times
set l to l & l
end repeat
set AppleScript's text item delimiters to delim
set t to text items of (do shell script ("echo '" & l as text) & "' | tr '" & delim & "' '\n' | sort -f")
-->list of 8291 items.

!!! WHAT!? how many? how the... That can't... DAMN! wow.

Why this is possible I can't say. I'm hoping Nigel or Chris will comment on the underlying reason.

Here's a hint:

set s to do shell script ("echo '" & l as text) & "' | tr '" & delim & "' '\n' | sort -f")
text items of s --> (an 8192 item list)
class of s --> Unicode text

Here's another hint:

text items of (s as string) --> Error: Stack overflow.

"Unicode text" doesn't suffer from the stack-imposed limit that "string" does. In another release, neither will "string".


--Chris Nebel
Apple Development Tools
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: the Holy Grail of AppleScript lists (From: Christopher Nebel <email@hidden>)

  • Prev by Date: Re: Display Status Window
  • Next by Date: Newbie call method help needed please
  • Previous by thread: Re: the Holy Grail of AppleScript lists
  • Next by thread: Re: the Holy Grail of AppleScript lists
  • Index(es):
    • Date
    • Thread