Virtual ANS is a software simulator of the unique Russian synthesizer ANS - photoelectronic microtonal/spectral musical instrument created by Russian engineer Evgeny Murzin from 1938 to 1958
Using the television as their primary tool, very-high-level marketers have managed to create a nation of people who typically:
work almost all the time
absorb several hours of advertising every night, in their own homes
are tired and unhealthy and vaguely dissatisfied with their lives
respond to boredom, dissatisfaction, or anxiety only by buying and consuming things
have disposable income but can’t find a more fulfilling line of work without losing their health insurance
create health problems for themselves, which can be treated with drugs they can “ask their doctor about”
own far more items than they use, and believe they don’t have enough
are easily distracted from the unhealthy state of their lives and their culture by breaking news and celebrity gossip
perpetually convince themselves it is not the right time to make major lifestyle changes
happily buy stuff that breaks within a year, and which nobody knows how to fix
have learned, through the media’s culture of blame-mongering, that the key to solving public and private issues is to find the right people to hate
You'd need a minimal "monitor" to start with — something that would let you enter in some binary code on an input device and jump to it. Here's a C version that lets you enter code in octal:
typedef void (*function)();
char program[32];
int main() {
char *t = program;
unsigned i, n;
for (;;) {
for (i = 3; i; i--) {
n = getch() - '0';
if (n > 7) (*(function)program)();
*t = *t * 8 + n;
}
t++;
}
}
Translate that into 8086 machine code with a BIOS call for `getch()`, put it on the boot sector of the floppy, and you're golden. GCC compiles it into 12 instructions, plus the function prologue for `main()`. I think that would be 32 bytes in 16-bit mode. (Maybe the BIOS call would push it a couple of bytes over.) (I don't actually remember if the alt-keypad thing that lets you type arbitrary bytes is in the BIOS. If so, you could probably simplify the minimal monitor program above by removing the loop.)
Traditionally a monitor like this was first built into the hardware, and a little later as software in ROM. If you want to use it for more than a very short period of time, it needs at least a few more features:
- the ability to correct keyboard errors;
- the ability to see what you're typing (or does the BIOS have a call for `getche`?);
- the ability to display the contents of memory;
- the ability to change the address at which new bytes will be put into memory;
- the ability to install themselves at some interrupt vector so that you can return to them when your program hits an infinite loop;
So your first task would be to write a more full-featured monitor program, on paper if possible — otherwise carve it into the desk surface with some removed part of the computer — and then *very carefully* type it in. Your second version, with a backspace, might be 40 bytes or so; you now need to type in 120 octal digits without making a single error, followed by some character that isn't an octal digit. If you do this correctly, you are rewarded by seeing your new program come to life!
Your next task is to enhance your monitor program to be truly usable, by adding the rest of the features listed above. And then you want to find a way to write it to the floppy drive.
At this point you are hoping that this is a 5¼" floppy drive so you can cut a couple of holes to make the disk into a "flippy": there's a substantial chance you're going to make a mistake and screw up writing your first boot sector, and if you do that, you're out of luck for the rest of your prison term.
So you write a call to the BIOS disk I/O routine, use it to write your new monitor program to the disk (hopefully on the back side of the disk), hold your breath, and test it.
Now you write another disk I/O routine that checks its argument to make sure it's not writing to the boot sector (or the original boot sector, which is at a different apparent location with the disk backwards) and start your system in earnest.
Edit: fixed two bugs in initial monitor code. Man, I would be so fucked if I were really in this situation.
The Assembler
===========
Your next task is to write an assembler, in memory, using your monitor. It doesn't have to be a fancy assembler with luxuries like multi-character mnemonics, the full instruction set, and stuff like that; it just needs to be an improvement over typing in x86 code in octal. Single-letter case-sensitive mnemonics for 25 or 30 opcodes, plus the ability to calculate jump offsets, are probably plenty to get to the next step. Save your assembler to the floppy in an unused sector. (You should be keeping a map of what's in what sectors, carved into the desk if necessary.)
This is also about the time you want to enhance your monitor program to show you the contents of registers and to be able to single-step.
At this point you have achieved your original goal of being able to implement Tetris or Freecell. The next step after here is roughly as hard as implementing one of these games in this impoverished assembler, so it isn't practical merely as a step toward that goal. But if you want to get to an operating system with a graphical user interface, read on.
A Low-Level Language: Forth
======================
Your next task is to bring up some kind of Forth, using your assembler. You can implement the basic primitives for a fairly reasonable Forth in about 200 instructions and 400 bytes of machine code, but that doesn't give you a text interpreter; that's another few hundred instructions. You can test each routine from your monitor program as you write it. (I have an [incomplete token-threaded Forth](http://github.com/kragen/tokthr) in 399 bytes of machine code, and a [complete self-compiling Forth compiler](http://github.com/kragen/stoneknifeforth) in 66 lines of code.)
Now you want to enhance your monitor program once more: you'll only be using it at boot time from now on, so you add a command to load and run a sector from elsewhere on the disk, so you can reboot more easily. You're going to be rebooting a lot, because every time you write a program that overwrites the wrong parts of memory, the machine is going to crash.
So at this point you've written somewhere around a thousand lines of code, which sounds like you ought to be able to do it in a day or two, but if you're like me, it's probably really more like two weeks because of the amount of effort involved in figuring out what went wrong each time you have a bug. And you're on the verge of having a usable programming environment: Forth has replaced your primitive assembler and monitor as your user interface of choice, you it can pretty easily be extended to loading programs from parts of the floppy disk, and now you probably want to implement some kind of minimal filesystem so that you don't accidentally overwrite your Forth operating system. It doesn't have to support fancy features like files that aren't contiguous on disk, files whose length isn't an exact number of sectors, nonsequential access, altering existing files, or multiple directories. It just has to keep you from accidentally overwriting data you meant to keep.
Now you probably want to write some utility programs: something to delete a file, something to defrag the disk, something to make a copy of a file, something to list the files on the disk, something to make a new version of a file. Also, you're probably becoming frustrated with waiting for the floppy disk to read and write data, so you probably want to implement LZW and huffman coding so that you can compress your files for speed. Also, you're going to have a hard time fitting the source code for an OS with a full-featured GUI on a single floppy disk without compressing it.
You can also very easily write a much more full-featured assembler now as a Forth vocabulary. Implementing your assembler as a Forth vocabulary magically gives your assembler macros and compile-time evaluation. You probably also want to write a disassembler now for debugging purposes.
You probably want a text editor now, with features like insert and delete, instead of poking strings of bytes into memory locations that contain your source code.
Protected Mode and a Memory-Safe Language
==================================
By this time, you probably want to be in 32-bit protected mode, unless the machine is so old that it doesn't support it or doesn't have more than a few hundred K of memory. Programming the x86 in 16-bit real mode is a pain; you have these constant tradeoffs between performance and imposing arbitrary limitations on data structure size.
The downside of this is that all the machine code you've written up to now won't work any more. Hopefully you can alter your Forth assembler to generate 32-bit code, and generate a 32-bit version of your Forth from a Forth version of its source code.
Your next problem is probably to implement a memory-safe language, so you can stop spending so much time tracking down pointer errors. This is probably easier to do by implementing a dynamically-typed language like Lua than by implementing a statically-typed language that's advanced enough to be pleasant to use like OCaml. You might be able to do this by implementing a memory-safe vocabulary in Forth, but I've never heard of anyone doing this.
Alternatively, you could implement fancier syntax for an unsafe low-level language first, in the manner of C. You probably want to use [PEGS](http://github.com/kragen/peg-bootstrap "parsing expression grammars"), because you can implement a parser generator for those in under a hundred lines of code, and they're roughly as powerful for commonly-used languages as LALR parsers.
Given the constraint of a single floppy disk, you probably want to compile all of this stuff into memory from a minimal bootstrapping interpreter at boot time, rather than compiling source code and storing the compiled results. (I'm assuming you have several times as much memory as floppy-disk space.)
Graphics
======
At this point you want to do graphics. Set the graphics mode to 640×480×16 via the BIOS, implement some graphics primitives by writing to the frame buffer, interface to the mouse so you can point at stuff on the screen easily, copy the font out of the VGA ROM, and implement a simple windowing system, a graphical text editor, and your games.
How does that sound? Remember the Macintosh guys did this stuff, without having seen it done before, on a 128kiB machine, mostly in assembly, in 1977–1983.
Postscript three years later
======================
Apparently this comment ended up at the top of /r/bestof today, so I guess I should link to the other stuff since then that's relevant: In 2011, I wrote a post about [bootstrapping from COPY CON](http://lists.canonical.org/pipermail/kragen-hacks/2011-April/000519.html), with some of these stages actually written in assembly and tested in DOSbox; Dave Long thoroughly one-upped that with [bootstrapping from ECHO](http://lists.canonical.org/pipermail/kragen-discuss/2011-April/001156.html), and found Greg Alt's [scheme-from-scratch](http://code.google.com/p/scheme-from-scratch/); later I tried [bootstrapping an interactive text editor starting from a noninteractive Lua interpreter](http://lists.canonical.org/pipermail/kragen-discuss/2011-June/001168.html), and then this year, Dave wrote a ["tweetable" "symbolic" hex COM loader](http://lists.canonical.org/pipermail/kragen-discuss/2012-May/001234.html), which is sort of like an assembler without mnemonics, in 140 bytes of machine code.
If you're interested in participating in the blog-like mailing lists where I post that kind of stuff, check out the [subscription page](http://lists.canonical.org/mailman/listinfo/).
Freeverb3 is a sound processing library, which includes sampling rate scaling enabled version of freeverb with some fixes, extended implementation of NReverb by CCRMA, implementation of impulse response convolution reverb, FIR filter constructor, band splitter, softknee/hardknee compressor, softknee/hardknee limiter, stereo enhancer and many other filter and effects.
Classic Shell is a collection of features that were available in older versions of Windows but were later removed. It has a customizable Start menu and Start button for Windows 7 and Windows 8, it adds a toolbar for Windows Explorer and supports a variety of smaller features.
Reid Supply serves manufacturers and businesses with easy sourcing of knobs, handles, hand wheels, clamps, tooling components, fasteners, hardware and much more...
float FastInvSqrt(float x) {
float xhalf = 0.5f * x;
int i = *(int*)&x; // evil floating point bit level hacking
i = 0x5f3759df - (i >> 1); // what the fuck?
x = *(float*)&i;
x = x*(1.5f-(xhalf*x*x));
return x;
}
- Wireless tethered shooting – attach a Wifi dongle to the USB port, so I can transmit pictures to a PC or tablet PC as I’m shooting.
- Attach a USB memory key or hard drive so I can back up the images on the camera.
- Remote control the camera using a PC, tablet PC or smartphone (from anywhere in the world).
- Intervalometer – take a picture every few seconds for those high-speed sunset sequences, including exposure adjustment as you go.
- On-the-fly image conversion for faster previews on remote display device (iPad, etc).
- Add a small LCD display to give status, allow user input via buttons, etc.
- Trigger camera via shutter release port, also allows waking up of sleeping camera, which cant be done via USB.
Miskatonic Books is an online retailer that focuses on classic horror fiction, Gothic ghost stories, dark fantasy, supernatural fiction and nonfiction, esoteric, philosophy, mythology, folklore, religion and generally anything weird and interesting. We carry many of the classic writers in the genre including: H. P. Lovecraft, Robert E. Howard, Arthur Machen, Clark Ashton Smith, Robert Bloch and many others. We also stock many modern authors influenced by these classic writers such as Laird Barron, W. H. Pugmire, S. T. Joshi, Thomas Ligotti, Jeffrey Thomas and many more.
Codex Seraphinianus, originally published in 1981, is an illustrated encyclopedia of an imaginary world, created by the Italian artist, architect and industrial designer Luigi Serafini during thirty months, from 1976 to 1978
JONO is a software musical instrument inspired by modular synthesizers.
By providing a mixture of classical and experimental elements it can serve as an interesting addition to your setup or as a standalone tool.
RequireJS is a JavaScript file and module loader. It is optimized for in-browser use, but it can be used in other JavaScript environments, like Rhino and Node. Using a modular script loader like RequireJS will improve the speed and quality of your code.
This paper describes how evolutionary techniques of variation and selection can be used to create complex simulated structures, textures, and motions for use in computer graphics and animation.
libcaca is a graphics library that outputs text instead of pixels, so that it can work on older video cards or text terminals. It is not unlike the famous AAlib library, with the following improvements:
Welcome to the heart of FEMCI online. The Book is an online library of useful information regarding finite element analysis, such as How-To's and engineering theory.
Restoring from Time Machine
With a sparsebundle
With a network mount of a drive with Backups.backupdb
Backing up Time Machine over the Network
Checking your Time Machine sparsebundle
Full Restore from Time Machine Network Share
remote backup access
pv gives you a progress bar for your task, based on either the number of bytes it's seen, or the number of newline characters that have come through. It can show you an ETA based on the information it's seen. It can even show you the current rate of throughput, and/or the average rate of throughput.
To all of the mac/linux/bsd users here:
Put this in a shell script, and add it to cron, run it once a minute or so.
if wget http://myserver.com/sshreverse; then ssh -R 2900:localhost:22 User@myserver.com; fi
If your box is ever stolen, put a file on your webserver called "sshreverse". Wait about a minute, then do:
ssh whatever_your_username_is_on_your_mac@localhost -p 2900
Now you've got an SSH connection back into your laptop. Use this to install a keylogger, take a picture, etc. etc.
(This will get you around NAT devices like wifi routers and the like [or firewalls or whatever. This is a reverse ssh session, to the firewall, it looks like an outbound connection])
edit: want to just say that that exact string of commands isn't something I wrote, a fellow hacker recommended it to me about a year ago or so.
// Cellular noise ("Worley noise") in 2D in GLSL.
// Copyright (c) Stefan Gustavson 2011-04-19. All rights reserved.
// This code is released under the conditions of the MIT license.
// See LICENSE file for details, located in ZIP file here:
// http://webstaff.itn.liu.se/~stegu/GLSL-cellular/
// Cellular noise, returning F1 and F2 in a vec2.
// Standard 3x3 search window for good F1 and F2 values
vec2 cellular(vec2 P) {
#define K 0.142857142857 // 1/7
#define Ko 0.428571428571 // 3/7
#define jitter FracMapJitter // Less gives more regular pattern
vec2 Pi = mod(floor(P), 389.0);
vec2 Pf = fract(P);
vec3 oi = vec3(-1.0, 0.0, 1.0);
vec3 of = vec3(-0.5, 0.5, 1.5);
vec3 px = permute(Pi.x + oi);
vec3 p = permute(px.x + Pi.y + oi); // p11, p12, p13
vec3 ox = fract(p*K) - Ko;
vec3 oy = mod(floor(p*K),7.0)*K - Ko;
vec3 dx = Pf.x + 0.5 + jitter*ox;
vec3 dy = Pf.y - of + jitter*oy;
vec3 d1 = dx * dx + dy * dy; // d11, d12 and d13, squared
p = permute(px.y + Pi.y + oi); // p21, p22, p23
ox = fract(p*K) - Ko;
oy = mod(floor(p*K),7.0)*K - Ko;
dx = Pf.x - 0.5 + jitter*ox;
dy = Pf.y - of + jitter*oy;
vec3 d2 = dx * dx + dy * dy; // d21, d22 and d23, squared
p = permute(px.z + Pi.y + oi); // p31, p32, p33
ox = fract(p*K) - Ko;
oy = mod(floor(p*K),7.0)*K - Ko;
dx = Pf.x - 1.5 + jitter*ox;
dy = Pf.y - of + jitter*oy;
vec3 d3 = dx * dx + dy * dy; // d31, d32 and d33, squared
// Sort out the two smallest distances (F1, F2)
vec3 d1a = min(d1, d2);
d2 = max(d1, d2); // Swap to keep candidates for F2
d2 = min(d2, d3); // neither F1 nor F2 are now in d3
d1 = min(d1a, d2); // F1 is now in d1
d2 = max(d1a, d2); // Swap to keep candidates for F2
d1.xy = (d1.x < d1.y) ? d1.xy : d1.yx; // Swap if smaller
d1.xz = (d1.x < d1.z) ? d1.xz : d1.zx; // F1 is in d1.x
d1.yz = min(d1.yz, d2.yz); // F2 is now not in d2.yz
d1.y = min(d1.y, d1.z); // nor in d1.z
d1.y = min(d1.y, d2.x); // F2 is in d1.y, we're done.
return sqrt(d1.xy);
}
void main( void )
{
vec2 p = gl_FragCoord.xy / resolution.xy;
vec2 m = vec2(.5,.5);
float lensSize =1.;
vec2 d = p - m;
float r = sqrt(dot(d, d)); // distance from center
r = 1.-r;
It is sometimes necessary to have a simple set of characters made up of vectors, the Hershey set of vectors is one of the standard descriptions in the public domain. They were originally created by Dr. A. V. Hershey while working at the U. S. National Bureau of Standards.
The following figures show samples of various Hershey vector-drawn fonts. The SHOWFONT command was used to create these figures. For example, to display the following figure on the screen, you would the command:
Duplicity backs directories by producing encrypted tar-format volumes and uploading them to a remote or local file server. Because duplicity uses librsync, the incremental archives are space efficient and only record the parts of files that have changed since the last backup. Because duplicity uses GnuPG to encrypt and/or sign these archives, they will be safe from spying and/or modification by the server.
Yes, it is possible to hack a Mac through the new DisplayPort/Thunderbolt interface, exactly the same way it is possible to hack Macs and PCs through FireWire interfaces.
Physicist and surfer Garrett Lisi presents a controversial new model of the universe that -- just maybe -- answers all the big questions. If nothing else, it's the most beautiful 8-dimensional model of elementary particles and forces you've ever seen.
Data structures play a central role in modern computer science. You interact with data structures even more often than with algorithms (think Google, your mail server, and even your network routers). In addition, data structures are essential building blocks in obtaining efficient algorithms. This course covers major results and current directions of research in data structures:
rePatcher is an Arduino shield that allows you to repatch your Max/MSP or Pure Data patches with a 6 x 6 patchbay matrix. It also has 6 general purpose control knobs for modifying parameters in your patch. Since it does all of this over USB, it can be hacked to work with any other program that can accept a serial stream.
"Eye contact is easier when I don't need to expose my heart to you."
faceME is an interactive performance piece that poses the question: how do people see themselves when they communicate through technology? Do they become machines themselves?
ROM Hacks make the process of developing a functional Sonic game with unique art, enemies, and modifications much easier, since the game engine and basic mechanics are already functional. However, if the game requires a different game engine, modifying existing low-level assembly may be inappropriate, and some game designers might choose to program their own unique game engine. The physics of a game engine are rules that describe how to transform the player's input (either in the form of buttons, keyboard, or even a mouse if the designer feels inclined) into appropriate changes in the position of the sprites in the game (such as the Sonic sprite, or alternatively, how enemy sprites will respond). These physics guides will hopefully make the process of simulating the rules used in Sonic games easier.
Bitwig Studio is a multi-platform music-creation system for production, performance and DJing, with a focus on flexible editing tools and a super-fast workflow.
both free and shareware fonts freely for noncommercial personal purposes, such as creating a logo for a personal web site, free web design materials, goods or banners.
This five-hour long recording is a passionate summary of Bucky's ideas. He reviews his assesment of humanity's most pressing problems, global strategies for solving these problems, and the conclusions from his "56-year experiment."
If you have a low-spec'ed computer (64 to 128 MB of RAM, less than 1 GHz processor), you may have difficulty with a regular Ubuntu installation. You may, even if you have a higher-spec'ed computer want to create a minimal installation for other reasons.
The Art of Unix Programming attempts to capture the engineering wisdom and philosophy of the Unix community as it's applied today - not merely as it has been written down in the past, but as a living "special transmission, outside the scriptures" passed from guru to guru. Accordingly, the book doesn't focus so much on "what" as on "why", showing the connection between Unix philosophy and practice through case studies in widely available open-source software.
In ecology, crypsis is the ability of an organism to avoid observation or detection by other organisms. It may be either a predation strategy or an antipredator adaptation, and methods include camouflage, nocturnality, subterranean lifestyle, transparency, and mimicry. The word can also be used in the context of eggs and pheromone production.
Charliecube is a 4x4x4 tri-color LED Cube. But what makes it special? Other cubes use shift registers, decade counters, or other components to control all the LEDs and can cost upwards of $150. The charliecube can be run using only 16 digital pins with no extra components and costs $30 plus an arduino.
This is a bash function. It gets called recursively (recursive function). This is most horrible code for any Unix / Linux box. It is often used by sys admin to test user processes limitations (Linux process limits can be configured via /etc/security/limits.conf and PAM).
So I carve landscapes out of books and I paint Romantic landscapes. Mountains of disused knowledge return to what they really are: mountains. They erode a bit more and they become hills. Then they flatten and become fields where apparently nothing is happening. Piles of obsolete encyclopedias return to that which does not need to say anything, that which simply IS. Fogs and clouds erase everything we know, everything we think we are.
Sound waves 57 octaves lower than middle-C are rumbling away from a supermassive black hole in the Perseus cluster. One single wave takes 17.5 million years to complete at 1.815 fHz.