Wednesday, December 23, 2009

Not my idea but it's good to remember

If you have a text editor, you should be able to do a search/replace only within a selected piece of text.

Thanks, Hoyle.

Tuesday, November 17, 2009

A Hard Problem

Probably not a "very hard" problem.

I've put in a bit of thought about the code style switcher - drawn some diagrams and such. The thing which is irking me at the moment is style switches in a revision controlled system.

Inevitably, there are going to be conflicts. Lots of conflicts. You can do nice things like make whitespace not count, but the different styles mentioned earlier don't all become erased in an "all whitespace is the same" world.

So... either you would need better diffing tools, a different means of describing the formatting of code-data, or a revision system that doesn't handle conflicts the same way

the other option is to have everyone "throw away" their repositories overnight, while the code is refactored to a different style, then they all come back and check out new copies. This could work, but it's not really feasible. Just think about how much code Googlers and Microserfs would have to check out, working on Office or Google Docs. Just think about how many little things they'd have going on as personal branches, all the half-finished code. Things that would have to be meticulously gone over and backed up, or lost. This option is nigh impossible for other reasons.

So, better diffing tools, a different means of describing the formatting of code-data (maybe partially compiled semi-object files, which your editor interprets? Oooh let's zoom in on that.

You could build a symbol tree and go through a large glomp of the compilation process but pull in a ton of data about the code itself, and then store those partially-compiled files. Then in your editor, you have specific stylesets which get applied to the code, and you pull the code out of the object file by interpreting it. You want to change styles? Just change styles and click. The program does the best-compile-possible (either takes the old object file and uses that, or compiles yours, or compiles as much of yours as is compilable and leaves chunks out) and then reinterprets the code outward. Oh that's fancy.

I'm taking compilers next semester; this is my new Awesome.

Wednesday, November 4, 2009

code style switcher

It can't be hard to write a linter that will go through code and make

if(){
}


into

if()
{
}


or (this is messy, I don't want to fight with blogspot's syntax today, I'm sure you get it)

if()
{
}


and all combinatorial groupings therein

well, maybe it can be hard, but I'm going to do it. I'm sick of reading people's code that doesn't agree to preconformed styles, and it shouldn't be a human's job to fix it.

Also, control over what styles for while, switch, if, methods, classes, would be useful.

Probably exists.


OOOH and convert spaces to tabs or vice versa, with control of how many spaces a tabstop is!

generally it just prettifies your code! I'm sure this exists. But it would be so fun to make! #isgoingtodoitanyway

Monday, November 2, 2009

bash on windows update

I looked into it this morning, and many people have tried this out. I went with the last of those three links, because it spoke of Unix Utilities and it was just a "download, extract, set PATH" sort of install process, which is one I grok.

Unfortunately, it didn't exactly pan out. I posted at TechSutram's blog (where I got the instructions from):

I just followed these instructions - I'm quite happy to have some additional unix utils on my command line (cat, less, rm) - but I could not get bash itself to work.

It will run fine, but reports "bash: warning: could not find /tmp, please create!" - I tried creating a "tmp" within C:\Users\myusername (where I set my HOME environment to), and also within C:\bash, but this did not stop the error.

Not so bad though, right? Just a warning. Well, actually it's worse: immediately after opening bash, a command like "ls" will display files in the good old fashioned style, then dump this to me: "[sig] C:\bash\bash.exe 1000 (0) call_handler: couldn't get context of main thread, error 998", and hang. After a CTRL+C, you end up with "[sig] bash 1000 (28) call_handler: couldn't get context of main thread, error 998", and now the terminal is entirely nonresponsive.

I'm running 64-bit Win7 Ultimate on an Intel Core2, about 4gb of ram and the rest is unimportant. I'm guessing this is a 64-bit issue or just a "Win7 is different" issue, which is causing some DLL call to fail or return differently and muck things up.
And I'm happy with the situation to some extent. I've now got the ability to string some bashfu together on my command line, and I'm closer to having UNIX available on this crazy Windows stuff, but I'm not quite there.

I'll keep looking, and if I find something that's not 2+ years old or broken, I'll report back.

Sunday, November 1, 2009

some more

instead of AIs, use people playing videogames:

I read the headline "more US residents playing farmville than there are farmers in the US"

Why not have those decisions impact the real world? Risk and reward come into play, in a good way. We don't need heavy mental lifting to be done by machines which aren't yet well equipped, but we can advance the state of the art of robotic machinery and workers, and let swarms of game players control the machinery through a heavily abstracted system of interaction and reward. Offer a small stipend, which increases based on personal success, and you have some seriously cool potential. Not just farms - anything labour intensive that could be roboticised except for the difficult decisions and analyses occasionally required.

is there an optimal svn usage?


if there's a set of operations which should pretty much always be done in order to have consistent backups and a well maintained repository, that should be automated. This is quite likely to already have been done / not be as useful as it sounded in my head when I first thought it.

why isn't everything under revision control and on/offline accessible what the hell

also, all apps should be networked/backed up/offline-networked. ex: your word documents are automatically backed up to your server and when you turn on your work computer they are automatically beamed down, with a full revision history

this is probably already done - is it done well?

windows bash

windows needs the linux command line in a fashion that integrates fully into windows. The only thing I really dislike about windows is not having scp, ssh, grep, cat, vim, vimdiff, ps, forward slashes, that sort of thing in my command line. I am aware that cygwin effectively provides this, but it does not (in my experience) integrate into the actual windows system. You are provided with a way to use linux while you are booted into windows. It's like a really shitty VM.

I want to be able to use my Windows system, use its interfaces and files and utilities and windowsisms, but make it so that when I pop open a command line I'm using what looks like UNIX. This should not be difficult. I intend to write a simple shell / collection of windows ported utilities and, after using it a bit, make it available to other people. I really want this.

Could already be done - I'll probably glance around a bit first.


That's all for this week.

Friday, October 9, 2009

a few for the bin

I want fast regex in pdf viewers

the NAC on campus relies on the user-agent string, apparently. If you attempt a DNS resolution while passing a legal non-windows user agent from your browser, you get redirected to the linux/mac login and are granted access.

This suggests that the process can be fully scripted - you should be able to send some custom packets, fill in the username and password (if the user wishes), and then access one further page, to auto-enable access.

I think you could write a simple script and then either get it to run whenever uog-wifi is connected to, or you could get it to run firefox as well, and just have an alternate icon to use when you first open firefox after connecting, while on campus.

a quick program that will create minimalist raw text documents perceiving much of the style of .doc, .docx, .odf, etc. I bet this exists... I should find it

Saturday, August 8, 2009

Real time search (particularly of the chans) just got feasible

After discussing it with my room mate, I've made some breakthroughs here:

the basic concept is, real time search for the *chans. 4chan, 7chan, 420chan, 711chan, 99chan - whatever ones float your boat. You archive about the front 4 pages of every one of their boards and drop the threads as they get beyond the 10-15 minute stale mark, with some obvious tweaking in less active boards. Then you present a nice search interface into it which returns links to and previews of the threads, and the user clicks the link to open a new tab or summat to the chan where the thread is taking place.

Originally the notion was "scrape the data off the pages and hope the chans don't notice you're doing it or change the structure of their pages much" - this meant dealing with the various chan softwares out there and crafting scrapers to get data from all of them. It also meant needing to update (perhaps frantically) at slight changes. It was a scary thought that they might start doing it maliciously, because you aren't really their friend. You're just someone hitting their servers kind of hard and not generating ad revenue.

The reason for all this? Think about it. You want a market? You got it. Around a million or two users who are predominantly male, single, 18-30, have a lot of time on their hands, and are probably aroused and impulsive over it. This should have marketing people salivating like mad - so much money to be made! Of course it's not a very "clean" or "safe" environment, but jesus.

The flipside for the people? What are people on chans for? To waste time? To not be doing anything? Maybe. What's likelier is that there are pieces of the chans that give them something they're looking for. A particular style of humor. A particular sexual fetish. A particular type of story - maybe creepy threads. They go to a chan they know and scour it - reading and looking, waiting for one of the less-than-a-dozen really interesting things (to them) pops up, then they read and follow it, and are either satisfied or continue. If they use a chan up they move to another, and often just work back and forth.

That's a large amount of unfocused viewing with little gratification. The thrill of the hunt I guess but - let's not bother with that. It would be much nicer if you could capture from all streams and grep out what you like. So you go to one interface, type in "creepy thread", and then it shows you threads on 10 or 20 different chans in the past 15 minutes that have had the term "creepy thread" come up in them, and bam. You've just made a way, way better experience for the end user, and dramatically cut down on server load for the people running the chan.

Why that cut-down on server load matters is the magic. This is as far as I'd gotten beforehand - page scraping and thread passing, hoping the chan owners wouldn't notice you was the plan. But why not make their deal sweeter too? The only source of revenue for a chan owner is advertisements. But ads are going to be ineffective unless they're broad, meaning they have to be blandly pornographic, and that's still ineffective. What this service offers is focus, and a reduction in server load. At optimal usage, you might have, say, half the server hits per month, but 10-30% higher probability of clickthrough rates because you can start targeting your ads. Someone comes to your chan because they searched "creepy thread"? Well, show them horror movie or scary story ads. They're way likelier to bite on that than a skimpily clad woman advertising "for-pay porn" on a site where half the users are present to get porn free.

The providers of the interface can target and present ads as well - maybe just unobtrusive google ads, whatever. The very fact that the user is showing their interests is enough to allow some level of targetting, meaning a higher clickthrough rate, and better revenue. It also ensures lower costs and a faster, easier experience for the end user. Literally, everyone wins.

Given this, the new idea is to work with the chan runners and get them to run some software for us, that will do the scraping on the server side and send an efficient package something like once a minute to our servers for inclusion in the search. This would make the job easier for us, and less painful for them.

Anyway, yeah. I think this should be done, and might work on it when I'm not actively engaged elsewhere. If you'd like to do it instead, go ahead - but this only really becomes effective if the chans play nice together on it. You'd need one service covering at least the big 4 or 5 for it to really be useful.

Wootsauce.

edit: there's the worry of "what if it's that stupid random unfocused time that allows you to run into new things and to spawn new things, which keeps the chans from becoming stale and dead" - and my response is that you can still go surf them regularly. Hopefully this'll clear out the leeches and the seekers, and leave mostly oldfags and trolls actually sticking to a chan. It'll also likely improve content of specialized threads, because people with a vested interest can be guaranteed to find them.

And the interface for this is crucial - you make the interface suck, it won't work.

..okay I'm done

Thursday, August 6, 2009

Search for Programmers

inurl: "\.(avi|mpe?g|wmv|mp(3|4))$"

Wouldn't it be great if this is all you had to do to reliably find media files on the internet?

Some of you out there will think "But wyatt that doesn't look simple or reasonable at all your crazy!". And the first thing I'll do is scold you for not correctly writing "you're". Then I'll tell you about the magic that Regular Expressions possess, try to show you how simple and powerful they are, and perhaps rant a bit, as I'm about to.

Search is an imperfect science, no doubt.

This isn't a matter that Google (or Bing, or Yahoo (...bing), or Ask (man where's jeeves) help, because they all do something that the end user is quite happy about. They generalize and abstract your search, in the hopes of providing you more relevant (and numerous!) results, faster. This is why punctuation doesn't get noticed, why you need to specify +sptember to not have Google check for "September", and many other things. These applications exist to serve the general populace and give people who don't know how to properly spell a break when they search for "maek baby", or "christ born" (when they meant 'chris brown').

So what about the rest of us? Those of us who know what we're typing, have a bit of a programmatic bent, and know that if we could only feed google the right pattern, we'd get precisely the material we want? To the best of my ability, I haven't been able to find anything which provides this sort of service.

That's sensible, I guess. Real text search is space and time expensive. On the order of the entire internet, no one would want to take on that extra problem. Why should Google, which already rules the universe, bother? No one is hammering at their door demanding this. How could anyone else try? It would be prohibitively expensive for a newcomer, or even a large competitor (Microsoft) to do, and provide relatively little gain*.

This presents a problem then: how can we make it occur? I'll tell you what I think: abuse the crowd.

Write the search database / server software to be as modular, self-contained, and high-latency scalable as possible. Pass it out free, and evangelize the hell out of it to the people who care. The more people who run the servers, the better the search gets, and all at a low cost of some space and processing time from each user.

Of course there's the problem of the front-end and making the queries get passed out reasonably, ensuring the right level of redundancy (searches should always work, but you shouldn't be too redundant. On top of that there's maintaining reasonable coverage with a small network, how (if at all) this 'makes money', and then actually writing the thing. And maintaining it.

It's a lot to do, but I want real text search (including complex regular expressions) on the web. I also want it in a billion other places - music sites/applications, code databases, booktext searches, forum searches, email. I'd especially like having it in Firefox's find command (this one probably exists already).

Anyway, that's the idea.



* This could have the unmeasurable and intangible benefit of providing a "we have _the most powerful search_" type of statement from whoever adopted it. The "way cool but only used by 20% of the users (or less)" type of feature.

and if you'd like to learn more about regular expressions... This is actually a pretty good site to get you started. I like that I used google's flexibility, of typing "regular expressions" into Firefox's URL bar, to immediately get there? I say yes.

Sunday, August 2, 2009

No Profit Allowed

"For Profit" should not exist

everyone should be "not for profit", and operate on a model very similar to the way that those do now.

The government provides a funding grant, you pay them back say, 115% of starting funds, maybe 150%, 1000%, I don't know.

Then you run the business. Pay yourself, your employees, pay back the government (or if you wish, some alternate investor - I'm just using the government because I'm picturing this as a heavily socialized thing) - and make your product / provide your service. Once you're paid up, go on as you like.

But you have to use / donate 100% of your revenue. So you pay yourself and your employees, invest in growth/new ventures, and donate the rest to charities or somesuch. No one gets crazy wealthy, everyone still gets paid, the charity portion of the nonprofit sector (which provides no pay services or products) gets a boon of money, everyone wins?

I think the greed of the investor, wanting perpetual returns, that's our problem. I likely just don't understand, that's all.

Sunday, March 8, 2009

Conversation stacks.

Often thought of them; never implemented one.

It works excellently.

Saturday, February 28, 2009

Fiction.

I routinely, when I have about 3-5 minutes, pop open a notebook and write flash fiction. I tend to write at the length of a page - I'll start, make things as interesting as I can knowing I don't have to explain them, then cut myself off at the end of a page.

I would like to put some of them online, and also, to be able to in odd moments write similar things on a computer and not lose them. So this is the announcement of a fifth blog to join my group - "Fiction." - it may end up being more or less "things I wrote" rather than "strictly fiction" - but I'm pleased with the name.

Aubletak (alt. Aubletac)

Perhaps also obletac, obeltak, some mix of them. I like Aubletak the most. Pronounced "Awe - bell - tak"

Definition: This is a bit of a high level concept - imagine that you are in a meeting where many people have things to say, and there is a very limited amount of time for everyone to participate. Someone is asked to speak, and they do -- for a long period of time. They may start on topic, but quickly digress and move away into whimsy, which no one really wants to hear about. However, no one wants to be the awful person that puts up their hand and says "Hey, uh, 'scuse me, but is what you're saying ever going to be even remotely relevant to this group again?" - because they'd have to be a dick. Everyone would applaud them internally, but they'd be hated publicly.

So I propose that someone just murmur, "aubeltak". If anyone else agrees, they repeat it. If you're ever talking and you hear a room full of people - or even two or three - toss out an aubletak, then maybe you should reconsider where you're going with things.

Someone could even be direct about it, raise their hand and say ".. I'm sorry, but this feels kind of aubletak to me.." and it's just extra polite. The exact meaning of it was written down as,

"What you are saying is not relevant to me, and it is a waste of very valuable time to let you continue to speak. I do not mean any offense to you, and agree that your information is exciting and vital to some, but I am not a member of that group. Please stop talking."

Which pretty effectively and politely gets across what needs to be said.

... any indication I've needed to use this recently? ^^

Sunday, February 22, 2009

I make this list often enough I should just keep a copy here.

Grade / Age / Year

5 23/24 2011/2012
4 22/23 2010/2011
3 21/22 2009/2010
2 20/21 2008/2009
1 19/20 2007/2008
+ 18/19 2006/2007
12 17/18 2005/2006
11 16/17 2004/2005
10 15/16 2003/2004
9 14/15 2002/2003
8 13/14 2001/2002
7 12/13 2000/2001
6 11/12 1999/2000
5 10/11 1998/1999
4 9/10 1997/1998
3 8/9 1996/1997
2 7/8 1995/1996
1 6/7 1994/1995
k 5/6 1993/1994
jk 4/5 1992/1993
. 3/4 1991/1992
. 2/3 1990/1991
. 1/2 1989/1990
. 0/1 1988/1989

Sunday, February 8, 2009

Perhaps incorrect, will edit later

The academic institution has lost its focus.

From the question of, "How does one understand the world?" (or something similarly phrased, I think you get the gist) - we ride along some thought trains:

1) Polymaths are widely taken not to exist any more, so 'one' is believed to be incapable of any real understanding of the world.

Response to 1) Polymaths are considered implausible because the system by which we disseminate information and certify students as being qualified is a lengthy, slow beast. One must spend 10 years of their life to be qualified and then they end qualified in something like "Molecular Microbiology as it applies to Pathogens in a Feline Diet" or something ricockulously thin like that. After all that time and focusing in, to change topics to something in Physics? Or Literature? It's absurd.

So maybe they shouldn't focus so much. Or maybe it shouldn't take so much time. Let's analyse.

You focus because you're told to. Because you have to distinguish yourself from the myriad other "Biochemists" out there and do something particular. In the slow-paced academic environment, you spend 5 years in an undergrad showing you can commit time, then 2-3 years in a masters showing you can write something legible then 3-8 years in a PhD showing you can write something worth reading. By this time you're focused pretty narrowly, because one person can only do so much, and you've still usually got classes to take and teach alongside your real work. So you'll have spent 10-16 years getting to the point where you're really good at your field, but then you'll be so narrowly focused as to be disabled in truly general discussions. Scary.

You take so long because that's just the way the system works. Ooooh, here we can start calling this a systemic barrier to timely education. You feel like you're doing great if it takes you just 6 years total university to get your masters. You spend that entire 6 years learning in 1 hour segments 3 times a week for 12 weeks, 3 times a year. And you're usually learning several things at once like that.

The issue here is that this is oriented toward a single master having not much time to deal with a large number of students, and the students having no other means of learning than hearing the master's voice. But things have so greatly changed.

Students can learn everything given to them in first and second year University on the internet. Probably in years above that as well - the only reason I limited myself at year 2 is because that's the year I'm in. There's one element we can't, which is practice and teamwork, but we'll get to that. The point here is that the lecture system in which a student receives bite-sized packets of divine data from the master 3 times a week is unnecessary now. It's a relic. Students could spend however much time they like reading about the topic on the internet, discussing it in a forum or chatroom, or in some sort of interactive lesson-game-thing, and probably learn this material better and faster than ever before. How much faster? Just because I like not sounding credible and because I just throw numbers around without any backing, I'll say an order of magnitude.

Under that assumption, it takes you 1-2 years (instead of 10-16) to become an expert in a field. If this were possible, a person could become an expert on many things in their lives - no long winding track that locks them in.

The only point I've been trying to make in this response is that the plymath is not necessarily dead yet. They may have gone away for a while, but it is possible thast, with the right tools and structures available on the internet, they are poised to make a phenomenal return.


Now,

2) Regardless of the existence of polymaths it could be argued that no single person can be an expert on everything simultaneously. There would be no retention, no practical use of a person constantly doing nothing but learning to jam expertise in on as many diverse subjects as possible for their entire life - when would they come to fruition and do something worth their time?

Response to 2) The trick here is that we operate under a paradigm of "a man is an island" - even though we've been long made aware that that's not true. A person presented with a problem, under our present system of thought and education, should have the correct answer (or the mechanism by which to arrive at a correct answer) stored within their heads. They then must take only the information given, process process process and using their stored up knowledge and expertise, produce some sort of solution. What a fine show it makes but it is truly ridiculously impractical.

No man is an island. You have friends, family, books, and by gods, THE INTERNET to ask for help. Use your lifelines like a millionaire.

When presented with a problem, a person needs only expertise in using the tools available to learn about the problem's parameters, find solutions or paths to solutions, and how to formulate solutions to the given problem.

So we need to be able to research, to synthesize, to actually do some figuring (because there's probably some to be done), and to write out our process and findings in a legible, worthwhile form. Those are things that could be hard to teach - but they could be the things taught to us by teachers.

A person like that, operating in that way, needs no advanced knowledge of a problem when presented with it. They simply receive a problem, (or run into it) and go off to solve it. They come back smarter with a solution, and if they forget it all after writing the answers, they can learn it again fairly easily. The important things will be learned so often that they'll stop being forgotten.

This person is a kind of half-polymath. They know what they need to know about anything. They can operate on any problem.

3) Regardless of a new-age polymath's ability to find a solution to whatever problem, they would likely waste a lot of their time if they didn't focus somewhat. Biology to astrophysics to shakespearian literature to Chemistry to biblical study to computer science - these are some pretty insane context switches. A true polymath would waste a massive amount of their time doing basic research and not be very productive in their life. They could exist but wouldn't really be worth having.

Response to 3) Ahah, you've beaten me. The only answer I have to this is: more polymaths. Have them be less than a polymath - find an optimised route. Polymathitise to the point that they are able to research and find solutions to whatever problem, but let them choose a field or group of fields that interests them. They only really deal with problems relating to economics. The economics of chemistry? Sure, they can learn that and work on it, they've got some grounding there. But they can choose a region of thought to stay within the bounds of and become an 'expert' by knowing the groundwork flat out. They can then spend all of their time going from midlevel of a problem up, working on the hard details. Any time a problem wanders into another region, they can pass it off or at least collaborate with a friend who operates in a different region.

The best part, let's say they get sick of economics. It doesn't take an entire life to switch over to literature! Within a year or two they could be similarly focused in a different area. How agile.

So the solution I'm presenting to properly understanding the world is having a team of part-polymaths who are all very good at analysing things in their fields, but not so focused that a question not shaped to their specific needs would scare them off. This could be some sort of free association of new academics - this could be the new University.

It wouldn't even have to be a place. It could simply be a collection of people communicating on the internet.

Store the answers to the problems they solve, have testing mechanisms provided by / to them, organize their knowledge in a clean and useful way, showing dependencies clearly, and you have for yourself a sort of utopia of learning. A true force that can operate with the intent of better understanding the world, and forwarding all of human kind.

It's kind of crazy, and it's so full of holes it couldn't hold frozen water - but it's a start in a new direction. Give it thought, give it pause. Let roots of change take hold and come up with your own ideas on how to make this place better, because the only thing it doesn't need to be is worse.


(to some extent this was brought on by reading this - thank you reddit)

Sunday, January 25, 2009

There is no penalty for being a predator.

Monday, January 5, 2009

need to work on that dream-recorder.

Last night was filled with bizarre and rememberworthy dreams. Walking around a park/castle/campus place and having lightning strike twice. Also the ridiculous amount of time spent walking around/interacting with people on/working at a campus earlier yesterday. So in-depth, these places are.