VAULT DWELLERS SERVED

Thursday, February 4, 2016

Protothreads

Was messing around with these last night. Didn't originally understand what I was doing when I looked at these last year. Was thinking about how evil threads are (been doing tons of coding with locking and mutexes) and wondering if my old polling model could be salvaged. Remember once you have solved a deadlock problem you have not solved all the deadlock problems. You have discovered your program can generate a deadlock condition in some situations. After that there will always be peculiar circumstances that can generate deadlocks somewhere in your code. If you pretend it is possible to fix all these situations you are faking it. It isn't. That's threads for you. If you're smart you think of a way to avoid using them except as a process in the OS that runs completely apart and is very loosely coupled to your app. It is the only safe way to expose your program to threading. Plenty of people think if you launch an app and it runs for a couple of months with threads no problem you win. Maybe you do in your context. In Vault-OS we lose if the program crashes in five years. Vault-OS is intended to never crash.

All of a sudden I just "got it." I realized what was happening with these things. Very exciting stuff. In addition to the fact you could definitely run a web server on these things you could also eliminate threads altogether in your design, meaning compiling Vault-OS on an Arduino or ARM board could become a snap.

Another thing. Having written a huge application with SQLite, not sure it was as useful as originally thought. If you could do co-synced threads or protothreads with a single flat file database system that supported in-memory tables, you might have a better option and it might be stabler long term. The journaling system is impressive in SQLite but the in-memory tables have to be shared for read-only amongst all your threads.

So imagine what sort of cross-platform simplicity you could reduce to if you went with the smaller alternatives :

SQLite = 670K + 400K SQL Handling Routines VS. Bullet ISAMic Key-stores with 38K and generic DB4 query system that is up to 1200% faster than SQLite for complex operations.

Pthreads or Winthreads = 470K .DLL (Sometimes larger for dependencies) VS.  30K Protothread library with no thread contention, fully cooperative task sequencing, safe polling for sockets and zero risk of thread contention also runs on all platforms with almost no headaches of any kind.

So the executable of the web server could start to come down drastically in size and maybe fit not just on a floppy but in REAL mode DOS 640K. That would be a real accomplishment. Right now it is getting pretty huge and also presents real problems in cross-platform compilation. I would rather have it compile anywhere on anything but be limited in features rather than be a 40 megabyte server when I have some machines sitting around that only have 64 megabytes (thin clients) to run anything on. For me personally, being able to run VOS on a thin client anywhere is a big plus because at $1.00 a pop on EBay they are the last word in cheap reconfigurable computing devices, perfect for the survivalist budget. You buy ten for terminals and one is modified to run the server, boom plug in a USB we're in operation.

The Sun Has Gone To Sleep


This is why they say we Neanderthals have "communication problems" with the humans.

I don't know how to say it any more simply. It doesn't matter because Saps has trouble following along no matter how you phrase it.

The Sun has gone dormant. No sun spots. Nothing to be scared of, this is the cyclic end of the Holocene. We should have another one just like the past 40,000 year cycle in another million years or so. Nothing to worry about, it is a natural cycle on this planet. Until then, the planet has gone back to normal ... which means cold. Neanderthal weather. This is the natural temperature on the planet ... well, actually it is still pretty warm. It ain't got "natural" yet ... but it is a barrel of monkeys if you are a Neanderthal. You really can't keep a Neanderthal interested at anything above 80 degrees below. It's just too muggy and humid above that. 80 degrees below is time to listen to chestnuts roaring on an open fire, it's Christmas every day for a million years after that.

I'm sorry if I am not communicating this idea simply enough. I can't make it any simpler.

The "Hu-Mans" (originally a Sumerian word that meant "A weakling sired for slavery by a serpent") just can't seem to understand reality. It's not their forte. You can't blame them, they act like they were designed to cart stones up the sides of pyramids with a whip at their backs and fight in games of war while Melonheads sat in the bleachers and threw slurpees at their generals for making bad decisions that cost them wagers.

Plausible Deniability

The U.S. is conducting a drill on days that terrorists strike and the drill is identical to the strike. The U.S. is afraid of a terrible plague at the same time it is spreading genetically modified mosquitos in the areas reporting plague cases from mosquitos.

See how that works?

Monday, February 1, 2016

You Gotta See This One


So fake it is mind boggling. Must see to believe.
I thought for sure this one had to be real. Nope. Now that I think about it, was clearly timed to intersect with policy. I just didn't think the Obamination would stoop this low.

Friday, January 29, 2016

Reporting Solution Found For Vault-OS


The HTML-to-PDF solution produces the most brilliant looking reports imaginable. Custom styles, formatting and layout are all faithful to the original. Sample output style above as example. It can be output with plain black and white or high contrast applied in the stylesheet.

I tried sending some of my inventory grids from the old VOS I had saved as HTML files except paginated lists to the PDF converter and they came out in the browser window correctly paginated for printing. I had always theorised this was possible and it is a fantastic way to generate a myriad of reports for the inventory manager, the shopping list, duty roster, radio contacts, inspection lists ... all as PDFs that can be viewed in the browser or sent to a printer. My 10 year old Compaq T5710 thin client that I purchased for $2 on EBay displays all of VOS correctly, including JQuery controls, Raphael vectors and has a built-in PDF viewer that comes installed. If the VOS server is running somewhere it is just plug-n-play and this box becomes a distributed terminal to control or monitor anything else in the shelter. My whole system is based on a few dollars for the lot if you can't find half of it thrown out somewhere.

There's a drawback and it is that you need a 20 megabyte open source PDF converter and accompanying 22 MB .DLL in the "bin" directory for all this to come off correctly. The Lua script that generates the reports as HTML calls the converter when it is done. It is easy to disable this feature and instead pop up the HTML in a new browser window which the user can then arrange to send to a freeware PDF printer or even send it directly to the printer if he thinks it will turn out looking okay.

The thing that bugs me about this approach is that it breaks my all-in-one .EXE superserver architecture by requiring a platform specific utility in the "bin" directory as well. It also adds a physical cache that needs automated management. (To delete old files on a regular basis and keep it from growing too big) This isn't too hard to implement, however. Most web servers do this. This open source converter comes with executable binaries compiled for almost all major OSes as well as all source code. It is totally portable.

Of course, I could just add a configuration flag that turns this process off and launches the HTML report in a browser window and leave it to the user to output the document however their local setup permits.

The reason I am telling Vault-Co readers all these details is that I am hoping somebody out there knows an even better way. For example ...

1. A much smaller HTML-to-PDF converter that either comes as a library or with source under a megabyte. Or a portable renderer that is an executable that takes up less space than 40+ MB.

2. Another way altogether to approach the problem ... like a report formatting tool that would plug into my former solution, LibHaru, with commands to draw tables, grids and layouts and then dump it into a PDF.

3. Another alternative like a way to build rich text files from a Lua script with tables or a Lua plug-in with some C code to render to some other document type that would be smaller and more efficient than what I am using, mostly important to compile it right in with what I have and return to my all-in-one total solution server that can do everything.

I may be making a fool out of myself but I just wonder if I throw a net out there somebody might have a better paradigm. Forty megabytes in the 'bin' directory is a little heavyweight compared with all the other code I have now.

ICBMs Are So Last Tuesday


The real power in the Third World War will come from hypersonic nuclear glider drones.

A cloud of red mercury nuclear cluster bomblets and then spray plutonium out the back for a couple of years until it finally crashes.

A proper vault is required for this war.

America continues to prepare for nuclear war in the 1960's. My former nation doesn't stand a ghost of a chance.

Zika Is Not Made By Nature

Outbreak occurred precisely where genetically engineered mosquitoes were released. 

Brilliant stuff by the NWO. It doesn't kill you. That might cause a panic. It effectively kills your kids. Extraordinary and subtle. These guys know how to fly under radar without being seen until it is right on top of you.

Fantastically stealthy ... most don't know they have it. Most won't until they have children. A pandemic that is so furtive it does not broadcast it's presence until everybody has got it.

If the next generation is all microcephalics, there won't be a generation after that. Very clever stuff.

The plague that creeps in and produces nasties like continuous fever and Guillain-Barre. Forever.

Kwanstainia, Land Of A Thousand ButtHurts

To know them is to despise them. If a Kwanstainian tells you it is raining outside, don't bother with your umbrella going to work today. Everything they say is the opposite of the truth. Good is evil. Bitter is sweet. Up is down. Truth is lies.

Give them kids more dope because it makes them better. Permanently. Now they are good yanks. Wait, what is the reason we giving them this crap again? I forgot.

I am sure if all that was true they would tell us about it. Needs more green screen. It's not trustworthy until it is photoshopped and contrast reversed. Everything.

Tuesday, January 26, 2016

LibHaru is a Wash

When push came to shove, embedded libharu with lua binding was a wash. I could not generate decent reports for it despite hours of work writing utility routines in Lua for it. I tried everything until I realised the library is just nothing but a collection of crude primitives that you can create a .PDF file with as a server stream. An impressive toy but under real use at work it fell apart.

My original idea for reporting was printing a report as a block formatted HTML paginated browser view and then figuring out how to send this to the printer or PDF. This means on thin clients it has to have a printer server connected or at least some kind of PDF server. There is a really good open source PDF server I switched to but it complicates reporting in Vault-OS which ideally was intended to be an all-in-one. The PDF has to run as a utility which the Lua executes with the HTML as an argument and then dumps it into a cache. This is my solution at work but I think I am going to hatch something else for Vault-OS. I may keep looking for a compact embeddable library that can stream to a web page but mainly converts HTML on the fly to .PDF where possible.

Any ideas from anyone else, seriously, much appreciated. Reporting in Vault-OS is a biggie. You have to be able to print out a shopping list to go the supermarket and top up your wishlist and expired or rotated list. It is really important functionality in a survivalist inventory manager. The barcoding solution I solved so elegantly it is beyond belief, also as an HTML trick to print barcode 39 straight from the browser. If anybody knows an embeddable solution in ANSI C I could compile directly into my code like LibHaru that outputs to .EPS, .PDF or LaTex and permits complex chart and table functionality with ease I would be really interested. Anything that once it is output can be displayed to the browser window directly or else sent to the printer. I know it sounds like a big ask and it is complicated but I have already turned so many huge problems into simple solutions with Vault-OS I know there is something out there that would work for this. The ideal solution would be to create a report as HTML and send it to .PDF like I am doing at present except this code would be compiled right into it. Incidentally I tried removing Libharu and the current build instantly shrunk from 2.1 megs to 1.28 megs, again small enough to fit on a floppy.

My solution for work requires a binary command utility to be present in the bin directory under the server, a good answer for my current requirements but a little too specific for Vault-OS. Any help from anyone will be much appreciated. Remember, ANSI C cross platform code is best. (I know this sounds ridiculously difficult to satisfy but somebody out there may know of another way of thinking about the problem of printing formatted reports altogether.)