4

I'm so fucking done 😔

consoleapi on windows and control codes + termios on linux

But what about ansi terminals on windows :(
I can't find a good way to interface with them, termios obviously won't work

My brain hurts so much but I cannot have another failed project. Fucking obsolete bodged together amateur software 😔

Comments
  • 0
    why not target unix first, then work on a windows solution later?
  • 1
    @jesustricks Well the whole idea is finally making a terminal library with complete cross platform support that works everywhere. Else I might just aswell use ncurses
  • 0
    @12bitfloat oh I see, which lang?
  • 0
  • 1
    ok
    are you writing two implementations with the same interface or a single implementation with platform specific behaviours?
  • 0
    @jesustricks One interface with platform drivers implemented via trait objects
  • 0
    @12bitfloat cool,

    i think if i had to learn about platform behaviour, i would first write experiments in the lang i'm most proficient with until i feel confident about the solution

    then i'd rewrite in rust when most of that headache is figured out.

    a couple of reasons for this is because a lot of langs have easier to use debuggers, or faster compile/vm boot up times than rust's compiler.

    this makes the platform learning process easier.

    also, how much unit testing/integration testing are you writing?
  • 0
    @jesustricks Rusts compile times and debugger are pretty good in my experience. The harded part is knowing the right functions/libraries. Although I have an idea for ansi terminals on windows

    Sadly integration testing is basically impossible for this. Not only because it would have to be run on every operating systems but even worse, whether a terminal is compliant can realistically only be verified by a human
  • 0
    @12bitfloat I would imagine integration tests to be hard to write but possible for some scenarios.

    you do are writing unit tests though right?
  • 0
    @jesustricks Very likely. First step is figuring out the fundamentals, though
  • 1
    @12bitfloat

    I'm not sure...but maybe that helps?

    https://docs.microsoft.com/en-us/...

    What part exactly pains you?

    FFI, behaviour, design,...?
  • 0
    @IntrusionCM Windows and linux both work, but I also want to support git bash which is basically just a msys2 terminal. So I need to have a windows binary that calls linux code within cygwin
  • 0
    @12bitfloat

    Okaaaaaaaaaaaaaaayyy....

    Nope. *giggle*

    I think I know what u want to do but there is a severe mixup in language.

    What cygwin does is basically providing POSIX system calls.

    That allows compilation of bash or other POSIX compatible software in Windows.

    And that is the difference between MSys and Cygwin too - MSys provides "minimal" environment, Cygwin POSIX compatible environment.

    When I interpret your Intention correctly, you need two code path's:

    1. POSIX terminal Interface
    2. Windows console Interface

    Right?
  • 0
    @IntrusionCM Basically. But I need a linux posix and a cygwin posix implementation. That's the problem: My lib will be statically linked into a windows binary but I somehow need to communicate with the cygwin libraries that the mintty terminal that started the program is running on
Add Comment