Re: [dev] tcvt: very useful for seeing more at once

2021-10-14 Thread Rudy Dellomas (dther)
On 21/10/14 12:28PM, Greg Reagle wrote:
> FYI
> 
> Useful, but a lot of wasted screen space on my monitor:
> man dwm
> 
> MUCH better!  I see the entire man page:
> tcvt -c 4 man dwm
> 

`tcvt` is a python terminal multiplexer, which is a bit excessive for the
purpose of saving terminal columns. Even forgoing that GNU man has
$MANWIDTH, why not just use vertical split tmux? It's faster (written in
C) and is much more versatile. This would do more or less the same:

`tmux new ';' splitw -h man dwm`




Re: [dev] tcvt: very useful for seeing more at once

2021-10-14 Thread Greg Reagle
On Thu, Oct 14, 2021, at 7:20 PM, Martin Tournoij wrote:
> I wonder if there's a way to do the same with tmux 樂

I had the same question.  Let me/us know if you find out.

> Also suspect you can get pretty close with far less code and curses 
> shizzle. I'll have to try some stuff later.

Again, let me/us know.  I see no alternative to tcvt for the same 
functionality.  Vim and Emacs can do it, but only within vim and emacs.



Re: [dev] tcvt: very useful for seeing more at once

2021-10-14 Thread Martin Tournoij
On Fri, Oct 15, 2021, at 03:55, Greg Reagle wrote:
> On Thu, Oct 14, 2021, at 2:24 PM, Markus Wichmann wrote:
>> You know, if you were trying to shill the program, you might have done
>> better if you had provided the homepage. I searched for "tcvt", and all
>
> Shill--I wish.  I get no money from people using it. Just trying to be 
> helpful.
>   http://subdivi.de/~helmut/tcvt/

Ah, this seems nice; unfortunately it wreaks havoc on my (st) terminal; it 
resets some colours, and many basic keys don't work (e.g. ^U, arrow keys, 
function keys), etc. It's not very functional.

Terminals are always fun.

I wonder if there's a way to do the same with tmux 樂 In Vim you can use :vsplit 
and :scrollbind, but that works on in, well, Vim.

Also suspect you can get pretty close with far less code and curses shizzle. 
I'll have to try some stuff later.



Re: [dev] tcvt: very useful for seeing more at once

2021-10-14 Thread Martin Tournoij
On Fri, Oct 15, 2021, at 04:24, Страхиња Радић wrote:
> On 21/10/14 12:28, Greg Reagle wrote:
>> Useful, but a lot of wasted screen space on my monitor:
>> man dwm
>
> If MANWIDTH is unset (default), man page will take all of the available width 
> of
> the terminal, unless:

Note that mandoc has a default of 78 if not set; GNU man (and maybe some 
others?) do indeed take up the full width by default, but mandoc won't take up 
more than 78.

Actually, mandoc doesn't even look at MANWIDTH; you need to use "man -Owidth=20 
page" or "man -Owidth=$COLUMNS page". I'm not entirely sure if there's a way to 
make it behave like GNU man – I much prefer the mandoc behaviour myself as long 
lines are so hard to read (especially since MANWIDTH is a "hard width" and it 
won't shrink if your terminal is too small; at least, it didn't last time I 
used it but that was years ago).

But no idea if the OP is using mandoc or GNU man or anything else.



Re: [dev] tcvt: very useful for seeing more at once

2021-10-14 Thread Greg Reagle
On Thu, Oct 14, 2021, at 2:24 PM, Markus Wichmann wrote:
> You know, if you were trying to shill the program, you might have done
> better if you had provided the homepage. I searched for "tcvt", and all

Shill--I wish.  I get no money from people using it. Just trying to be helpful.
  http://subdivi.de/~helmut/tcvt/



Re: [dev] tcvt: very useful for seeing more at once

2021-10-14 Thread Страхиња Радић
On 21/10/14 12:28, Greg Reagle wrote:
> Useful, but a lot of wasted screen space on my monitor:
> man dwm

If MANWIDTH is unset (default), man page will take all of the available width of
the terminal, unless:

- COLUMNS is also somehow unset (it is set by most sane shells by default), or
- ioctl(2) is somehow nonfunctional, or
- you are not using a tilling wm, or
- you are using a floating terminal, in which case switching it back to full
  screen should use up more of the screen space.

I have no idea what tcvt is or does. Since you haven't provided any details on
that program(?)/script(?), I can only guess.


signature.asc
Description: PGP signature


Re: [dev] tcvt: very useful for seeing more at once

2021-10-14 Thread Markus Wichmann
On Thu, Oct 14, 2021 at 12:28:52PM -0400, Greg Reagle wrote:
> FYI
>
> Useful, but a lot of wasted screen space on my monitor:
> man dwm
>
> MUCH better!  I see the entire man page:
> tcvt -c 4 man dwm
>

You know, if you were trying to shill the program, you might have done
better if you had provided the homepage. I searched for "tcvt", and all
I found was a Dutch site for something to do with VTOL, and a registry
for the TransCatheter Valve Treatment. I am reasonably sure you meant
neither.

Ciao,
Markus



[dev] tcvt: very useful for seeing more at once

2021-10-14 Thread Greg Reagle
FYI

Useful, but a lot of wasted screen space on my monitor:
man dwm

MUCH better!  I see the entire man page:
tcvt -c 4 man dwm



[dev] Tiny VMs and parsers

2021-10-14 Thread ribal

Hi all,

I've been following the book "Crafting Interpreters [1]" to learn how to 
write my own VM and parser in C and now I'm searching for some 
tiny/suckless implementations of both VMs and parsers in C, so I can see 
some other approaches to this question.


At this moment I've found this guide from Bartosz Sypytkowski [2], but 
is only works with int values and lacks the compiler.


Which non obfuscated tiny code do you recommend to study as a reference 
of how simple an interpreted language can be (preferred non lisp, 
supporting infix notation).


[1] https://craftinginterpreters.com/
[2] https://bartoszsypytkowski.com/simple-virtual-machine/

Thank you all,
Rubén Santos.