Re: [new] gurk-rs - a cli signal client

2024-05-19 Thread James Cook

On Thu, May 16, 2024 at 07:53:41PM GMT, Stefan Hagen wrote:

James Cook wrote (2024-05-14 21:21 CEST):

> I wasn't able to link to my phone because the QR code is not displayed in a
> usable way.  Here are the first three lines of what I assume is supposed to
> be a QR code.
>
>$ gurk
>Linking new device with device name: gurk@angel
>   ▄▄▄ ▄ ▄   ▄   
▄▄ ▄ ▄  ▄  ▄  ▄  ▄ ▄ ▄ ▄
> ▄ ▄ ▄  ▄▄▄▄ ▄    ▄▄ ▄▄   ▄▄▄

Sorry, format=flowed messed that up. Here are the first three lines
again:

   ▄▄▄ ▄ ▄   ▄   ▄▄ ▄ ▄  ▄
▄  ▄  ▄ ▄ ▄ ▄ ▄ ▄ ▄
▄▄▄▄ ▄    ▄▄ ▄▄   ▄▄▄


Try playing with a different font / different terminal.
It should look like a square'ish block that resembles
a QR code.

Best regards,
Stefan


Some more info:

I tried redirecting gurk's stdout to a file. Feeding that output to vis, it 
begins like this:

Linking new device with device name: gurk@angel
\^[[m\^[[m \^[[m\^[[m\^[[m\^[[m \^[[m\^[[m\^[[m\^[[m \^[[m\^[[m

This seems broken, because when I wrote my own program to call 
qr2term::print_qr, the output began like this (again, viewed with

vis):

\^[[48;5;15m\^[[38;5;0m \^[[49m\^[[39m\^[[48;5;15m

It looks like some terminal escape codes are not properly generated 
when gurk calls qr2term::print_qr. My own program's output is a 
usable QR code.


I tried gurk in xterm, in tmux in xterm, and in gnome-terminal 
(hastily installed just for this purpose; gnome-terminal is using 
a weird ugly font and I didn't dig into why). In all three cases, 
gurk|vis|head shows the same (as far as I can see) sequence of 
\^[[m\^[m The TERM environment variable is "xterm", "screen"

and "xterm-256color respectively in those three cases.




Details on how I manually tried qr2term::print_qr:

I built and ran the following program:

use qr2term;

fn main() {
qr2term::print_qr("https://rust-lang.org/;).unwrap();
}

and it works fine: I see a (kind of ugly) QR code on the terminal 
that I can scan. I built it with the following Cargo.toml file, 
which I generated with "cargo init" then "cargo add qr2term":


[package]
name = "r"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at 
https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
qr2term = "0.3.1"

--
James



Re: [new] gurk-rs - a cli signal client

2024-05-16 Thread Stefan Hagen
James Cook wrote (2024-05-14 21:21 CEST):
> > I wasn't able to link to my phone because the QR code is not displayed in a
> > usable way.  Here are the first three lines of what I assume is supposed to
> > be a QR code.
> > 
> > $ gurk
> > Linking new device with device name: gurk@angel
> >▄▄▄ ▄ ▄   ▄  
> >  ▄▄ ▄ ▄  ▄  ▄  ▄  ▄ ▄ ▄ ▄
> > ▄ ▄ ▄   ▄▄▄▄ ▄    ▄▄ ▄▄   ▄▄▄
> 
> Sorry, format=flowed messed that up. Here are the first three lines
> again:
> 
>▄▄▄ ▄ ▄   ▄   ▄▄ ▄ ▄  ▄
> ▄  ▄  ▄ ▄ ▄ ▄ ▄ ▄ ▄
> ▄▄▄▄ ▄    ▄▄ ▄▄   ▄▄▄

Try playing with a different font / different terminal.
It should look like a square'ish block that resembles
a QR code.

Best regards,
Stefan



Re: [new] gurk-rs - a cli signal client

2024-05-14 Thread James Cook
> I wasn't able to link to my phone because the QR code is not displayed in a
> usable way.  Here are the first three lines of what I assume is supposed to
> be a QR code.
> 
>   $ gurk
>   Linking new device with device name: gurk@angel
>  ▄▄▄ ▄ ▄   ▄  
>  ▄▄ ▄ ▄  ▄  ▄  ▄  ▄ ▄ ▄ ▄
> ▄ ▄ ▄ ▄▄▄▄ ▄    ▄▄ ▄▄   ▄▄▄

Sorry, format=flowed messed that up. Here are the first three lines
again:

   ▄▄▄ ▄ ▄   ▄   ▄▄ ▄ ▄  ▄
▄  ▄  ▄ ▄ ▄ ▄ ▄ ▄ ▄
▄▄▄▄ ▄    ▄▄ ▄▄   ▄▄▄

-- 
James



Re: [new] gurk-rs - a cli signal client

2024-05-13 Thread James Cook

On Tue, Apr 16, 2024 at 04:52:46PM GMT, Edd Barrett wrote:

On Sat, Mar 23, 2024 at 09:56:07PM +0100, Stefan Hagen wrote:

I've updated gurk-rs on openbsd-wip to version 0.4.3. It seems to start
more reliable now. I could exchange a few messages. Once a message got
deleted, further messages could not be sent from gurk.


I just tried this and it worked until someone sent me a message, then it
dropped me back to the shall and spammed the screen with weird characters.

Such a shame, I could really use a client like this.

--
Best Regards
Edd Barrett

https://www.theunixzoo.co.uk



I just tried this and wasn't able to link to my phone.

I had to patch the Makefile slightly to get it to build; see [0].

I wasn't able to link to my phone because the QR code is not displayed 
in a usable way.  Here are the first three lines of what I assume is 
supposed to be a QR code.


$ gurk
Linking new device with device name: gurk@angel
		 
	   ▄▄▄ ▄ ▄   ▄   ▄▄ ▄ ▄  ▄   
		▄  ▄  ▄ ▄ ▄ ▄ ▄ ▄ ▄  
	▄▄▄▄ ▄    ▄▄ ▄▄   ▄▄▄  

The whole thing seems to be made out of spaces and U+2584 characters. 
The Signal app does not recognize it as a QR code. Has anyone else 
encountered this behaviour?


Just in case, I tried setting LANG=en_US.UTF-8, and then LANG=C, 
and then instead LC_CTYPE=en_US.UTF-8, but none of those helped.


--
James

[0] https://github.com/jasperla/openbsd-wip/pull/175



Re: [new] gurk-rs - a cli signal client

2024-04-16 Thread Edd Barrett
On Sat, Mar 23, 2024 at 09:56:07PM +0100, Stefan Hagen wrote:
> I've updated gurk-rs on openbsd-wip to version 0.4.3. It seems to start
> more reliable now. I could exchange a few messages. Once a message got
> deleted, further messages could not be sent from gurk.

I just tried this and it worked until someone sent me a message, then it
dropped me back to the shall and spammed the screen with weird characters.

Such a shame, I could really use a client like this.

-- 
Best Regards
Edd Barrett

https://www.theunixzoo.co.uk



Re: [new] gurk-rs - a cli signal client

2024-03-23 Thread Stefan Hagen
Stefan Hagen wrote (2024-03-23 10:11 CET):
> Rafael Sadowski wrote (2024-03-23 10:02 CET):
> > On Fri Feb 10, 2023 at 07:28:52PM +0100, Stefan Hagen wrote:
> > 
> > What is the status here? I see 0.4.2 upstream.
> 
> 0.4.2 is in openbsd-wip, feel free to try. It's buggy as hell
> and crashes frequently.
> 
> I'll resubmit it to ports@ once it works better.

I've updated gurk-rs on openbsd-wip to version 0.4.3. It seems to start
more reliable now. I could exchange a few messages. Once a message got
deleted, further messages could not be sent from gurk.



Re: [new] gurk-rs - a cli signal client

2024-03-23 Thread Stefan Hagen
Rafael Sadowski wrote (2024-03-23 10:02 CET):
> On Fri Feb 10, 2023 at 07:28:52PM +0100, Stefan Hagen wrote:
> 
> What is the status here? I see 0.4.2 upstream.

0.4.2 is in openbsd-wip, feel free to try. It's buggy as hell
and crashes frequently.

I'll resubmit it to ports@ once it works better.



Re: [new] gurk-rs - a cli signal client

2024-03-23 Thread Rafael Sadowski
On Fri Feb 10, 2023 at 07:28:52PM +0100, Stefan Hagen wrote:
> Hello,
> 
> here is a command line signal client. It's lacking a lot of features,
> but basic text send/receive functionality is there.
> 
> The contact sync doesn't work for me. But I can see and message in
> conversations initiated after gurk-rs is linked.
> 
> I hope the situation will improve. But this client is much better than 
> having no client at all.
> 
> Some hints:
> - this is rust, so build with "MAKE_JOBS=8 make", or something.
> - F1 shows the key bindings and they're not configurable
> - gurk -v(vv) starts verbose mode writes to gurk.log
> 
> I have OK kn@ already.
> 
> One more?
> 
> Best regards,
> Stefan

What is the status here? I see 0.4.2 upstream.



Re: [new] gurk-rs - a cli signal client

2023-02-17 Thread Stuart Henderson
On 2023/02/17 14:51, Marcus MERIGHI wrote:
> Hello, 
> 
> s...@spacehopper.org (Stuart Henderson), 2023.02.17 (Fri) 10:50 (CET):
> > On 2023/02/17 08:13, Stefan Hagen wrote:
> > > Marcus MERIGHI wrote (2023-02-11 17:14 CET):
> > > > sh+openbsd-po...@codevoid.de (Stefan Hagen), 2023.02.10 (Fri) 19:28 
> > > > (CET):
> > > > > here is a command line signal client. It's lacking a lot of features,
> > > > > but basic text send/receive functionality is there.
> > > > 
> > > > for me the client quits upon receiving messages, reliably.
> > > > 
> > > > 2023-02-11T15:50:33.433155Z ERROR panic: thread 'main' panicked at
> > > > 'called `Result::unwrap()` on an `Err` value: Error { kind:
> > > > Uncategorized, message: "no current exe available (short)" }':
> > > > /usr/ports/pobj/gurk-rs-0.3.0/gurk-rs-0.3.0/modcargo-crates/ \
> > > > notify-rust-4.5.10/src/notification.rs:23
> > > 
> > > Oh, that's unfortunate and it's keeping me from going forward. I know it 
> > > works for me and kn@ had some success. But I also don't want to import 
> > > something that only works for half of the people. Missing features are 
> > > fine, but it shouldn't break like that.
> > 
> > Does it work if you use the full path when running the binary?
> 
> Yes, it does! Tried multiple times. 
> 
> I receive messages and the chats that I've been part of since linking to
> the phone have popped up, nice.

So this is one of those programs which wants to know which path you used
to run it, which is a standard library feature provided in some of the
newer languages and is available in some OS (it's not possible to
guarantee that the file reachable at that path is still the same, or
even exists at all, but for the purppses of what the software wants
that's good enough).

Here it wants to yse it to set the application name and icon in desktop
notifications.

OpenBSD doesn't have a way to do this at all unless it can retrieve
the full path from argv (sshd needs similar for reloading).

As far as software in ports goes, it probably makes sense to patch to
use the location where the package installs the binary - in this case
it's in "notify-rust", so it would probably make sense to patch
that (look for "current_exe" to use a hardcoded path string instead.

> > > > Regarding
> > > > Signal Messenger client for the terminal written in Rust.
> > > > 
> > > > While beeing completely right it does not tell that it is a Text User
> > > > Interface (TUI). Maybe steeli^Wtaking a bit from tut(1)'s description?
> > > > 
> > > > So 
> > > > TUI for Mastodon with vim inspired keys
> > > > becomes
> > > > Signal Messenger client TUI with strange key bindings
> > > 
> > > Ironically, I find "for the terminal" clearer than TUI.
> > 
> > me too.
> 
> To me there's two types of user interfaces "for the terminal".
> 
> Command line, based on stdin/stdout/stderr, like wc(1).
> 
> Or an program that is started from the command line but its user
> interface is not based on stdin/stdout/stderr, like mutt. 
> 
> "for the terminal" does not tell which one of these it is.
> 
> Am I getting it wrong? In what way?

We used to just say things like "curses UI" and everyone knew what it
meant, but since it doesn't actually use curses that seems wrong...

Personally I'd expect to see "command-line" if it's a command line
application and for most other wording that is obviously related to the
console rather than X or a daemon I'd expect some kind of (probably
full-screen) terminal ui.

Not that it matters all that much.



Re: [new] gurk-rs - a cli signal client

2023-02-17 Thread Morgan Aldridge
On Fri, Feb 17, 2023 at 8:52 AM Marcus MERIGHI  wrote:
>
> Hello,
>
> s...@spacehopper.org (Stuart Henderson), 2023.02.17 (Fri) 10:50 (CET):
> > On 2023/02/17 08:13, Stefan Hagen wrote:
> > > Marcus MERIGHI wrote (2023-02-11 17:14 CET):
> > > > sh+openbsd-po...@codevoid.de (Stefan Hagen), 2023.02.10 (Fri) 19:28 
> > > > (CET):
> > > > > here is a command line signal client. It's lacking a lot of features,
> > > > > but basic text send/receive functionality is there.
> > > >
> > > > for me the client quits upon receiving messages, reliably.
> > > >
> > > > 2023-02-11T15:50:33.433155Z ERROR panic: thread 'main' panicked at
> > > > 'called `Result::unwrap()` on an `Err` value: Error { kind:
> > > > Uncategorized, message: "no current exe available (short)" }':
> > > > /usr/ports/pobj/gurk-rs-0.3.0/gurk-rs-0.3.0/modcargo-crates/ \
> > > > notify-rust-4.5.10/src/notification.rs:23
> > >
> > > Oh, that's unfortunate and it's keeping me from going forward. I know it
> > > works for me and kn@ had some success. But I also don't want to import
> > > something that only works for half of the people. Missing features are
> > > fine, but it shouldn't break like that.
> >
> > Does it work if you use the full path when running the binary?
>
> Yes, it does! Tried multiple times.
>
> I receive messages and the chats that I've been part of since linking to
> the phone have popped up, nice.
>
> > > > Regarding
> > > > Signal Messenger client for the terminal written in Rust.
> > > >
> > > > While beeing completely right it does not tell that it is a Text User
> > > > Interface (TUI). Maybe steeli^Wtaking a bit from tut(1)'s description?
> > > >
> > > > So
> > > > TUI for Mastodon with vim inspired keys
> > > > becomes
> > > > Signal Messenger client TUI with strange key bindings
> > >
> > > Ironically, I find "for the terminal" clearer than TUI.
> >
> > me too.
>
> To me there's two types of user interfaces "for the terminal".
>
> Command line, based on stdin/stdout/stderr, like wc(1).
>
> Or an program that is started from the command line but its user
> interface is not based on stdin/stdout/stderr, like mutt.
>
> "for the terminal" does not tell which one of these it is.
>
> Am I getting it wrong? In what way?

I don't think you're wrong, it just seems like "for the terminal" is a
more likely search term. For example, a quick search of -current
package descriptions finds 492 for "command line", 197 for "terminal",
and 3 for "TUI".

Morgan Aldridge



Re: [new] gurk-rs - a cli signal client

2023-02-17 Thread Marcus MERIGHI
Hello, 

s...@spacehopper.org (Stuart Henderson), 2023.02.17 (Fri) 10:50 (CET):
> On 2023/02/17 08:13, Stefan Hagen wrote:
> > Marcus MERIGHI wrote (2023-02-11 17:14 CET):
> > > sh+openbsd-po...@codevoid.de (Stefan Hagen), 2023.02.10 (Fri) 19:28 (CET):
> > > > here is a command line signal client. It's lacking a lot of features,
> > > > but basic text send/receive functionality is there.
> > > 
> > > for me the client quits upon receiving messages, reliably.
> > > 
> > > 2023-02-11T15:50:33.433155Z ERROR panic: thread 'main' panicked at
> > > 'called `Result::unwrap()` on an `Err` value: Error { kind:
> > > Uncategorized, message: "no current exe available (short)" }':
> > > /usr/ports/pobj/gurk-rs-0.3.0/gurk-rs-0.3.0/modcargo-crates/ \
> > > notify-rust-4.5.10/src/notification.rs:23
> > 
> > Oh, that's unfortunate and it's keeping me from going forward. I know it 
> > works for me and kn@ had some success. But I also don't want to import 
> > something that only works for half of the people. Missing features are 
> > fine, but it shouldn't break like that.
> 
> Does it work if you use the full path when running the binary?

Yes, it does! Tried multiple times. 

I receive messages and the chats that I've been part of since linking to
the phone have popped up, nice.

> > > Regarding
> > > Signal Messenger client for the terminal written in Rust.
> > > 
> > > While beeing completely right it does not tell that it is a Text User
> > > Interface (TUI). Maybe steeli^Wtaking a bit from tut(1)'s description?
> > > 
> > > So 
> > > TUI for Mastodon with vim inspired keys
> > > becomes
> > > Signal Messenger client TUI with strange key bindings
> > 
> > Ironically, I find "for the terminal" clearer than TUI.
> 
> me too.

To me there's two types of user interfaces "for the terminal".

Command line, based on stdin/stdout/stderr, like wc(1).

Or an program that is started from the command line but its user
interface is not based on stdin/stdout/stderr, like mutt. 

"for the terminal" does not tell which one of these it is.

Am I getting it wrong? In what way?

Marcus



Re: [new] gurk-rs - a cli signal client

2023-02-17 Thread Stuart Henderson
On 2023/02/17 08:13, Stefan Hagen wrote:
> Marcus MERIGHI wrote (2023-02-11 17:14 CET):
> > sh+openbsd-po...@codevoid.de (Stefan Hagen), 2023.02.10 (Fri) 19:28 (CET):
> > > here is a command line signal client. It's lacking a lot of features,
> > > but basic text send/receive functionality is there.
> > 
> > for me the client quits upon receiving messages, reliably.
> > 
> > 2023-02-11T15:50:33.433155Z ERROR panic: thread 'main' panicked at
> > 'called `Result::unwrap()` on an `Err` value: Error { kind:
> > Uncategorized, message: "no current exe available (short)" }':
> > /usr/ports/pobj/gurk-rs-0.3.0/gurk-rs-0.3.0/modcargo-crates/ \
> > notify-rust-4.5.10/src/notification.rs:23
> 
> Oh, that's unfortunate and it's keeping me from going forward. I know it 
> works for me and kn@ had some success. But I also don't want to import 
> something that only works for half of the people. Missing features are 
> fine, but it shouldn't break like that.

Does it work if you use the full path when running the binary?

> > Regarding
> > Signal Messenger client for the terminal written in Rust.
> > 
> > While beeing completely right it does not tell that it is a Text User
> > Interface (TUI). Maybe steeli^Wtaking a bit from tut(1)'s description?
> > 
> > So 
> > TUI for Mastodon with vim inspired keys
> > becomes
> > Signal Messenger client TUI with strange key bindings
> 
> Ironically, I find "for the terminal" clearer than TUI.

me too.



Re: [new] gurk-rs - a cli signal client

2023-02-16 Thread Stefan Hagen
Marcus MERIGHI wrote (2023-02-11 17:14 CET):
> sh+openbsd-po...@codevoid.de (Stefan Hagen), 2023.02.10 (Fri) 19:28 (CET):
> > here is a command line signal client. It's lacking a lot of features,
> > but basic text send/receive functionality is there.
> 
> for me the client quits upon receiving messages, reliably.
> 
> 2023-02-11T15:50:33.433155Z ERROR panic: thread 'main' panicked at
> 'called `Result::unwrap()` on an `Err` value: Error { kind:
> Uncategorized, message: "no current exe available (short)" }':
> /usr/ports/pobj/gurk-rs-0.3.0/gurk-rs-0.3.0/modcargo-crates/ \
> notify-rust-4.5.10/src/notification.rs:23

Oh, that's unfortunate and it's keeping me from going forward. I know it 
works for me and kn@ had some success. But I also don't want to import 
something that only works for half of the people. Missing features are 
fine, but it shouldn't break like that.

> Regarding
> Signal Messenger client for the terminal written in Rust.
> 
> While beeing completely right it does not tell that it is a Text User
> Interface (TUI). Maybe steeli^Wtaking a bit from tut(1)'s description?
> 
> So 
> TUI for Mastodon with vim inspired keys
> becomes
> Signal Messenger client TUI with strange key bindings

Ironically, I find "for the terminal" clearer than TUI.

Only change in the attached version:

$ cat pkg/DESCR
Signal Messenger TUI client written in rust. It's an early development
version which allows sending and receiving text messages from the
terminal. The non-configurable key bindings can be viewed with F1.

I'd be happy to see some reports where it works.

Best regards,
Stefan


gurk-rs.tgz
Description: application/tar-gz


Re: [new] gurk-rs - a cli signal client

2023-02-11 Thread Marcus MERIGHI
Hello, 

sh+openbsd-po...@codevoid.de (Stefan Hagen), 2023.02.10 (Fri) 19:28 (CET):
> here is a command line signal client. It's lacking a lot of features,
> but basic text send/receive functionality is there.

for me the client quits upon receiving messages, reliably.

2023-02-11T15:50:33.433155Z ERROR panic: thread 'main' panicked at
'called `Result::unwrap()` on an `Err` value: Error { kind:
Uncategorized, message: "no current exe available (short)" }':
/usr/ports/pobj/gurk-rs-0.3.0/gurk-rs-0.3.0/modcargo-crates/ \
notify-rust-4.5.10/src/notification.rs:23

> The contact sync doesn't work for me. But I can see and message in
> conversations initiated after gurk-rs is linked.
>
> I hope the situation will improve. But this client is much better than 
> having no client at all.

it would be so handy. thanks for your work!

> Some hints:
> - this is rust, so build with "MAKE_JOBS=8 make", or something.

compile and install worked, I understand you comment now.

> - F1 shows the key bindings and they're not configurable
> - gurk -v(vv) starts verbose mode writes to gurk.log
 
Regarding
Signal Messenger client for the terminal written in Rust.

While beeing completely right it does not tell that it is a Text User
Interface (TUI). Maybe steeli^Wtaking a bit from tut(1)'s description?

So 
TUI for Mastodon with vim inspired keys
becomes
Signal Messenger client TUI with strange key bindings

Marcus



[new] gurk-rs - a cli signal client

2023-02-10 Thread Stefan Hagen
Hello,

here is a command line signal client. It's lacking a lot of features,
but basic text send/receive functionality is there.

The contact sync doesn't work for me. But I can see and message in
conversations initiated after gurk-rs is linked.

I hope the situation will improve. But this client is much better than 
having no client at all.

Some hints:
- this is rust, so build with "MAKE_JOBS=8 make", or something.
- F1 shows the key bindings and they're not configurable
- gurk -v(vv) starts verbose mode writes to gurk.log

I have OK kn@ already.

One more?

Best regards,
Stefan


gurk-rs.tgz
Description: application/tar-gz