VAULT DWELLERS SERVED

Friday, January 15, 2016

PicoTCP For DOS Released

TCP Stack with very small memory footprint for 16 bit DOS

Have not had a chance to look at it yet, apparently it is supposed to be smaller than Michael Brutman's amazing network code.

26 comments:

Sam said...

Interesting.

Red Programming Language, a updated REBOL, now can be used with a GUI. I think but I'm not sure it uses Rebols GUI. Here's a new page on it with programming examples and a compiled copy to use in the side bar.

http://redprogramming.com/Home.html

The DOS reference is what made me think of linking this. See the cross compilation for RED. I'm not sure how you'd compile it for DOS GUI work. The actual cross compile for DOS is just a key word. I think using this it would be very small and powerful.

https://github.com/red/red

Cross-compilation targets:

MSDOS : Windows, x86, console (+ GUI) applications
Windows : Windows, x86, GUI applications
Linux : GNU/Linux, x86
Linux-ARM : GNU/Linux, ARMv5, armel (soft-float)
RPi : GNU/Linux, ARMv5, armhf (hard-float)
Darwin : MacOSX Intel, console-only applications
Syllable : Syllable OS, x86
FreeBSD : FreeBSD, x86
Android : Android, ARMv5
Android-x86 : Android, x86


I'm telling you RED is going to be big. Especially because it's going to come in one little package that will do most of what the realms and realms and packages and packages of development tools are now used to do practically anything. You ought to do a little with this. Rebol can be used as a guide as RED has mostly the same syntax. I know most of the time people you work for choose their own language but maybe you could do some super fast freelance work and grind the stuff out with amazing speed using RED or Rebol.

Maybe it could be used in DOS although I'm not sure where the docs are for GUI DOS programming. May look around a little.

Texas Arcane said...

@Sam

Very, very interesting. Seriously.

I am now 80% through the slog of development on a V1.0 Vault-OS, so it would not be wise for me to switch to another development language and paradigm now.

It would be very interesting to see after I release VOS as open source if I could create a parallel system in RED. If it has networked support for DOS it would definitely be worth looking at. There are also other paradigms that need to be satisfied for a port.

One thing I have noticed while working on my current version - threads are evil. I finally got them running solid together but it was a lot of trouble. I bet the co-sync model of RED would be much better than debugging threads all the time. I also think a co-sync polling model for sockets and HTTP makes way more sense than threads for long term stability. I have written tons of code to permit file streaming and archiving in a multithreaded environment and I would rather have concentrated on the app instead of all this maintenance debugging.

Texas Arcane said...

@Sam

Wow. 100 lines complex HTTP web server for Rebol.

If I saw that thing running on DOS I'd be really impressed.

Texas Arcane said...

@Sam

Been having a look today at it. Actually downloaded the Mac version and have been running the examples and trying some snippets of code.

Really amazing, seriously. My current incarnation of VOS is compiling to 2 megs and it can't do all the things that two pages of code do for the web server.

I would like to investigate what is involved in communicating with embedded devices. Since the parallelism appears to be built in, the necessity of having daemon processes to support the hardware monitoring might be negligible. I am trying to find out what would be involved in hooking up to .DLLs etc like a CANBUS library.

Texas Arcane said...

@Sam

Found the DLL snippet. You are right, this thing is incredible.

Since the co-syncing of other executions can be controlled and shut down by a master program I don't think daemons would be the right approach if I wrote a version of VOS with it. It would be all-in-one and you could check boxes for the protocols you wanted the web server to monitor and it would run those scripts in the background.

Thanks for sending me these links, Sam, I really appreciate it. I also appreciated it a while back when you were getting me to look at it. With the new incarnation as "RED" it is obvious that this stuff is now clearly a serious competing technology for traditional languages. Stuff just happens quickly with it. I skipped over three months of work in C code getting custom AJAX web methods to work with JSON with just 12 lines of code. Very amazing. All that work and I got this for free and just used a modified snippet and all my work was duplicated. I had generic AJAX methods that make generic data requests that come back in rows with column names - I just found a REBOL snippet to do this same thing in a few lines.

This might have come at just the right time for me for a lot of different reasons, not the least of which is that I have now shared a lot of my intellectual property with my employer and cannot easily fork my source code back. What if I took all my paradigm ideas (they really do port well to anything) and reimplemented them in REBOL? Halftone work is really available in other people's code.

I could list all the other stuff I saw and how amazing it was - built-in SVG support ? Incredible, half of VOS is based on importing SVG diagrams and then displaying fragments with Raphael Javascript vector graphics. This was also intended for the mapping I have been meaning to build into it so VOS would not only be a standalone tile mapping geoserver it would not even use tiles - it would use vector graphics.

Texas Arcane said...

@Sam

... and native code compiles on all platforms? You gotta be kidding me, how do they fit all of that into the same executable? I cannot even fathom how brilliant the dudes working on this must be, they are giants. I would not even rate compared to programmers who could do this cross-platform.

Texas Arcane said...

@Sam

I will show you what was involved in writing out JSON to AJAX.

http://www.json.org/json.r

Here the guy points out the similarity in generic, untyped (or strongly typed with REBOL if desired) data and it is obvious REBOL is not only far superior to Javascript but it does conversions so easily they are natural companions for JSON communications. (Not only for web pages, either, but recently I have used JSON over web sockets with the exact same dispatching functions I use for web pages, very concise. Web sockets are supported in modern browsers but you don't need a browser to talk to them, a tiny postage stamp device can talk to a web socket with single call to the server to be issued a connection.)

Texas Arcane said...

@Sam

UPNP for Rebol sample in a page or two ...

http://www.rebol.org/view-script.r?script=upnp-igd.r

I still don't have this running at work. It is critical for self-discovery plug and play for other stations to find one another and list each other as destination URLs on the network. So an automatic list of VOS stations is supposed to be available, you click on one marked "GENERATOR ROOM" and now surf to the generator VOS server to control it.

Sam said...

First I'm not a smart programmer like you, or very smart at all, but I'm good at recognizing patterns and quality. I've looked at a lot of languages and nothing compares to ease and the super depth of Rebol. It's like FORTH jammed together with LISP but with PARSE (a big, big deal) it also acts like a normal language like C or FORTRAN. It can even be used in an objective programming way if you like to type a lot.

JSON comes from Rebol. He copied Rebol.

There's several Rebols
1. Original, Rebol, (R2)- I "think" that you should use it to play with. It doesn't have some newer stuff but it's fairly complete on older tech which is what you need for older computers. Unless you need characters other than English I think it will do most of what you want.
2. R3 This is the opened source version.
3.Saphirion R3-GUI This is the opened source version with a private company adding a few things. They use this for present work. Mostly for programmable controllers in factories. They do all their PLC control with Rebol. Understand they took the open sourced R3 (Rebol3)and then added a few things.
4. RED. Started before R3 was opened sourced. A very talented insider loved Rebol and saw it needed work. The inventor Carl Sassenrath (He did some or most of the original Amiga multitasking OS work)had ceased to work on Rebol consistently. Rebol needed what he's building. A language with almost the same syntax and operation as Rebol but with a system language, interpreter, High level language like HTML(thru PARSE),JIT-compiler and compiler all in one package all following the Rebol way. He's come a long way. It won't be done for a while but you can see it's usable. Some people are using the core system for production work now.
4. Now I'll really blow your mind. A guy "Hostile Fork" embedded Rebol R3 interpreter into "C" language. Also has one for C++. Called Ren C. Now I admit I can't quite fathom exactly what you do with this but it must be brilliant because a guy named "Hostile Fork" wrote it and he's a genius. I think he wrote the operating system Syllable also.


The people who thought up Rebol and are working on it and RED are serious heavyweight coders. Here's a links page for more data. It's on Nick's forum. He's super smart and can help if you get stuck. He wrote the first link I sent you on RED coding.

http://www.rebolforum.com/index.cgi?f=printtopic&topicnumber=49&archiveflag=new

A few hostile Fork links. Has some coverage of PARSE. PARSE is used to write Domain Specific Languages. PARSE is used in Rebol to write the compiler, linker and JIT-compiler and system code for RED (RED system serves the same function as a bare metal language like C code). Then RED will be rewritten with RED system to complete the package. Also look at H.F.'s REN which is an ???upgraded, simplified JSON...maybe???

http://blog.hostilefork.com/arity-of-rebol-red-functions/

http://blog.hostilefork.com/

ren-c

https://github.com/metaeducation/ren-c

PARSE

http://blog.hostilefork.com/why-rebol-red-parse-cool/

It's going to take years to sloff off the vile dreck that is programming today but you might be able to get a head start with Rebol and RED. It also might help you at work. Just don't tell anyone what you're doing. Just let them think you're some kind of programming God/Demon. You could do a lot of your work in RED, compile it and call it in some dreck of a language like JAVA or C.

Sam said...

I forgot a link. It's on the page of links I sent but I want to draw your attention to it. You're using the raphael javascript library here's a link to,

Building Mobile and Web Apps with jsLinb, Sigma Visual Builder, and Rebol Server Code

http://re-bol.com/jslinb/

This also might help you in using the raphael javascript library with Rebol as surely it links up the same way. Maybe a combo of the two libraries plus the PVBrowser driver lib. would do most of what you want.

While I'm at it here's a Database already written Rebol that comes in at 30Kb.

http://www.dobeash.com/rebdb.html

Will it work in RED??? Supposedly they're close but may need a few changes.

Here's a "minimalist, high-performance application interface" that uses the same low level commands as Rebol for the interface it just rewrites the middle level commands. It doesn't change Rebol in any way. It just uses the same lower level commands to display a little differently. Rebol has a graphics engine (Like Open GL) that draws lines, circles, or whatever, then a middle layer that handles all the drawn objects and lines it up and finally a DSL, (using PARSE), that is the commands to make the windows you use but you can change any part of the process. So this is sorta like a low level "skin" of the GUI.

http://www.dobeash.com/rebgui.html

Texas Arcane said...

@Sam

The version I have been looking at in RED seems full featured for an early version. It's got tons of samples and they all appear to work pretty well. Pretty sophisticated UI built-in, SVG display ... what I don't understand is that most of the libraries to do these things in open source are individually bigger than the entire RED binary - how did they cram all those features into it?

I would really like to see if RED runs on embedded Windows NT 6.0 because I have a lot of thin clients that run on that OS.

Sam said...

I think the reason Rebol and RED are so small is first Carl Sassenrath is a complete genius. He defines all types of of variables and they are all treated the same so he only has a small amount of repeating instructions. This also accounts for portability. Since there all just list then you only have to change the code for the way each processor handles these list with a few functions. The functions are few and all the larger part just builds on these small ones.

Won't Windows NT 6.0 run XP stuff? I would think so. Got to be some combination of RED or Rebol that will do so. You may have to piece something together or compile it Yourself to get it to work (Using R3) to compile.

My main worry about RED was that he plans on using the internal graphic GUI engines of the individual OS's for the GUI. BIG MISTAKE. Why? A bunch of people can do high level work but very few can do that kind of tying the lower View portion of RED to a OS's graphic GUI engine. I even tried to get him to use a standard like Canvas, or SVG or even the linux window manager enlightenment. I think I just pissed him off. I didn't mean too. He thought I was explaining to him how these things worked but that wasn't my point. I just want the GUI to be in a position that it can be maintained. My thinking was it would be easier to skin a maintained library to look like whatever needed than to maintain all these separate libraries that the OS manf. could change at any time. However I may have made a little difference because I notice that now it seems work is being done on a independent GUI. I'm not sure if it's the same VIEW/VID from Rebol or not but it's the basic idea of what I wanted. A fall back GUI that's always there. Of course he could have already have decided this well before I said anything but his documentation seemed to stress using the built in functions from each OS which stress. The basic problem is the kind of people who do brilliant work like tying together the layers of low level GUI to GUI libraries get bored. They might love to make the new bindings but they're not going to stick around and twiddle wit the thing every time the OS changes a little. And their work is probably going to be to difficult to understand for the average Joe. If however the GUI is tied to the language and then some one makes a GUI based skinner to alter it's appearance then any fool can diddle around with the way it looks to approximate the looks of any new OS look and feel.

Texas Arcane said...

@Sam

That makes me worry that he thinks moving to OS specific layer for the GUI is a good idea! It never is! The current UI built-in is amazingly complete and it looks great!

People have tried that before and it is always a mistake in design. Do you think if he does this he will still maintain the version with the cross-compiled UI? If that UI compiles on DOS too and looks the same on each platform it is a million times better than OS Layer to UI, I've seen this before and it never works out like you'd hope it would.

Texas Arcane said...

@Sam

Your average cross-platform UI like the one in RED usually chews up a minimum of 3/4s a megabyte on any platform if it is extensive and the one in RED is. So I cannot believe that UI is built-in with about ten other libraries that each usually end up a megabyte compiled. SVG support in the Antigrain Geometry engine compiles to 680K in DOS with Watcom so how did he get that in there, too? I would say the guy is a marvel to have quietly done this working alone.

Sam said...

Thinking a little more about this surely RED will run on Windows NT 6.0 because Rebol and RED use very little of an OSes functions. File operations and writing to a???window buffer???graphics map???I don't what???whatever is used to display but the underlying GUI and everything else is all in the language.

Not to say they can't use any OS functions but they don't need them.

Texas Arcane said...

@Sam

I don't have a chance to test it today but I would bet anything that the "Windows" layer in RED expects your standard Win 32 core that is present even in Windows 98. If it is compiled with MingW it normally runs on anything after Windows 95. Over the years M$ has added a lot to the original core but programs that assume that is all that they need to run will often run on any Win OS right through to 10.

If it runs on Windows NT embedded with zero install/admin that is beautiful you could simply burn it onto the ROM or flash disk with the installer itself. All-in-one is great for coming back on after an EMP attack, there is not much that can go wrong if that single file is not corrupted. This is why I have tried to compile it all into one big fat self-configuring binary executable now.

In my experience it is a lot cheaper to put some lightning arrestors on ethernet cables than it is to operate optical internet but if I have the money I will combine both.

Texas Arcane said...

@Sam

What would really be crazy is if you tried to merge RED with the code for HX-DOS extender and would have a single EXE that runs on DOS, Windows and Linux .... all in a single program! Whatever computer you could find would run your code!

Texas Arcane said...

@Sam

http://www.xaver.me/drdoswiki/index.php?n=Main.HX-DOS

Texas Arcane said...

@Sam

I have already used this guy's code, which was invaluable, for using pluggable modules in .DLL form even under DOS as a Causeway DOS-32 exe ... I have not done it at work but my goal was build .DLLs that the daemons only use Lua to hook up to and no binaries so the daemons port to other environments easily. (CANBUS works from the same .DLL under Windows or DOS-32)

http://www.nyangau.org/dll/dll.htm

Sam said...

If you're doing SVG then RED has GOT to be using the Rebol portion for graphics. It's calling Rebol functions. "...Do you think if he does this he will still maintain the version with the cross-compiled UI?..."

His documentation in the beginning said all GUI functions would be based on the OS libraries. I'm not sure if I had any influence on this or not but I bitched and moaned about it enough to piss him off. Though not meaning to...So now he has definitely stated that he will have a cross platform GUI tied in with the normal RED package. My thinking is that this was in the cards the whole time but all my, fairly unintelligent, moaning about it being a problem that would slowly cause bit rot "may", "might" have pushed it to where there was a little more priority put into the basic GUI that would always be available.

I'll bet you that if a decent GUI tied to the system is created and it can be manipulated to the look and feel of each OS then all that work of tying into the OS window functions will just whither away. After all who wants to do all that work if you have something that works now?

As for speed if the primitives can be lined up with Open GL (in the view subsystem)then you've got the speed licked. I think most every OS has Open GL and every video card has drivers already. The key would be to have lower level drawing functions not stray to far from those of Open GL. If you think about it how hard could that be? Open GL and all these libraries are just a bunch of lines and circles and basic stuff like that. Just like AGG. Now am I bright enough to know how to tie this together? No. Maybe with a several years effort I could but I'm just not that smart. I guess I'm just smart enough to understand the basics and how they "might" be fit together and maybe I'm wrong about that as the stupid very often don't know how stupid they are and I could be falling into exactly that trap.

cont.

Sam said...

cont.

What I'm talking about is exactly like the EGL library,

https://en.wikipedia.org/wiki/EGL_%28API%29

If you look at the bottom of the page each operating system has the equivalent of EGL that links to OpenGL. You would have a RED written EGL. Maybe just copy it function for function but use RED instead of C. Then it would have a accelerated GUI on any platform which has OpenGL. Which seems to be about all of them that matter. So if you didn't have OpenGL libraries you could use the internal RED GUI. If you did it would use the accelerated OpenGL to do exactly the same thing line for line but with the OpenGL lib.

I don't know how he did this. He's just super smart and has been at this sort of OS and GUI work for years. He worked on the Amiga and did some stuff for Apple. He must not be using all of the AGG library. Maybe just the SVG section. Cause I don't see how he could fit it all in. Carl Sassenrath is the guy who did all this stuff. RED just builds on what he started. Maybe he's got this stuff compressed in the .exe.

There's a video of Carl somewhere where he uses Rebol to tie into the X10 automated home controller. Might interest you. He wanted to control some pumps he had or something. The codes available also.

Another aside. Carl also came up with the whole entire Web OS that we do now with tons of libraries and crude and nonsense over a decade ago. REBOL Internet Operating System: (IOS). All the stuff that's done now he did in a small little package. Every damn bit of it. I think he was just so far ahead of his time people never grasped what he was doing.

http://www.rebol.com/ios/ios-intro.html

I've often wondered if you couldn't hollow out all these bastards code from the inside. Say you had something like RED. Say you added a big Graphics system, big for RED, of say 2MB. Then to finish them off add a so called message passing system. Actually the message passing system would be a RED written "Plan 9" OS. A quote "... (According to a 2006 count, the kernel[speaking of the Plan 9 kernel] was then some 150,000 lines, but this was compared against more than 4.8 million in Linux.[20]..."

https://en.wikipedia.org/wiki/Plan_9_from_Bell_Labs

So then you have the whole damn OS, GUI, SVG, networking, tools, and the kitchen sink in maybe 5MB. Add another 50MB for all the basic programs. Slowly cut the ground out from under then with the tools they use. Devious huh!

The HX DOS Extender. I didn't even know there was such a thing??? Does it work like a BOCH or VirtualBox? Converting the program commands to 16 bit?

Thanks for the DLL link. I understand DLL's. I understand that registers in the CPU pass indirect addresses so that the program doesn't have to know where the actual location of the memory DATA/Program is. What I have never understood is just how does the program get loaded into the registers to run? How does message/DATA passing between Dll's get passed? Somewhere there's a system that when you send info to a dll it gets passed back to you but I don't know how that happens. I also don't know how you find the dll in the first place. I know there's a common area in, say Windows, for dll's but how do you ask for it, load it, pass info to it??? I also don't know how you can call say a DOS or Linux command line progran and pass it commands or retrieve the results. It would be nice as then you could make GUI's for command line programs. I'm not lazy and have looked a lot for this info and there's no clear answer that I've found. RED would be great for making little GUI programs to test and play with libraries.

Sam said...

I didn't read all the dll link you sent me before I sent the last post. No wonder I've never seen an easy simple way to work will dll's. There's not one. Thanks for this link it so far the best explanation I've ever seen.

A lot of the computer infrastructure we depend on to live is held together with spit, paper and chewing gum. Maybe a little glue and tar-paper here and there so it doesn't fly apart. It's depressing how awful it is.

Texas Arcane said...

@Sam

I did some programming with Plan 9. It aspired to be this but it was never this. It was not good architecture but the idea was pretty ambitious. I was originally thinking of forking it and trying to do something with it, I am glad I did not waste my time on it.

You're right, the stuff looks shabby for 2016. Really shabby. You'd think Microsoft had been asleep for ten years.

Some people like Jim Penman would say the West is clearly running out of magic go-juice. More and more people are being born who just do not show the enthusiasm to power the kind of innovation that drove society from 1905 to 1995. Whatever that magic stuff is, they don't have it. I think things should have moved in the direction these REBOL guys have gone in.

Texas Arcane said...

@Sam

The HX-DOS extender can run a Windows application in DOS. It can run in DOS without any Windows installed for the kind of programs that would run on NT/98 era. Or it can just run in DOS 32-bit. It can also run in Linux either as a windows app or just a DOS app. The hardware it looks for is elemental VESA/packet driver etc.

Texas Arcane said...

@Sam

This is the real reason I want to see if it works on NT. Like FreeDOS, I would like to give away a bootable, self-installing EXE that just writes the operating system and VOS together and then starts it all. Apocalypse backup that runs on any computer with reasonably recognisable hardware.

https://www.reactos.org

Sam said...

I've got a copy of reactOS.

I'm surprised that you don't like Plan9. It seems to be the perfect thing to me. Maybe they got a little off track with three button mouse thing but the basics seem to be bulletproof. My thoughts were it had a funky GUI, like Rebol, and that just turned people off. That combined with lack of drivers for cards and stuff. Maybe I misjudged.

I guess you can tell I like small, simple, orderly things that work without a lot of magic, wonk, kludges tying them together.

"...Jim Penman would say the West is clearly running out of magic go-juice..."

I want you to think about something another guy wrote. He tracked "research and development" dollars spent and they perfectly track the great progress the US had in the 50's and 60's. So maybe the real foundation is we spent more on innovation and so we got it. No complicated generations, seasons, dumbing down, empire timing or whatever. We got what we paid for. Now why we didn't keep it up? Another question where all the generations, seasons, etc. might come into play.

Notice the longest living Empire of all time, the Byzantine Empire, VERY HEAVILY regulated the Jews. Hmm... It would seem the most important thing the US should do, top priority, would be to find out what the Byzantine Empire did and just copy it.

Look at what the Chinese are doing. They're spending a huge, massive, shit storm of money on research, infrastructure, etc. Guess where RED is being developed? China by a Frenchman. They gave him money to develop something the US just ignored in their back yard. Same story with molten salt reactors. MSR are the KEY to plentiful, cheap energy,(excluding fusion). The leader of Chinas son came to Oak Ridge where we developed MSR and copied every damn paper we had.

I think it's very likely that Trump will win if he's not killed. I'm very hopeful but can't get over the thought in the back of my mind that it's just a huge farce. A big, last knife in the back where he gets in office and fucks the US real hard. That being said what's the alternative? Jeb? That waste of fetal tissue. Hillary? That vile focus of concentrated evil. Hillary's got to be a psychopath. Look at the way she laughs. She has no soul. Her face betrays her. She just opens her eyes wide in a copy of laughing but the rest of her face is dead. I'm thinking that with the revolt of the masses happening it might vastly reduce the chances of nuclear war. If the Jews keep power in the US it's all over though. They're going to have to make a move soon. They've stolen just about every dollar the US has. If some honest folks get in office they might be finding a way to claw some of that back.

You know we created the FED we could tax it 5000% and take it over. Get back the loot. The gov. givith the gov. can take away.

www.000webhost.com