www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Help with testing my cross-platform library

reply Vladimirs Nordholm <v vladde.net> writes:
Hello.

I am working on a cross-platform terminal manipulation library, 
and I need help finding differences between platforms. Different 
operating systems and different emulators all work slightly 
differently.

My idea is that you, the reader, clone my project and run an 
example file with your favorite terminal emulator. The library 
also detects input, so press a button or two with modifier keys 
like ctrl, shift, etc. After this, you send me a screenshot of 
what your terminal looks like along with which operating system 
and terminal emulator you use, and I will be forever grateful. 
Either reply with a link to a screenshot, or email me at 
v( )vladde.net .

So far I am only trying to identify any differences. I have a few 
setups to test on, and I'll provide some images of what I am 
looking for:

- Windows 10, CMD.exe: 
https://public.vladde.net/scone-feedback-windows-cmd.png
- Windows 10, Windows Terminal+Powershell: 
https://public.vladde.net/scone-feedback-windows-windows_terminal-powershell.png
- GitHub Codespace, integrated terminal: 
https://public.vladde.net/scone-feedback-github-codespace.png

If you want to help me, please run the following commands. I've 
tried to make it as seamless as possible to get the test program 
up and running (requires git, dmd, and dub).


git clone https://github.com/vladdeSV/scone
cd scone
cp misc/test.d source/main.d
dub


git.exe clone https://github.com/vladdeSV/scone
cd scone
copy misc\test.d source\main.d
dub.exe


This would be very valuable for me, and I really hope you find 
this easy enough to try out and help me.

Best regards,
Vladimirs Nordholm
Nov 07 2020
next sibling parent reply Adam D. Ruppe <destructionator gmail.com> writes:
You don't handle combinations of modifiers right in xterm

right = ok
shift right = ok
ctrl right = ok
ctrl + shift + right = "c, shift pressed". obviously wrong.
ctrl + alt + riht = same


The modifiers are kinda insane the way the work. See line 
3291(ish) of my terminal.d for `mod_switch` where I handle it...
Nov 07 2020
parent Vladimirs Nordholm <v vladde.net> writes:
On Saturday, 7 November 2020 at 18:49:56 UTC, Adam D. Ruppe wrote:
 You don't handle combinations of modifiers right in xterm

 right = ok
 shift right = ok
 ctrl right = ok
 ctrl + shift + right = "c, shift pressed". obviously wrong.
 ctrl + alt + riht = same


 The modifiers are kinda insane the way the work. See line 
 3291(ish) of my terminal.d for `mod_switch` where I handle it...
Yes, that is correct. I have had problems with multiple modifier keys on POSIX, and as of now it only detects the last modifier key (I think). I'll take a look at your code. Thanks!
Nov 07 2020
prev sibling next sibling parent reply Guillaume Piolat <first.name guess.com> writes:
On Saturday, 7 November 2020 at 18:37:15 UTC, Vladimirs Nordholm 
wrote:
 So far I am only trying to identify any differences. I have a 
 few setups to test on, and I'll provide some images of what I 
 am looking for:

 - Windows 10, CMD.exe: 
 https://public.vladde.net/scone-feedback-windows-cmd.png
I tested that combination, and got the same result, apart from "shift pressed". https://imgur.com/a/UZFI0XY I was pressing left-shift and "got cast(SCK)11" instead
Nov 08 2020
parent Vladimirs Nordholm <v vladde.net> writes:
On Sunday, 8 November 2020 at 08:17:12 UTC, Guillaume Piolat 
wrote:
 On Saturday, 7 November 2020 at 18:37:15 UTC, Vladimirs 
 Nordholm wrote:
 So far I am only trying to identify any differences. I have a 
 few setups to test on, and I'll provide some images of what I 
 am looking for:

 - Windows 10, CMD.exe: 
 https://public.vladde.net/scone-feedback-windows-cmd.png
I tested that combination, and got the same result, apart from "shift pressed". https://imgur.com/a/UZFI0XY I was pressing left-shift and "got cast(SCK)11" instead
Thanks. The control keys are a bit janky, and in this case it only prints an enum. In your case, it detected the control keys shift, numlock, and capslock I think. (https://github.com/vladdeSV/scone/blob/develop/source/scone/input/scone_control_key.d) Printing the enum isn't really how the library is intended to be used ordinarily, but it works for now :)
Nov 08 2020
prev sibling parent reply Jacob Carlborg <doob me.com> writes:
On 2020-11-07 19:37, Vladimirs Nordholm wrote:

 I am working on a cross-platform terminal manipulation library, and I 
 need help finding differences between platforms. Different operating 
 systems and different emulators all work slightly differently.
I recommend you setup a couple of virtual machines to test different platforms. It's free and easy to do for most platforms, except macOS. -- /Jacob Carlborg
Nov 08 2020
next sibling parent reply random <frederick.mueller existiert.net> writes:
On Sunday, 8 November 2020 at 16:20:28 UTC, Jacob Carlborg wrote:
 I recommend you setup a couple of virtual machines to test 
 different platforms. It's free and easy to do for most 
 platforms, except macOS.
Try this for macOS: https://github.com/foxlet/macOS-Simple-KVM It's brain dead easy. I wasted a day setting it up manually in virtualbox and found this the day after^^
Nov 08 2020
next sibling parent random <frederick.mueller existiert.net> writes:
On Sunday, 8 November 2020 at 21:27:50 UTC, random wrote:

PS:
You can even create and use an apple id with it.

Also notice that you would violate apple's licence if you would 
do this with non apple hardware ;)
Nov 08 2020
prev sibling parent reply Vladimirs Nordholm <v vladde.net> writes:
On Sunday, 8 November 2020 at 21:27:50 UTC, random wrote:
 On Sunday, 8 November 2020 at 16:20:28 UTC, Jacob Carlborg 
 wrote:
 I recommend you setup a couple of virtual machines to test 
 different platforms. It's free and easy to do for most 
 platforms, except macOS.
Try this for macOS: https://github.com/foxlet/macOS-Simple-KVM It's brain dead easy. I wasted a day setting it up manually in virtualbox and found this the day after^^
Interesting. Will take a look at it. Thanks.
Nov 09 2020
parent Jacob Carlborg <doob me.com> writes:
On Monday, 9 November 2020 at 12:34:09 UTC, Vladimirs Nordholm 
wrote:

 Try this for macOS:

 https://github.com/foxlet/macOS-Simple-KVM

 It's brain dead easy. I wasted a day setting it up manually in 
 virtualbox and found this the day after^^
Interesting. Will take a look at it. Thanks.
There's a macOS translation layer for Linux [1] available as well. Same idea as Wine. [1] https://darlinghq.org -- /Jacob Carlborg
Nov 10 2020
prev sibling parent reply Vladimirs Nordholm <v vladde.net> writes:
On Sunday, 8 November 2020 at 16:20:28 UTC, Jacob Carlborg wrote:
 On 2020-11-07 19:37, Vladimirs Nordholm wrote:

 I am working on a cross-platform terminal manipulation 
 library, and I need help finding differences between 
 platforms. Different operating systems and different emulators 
 all work slightly differently.
I recommend you setup a couple of virtual machines to test different platforms. It's free and easy to do for most platforms, except macOS.
Yeah, that might be the way to go. Thanks for the recommendation.
Nov 09 2020
parent reply Jacob Carlborg <doob me.com> writes:
On 2020-11-09 13:31, Vladimirs Nordholm wrote:

 Yeah, that might be the way to go. Thanks for the recommendation.
And I recommend using any of the public CI services, like GitHub Actions. This allows to run unit tests on all supported platforms (currently: Linux, Windows and macOS) on every push. Although it doesn't help when one needs to visual inspect a UI (technically it can, if you have the right tools to take screenshots and/or video recordings of the UI). -- /Jacob Carlborg
Nov 10 2020
parent Vladimirs Nordholm <v vladde.net> writes:
On Wednesday, 11 November 2020 at 06:26:02 UTC, Jacob Carlborg 
wrote:
 And I recommend using any of the public CI services, like 
 GitHub Actions. This allows to run unit tests on all supported 
 platforms (currently: Linux, Windows and macOS) on every push.
I am currently doing exactly that!
 Although it doesn't help when one needs to visual inspect a UI 
 (technically it can, if you have the right tools to take 
 screenshots and/or video recordings of the UI).
This is the big issue. I don't know how I would approach this issue.
Nov 11 2020