On Tuesday, February 14, 2017, Kurtis Rader <kra...@skepticism.us>
wrote:
> The fish shell has no hard code limits on such things. You're
essentially limited by available memory (or virtual address space).


That's what I would have guessed.

But I was suddenly curious, so I thought I'd try. I created a variable,
foo, that contained an array of identical items -- the letter "a".

  set  foo  a  a  a  a...

That's an awfully slow way to grow a list, but it got me started. I
then added foo to itself several times.

  set  foo  $foo  $foo  $foo...

And I ran `count` on the growing array between each repitition. I think
by the second or third time, $foo contained several thousand items --
but it was still nice and snappy. Then it had about 1.4 million items,
and count took a couple seconds before it printed the number. Then my
computer froze just about ground to a halt -- `count` took about 10
minutes before it reported something like 55 million items. Even after
killing all running fish processes on my system, everything was a
little sluggish until I rebooted.

I have kind of an old desktop at home, though. Your mileage may vary.


> If you're doing something where such limits are a concern you
should be using a different language such as C++, Java or Python.


Yup, haha, if you need to do some serious programming work, pick a
serious programming language.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to