UncleOxidant

+ friends- friends
3,516 link karma
10,303 comment karma
send messageredditor for 4 years
what's this?

TROPHY CASE


Four-Year Club

reddit is a source for what's new and popular online. vote on links that you like or dislike and help decide what's popular, or submit your own!

$99 Linux Netbook Goes On Sale

UncleOxidant 1 point2 points 9 hours ago[-]

Keyboard looks awful for touch typing.

running so fast you can't see it's legs

UncleOxidant 22 points23 points 1 day ago[-]

Ah, once again, I have not kept up with the cool kiddies.

Tim Bray leaves Oracle/Sun for Google

UncleOxidant 1 point2 points 2 days ago* [-]

Even Tim Bray has to go through the notorious 2-day Google interview? I would think that he and his work are well enough known that he wouldn't have to do that.

Video showing compilation of C++ into hardware circuits

UncleOxidant 2 points3 points 11 days ago[-]

Yeah, it would have been more accurate to say "Video showing compilation of C into RTL Verilog"

Video showing compilation of C++ into hardware circuits

UncleOxidant 1 point2 points 11 days ago[-]

I don't think it can handle C++ constructs - just C.

All foods at your eye level in the new General Electric Wall Refrigerator-Freezer

UncleOxidant 20 points21 points 15 days ago[-]

Seafoam green.

I propose a new amendment to the U.S. Constitution: "Separation of Corporation and State."

UncleOxidant -1 points0 points 20 days ago[-]

If corporations are supposed to have the same rights as a person, then why don't we also give them a human lifespan. Your corporation gets 80 years. After that it's dead. Plan accordingly.

BREAKING: Senate approves tax breaks for new hires

UncleOxidant 0 points1 point 21 days ago[-]

PointyHaired Bosses all over the US are now considering laying off workers and rehiring them to get the tax break

Nap 'boosts' brain learning power

UncleOxidant 5 points6 points 24 days ago[-]

Some parts of it are.

Here's an explanation of the boneheaded tax law that the guy who crashed the plane into the IRS building was upset about

UncleOxidant 2 points3 points 26 days ago* [-]

I would guess that the guy had more issues with the government than just this particular law. I'm guessing he was angry about being singled out by this law and stewed about if for many years and then other things like the banker bailouts came up... then stir in a little Glenn Beck and you get an explosive situation.

Here's an explanation of the boneheaded tax law that the guy who crashed the plane into the IRS building was upset about

UncleOxidant 15 points16 points 26 days ago[-]

But this seems like a common thing... Independent contractor. So why would some idiot Senator decide that programmers can't be independent contractors that own their own biz (while any other profession can)?

There seem to be fairly easy ways around this: 1. have a partnership - two programmers 2. If you're married, have your spouse "own" the biz or if you're single find a trusted friend that you can have act as the "boss" for a small fee. Other ideas?

The new Ruby ⇄ Haskell interop package, Hubris, and why you should use it

UncleOxidant 6 points7 points 29 days ago[-]

There's also rocaml (Ruby <=> OCaml ) in case you prefer a less pure, but also very strongly typed functional language. http://eigenclass.org/hiki/rocaml

Where Is Tcl Hiding?

UncleOxidant -1 points0 points 29 days ago[-]

Yeah, now I'm really worried. I hope Tcl isn't used in critical life support equipment or anything where someone's life would be in danger. For those apps I'd prefer that they used a very strongly typed, functional programming language.

Where Is Tcl Hiding?

UncleOxidant -1 points0 points 29 days ago[-]

Not sure how that explains that you can't comment a brace. I would think that when you start a comment with a '#' that everything till the end of that line is a comment. Why is it still trying to tokenize after the '#'?

Where Is Tcl Hiding?

UncleOxidant 0 points1 point 29 days ago* [-]

Tcl does have lexical scoping.

% proc f { a b } {
    proc g { x} { puts "b is: $b, x is: $x" }
 g 10
}

% f 1 2 can't read "b": no such variable

Where Is Tcl Hiding?

UncleOxidant 0 points1 point 29 days ago[-]

Like I said, I get thrown into the Tcl pit every six months or so for a day or two... but lately it's been more than a day or two - more like a week or two. So yeah, it's on the job training.

Where Is Tcl Hiding?

UncleOxidant 0 points1 point 1 month ago[-]

Thanks, that's helpful for understanding the underlying philosophy of the language.

I really don't want to hate Tcl because I'm stuck with it. But so far my experience with the language hasn't been pleasant at all. I'm approaching it having done a lot of Ruby in the past (which of course has it's own quirks) and that may be coloring my expectations or maybe I've been doing so much functional OCaml lately that I expect some higher order functionality (why no map?).

Where Is Tcl Hiding?

UncleOxidant 2 points3 points 1 month ago* [-]

Some functions (mainly the ones that modify variables directly) take a variable name, while others take a value (hence the dollar $).

Yes, I know this. The problem is that that it's not always consistent... Though I'm concluding that if you're passing an array or a list it's usually just the name.

As for comments, the docs clearly state that the # has to be the first non-space character in the line, otherwise it is just another token for the parser to deal with (confusing, I agree).

I have discovered this. You can't have something like:

set fingers 10 #number of fingers

However, what I was referring to was something along these lines:

if { $foo > 10 } { 
#was: if { $foo > 8 } {
  ...stuff...
}

Not exactly the code, of course, wish I had the exact code around still. Messy, yeah, but I was trying something out so I commented one of the if's. But that led to some kind of syntax error. To get it to work I ended up having to get rid of the '{' at the end of the commented line. That's a real sloppy parser they've got there. (speaking of which, I was examining a Tcl file that had been checked in for months and was released in our product (written by Tcl experts, not I) and I noticed in Vim that there was an unmatched " (with syntax coloring on it was quite obvious). Yet it had compiled and run fine. I removed the errant " and the output of the program was the same. I sat there stunned... Again, that's quite a parser they've got there.

All vars are locally scoped by default. So, to access them from within another scope (like a proc), you need to either declare them as global (yuck) or reach out to the parent scope and grab them (upvar)

Ummm.... OK. So it's a global that's just not quite as global.... err... I'm still trying to understand when people use these sort of "cheats" (for lack of a better word). It just seems so messy.

Anyway, my post is to show you that there is some thought behind Tcl's design.

Oh, I'm sure there was some kind of "thought" that went into it... I just find myself not agreeing with much of the "thinking". Tcl feels like had all kinds of stuff tacked onto it with bubble gum in order to make it stick together. upvar is one of the more prominent examples - I'm guessing you wouldn't need that if you had true lexical scoping. Let's just say that language design wasn't the forte of the creator of Tcl.

As with any language, if you don't like it, choose something else. Cheers.

Unfortunately, we've got a lot of legacy Tcl code and I am one of the inheritors. Most of the time I can be blissfully unaware of it... until something goes wrong...

And lest you think I'm completely negative, I will praise Tk. I still think it's one of the better GUI toolkits out there; I especially like it's canvas widget. This is probably the reason that Tcl got the mindshare it had (well, that and expect).

Where Is Tcl Hiding?

UncleOxidant 2 points3 points 1 month ago* [-]

Keep in mind that Tcl was designed with a simple command arg1 arg2 sort of syntax.

Yeah, I'm fine with that. I program in OCaml some, it's the same (as it is in Haskell or Scheme as well).

A lot of the weird rules (like name vs. $name) are actually a simplification - name means "raw name of variable here", $name means "interpolate current value of variable here."

yes, I understand, but the libraries tend to not be very consistent when it comes to this - sometimes things need the name to be passed in, other times it's gotta be $name.

We're so used to advanced parsers and compilers that we get confused by simplicity.

Simplicity would be Scheme. Tcl is nowhere near as simple (or consistent).

view more: next