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

readline REPL can't handle more than ~500 character commands #4053

Closed
quinnj opened this issue Aug 14, 2013 · 5 comments
Closed

readline REPL can't handle more than ~500 character commands #4053

quinnj opened this issue Aug 14, 2013 · 5 comments

Comments

@quinnj
Copy link
Member

quinnj commented Aug 14, 2013

I'm not sure if this is readline specific, or windows specific, or what, but I can't seem to get 500+ character commands to work. I didn't ever run into a problem using release-basic, but I'm trying to get release-readline support for Sublime-Julia and my tests keep failing. Even when trying to split the command into new lines of < 500 characters, it still barfs. Anyone have any insight on this?

An example where I try to create an array with 259 elements; even though I pasted a full command (note both brackets []), it returns expecting additional input, and if I close with a bracket, it only returns a 253 element array.

julia> t = [3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3]
t = [3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3
,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3
,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3
,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3
,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3
,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3
,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3
       ]
253-element Int64 Array:
 3
 3
 3
 .
 .
 .

Now for the really weird part: I try to paste a few lines of 500+ characters and in between returns from readline, I get the output of ls?

julia> t = [3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
t = [3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3
,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3
,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3
,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3
,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3
,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3
,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3
       ,
bugpoint.exe                llvm-dwarfdump.exe
fftw-wisdom-to-conf         llvm-extract.exe
fftw-wisdom.exe             llvm-link.exe
fftwf-wisdom.exe            llvm-mc.exe
julia-release-basic.exe     llvm-mcmarkup.exe
julia-release-readline.exe  llvm-nm.exe
julia.bat                   llvm-objdump.exe
libgcc_s_seh-1.dll          llvm-prof.exe
libgcc_s_sjlj-1.dll         llvm-ranlib.exe
libgfortran-3.dll           llvm-readobj.exe
libpcrecpp-0.dll            llvm-rtdyld.exe
libpcreposix.dll            llvm-size.exe
libquadmath-0.dll           llvm-stress.exe
libssp-0.dll                llvm-symbolizer.exe
libstdc++-6.dll             llvm-tblgen.exe
libuv-11.dll                LTO.dll
llc.exe                     macho-dump.exe
lli.exe                     opt.exe
llvm-ar.exe                 pcre-config
llvm-as.exe                 pcregrep.exe
llvm-bcanalyzer.exe         pcretest.exe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3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3
       ]
508-element Int64 Array:
 3
 3
 3
 3
 3
 3
@JeffBezanson
Copy link
Member

Seems to work for me on linux.

@johnmyleswhite
Copy link
Member

I've had tons of problems in the past with the REPL being unable to process large blocks of text, so I can believe this might be a platform-specific problem.

@quinnj
Copy link
Member Author

quinnj commented Aug 14, 2013

Ok, I think I've got a workaround for this. Turns out breaking it down into sub-500 chunks and then running works just fine (I was confused because it was working sometimes but sometimes doing the ls thing). The problem, as far as I can tell, seems to be when there are any tab \t characters in any chunks after the first. The presence of \t characters seems to be triggering the ls functionality somehow. As \t doesn't hold any syntactic value (right?), I just run a pass over the chunks and replace them with a space and that seems to solve it.

I'll close this as I don't know if there's really anything else that could be done.

@quinnj quinnj closed this as completed Aug 14, 2013
@StefanKarpinski
Copy link
Member

We're going to ditch the readline repl in favor of @loladiro's pure-Julia repl in the future in any case.

@quinnj
Copy link
Member Author

quinnj commented Aug 14, 2013

Can't wait!

IanButterworth pushed a commit that referenced this issue Oct 21, 2024
Stdlib: Pkg
URL: https://github.com/JuliaLang/Pkg.jl.git
Stdlib branch: master
Julia branch: master
Old commit: 27c1b1ee5
New commit: 799dc2d54
Julia version: 1.12.0-DEV
Pkg version: 1.12.0
Bump invoked by: @IanButterworth
Powered by:
[BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl)

Diff:
JuliaLang/Pkg.jl@27c1b1e...799dc2d

```
$ git log --oneline 27c1b1ee5..799dc2d54
799dc2d54 REPLExt: use Base.isaccessibledir rather than isdir in completions (#4053)
3fde94ee9 REPLExt: run repl hint generation for modeswitch chars when not switching (#4054)
```

Co-authored-by: Dilum Aluthge <[email protected]>
IanButterworth pushed a commit that referenced this issue Oct 21, 2024
…b6e99 (#56261)

Stdlib: Pkg
URL: https://github.com/JuliaLang/Pkg.jl.git
Stdlib branch: release-1.11
Julia branch: backports-release-1.11
Old commit: aba90d22b
New commit: 9438b6e99
Julia version: 1.11.1
Pkg version: 1.11.0(Does not match)
Bump invoked by: @IanButterworth
Powered by:
[BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl)

Diff:
JuliaLang/Pkg.jl@aba90d2...9438b6e

```
$ git log --oneline aba90d22b..9438b6e99
9438b6e99 Merge pull request #4055 from JuliaLang/backports-release-1.11
c83160aac REPLExt: use Base.isaccessibledir rather than isdir in completions (#4053)
7997ec320 REPLExt: run repl hint generation for modeswitch chars when not switching (#4054)
```

Co-authored-by: Dilum Aluthge <[email protected]>
KristofferC pushed a commit that referenced this issue Oct 21, 2024
Stdlib: Pkg
URL: https://github.com/JuliaLang/Pkg.jl.git
Stdlib branch: master
Julia branch: master
Old commit: 27c1b1ee5
New commit: 799dc2d54
Julia version: 1.12.0-DEV
Pkg version: 1.12.0
Bump invoked by: @IanButterworth
Powered by:
[BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl)

Diff:
JuliaLang/Pkg.jl@27c1b1e...799dc2d

```
$ git log --oneline 27c1b1ee5..799dc2d54
799dc2d54 REPLExt: use Base.isaccessibledir rather than isdir in completions (#4053)
3fde94ee9 REPLExt: run repl hint generation for modeswitch chars when not switching (#4054)
```

Co-authored-by: Dilum Aluthge <[email protected]>
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

4 participants