Domain: spy.net
Stories and comments across the archive that link to spy.net.
Comments · 11
-
Re:Ajax Q&A... the real one
Why couldn't you just pass in a reference to the XmlHttpRequest object so people wouldn't be forced to use global variables to store the reference? Is that so hard?
I don't have any problem doing it without global variables. Look at the javascript behind this:
http://bleu.west.spy.net/jwebkit/threads.html
It's easy to get many asynchronous XML requests going on concurrently without a global variable in here. It appears to work for me. -
Re:Hrmm
Heh, that reminds me...here's a conversation I had with a guy at work one day:
aim.png -
Re:The best tool for WHAT job?
I'm no java apologist. I use a lot of different programming environments and find java frustrating in a lot of ways, but I disagree with a lot of what you said. Java is the best tool for many jobs simply because it was the best tool for many other jobs. This has caused a large class library to come about that has pre-built code for many of the things one needs to do. This makes it take less time for me to make some things (but the language still manages to make the process a bit slow and painful).
In particular:
NEVER use Java to create or manipulate graphics from the command line. No JDK, EVER, has managed to do this despite five years of pleading from the professional programmers. Without a GUI Java goes belly-up on the first "new java.awt.Frame()". (And for you 1.4+ folks who think HeadlessException was a fine solution, it wasn't.)
I've been doing headless java graphics manipulation since 1.1.6 as part of my photo album and other tools. It got a bit easier in 1.4, but it's always been possible. For example: my house temperature diagram takes the collected data and renders to PNG or GIF depending on what your client claims to accept. -
Re:The memories...
Just out of interest, have you ever tried to solve any problems that were not inherently recursive (e.g. traversing a tree) using a functional language? Maybe I was just young and inexperienced but I really did find it to be a serious bitch!
What is traversing a tree if not recursive? Here's what I do in OCaml:
walk_dir to walk directory trees.
I use that in an app that finds all files that meet certain criteria and performs an operation on them. It's a very straight-forward process. It also seems to be quite efficient.
Pretty much anything that loops can be considered recursive though. Take a look at my iteri implementation in OCaml:
extlist. (click on iteri for the code).
BTW, don't worry if you can't read the OCaml documentation just yet. It's very easy to read after spending a brief amount of time in OCaml. -
Re:The memories...
Just out of interest, have you ever tried to solve any problems that were not inherently recursive (e.g. traversing a tree) using a functional language? Maybe I was just young and inexperienced but I really did find it to be a serious bitch!
What is traversing a tree if not recursive? Here's what I do in OCaml:
walk_dir to walk directory trees.
I use that in an app that finds all files that meet certain criteria and performs an operation on them. It's a very straight-forward process. It also seems to be quite efficient.
Pretty much anything that loops can be considered recursive though. Take a look at my iteri implementation in OCaml:
extlist. (click on iteri for the code).
BTW, don't worry if you can't read the OCaml documentation just yet. It's very easy to read after spending a brief amount of time in OCaml. -
Re:The problem with personal websites
So, do tell, how do you use CSS to replace tables and frames?
You use tables where tabular data should be presented, and not where it shouldn't.
For example, the following page contains no tables (but it used to, and it was really difficult to manage changes):
http://bleu.west.spy.net/~dustin/
-
Re:Or just RCS
I have a script that does all of this for me:
http://bleu.west.spy.net/~dustin/soft/filemonitor
You point it at a dir and run it from cron nightly. It also gives you a handy nightly mail telling you what changed. Excellent for those late night changes to systems where you don't remember what you did...or if someone else made some late night changes that you'd like to undo. -
Re:Application level sequencer == BAD
That page gave an example of a bad way to do it. There are also good ways to do it. I'm sure there are many implementations of things similar to my GetPK.
This provides application level sequences in a cluster and bypasses a lot of performance issues. Combined with my hierarchial storage model, it allows us to build out large complex trees of objects where the objects all know the primary keys of all of the objects as they will be if they get stored in the DB. The framework also allows us to ensure the tables get updated in the correct order so the DB can maintain the RI.
Different keys can have different burn rates so keys that get used up quickly can produce no greater performance hit against the DB than keys that are rarely needed.
This does not guarantee that the keys are given out exactly in sequence, but I've rarely seen it necessary. -
Re:Yes another one!
You pick your set, I'll pick mine. C++ is hopefully getting ready to die. It's just not pleasant to use. I'm also waiting for the day when the world wakes up and realizes the cruel joke Larry Wall played on it with perl. While some of my most crucial application code is written in C, I've spent more time on it, and trust it far less than stuff I've thrown together in Eiffel.
At home, I've got code I rely on written in Java, Eiffel, C, Objective C, python, bourne shell, smalltalk (although the smalltalk code that I actually use the most I didn't write), tcl, scheme, etc... I've got some perl stuff, too, but I don't maintain it anymore (it asked me not to). This is just the stuff I use day-to-day, and much of it is server code I've written that just runs on its own (Java, C, python, eiffel).
So, that's my set. Anyone who disagrees, make up your own set, continue to research and find better ways to do things, and help us continue to improve computer science in general. Every time I learn a new programming language, I learn a little more about programming, and apply that knowledge to everything I do. -
Awesome software - take a look
I've got a stack that I wrote and have been using for a few years without a problem...well, until 0325 this morning when a battery in one of my thermometer servers caused the machine to fail. It does a lot of cool stuff, including some cool multicast action for plug-n-play data collection and stuff. You can see some good examples here:
http://bleu.west.spy.net/~dustin/projects/ibutton. xtp
-
Re:I remember back when i thought it was a neat id
Actually, it was pretty close. With contributions to my ``kittycode'' project, it's possible to pull up books at Amazon by ISBN, and other products by UPC if you've got a place that'll give you info by UPC. Look here.