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

naming of takebuf_string #8575

Closed
MikeInnes opened this issue Oct 4, 2014 · 11 comments
Closed

naming of takebuf_string #8575

MikeInnes opened this issue Oct 4, 2014 · 11 comments
Labels
strings "Strings!"

Comments

@MikeInnes
Copy link
Member

I just spent quite a long time figuring out a bug caused by the fact that takebuf_array resets the IOBuffer if it is writeable. This isn't documented in the help string, and I think it would be more consistent with other "dangerous" operators to add a ! to the name (so people think to look for mutation as the source of problems).

Also – this seems like a big change in behaviour for such a subtle change in the object (it's not obvious to me that IOBuffer("...") and print(IOBuffer(), "...") should have different semantics). It might be nice to split into takebuf_string and takebuf_string! to avoid that.

@eschnett
Copy link
Contributor

eschnett commented Oct 4, 2014

Shouldn't the routine be called take_bufstring!?

@vtjnash
Copy link
Member

vtjnash commented Oct 4, 2014

well now, that sent me down quite a rabbit hole of trying to make sphinx work for everyone: 10b64dd

@StefanKarpinski
Copy link
Member

Yikes, that was some herculean effort you put in there. I was just going to bundle Python with Julia.

@vtjnash
Copy link
Member

vtjnash commented Oct 4, 2014

now that would have been an insane rabbit hole. virtualenv made the whole thing quite easy

@pao
Copy link
Member

pao commented Oct 4, 2014

Is it time to remove helpdb.jl from the repository yet? (#2501)

@vtjnash
Copy link
Member

vtjnash commented Oct 4, 2014

makes sense to me -- just need to check that this actually works everywhere (esp. msys / msvc)

@StefanKarpinski
Copy link
Member

Worked for me and I've always had one of the setups with extra new lines.

@jiahao
Copy link
Member

jiahao commented Oct 5, 2014

Unfortunately installing a virtualenv to use sphinx 1.1.3 can only be a stopgap measure; there are additional bugs in the rendering of helpdb.jl like #8276 which have been fixed upstream.

@vtjnash
Copy link
Member

vtjnash commented Oct 5, 2014

This is getting way off topic, but only part of the purpose of using virtualenv was to install 1.1.3. I had that working locally without this. Instead, this makes it super easy to give everyone the same, reproducible setup. We could also change it so that everyone has the extra line.

@pao
Copy link
Member

pao commented Oct 5, 2014

It is off topic here. If only we had an issue (#2501) where this was an appropriate thing to discuss (say, #2501).

@quinnj
Copy link
Member

quinnj commented Oct 13, 2014

How about

take!(::Type{Array},io) = ...
take!(::Type{String},io) = ...

with the right first arg of course (using a parameter perhaps).

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

No branches or pull requests

8 participants