Arc Forumnew | comments | leaders | submitlogin
Missing keyword 'tokens' in arc/nu and lite-nu
2 points by kinleyd 4530 days ago | 8 comments
The keyword 'tokens' in Arc is supported in anarki, but seems to be absent in arc/nu and lite-nu. Can anyone point me to the equivalent command in arc/nu and lite-nu? Thanks.


1 point by kinleyd 4530 days ago | link

Oops, found it in arc-nu/lib/strings.arc. :)

-----

1 point by Pauan 4529 days ago | link

Yeah, it's the same in Arc 3.1. Personally, I would put it into arc.arc, since I use it frequently when dealing with strings, but one of Arc/Nu's goals was to run Arc 3.1's arc.arc unmodified.

Maybe I could have Arc/Nu autoload lib/strings.arc?

-----

2 points by kinleyd 4529 days ago | link

I think autoloading it would be a good idea since Arc 3.1 also does that and one would get used to that.

-----

2 points by Pauan 4529 days ago | link

Done, thanks for the heads up:

https://github.com/Pauan/ar/commit/c8dea3f2d3a4f343ec633c814...

If you ever want something auto-loaded, just add it to the "arc" executable. It's very easy, just one line of code per file. Maybe I should have it autoload "lib/re.arc" as well...

-----

1 point by kinleyd 4529 days ago | link

Thanks Pauan. Regarding lib/re.arc, my take is that if Arc 3.1 does it by default, arc/nu should do the same to match Arc 3.1's out-of-the-box functionality, unless of course if you have specific reasons that justify not loading it up front.

-----

1 point by Pauan 4529 days ago | link

Arc doesn't have regexps at all[1], that's a new addition in Arc/Nu, but a very useful one. I should check and see if Anarki loads regexps by default.

---

* [1]: Except with third-party libraries, of course.

-----

2 points by kinleyd 4528 days ago | link

I hadn't tried regex support in Arc earlier so I just figured Arc 3.1 must have it. However, I checked and found that Anarki does have lib/re.arc loaded by default.

-----

2 points by Pauan 4528 days ago | link

Ah, thanks, I'll have Arc/Nu load it too, then.

-----