Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use the reader? #65

Open
Ambrevar opened this issue Jun 9, 2021 · 2 comments
Open

How to use the reader? #65

Ambrevar opened this issue Jun 9, 2021 · 2 comments

Comments

@Ambrevar
Copy link

Ambrevar commented Jun 9, 2021

> (in-package :iolib/pathnames)
> (iolib/base:enable-literal-reader* )
T
> #/p/"README.org"
#/P/"README.org"
> #/p/"README.org"
; error
> (iolib/pathnames:file-path "README.org")
#/IOLIB/PATHNAMES:P/"README.org"
> #/IOLIB/PATHNAMES:P/"README.org"
; error

Some things be wrong.

  • The reader seems to only work in the IOlib package.
  • Is it intended that the reader dispatch string changes?
  • Why surround the reader dispatch string with /? Actually, just / would be a nice dispatch string for pathnames. For instance #/"path/to/foo" makes a lot of sense to me.

Thoughts?

@sionescu
Copy link
Owner

sionescu commented Jun 9, 2021

It works in any package that imports the symbol iolib/pathnames:p.

Is it intended that the reader dispatch string changes?

I'm not sure what you mean by this.

Why surround the reader dispatch string with /

I meant the #/ macro to be something generic that I could reuse. It currently works for IP addresses: #/ip/1.2.3.4 or #/ip/ff::1.

@Ambrevar
Copy link
Author

Ambrevar commented Jun 9, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants