You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 5678 Reporter: antalsz Assigned to:@diml Status: closed (set by @xavierleroy on 2015-12-11T18:07:12Z) Resolution: not a bug Priority: normal Severity: minor Version: 3.12.1 Category: ~DO NOT USE (was: OCaml general)
Bug description
When using the OCaml toplevel, it will not accept more than 1024/4096 characters of input at a time. A line of input containing 1023/4095 characters can be followed by a return; a line of input containing 1024/4096 characters just beeps when any additional keys (letters, return, etc.) are pressed. Importantly, this only happens if OCaml is running interactively. Piping input in or reading input from a file does not cause any problems.
I've tested this on Mac OS X 10.6.7 and 10.7.4, with 3.12.1 from Homebrew (and 4.00.0+beta2 on the 10.6.7 system), I get this with 1024 characters every time. I believe the limit is 4096 characters on Linux systems, but I have not been able to check this directly (I have confirmed it second-hand).
Steps to reproduce
Generate a 1023/4095 character string, e.g. by running perl -e 'print ((" " x 1020) . "1;;")' or perl -e 'print ((" " x 4092) . "1;;")'; copy and paste this into the top level; and try to continue typing.
The text was updated successfully, but these errors were encountered:
This is not a limitation of OCaml but a limitation of the terminal. The standard toplevel does not implement line edition, so the buffered input of the terminal is used, and this one has a limited capacity. You can observe the same behavior with the command "cat" for example.
In order to write long lines in the toplevel you have to launch it with a program like ledit or rlwrap, or you can also use utop.
Original bug ID: 5678
Reporter: antalsz
Assigned to: @diml
Status: closed (set by @xavierleroy on 2015-12-11T18:07:12Z)
Resolution: not a bug
Priority: normal
Severity: minor
Version: 3.12.1
Category: ~DO NOT USE (was: OCaml general)
Bug description
When using the OCaml toplevel, it will not accept more than 1024/4096 characters of input at a time. A line of input containing 1023/4095 characters can be followed by a return; a line of input containing 1024/4096 characters just beeps when any additional keys (letters, return, etc.) are pressed. Importantly, this only happens if OCaml is running interactively. Piping input in or reading input from a file does not cause any problems.
I've tested this on Mac OS X 10.6.7 and 10.7.4, with 3.12.1 from Homebrew (and 4.00.0+beta2 on the 10.6.7 system), I get this with 1024 characters every time. I believe the limit is 4096 characters on Linux systems, but I have not been able to check this directly (I have confirmed it second-hand).
Steps to reproduce
Generate a 1023/4095 character string, e.g. by running
perl -e 'print ((" " x 1020) . "1;;")'
orperl -e 'print ((" " x 4092) . "1;;")'
; copy and paste this into the top level; and try to continue typing.The text was updated successfully, but these errors were encountered: