brownplt / pyret-lang

The Pyret language.
Other
1.07k stars 109 forks source link

s-exp library not usable #929

Open shriram opened 7 years ago

shriram commented 7 years ago

Consider this:

> import s-exp as S
> sl = S.read-s-exp("(1 2)")
> S.is-s-list(sl)
true
> sl
s-list([list: s-num(1), s-num(2)])

Great. Now let's try to get the list out of the s-list structure. (You are not allowed to grep the Pyret source code, as I just did.)

If it helps, the documentation is here:

http://www.pyret.org/docs//latest/s-exp.html

Anything beyond the most rudimentary testing (hopefully the tests aren't only those shown in the documentation…) would reveal this problem.

jpolitz commented 7 years ago

Those docs link to http://www.pyret.org/docs//latest/s-exp-structs.html#%28part._s-exp-structs_.S-.Exp%29, which describes the S-Exp datatype, which can be manipulated in all the usual ways. On Sun, Oct 30, 2016 at 10:28 PM Shriram Krishnamurthi < notifications@github.com> wrote:

Consider this:

import s-exp as S sl = S.read-s-exp("(1 2)") S.is-s-list(sl) true sl s-list([list: s-num(1), s-num(2)])

Great. Now let's try to get the list out of the s-list structure. (You are not allowed to grep the Pyret source code, as I just did.)

If it helps, the documentation is here:

http://www.pyret.org/docs//latest/s-exp.html

Anything beyond the most rudimentary testing (hopefully the tests aren't only those shown in the documentation…) would reveal this problem.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/brownplt/pyret-lang/issues/929, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHUU428ioYE2DJedJTZlx_nuRnVo3TWks5q5VJGgaJpZM4Kkmz4 .

shriram commented 7 years ago

Surely you aren't telling me that this is easy to figure out? I don't even see why we have two different libraries here. The only reference is in a blue word that is the same name as the current library (i.e., hardly a word you would expect to click on). And there are no examples to show how to use this part of the library, which surely is the user's intent most of the time…