Re: Vip without [N]curses
On Sun, Aug 11, 2019 at 06:14:56PM +0200, Thorsten Jolitz wrote: > I do have that installed, but the for the library on that first > line it does not work, I can leave the first (/usr/bin ...) as is, but have > to change > the second entry (/usr/lib ...), otherwise I get a library-not-found error. That's true, it fixes only the execution path, not the arguments. So it does not help in this case. What I do usually with portable scripts is calling 'pil': #!/usr/bin/pil @lib/too.l or #!/usr/bin/pil -load "@lib/too.l" foo/main.l etc. > > The other escapes, like character attributes, line clearing, show/hide > > cursor > > and switching between first and second screen are more or less just > > cosmetics. > > Ok, thanks, maybe I understand that somehow now. > > If you do a (horizontal) split, then 2 +Window objects refer > to the same +Buffer object, so changes are synchronized. > The split is realized by dividing the current window hight by 2, > adjust the existing +Window object, and create a new one. Right. > Vip itself than draws the separating status line for each window > (except the "mini buffer", in Emacs terminology). "mini buffer" is the "command window" (the bottom-most window) in Vip? ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: Vip without [N]curses
Alexander Burger writes: Hi Alex, >> (for termux I always have to adapt the first line in /bin/vip, >> i.e. replace /usr with termux $PREFIX, /data/data/com.termux/files/usr) > > This is no longer necessary if you install in Termux > >$ apt install termux-exec > > With that, hashbangs like #!/usr/bin/pil automagically work! :) > Most scripts now work on Linux and Termux without change. I do have that installed, but the for the library on that first line it does not work, I can leave the first (/usr/bin ...) as is, but have to change the second entry (/usr/lib ...), otherwise I get a library-not-found error. #!/usr/bin/picolisp /usr/lib/picolisp/lib.l >> I looked into vip.l and some vt100 docs, but I find it really hard to >> understand how e.g. "split window (qs)" is implemented with the vt100 >> escape sequences? >> Could you elaborate on this a bit? > > The windows are maintained by Vip directly and explicitly. Simply positioning > the cursor and writing stuff. Windows are just areas on the screen like > everything else. > > As you see in @lib/vip.l, it uses only one single escape sequence for all such > positionings: > >(de cup (Y X) > (prin "^[[" Y ";" X "H") ) > > The other escapes, like character attributes, line clearing, show/hide cursor > and switching between first and second screen are more or less just cosmetics. Ok, thanks, maybe I understand that somehow now. If you do a (horizontal) split, then 2 +Window objects refer to the same +Buffer object, so changes are synchronized. The split is realized by dividing the current window hight by 2, adjust the existing +Window object, and create a new one. Vip itself than draws the separating status line for each window (except the "mini buffer", in Emacs terminology). So its really just PicoLisp drawing on one terminal screen, not much vt100 "intelligence" involved. Thats cool ;-) -- cheers, Thorsten -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: Vip without [N]curses
Alexander Burger writes: Hi Alex, > It should be a problem only on the first bootstrap. After you > downloaded the *.s > files once and got a running system, it will self-build from that time on. I could fix this now, maybe a rather Archlinux specific problem. Fist I figured out, that java verson shows 7, but in the ArchLinux repos there are Open JDK/JRE 12 already. When I installed the newest version, the verbose output gave the decisive hint, problem was the default Java ENV. This works now, did not have to download anything. Thanks Thorsten PS (3/4) Installiere jre-openjdk (12) Default Java environment is already set to 'java-7-openjdk' See 'archlinux-java help' to change it => [tj@arch ~]$ archlinux-java help archlinux-java COMMAND: status List installed Java environments and enabled one get Return the short name of the Java environment set as default set Force as default unset Unset current default Java environment fix Fix an invalid/broken default Java environment configuration [tj@arch ~]$ sudo archlinux-java get java-7-openjdk [tj@arch ~]$ sudo archlinux-java set java-12-openjdk => [tj@arch picoLisp]$ (cd src64;make) [...] [tj@arch picoLisp]$ pil + : (version) 19.8.9 -> (19 8 9) : -- cheers, Thorsten -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: Vip without [N]curses
Hi Thorsten, our mails just crossed :) On Sun, Aug 11, 2019 at 04:56:59PM +0200, Thorsten Jolitz wrote: > Hi Geo, > > If nobody else has this problem, seems to be a local (java) thing. > Since new PicoLisp versions a coming quite frequently, I would prefer > not to fall back to alternative build methods but rather fix my system > so that the normal build works again. But thanks for your hints anyway. It should be a problem only on the first bootstrap. After you downloaded the *.s files once and got a running system, it will self-build from that time on. > I googled this now, this seems to be a well known Java problem with > versions of JRE and JDK which do not work together (the java class file > was compiled with a newer Java version than the installed runtime Java). > So not really a PicoLisp problem, sorry for the noise ... I see, thanks for the info! ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: Vip without [N]curses
Hi Thorsten, > thats very interesting, ncurses seemed to be a real curse so to say ... > I have > - version (19 7 31) on Android/termux > - version (19 8 9) on Win10/wsl > now, both seem to have that change, and both could be installed and > work Good to know! > (for termux I always have to adapt the first line in /bin/vip, > i.e. replace /usr with termux $PREFIX, /data/data/com.termux/files/usr) This is no longer necessary if you install in Termux $ apt install termux-exec With that, hashbangs like #!/usr/bin/pil automagically work! :) Most scripts now work on Linux and Termux without change. > I looked into vip.l and some vt100 docs, but I find it really hard to > understand how e.g. "split window (qs)" is implemented with the vt100 > escape sequences? > Could you elaborate on this a bit? The windows are maintained by Vip directly and explicitly. Simply positioning the cursor and writing stuff. Windows are just areas on the screen like everything else. As you see in @lib/vip.l, it uses only one single escape sequence for all such positionings: (de cup (Y X) (prin "^[[" Y ";" X "H") ) The other escapes, like character attributes, line clearing, show/hide cursor and switching between first and second screen are more or less just cosmetics. > On an up-to-date ArchLinux today, with the freshly downloaded dev > version of PicoLisp: > > [tj@arch picoLisp]$ (cd src64/;make) > /mkAsm x86-64 ".linux" .s Linux base "" ../lib/map version.l glob.l > main.l gc.l apply.l flow.l sym.l subr.l big.l io.l db.l net.l err.l > sys/x86-64.linux.code.l > Exception in thread "main" java.lang.UnsupportedClassVersionError: > PicoLisp : Unsupported major.minor version 52.0 It seems to fall back to Java because it finds no existing picolisp. Not sure what the Java problems actually are, but it is needed anyway only to build the sr64/*.s files the first time. So I recommend to simply download the pre-generated "*.s" files e.g. in https://software-lab.de/x86-64.linux.tgz > [tj@arch picoLisp]$ lscpu > Architektur: x86_64 > CPU Operationsmodus: 32-bit, 64-bit ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: Vip without [N]curses
George Orais writes: Hi Geo, > I'm not sure but looking at those errors are coming from Java, so maybe > you can try the other two ways to build the 64bit: > > * Download one of the pre-generated "*.s" file packages > * Build a 32-bit version first, and use the resulting bin/picolisp to > generate the "*.s" files: I tried the same thing with the current stable version (19 6), same error, so it's not really a problem with the dev version. But I never ever had a problem with installing a new pil on this machine. If nobody else has this problem, seems to be a local (java) thing. Since new PicoLisp versions a coming quite frequently, I would prefer not to fall back to alternative build methods but rather fix my system so that the normal build works again. But thanks for your hints anyway. I googled this now, this seems to be a well known Java problem with versions of JRE and JDK which do not work together (the java class file was compiled with a newer Java version than the installed runtime Java). So not really a PicoLisp problem, sorry for the noise ... Cheers Thorsten PS [tj@arch bin]$ ls lisp picoLisp picoLisp-19.6.tgz PilBox pil-dev pil-old tmp waffles [tj@arch bin]$ cd picoLisp [tj@arch picoLisp]$ (cd src64/;make) /mkAsm x86-64 ".linux" .s Linux base "" ../lib/map version.l glob.l main.l gc.l apply.l flow.l sym.l subr.l big.l io.l db.l net.l err.l sys/x86-64.linux.code.l Exception in thread "main" java.lang.UnsupportedClassVersionError: PicoLisp : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method) [...] make: *** [Makefile:179: x86-64.linux.base.s] Fehler 1 [tj@arch picoLisp]$ java -version java version "1.7.0_171" OpenJDK Runtime Environment (IcedTea 2.6.13) (Arch Linux build 7.u171_2.6.13-1-x86_64) OpenJDK 64-Bit Server VM (build 24.171-b02, mixed mode) > > > BR, > Geo > On Sunday, 11 August 2019, 09:54:04 pm GMT+9, Thorsten Jolitz > wrote: > > Alexander Burger writes: > > Hi Alex, > >> more and more I got frustrated with all the quirks of Ncurses (as >> discussed here >> and in IRC), so I decided to abandon them, and implement Vip directly >> with ANSI >> escape sequences (VT-100). >> >> To my surprise this turned out quite easy, and the result is both >> smaller and >> simpler! >> >> I tested on Termux, Tmux, XTerm and Linux Console. If anybody is >> interested, it >> is in the rolling picoLisp.tgz release :) > > thats very interesting, ncurses seemed to be a real curse so to say ... > I have > - version (19 7 31) on Android/termux > - version (19 8 9) on Win10/wsl > now, both seem to have that change, and both could be installed and > work (for termux I always have to adapt the first line in /bin/vip, > i.e. replace /usr with termux $PREFIX, /data/data/com.termux/files/usr) > > But on my desktop ArchLinux machine with the newest PicoLisp dev > download I get a make error, see PS1. > > Cheers > Thorsten > > PS 0 > I looked into vip.l and some vt100 docs, but I find it really hard to > understand how e.g. "split window (qs)" is implemented with the vt100 > escape sequences? > Could you elaborate on this a bit? > > PS 1 > On an up-to-date ArchLinux today, with the freshly downloaded dev > version of PicoLisp: > > [tj@arch picoLisp]$ (cd src64/;make) > /mkAsm x86-64 ".linux" .s Linux base "" ../lib/map version.l glob.l > main.l gc.l apply.l flow.l sym.l subr.l big.l io.l db.l net.l err.l > sys/x86-64.linux.code.l > Exception in thread "main" java.lang.UnsupportedClassVersionError: > PicoLisp : Unsupported major.minor version 52.0 > at java.lang.ClassLoader.defineClass1(Native Method) > at java.lang.ClassLoader.defineClass(ClassLoader.java:803) > at > java.security.SecureClassLoader.defineClass > (SecureClassLoader.java:142) > at java.net.URLClassLoader.defineClass(URLClassLoader.java:442) > at java.net.URLClassLoader.access$100(URLClassLoader.java:64) > at java.net.URLClassLoader$1.run(URLClassLoader.java:354) > at java.net.URLClassLoader$1.run(URLClassLoader.java:348) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:347) > at java.lang.ClassLoader.loadClass(ClassLoader.java:425) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:312) > at java.lang.ClassLoader.loadClass(ClassLoader.java:358) > at > sun.launcher.LauncherHelper.checkAndLoadMain > (LauncherHelper.java:482) > make: *** [Makefile:179: x86-64.linux.base.s] Fehler 1 > > PS 2 > [tj@arch picoLisp]$ lscpu > Architektur:x86_64 > CPU Operationsmodus:32-bit, 64-bit > > -- > cheers, > Thorsten -- cheers, Thorsten -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: Vip without [N]curses
Hi Thorsten, I'm not sure but looking at those errors are coming from Java, so maybe you can try the other two ways to build the 64bit: * Download one of the pre-generated "*.s" file packages* Build a 32-bit version first, and use the resulting bin/picolisp to generate the "*.s" files: BR,GeoOn Sunday, 11 August 2019, 09:54:04 pm GMT+9, Thorsten Jolitz wrote: Alexander Burger writes: Hi Alex, > more and more I got frustrated with all the quirks of Ncurses (as > discussed here > and in IRC), so I decided to abandon them, and implement Vip directly > with ANSI > escape sequences (VT-100). > > To my surprise this turned out quite easy, and the result is both > smaller and > simpler! > > I tested on Termux, Tmux, XTerm and Linux Console. If anybody is > interested, it > is in the rolling picoLisp.tgz release :) thats very interesting, ncurses seemed to be a real curse so to say ... I have - version (19 7 31) on Android/termux - version (19 8 9) on Win10/wsl now, both seem to have that change, and both could be installed and work (for termux I always have to adapt the first line in /bin/vip, i.e. replace /usr with termux $PREFIX, /data/data/com.termux/files/usr) But on my desktop ArchLinux machine with the newest PicoLisp dev download I get a make error, see PS1. Cheers Thorsten PS 0 I looked into vip.l and some vt100 docs, but I find it really hard to understand how e.g. "split window (qs)" is implemented with the vt100 escape sequences? Could you elaborate on this a bit? PS 1 On an up-to-date ArchLinux today, with the freshly downloaded dev version of PicoLisp: [tj@arch picoLisp]$ (cd src64/;make) /mkAsm x86-64 ".linux" .s Linux base "" ../lib/map version.l glob.l main.l gc.l apply.l flow.l sym.l subr.l big.l io.l db.l net.l err.l sys/x86-64.linux.code.l Exception in thread "main" java.lang.UnsupportedClassVersionError: PicoLisp : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:803) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:442) at java.net.URLClassLoader.access$100(URLClassLoader.java:64) at java.net.URLClassLoader$1.run(URLClassLoaderjava:354) at java.net.URLClassLoader$1.run(URLClassLoaderjava:348) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:347) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:312) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482) make: *** [Makefile:179: x86-64.linux.base.s] Fehler 1 PS 2 [tj@arch picoLisp]$ lscpu Architektur: x86_64 CPU Operationsmodus: 32-bit, 64-bit -- cheers, Thorsten -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: Vip without [N]curses
Alexander Burger writes: Hi Alex, > more and more I got frustrated with all the quirks of Ncurses (as > discussed here > and in IRC), so I decided to abandon them, and implement Vip directly > with ANSI > escape sequences (VT-100). > > To my surprise this turned out quite easy, and the result is both > smaller and > simpler! > > I tested on Termux, Tmux, XTerm and Linux Console. If anybody is > interested, it > is in the rolling picoLisp.tgz release :) thats very interesting, ncurses seemed to be a real curse so to say ... I have - version (19 7 31) on Android/termux - version (19 8 9) on Win10/wsl now, both seem to have that change, and both could be installed and work (for termux I always have to adapt the first line in /bin/vip, i.e. replace /usr with termux $PREFIX, /data/data/com.termux/files/usr) But on my desktop ArchLinux machine with the newest PicoLisp dev download I get a make error, see PS1. Cheers Thorsten PS 0 I looked into vip.l and some vt100 docs, but I find it really hard to understand how e.g. "split window (qs)" is implemented with the vt100 escape sequences? Could you elaborate on this a bit? PS 1 On an up-to-date ArchLinux today, with the freshly downloaded dev version of PicoLisp: [tj@arch picoLisp]$ (cd src64/;make) /mkAsm x86-64 ".linux" .s Linux base "" ../lib/map version.l glob.l main.l gc.l apply.l flow.l sym.l subr.l big.l io.l db.l net.l err.l sys/x86-64.linux.code.l Exception in thread "main" java.lang.UnsupportedClassVersionError: PicoLisp : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:803) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:442) at java.net.URLClassLoader.access$100(URLClassLoader.java:64) at java.net.URLClassLoader$1.run(URLClassLoader.java:354) at java.net.URLClassLoader$1.run(URLClassLoader.java:348) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:347) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:312) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482) make: *** [Makefile:179: x86-64.linux.base.s] Fehler 1 PS 2 [tj@arch picoLisp]$ lscpu Architektur: x86_64 CPU Operationsmodus: 32-bit, 64-bit -- cheers, Thorsten -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: Vip without [N]curses
Hi all, On Wed, Jul 31, 2019 at 05:05:18PM +0200, Alexander Burger wrote: > > The wiki article says, that if I move to > > the command buffer and enter a Picolisp expression on a line of its own, > > then I can execute it by pressing Enter. > > Oh, sorry! The article is outdated in this regard. I tried to fix and update the article. Hope it is better now :) (https://picolisp.com/wiki/?vip) ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: Vip without [N]curses
Thanks Alex! This is exactly what I was missing :). Cheers, Wojtek W dniu środa, 31 lipca 2019 Alexander Burger napisał(a): > Hi Wojtek, > >> By the way, I wanted to clear a misunderstanding I seem to be having, >> regarding code evaluation in Vip. The wiki article says, that if I move to >> the command buffer and enter a Picolisp expression on a line of its own, >> then I can execute it by pressing Enter. > > Oh, sorry! The article is outdated in this regard. > > The Vip REPL now no longer behaves this way (triggering evaluation with an > opening parenthesis). Instead, it needs ": " (a colon and a space). > > Practically, you get the colon by pressing ':' (as in Vim) or . At this > point you can enter commands like "e" (edit), "w" (write) and so on (see the > full list in the 'command' function in the 'case C' body. BUT if you press > a(nother) space here, the rest of the line will be evaluated. > > This is easier than it sounds ;) > > Try this: Hit '-' a few times to get a bigger command window. Then hit space, > space,(+ 3 4 and . The command window shows > >: (+ 3 4) >-> 7 > > The focus is back to the current edit window. > > Or, you move to the command window permanently with "qj" or "^wj", and edit > expressions manually. You can (re)evaluate any line there by pressing on > it. > > >> While I'm on the topic, is there a way to evaluate arbitrary Picolisp code >> from *any* Vip buffer, i.e. sending region to the Picolisp REPL? > > Not a region (in the sense of as part of a file), but you can evaluate ('load') > the whole file by pressing F7. > > Or you copy some lines to the command window ('y' and 'p' commands) and evaluate > them there. > > ☺/ A!ex > > -- > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe >
Re: Vip without [N]curses
Hi Wojtek, > By the way, I wanted to clear a misunderstanding I seem to be having, > regarding code evaluation in Vip. The wiki article says, that if I move to > the command buffer and enter a Picolisp expression on a line of its own, > then I can execute it by pressing Enter. Oh, sorry! The article is outdated in this regard. The Vip REPL now no longer behaves this way (triggering evaluation with an opening parenthesis). Instead, it needs ": " (a colon and a space). Practically, you get the colon by pressing ':' (as in Vim) or . At this point you can enter commands like "e" (edit), "w" (write) and so on (see the full list in the 'command' function in the 'case C' body. BUT if you press a(nother) space here, the rest of the line will be evaluated. This is easier than it sounds ;) Try this: Hit '-' a few times to get a bigger command window. Then hit space, space,(+ 3 4 and . The command window shows : (+ 3 4) -> 7 The focus is back to the current edit window. Or, you move to the command window permanently with "qj" or "^wj", and edit expressions manually. You can (re)evaluate any line there by pressing on it. > While I'm on the topic, is there a way to evaluate arbitrary Picolisp code > from *any* Vip buffer, i.e. sending region to the Picolisp REPL? Not a region (in the sense of as part of a file), but you can evaluate ('load') the whole file by pressing F7. Or you copy some lines to the command window ('y' and 'p' commands) and evaluate them there. ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: Vip without [N]curses
By the way, I wanted to clear a misunderstanding I seem to be having, regarding code evaluation in Vip. The wiki article says, that if I move to the command buffer and enter a Picolisp expression on a line of its own, then I can execute it by pressing Enter. So what I did was, I entered the following command: (out "/tmp/vip-test" (prinl "test")) And pressed Enter with the cursor on that expression. Based on the article, I would expect the code to be run and the /tmp/vip-test file to appear, but it didn't. Am I missing something? While I'm on the topic, is there a way to evaluate arbitrary Picolisp code from *any* Vip buffer, i.e. sending region to the Picolisp REPL? Cheers, Wojtek śr., 31 lip 2019 o 11:56 Alexander Burger napisał(a): > On Tue, Jul 30, 2019 at 10:41:40AM +0200, Alexander Burger wrote: > > I tested on Termux, Tmux, XTerm and Linux Console. If anybody is > interested, it > > is in the rolling picoLisp.tgz release :) > > Released an updated version now (19 7 31). > > Fixed some bugs - not directly related to the changes from curses to escape > sequences, but to the different screen updates and the ^Z (SIGTSTP and > SIGCONT) > handling. > > Just in case anybody actually uses it. > > ☺/ A!ex > > -- > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe >
Re: Vip without [N]curses
On Tue, Jul 30, 2019 at 10:41:40AM +0200, Alexander Burger wrote: > I tested on Termux, Tmux, XTerm and Linux Console. If anybody is interested, > it > is in the rolling picoLisp.tgz release :) Released an updated version now (19 7 31). Fixed some bugs - not directly related to the changes from curses to escape sequences, but to the different screen updates and the ^Z (SIGTSTP and SIGCONT) handling. Just in case anybody actually uses it. ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: Vip without [N]curses
Ok, that did the trick. Turns out the variables were set, but not exported. Thanks, Wojtek wt., 30 lip 2019 o 13:26 Alexander Burger napisał(a): > On Tue, Jul 30, 2019 at 01:07:43PM +0200, Wojciech Gac wrote: > > Right. So my Bash has the two variables set and exported, but they do not > > propagate over to Picolisp, i.e. when I evaluate (sys "LINES"), i get > NIL. > > Any way to force pil to grab those variables? > > I have in my ~/.bashrc > >export COLUMNS LINES > > and get > >$ ./pil + >: (sys "COLUMNS") >-> "48" >: (sys "LINES") >-> "48" > > Is it different in your case? > > ☺/ A!ex > > -- > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe >
Re: Vip without [N]curses
On Tue, Jul 30, 2019 at 01:07:43PM +0200, Wojciech Gac wrote: > Right. So my Bash has the two variables set and exported, but they do not > propagate over to Picolisp, i.e. when I evaluate (sys "LINES"), i get NIL. > Any way to force pil to grab those variables? I have in my ~/.bashrc export COLUMNS LINES and get $ ./pil + : (sys "COLUMNS") -> "48" : (sys "LINES") -> "48" Is it different in your case? ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: Vip without [N]curses
Right. So my Bash has the two variables set and exported, but they do not propagate over to Picolisp, i.e. when I evaluate (sys "LINES"), i get NIL. Any way to force pil to grab those variables? Cheers, Wojtek wt., 30 lip 2019 o 12:57 Alexander Burger napisał(a): > On Tue, Jul 30, 2019 at 12:33:15PM +0200, Wojciech Gac wrote: > > I know, but the invocation I mentioned worked for me before. The > invocation > > from your email doesn't work either. Same error as before. > > I see from > > > > > [/usr/local/bin/vip:6] !? (need X (chop (next)) " ") > > that it happens in 'align'. The only place where @lib/vip.l calls 'align' > is in > 'status' (that's why you get the inverse video): > >(need (- *Columns (length A) (length Z)) " ") > > > So it looks like *Columns is not set. > > Vip fetches it with > >(setq > *Columns (format (sys "COLUMNS")) > *Lines (format (sys "LINES")) ) > > I think in your environment these variables are not set or not exported. > > ☺/ A!ex > > -- > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe >
Re: Vip without [N]curses
On Tue, Jul 30, 2019 at 12:51:43PM +0200, Alexander Burger wrote: > I think in your environment these variables are not set or not exported. I added a check upon startup. ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: Vip without [N]curses
On Tue, Jul 30, 2019 at 12:33:15PM +0200, Wojciech Gac wrote: > I know, but the invocation I mentioned worked for me before. The invocation > from your email doesn't work either. Same error as before. I see from > > > [/usr/local/bin/vip:6] !? (need X (chop (next)) " ") that it happens in 'align'. The only place where @lib/vip.l calls 'align' is in 'status' (that's why you get the inverse video): (need (- *Columns (length A) (length Z)) " ") So it looks like *Columns is not set. Vip fetches it with (setq *Columns (format (sys "COLUMNS")) *Lines (format (sys "LINES")) ) I think in your environment these variables are not set or not exported. ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: Vip without [N]curses
I know, but the invocation I mentioned worked for me before. The invocation from your email doesn't work either. Same error as before. Cheers, Wojtek wt., 30 lip 2019 o 12:13 Alexander Burger napisał(a): > Hi Wojtek, > > > Hmm... When running Vip (both with and without "+"), I get a reversed > video > > Picolisp prompt. When I exit with a (bye), I get the following error > > message: > > > > [/usr/local/bin/vip:6] !? (need X (chop (next)) " ") > > NIL -- Small number expected > > The invocation did not change. > > You can either call it from the REPL > >$ ./pil lib/vip.l + >: (vi "file") >... >: (vi 'car) > > Or make a startup script. I have in my path > a bin/vi > >#!/data/data/com.termux/files/home/pico/bin/picolisp > /data/data/com.termux/files/home/pico/lib.l ># 04oct17abu > >(load "@bin/vip") > > ☺/ A!ex > > -- > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe >
Re: Vip without [N]curses
Hi Wojtek, > Hmm... When running Vip (both with and without "+"), I get a reversed video > Picolisp prompt. When I exit with a (bye), I get the following error > message: > > [/usr/local/bin/vip:6] !? (need X (chop (next)) " ") > NIL -- Small number expected The invocation did not change. You can either call it from the REPL $ ./pil lib/vip.l + : (vi "file") ... : (vi 'car) Or make a startup script. I have in my path a bin/vi #!/data/data/com.termux/files/home/pico/bin/picolisp /data/data/com.termux/files/home/pico/lib.l # 04oct17abu (load "@bin/vip") ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: Vip without [N]curses
Hmm... When running Vip (both with and without "+"), I get a reversed video Picolisp prompt. When I exit with a (bye), I get the following error message: [/usr/local/bin/vip:6] !? (need X (chop (next)) " ") NIL -- Small number expected Cheers, Wojtek wt., 30 lip 2019 o 11:10 Wojciech Gac napisał(a): > Great news! > > I also found it increasingly annoying, even on the user side, that on > various systems getting Vip to run correctly was not always easy. Giving it > a try right now. > > Cheers, > Wojtek > > wt., 30 lip 2019 o 10:48 Alexander Burger > napisał(a): > >> Hi all, >> >> more and more I got frustrated with all the quirks of Ncurses (as >> discussed here >> and in IRC), so I decided to abandon them, and implement Vip directly >> with ANSI >> escape sequences (VT-100). >> >> To my surprise this turned out quite easy, and the result is both smaller >> and >> simpler! >> >> I tested on Termux, Tmux, XTerm and Linux Console. If anybody is >> interested, it >> is in the rolling picoLisp.tgz release :) >> >> ☺/ A!ex >> >> -- >> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe >> >
Re: Vip without [N]curses
Great news! I also found it increasingly annoying, even on the user side, that on various systems getting Vip to run correctly was not always easy. Giving it a try right now. Cheers, Wojtek wt., 30 lip 2019 o 10:48 Alexander Burger napisał(a): > Hi all, > > more and more I got frustrated with all the quirks of Ncurses (as > discussed here > and in IRC), so I decided to abandon them, and implement Vip directly with > ANSI > escape sequences (VT-100). > > To my surprise this turned out quite easy, and the result is both smaller > and > simpler! > > I tested on Termux, Tmux, XTerm and Linux Console. If anybody is > interested, it > is in the rolling picoLisp.tgz release :) > > ☺/ A!ex > > -- > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe >
Vip without [N]curses
Hi all, more and more I got frustrated with all the quirks of Ncurses (as discussed here and in IRC), so I decided to abandon them, and implement Vip directly with ANSI escape sequences (VT-100). To my surprise this turned out quite easy, and the result is both smaller and simpler! I tested on Termux, Tmux, XTerm and Linux Console. If anybody is interested, it is in the rolling picoLisp.tgz release :) ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe