▲ 1 r/csharp

Equal precedence

I was wondering how would one properly implement equal precedence in an if-else statement, for logical AND and OR, when building an interpreter?

I have made my expression parser but i only store the next logical operator on the right most side and store the current being parsed on the left.

Repo

reddit.com
u/Excellent-Cow-9046 — 11 days ago
▲ 2 r/termux

Linking Error when compiling in C#

Context:

So when I tried to compile my project named AurSh in termux, I got this error after it compiled:

Linking Error after compiling

When I compiled it in proot, it worked fine but outside of proot not so much ,as It always gives that error.

Question:

Does anyone know why this happen? and is there a solution for this? so that my project wont have the dependency of having to install proot.

reddit.com
u/Excellent-Cow-9046 — 5 months ago

Ports in the front/top portion of my CPU stopped working

Context:

The USB and Audio ports in the front/top portion of my CPU has stopped working for some reason, but the back part works fine so I transferred my mouse, keyboard and speakers to the back side. I have to insert my USB's and Hard Drive in the back every time which is a bit of a inconvenience for me. For Context it was working well for about a 2 years, then out of nowhere they slowly stopped working which concerns me quite a bit. My CPU is well ventilated and I regularly clean it from time to time so dust doesn't accumulate inside.

Does anyone have any idea why this happens and how to prevent it?

reddit.com
u/Excellent-Cow-9046 — 5 months ago
▲ 5 r/CLI

Built a cross compatible frontend shell with .Net

AurSh Running in WSL Ubuntu

Context:

So I built a cross compatible front-end shell called AurSh in C# because of how cross platform C#'s .Net Core is. So I made it in C#, Originally I was suppose to build it in rust's ratatui. But I liked the OOP of C# better so I decided to go into that direction plus its very scalable that way.

It has a Unicode Tui execution viewport called blackbox where stdin/out of processes are redirected inside BlackBox. Except for processes that takeover the terminal with their own screen buffer.

What do ya'll think of its UI?

Repository: AurSh

reddit.com
u/Excellent-Cow-9046 — 5 months ago

Updated my Shell's UI interface

Context:

This is an Update to my previous Post, basically I updated AurSh's UI when it comes to executing processes, particularly in the output and input of a process launched in the command-line. Now its encapsulated in a Unicode box with round borders and its exit code at the bottom, and its title at the top left.

Windows

AurSh running in Windows Terminal

Linux:

AurSh running in WSL

Android (Termux):

AurSh running in Termux

Demo Video:

AurSh running on WSL

If you want to use the shell with the BlackBox, then go over to the BlackBox branch and clone it.

Repository: AurSh

reddit.com
u/Excellent-Cow-9046 — 5 months ago
▲ 0 r/csharp

Parallelizing ReadLine and ReadKey

Context:

I've been working on a project called Automaton, and I want to capture certain key combinations while typing input through Console.ReadLine(), specifically control keys such as Ctrl+C and Ctrl+D.

I tried using Console.ReadKey() alongside ReadLine(), but ran into issues.

Problem:

Console.ReadKey() blocks execution, and I want both input handling systems to work concurrently/in parallel.

So far, I haven't found a clean solution for this. Does anyone know a good approach to this?

reddit.com
u/Excellent-Cow-9046 — 5 months ago

I built a cross-platform shell in C#.

So I made Aursh which is a cross platform frontend shell, built around the .Net SDK to make the command-line somewhat aesthetically pleasing to interact with. Whilst focusing on user friendliness and the over all UI/UX of the shell.

AurSh uses the Operating Systems native commands, apps and installed packages. It also brings its own native built-ins to avoid reinventing the wheel. I did have some aid from AI along the way when I was developing this. It actually made the entire development faster, as I just needed to tweak and fix some of the errors and inefficient code it spits out.

AurSh has:

  • Plugin System with Lua or F# (aursh-plugin)
  • Syntax Highlighting
  • Auto-Suggestions and Ghost Texts
  • Pipable File reader and Text Editor with aursh-cat <-e : for text editor>
  • advanced tui ls with auto-cd (aursh-ls)
  • Scripting Capabilities with bash like syntax (.aur files) and Startup script (.aurc)

Windows:

Aursh Running on Windows in Terminal

Linux:

AurSh running on WSL

Android:

Aursh Running on Termux

Overall its just a hobby side project of mine. Its still in its early release version, more is yet to come.

Repo: AurSh

reddit.com
u/Excellent-Cow-9046 — 5 months ago