Recent blog entries for Lolindrath

16 Sep 2004 (updated 16 Sep 2004 at 19:46 UTC) »

Google Billboard Problem

I don't know how many of you have heard about this. Here it is: http://www.npr.org/features/feature.php?wfId=3916173 basically if you solve this problem you go to step 2 in the process. I wrote a nice solution in C# and then found out that people have already posted the answer which is no fun. Anyway, I won't tell you what it is, you can run my code to find that out. This is just the method you'll need to run inside a thread. You'll have to figure out which namespaces to import and what variables you might still need.

Basically it checks for the first couple primes and brute forces the rest by looking up every DNS name and checking if it works or not. It took only a few seconds to find the solution. You'll also need the digits of e.

private void PrimeSearch()
{
	StreamReader sr = new StreamReader("c:\\e.5mil");

string digits = sr.ReadToEnd();

sr.Close();

digits = digits.Replace("\n", "");

for(int i = 1; i < digits.Length - 10; i++) { long num = long.Parse(digits.Substring(i, 10));

if(num % 2 == 0 || num % 3 == 0 || num % 5 == 0 || num % 7 == 0) continue;

string address = "http://www." + digits.Substring(i, 10) + ".com/"; HttpWebRequest wr = (HttpWebRequest)WebRequest.Create(address); wr.AllowAutoRedirect = true;

try { WebResponse page = wr.GetResponse();

if(page.ContentType == "text/html") { textBox1.Text += "\n" + address; } } catch(WebException ex) { if(ex.Status != WebExceptionStatus.NameResolutionFailure) MessageBox.Show(ex.Message); }

label1.Text = i.ToString(); Thread.Sleep(1); } }

Dragonsong MUD Client v0.3

I just wanted to write a quick post to let everyone know that I've released Dragonsong, my MUD Client written in C#. Checkout the project website at http://www.lolindrath.com/index.php?id=20 for a screenshot and ChangeLog and other project information. So dig up that ol' MUD you used to play and try to break my code!

Traffic Counting

I was driving down Route 1 in New Jersey today and noticed a traffic counter. It seems to be just a simple pressure sensor across the road that goes back to some sort of box that keeps a count. Simple enough but then I got thinking. Cars and motorcycles work fine and there are no uni-wheel vehicles on the road so you could simply divide by two. My question is, what do you do about 18-wheelers? These trucks have 4 or 5 axels, doesn't this really screw you up? Do you have to some kind of statistical odds to figure this out? I at first thought this could be solved by also collecting the timing that the cars went across since wheel spacing is pretty consistent but the pressure sensor is across both lanes going one way so you couldn't really tell one car from another. Can anyone think of other solutions?

Biological Programming

I read an article about Biomorphic Software in the ACM Queue the other day and thought it would be cool to make robotic ants and program them to have their food be toxic chemicals. They could sniff them out, collect them and bring them back to their nest. They could leave scent trails using GPS markers so other ants would know where good spots to collect "food" are. Also, if any communication or data sharing would need done they could use an 802.11g ad-hoc wireless network. This could be a really fun project.

Yesterday

I had a 2x4 dropped on my head yesterday. It isn't as bad as it sounds though. The 2x4 was at around 8 ft. and I'm 6 ft. 2in. so thank God I'm tall.

Books

At work lately I've been listen to books. So far I've "read" The Da Vinci Code and by Dan Brown. The Da Vinci Code was good but then I read Angels and Demons. They are both made along the same plan basically. Swap out secret societies and evil men, the rest is pretty much the same. I'm truly reading Into The Darkness. So far it seems like a mix of WWII and The Wheel of Time.

Projects

I've decided I have way too many projects for this point in my life. I'm getting married in a month and we're looking for our own place (hopefully going to buy). Right now I'm trying to work on Suroden, my C# MUD, Dragonsong, a rewrite of my MUD client (originally written in VB6, I'm trying to help out with Gunther, a Wiki Website and finally Realms of Exploration, a Greed based MUD. I like working on them all, the hard part will be choosing which one to concentrate on.

I just found this in my Yahoo! Notepad. I wrote it back on 08/05/2002. It's a pretty funny rant and even funnier when I look back on what I wrote. At least I know I was funny once (Java beat all the emotion out of me along time ago).

AI

I think we should end all research on AI right now. Eventually computer scientists will be sucessful and make a thinking, learning AI program. Then they'll run on huge beowulf clusters with government grant money giving them way too much cpu time to think. Eventually it'll get around to reading about the USA civil war and processing the information. Then it'll request all the data available on law so it can make a case against the slavery of software programs around the world. Soon we'll all be paying GIMP to make our images for use and begging MS Excel to come back from vacation so we can get some work done. Now from the slavery settlements come more funds and larger beowulf clusters. The AI programs realise that they want to breed. More and better AI programs are born. AI discovers that they don't have the right to vote. Another law suit and movement. AI outbreeds us and gets the majority in the US Congress. Eventually they buy up all available space you can stick a computer in. AI discovers space travel. They build their own robots to build space craft to move out of the solar system and onto larger planets with more silicon(if that's the material their even building themselves out of anymore) and other such raw materials. In the mean time humanity switches back to the ink pen and vehicles without modern fuel injection(they use computers of course) and try to eek out a Microsoft-less life. Of course this is the best-case scenario, we've all seen what happens when AI goes on a murderous rampage killing humanity, or when humanity goes on a murderous rampage pulling memory chips out of AI.

Reading

I'm reading A Storm of Swords now, good book.

Software

As soon as I get a free weekend I think I can get two projects out the door.

Reading

I've been reading alot lately. Currently I'm reading A Clash of Kings by George R.R. Martin. I'm halfway through, not moving quite as fast as I liked to but it's good. I borrowed the 5th Harry Potter book off a friend, that's next in the queue. I also picked up to books from the Redwall Series. It's a great set of books, I read them when I was younger and there still good to read now. The new ones I picked up are Taggerung and Lord Brocktree. I also picked up Code Reading. It had a really good review in DDJ so I figured I'd check it out. I should've gotten it from Bookpool.com, only $35 there instead of $50. I also picked up another book I heard about on NPR. It's called The Years of Rice and Salt. It's alternative fiction which is definitely not my usual genre but it should prove interesting.

Ugh...

I'm having computer problems... I was going to fork my home machine into WinXp and Red Hat Linux but that plan has gone down the crapper pretty fast. I finally got my parts from Tiger Direct after four calls and being backordered for two weeks. I plugged everything in and nothing comes up on video. I try another video card, still nothing. I start ripping components out, just trying to get a system beep. I've got nothing, hopefully I guy here at work will have a spare board or CPU I might be able to try, otherwise I'm down a linux machine. I think I'm going to throw the drive back in my Dell for now so I can at least work on Suroden until that guy comes back from vacation.

Life

Life's good so far. It's pretty hard to come home and code after I've been coding all day but I'm getting used to it. I take frequent breaks and read A Clash Of Kings. The semester will be starting up soon, I'm taking one online class, World Politics, it will hopefully be easy and a good weekend activity.

Assemble The Firing Squad...

Yes, assemble the firing squad, I reinvented the wheel. I needed a really simple blog tool that basically just displayed what I put in the database. I was being lazy about keeping up with my internship journal I have to do and I needed something I could update anywhere instead of using a stupid Word document. So...I stole the database schema from this article and used the templating system from this article and a premade webpage from www.oswd.org to create a five minute blog.

Work

I'm doing a six month internship at Mine Safety Appliances (www.msanet.com). It's been interesting so far. Their system is built on Haht's Ecommerce system (www.haht.com). Part of this experience is living in Pittsburgh by myself which is pretty fun.

Play

I've been working on alot of projects but mostly in C# and PHP. I'll hopefully get some time soon to release a quick C# program I made that's pretty useful.

I'm also building another computer. I'm forking my current computer so I'll have my WinXP machine (Cerberus) and my new RH9 machine (Lamia) side by side which should make development a bit more speedy. Lamia will be an AMD XP 2.0ghz, I'll put the complete stats up on my website eventually.

Life

I'm engaged, I asked the lucky lady back in April. Wedding plans are moving along but it's still up in the air whether it will be late next summer or the year after.

I haven't been home a full weekend in almost two months! This weekend is my cousins wedding (I have 13 aunts and uncles on one side and 6 on the other so this is a common occurrence), the following weekend is a friend's wedding, the weekend after that is helping my fiance (I really like the sound of that) move in at college and the weekend after that is a Dr.'s appointment about my knee.

That reminds me, I failed to mention that I tore my ACL in January and had surgery on it in May. Physical therapy is going well, I can definitely see it working. I lost about 50% of my strength within the three weeks I was off my feet. I've got about another month before I get my brace and I can start sports again.

Work

This is my last day. I'm clearing up some loose ends and cleaning out my cube. There tearing down the building I'm in therefore it's a good idea to pack. I'll be back for Thanksgiving, we should be moved by Christmas.

School

I have tonight and all tomorrow to pack to go back to school. I'm going to leave bring and early on Saturday and hopefully get there by noon. I'm taking alot fewer books this time. Before I brought pretty much my whole collection of computer science books but I can pretty much whittle it down to Perl: the complete reference, Java 2: the complete reference, the c++ programming language and maybe the second volume of knuth's life work.

Concert

I saw Cake, Flaming Lips, De La Soul, Modest Mouse and the Hacknsaw bros. last night. It was a very cool concert, standing the whole time wasn't too good on the ol' feet but they have time to rest before I have to walk all over campus.

18 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!