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

Lazy vectors of 1s and 0s #21

Open
jlperla opened this issue May 28, 2018 · 5 comments
Open

Lazy vectors of 1s and 0s #21

jlperla opened this issue May 28, 2018 · 5 comments

Comments

@jlperla
Copy link

jlperla commented May 28, 2018

This is a placeholder issue with the hope of implementing something like https://discourse.julialang.org/t/possibility-of-a-generically-sized-vector-of-1s-and-0s-similar-to-the-uniformscalingoperator-in-juila-v0-7/10297

In order to have the bold 1 notation, JuliaLang/julia#26808 would be required, but that can wait.

Any thoughts on what the vector of 1s and the vector of 0s should be called?

@dlfivefifty
Copy link
Member

Here’s a thought along the same lines as InfiniteArrays.jl:

struct UnknownSize <: Number end

Ones(UnknownSize())

@jlperla
Copy link
Author

jlperla commented May 28, 2018

Sounds good to me. When I find an RA who I want to play around with an implementation, I will tell her or him to look at the dispatching in InfiniteArrays.jl as a starting point.

Do you think it is useful to try to push a PR for JuliaLang/julia#26808 ? I am not sure what is involved, but I suspect it is not a huge amount of work... the problem is getting someone who knows Scheme might be tricky.

@dlfivefifty
Copy link
Member

I think making that PR happen is a good idea, though I'm not able to do it so I'll leave it to you.

Note InfiniteArrays.jl is Julia v0.7 only, so it might be wise to wait for UnknownSize as well.

What do you think of a unicode synonym, like Ones(⍰) or Ones(❓)?

@jlperla
Copy link
Author

jlperla commented May 29, 2018

Yeah, I think it may make sense to target v0.7 then. I wouldn't want to teach with this until the fall anyways. I will try to figure out a way to get the PR for the unicode in the next few months.

I am not sure about using ⍰ = UnknownSize() I like unicode symbols when they clearly represent concise mathematical notation, but I think it may be confusing when it doesn't. But I don't have a very strong opinion.

If we were able to go

const 𝟏 = Ones(UnknownSize())
const 𝟎 = Zeros(UnknownSize())

then I think that may be sufficient for now.

@jlperla
Copy link
Author

jlperla commented Jul 10, 2018

cc: @arnavsood and @Nosferican
Here is the issue I mentioned, which is intended to implement that discourse discussion. The plan is to chip away at this (as a v0.7 only solution)

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