I wrote a toy. It's fun to play with, so I figured I'd share.
The idea is to define a bunch of rules, consisting of a regular expression and a composition of parts of the string matched. The language then tries to apply each rule to the input until no regexp matches it.
Not to overcrowd this post, a tutorial/specification: http://pastebin.com/A98krS5r
I've had (and fixed) some bugs in the language. Silly ones mostly. I can't promise there aren't more. If you find any, do report please.
I've been working on a terminal emulator in C# using Gtk# for the GUI. It's... getting there. I have a todo list at the top of Window.cs. The output you see in the GtkTextView is the actual output of whatever shell you run in it (it has a list of paths to try if you don't specify one). You won't be able to interact with the shell, though; if I enable standard input redirection then the program doesn't do anything.
The reason for it is that I don't like any of the terminal emulators I've been able to find on Windows and can't run gnome-terminal on Windows.
Note: sometimes the process won't die on its own when you close the window. On Windows it usually hangs around for a few seconds and then kills itself or gets killed by windows after crashing, but I don't know what will happen on Linux, so have a proper (read: working) terminal emulator open so you can send a SIGKILL :P
@chris, something is wrong. When I run it on WinXP, I get "Send error report" thing. When I "mono TTYSharp.exe" in my SUSE, "/bin/bash" is printed in the terminal and nothing happens. I'll try compiling myself..[edit]Forgot I don't have gtk#. Oh well.
If /bin/bash is printed then it means that the Terminal class was constructed and started /bin/bash in a new process. I think on Linux you will need to put the DLLs in the same directory as the .exe file and you'll also need dll.config files which I don't have. Installing Gtk# would fix that.
hamsterman wrote:
Oh, by the way, >:-(
What's that for? :(
---
In other news I've been writing a 32-bit protected mode OS. It doesn't work really because I need to fix a few things but it should compile and boot (you need a compiler toolchain capable of producing ELF files and a 386 emulator).
Anyway, why did you decide to use gtk? Is it more comfortable than win forms?
Several reasons:
1. I already knew how to use Gtk+
2. I don't think Windows Forms works on Mono (haven't bothered to check though)
3. I think Gtk is pretty
hamsterman wrote:
Thread hijack. I don't mind, really. It would be nice if this became a place where people post their projects.
Oops :/
I though that's what this thread was for. Sorry!