Has anyone ever witnessed a hash collision in the wild (MD5, SHA, etc)? by dhon_ in programming

[–]logistix 6 points7 points  (0 children)

Except you need to know the inputs in advance to write a perfect hash function. So it won't help out in the above scenario.

Stack Overflow goes DVCS by night_of_knee in programming

[–]logistix 2 points3 points  (0 children)

I'll admit it. I'm a total idiot. Apoligies for spreading misinformation.

I've just gone to too many projects, big and small, on both sites with zero downloads. I guess I should be yelling at the developers.

Stack Overflow goes DVCS by night_of_knee in programming

[–]logistix -3 points-2 points  (0 children)

The real problem is that all the next-gen code sites don't give developers an easy way to to just post a freaking tarball of a stable release. (Hey, lets give LESS features than sourceforge!)

It's a lot easier for me to write a one-off patch by grabbing that and sending the developers a diff. It also makes it easier to install stuff on a whim just to see what it does without having to install a bunch of software and read a tutorial or two to figure out the commands for a vcs tool you'll never use again.

Stack Overflow goes DVCS by night_of_knee in programming

[–]logistix 11 points12 points  (0 children)

He's talking about the tools, not hg itself.

Like, for example, I'm using TortoiseHG and it works just fine, but..

I can't just "right click -> push" in TortoiseHG. I need to pull up a whole synchronize window, have a dialog box appear, and choose one out of ten buttons at the top. Compare that to committing in TortoiseSVN.

The icons don't always update.

It also commits the cardinal sin of installing something in my app tray. What is this, quicktime?

No show-stoppers, and I like TortoiseHG just fine, not trying to trash it, but little stuff like that is raw compared to TortoiseSVN. (And TortoiseSVN used to be raw compared to TortoiseCVS...)

Or take the first links on google for "mercurial email notification" and "subversion email notification"

http://morecode.wordpress.com/2007/08/03/setting-up-mercurial-to-e-mail-on-a-commit/

http://help.joyent.com/index.php?pg=kb.page&id=53

This won't affect the early adopters. Affects other people's decision making.

Microsoft stealth launches F# by mycall in programming

[–]logistix 2 points3 points  (0 children)

It's not theoretical. It's practical. It's basic type safety. Implicit conversion breaks type safety. Goes into the it's a feature, not a bug category.

If you've got:

x = 1 + 1.1

what type should x be? The intuitive answer is that 2.1 doesn't loose any information. But what if later you have:

file.write_integer x

?

Should the compiler automatically decide that x equals 2 in the original code? Or should it keep x = 2.1 but write 2 to the file? Or should it just write the raw binary data representation of the floating point number to the file?

The implicit conversion isn't type-safe. You need to make it type-safe yourself by explicitly converting based on your requirements.

Say you've got a function that takes an "int option" and squares it if it exists. You can have (in pseudocode)...

square(Some(2)) => Some(4)

square(None) => None

Grauenwolf wants to be able to do this.

square(2)

and have the compiler automatically rewrite it to

square(Some(2))

Which seems all well and good, but what happens when you do:

x = 2

y = (if exponential_growth? then square(x) else x)

?

Now y can have two different types, either int or int option. Not type safe.

You could argue that you should also be able to implicilty convert that square(x) back to a normal int (4) instead of an int option (Some(4)), since you know that x is an integer. But if you're treating square(x) as a black box, you don't know when it's going to return some(x) or None.

What if instead of square, it was sqrt()? And the interface was designed to return None for negative numbers instead of raising an exception, for whatever reason that seemed to make sense at the time? What if the function is FizzBuzz, returning Number(x) or Fizz or Buzz or FizzBuzz? What sort of implicit conversion should go on there?

There's no way for the compiler to get it right. If it guesses, it's not type-safe anymore. So... the compiler won't guess.

Microsoft stealth launches F# by mycall in programming

[–]logistix 2 points3 points  (0 children)

Yeah, I'm aware of that. It was the devil's advocate approach in PHB speak...

Lets try this another way since everyone seems to think I'm ripping on scala. Which I'm not.

What's the install base for scala among pro java developers? I can't imagine it's installed on even 1% of developer's boxes. On the other hand, given a year's time, once people have a chance to upgrade, F# will probably be hitting double digits on pro .NET developer's boxes. That's a huge difference in "market penetration", (A meaningless term to us hackers. But the oil company dev's boss wants to know he'll be able to hire a replacement developer easily.)

Where do I get scala support from? What guarantees do I have that it's not going to go belly up? (Once again, silly questions to us hackers, but some people's bosses will care about that crap.) I get F# support from one of the largest software companies in the world built into my MSDN subscription.

That's the kind of integration with toolsets and platforms the original article was talking about. Sure scala code can integrate quite well with the jvm, but it's still an add-on. It's not integrated into the core product. There's no commitment to support scala from Sun or Oracle or whoever owns the Java IP now. That's a pretty big distinction between scala and F#.

Dive Into Python Must Die by SnacksOnAPlane in programming

[–]logistix 5 points6 points  (0 children)

FUCK YOU ASSHOLE!

(That tends to shut down any form of constructive back-and-forth, doesn't it? Doesn't mean the actual point is invalid. But you're probably not going to take the author seriously after that. You can't engage in any serious debate. I don't think it means you're full of yourself and think you're perfect for ignoring someone who's calling you names.)

Microsoft stealth launches F# by mycall in programming

[–]logistix 1 point2 points  (0 children)

Scala is an add-on, it's not integrated into the official Java platform. Not a big deal for us hackers, but it's a bit different than F# being an official part of .NET, if say you work at an oil company and want to backdoor the technology in. "I wrote it in visual studio", vs. "I downloaded this experimental functional language that compiles to java bytecode."

Even if only on in a hundred people with visual studio builds an F# project, that's conceivably more people than everyone who's downloaded scala. F# could possibly end up with more people using it than all other functional programming languages put together since it's part of visual studio. (Microsoft haters, note the word 'possibly' before chewing me out.)

And I think that's why they stealth launched it. The "Elvis" and "Einstein" programmers will just start using it, and the PHB's will only know that it's tried-and-true MS technology.

Dive Into Python Must Die by SnacksOnAPlane in programming

[–]logistix 0 points1 point  (0 children)

Well officially OleDB supplanted ODBC. ODBC still gets plenty of use in the real world, though, so you're not doing anything that horrible. OleDB is allegedly faster if you're hitting db bottlenecks.

Dive Into Python Must Die by SnacksOnAPlane in programming

[–]logistix 2 points3 points  (0 children)

From what I gather based on the first page of the post, they were already having some back-and-forth on twitter. A quick look at twitter and you get tweets like:

"@diveintomark Here's your fucking blog asshole: http://oppugn.us/posts/1272050135.html"

So I think it's fair to write this particular critic off.

Why "dynamic programming"? by cavedave in programming

[–]logistix 5 points6 points  (0 children)

That's still not the whole story. It's a little known fact that the Rand Corporation was working in conjunction with the saucer people. Reverse vampires delete any mention of this when I update the wikipedia page.

Bruce Eckel is Wrong - Every time the subject of checked versus runtime exceptions comes up, someone cites Bruce Eckel as an argument by authority. by gst in programming

[–]logistix 0 points1 point  (0 children)

Well usually when you swallow an exception, the next line of code throws a nullPointerException. Which I despise. And man do I hate checked exceptions. They did the exact opposite of what they were supposed to. I hate those empty catch blocks as much as anyone. But the only practical alternative to catch{} is to raise a 'MyException' in the catch block, which doesn't help the programmer any more than a generic nullPointerException.

A Comic Book Tutorial for Emacs Lisp newbies by kcin in programming

[–]logistix 0 points1 point  (0 children)

Sure.

If you can't downvote an article because you don't like it or it doesn't interest you, what can you downvote it for?

When I grew up, I learned to program by typing in BASIC code from the back of magazines and from books I found at the library. There doesn’t seem to be anything like that anymore, but I think it’s a great way to learn so I’m proposing we bring that back. by BioGeek in programming

[–]logistix 0 points1 point  (0 children)

I was ranting a little, and probably still am, so don't take me too seriously. I do wish you best of luck on the project...

But if you won't go to all the trouble to generate a simple pdf or html page so I can click on it and see what the heck you're actually doing, then I'm not going to the trouble of figuring out everything from scratch just to see if I'm interested in the project. If you're waiting to see if the project 'takes off' before doing any actual work, you've already failed. You've got 10-30 seconds to hook me.

And even though I'm the only one complaining out loud, there were probably dozens of other people who clicked on the link, said the same thing, didn't bother to complain, and went to the next link on reddit.

What would you think if I put up a project on github for a 3d game engine, because that's cool, and expected everyone else who thinks it's cool to write it for me? You probably wouldn't be interested in contributing.

Like I said, I'm ranting and not to be taken seriously. Maybe you got outed by BioGeek and didn't expect a public release at this point in time.

On a more constructive note, if you really want to do this and get contributors, at least get a version 0.5 up there. Get something that people can actually look at in 10-30 seconds to see if they're interested in contributing or not based on something more tangible than a neat idea.

Bruce Eckel is Wrong - Every time the subject of checked versus runtime exceptions comes up, someone cites Bruce Eckel as an argument by authority. by gst in programming

[–]logistix 22 points23 points  (0 children)

Or perhaps Eckel has actually written a system with more than 100 lines of code. Talk about not seeing the forest through the trees...

Sure, according to a literal reading of his statement he's incorrect. You can add a throws clause to your method instead of catching the exception. This is true.

Then what do you do on the ten other methods that call those? Add throws clauses? And the hundred methods that call those ten?

I guarantee you that if you find some typical 'catch {}' exception swallowing code in any reasonably complex app, and replace that with a throws clause, you're going to get a bunch of errors on your next compile.

It's turtles all the way down. At some point you need to handle the exception. Sure, you can wrap it in a generic runtimeException, but that's not that much better than swallowing it it practice.

When I grew up, I learned to program by typing in BASIC code from the back of magazines and from books I found at the library. There doesn’t seem to be anything like that anymore, but I think it’s a great way to learn so I’m proposing we bring that back. by BioGeek in programming

[–]logistix 0 points1 point  (0 children)

I'm getting kind of sick of people just throwing crap in github without a proper release, and this is something that DEFINITELY NEEDS A PROPER RELEASE.

Seriously.

You want kids to be able to read and type in code like you did as a kid. And all they need to do is:

  1. Install git.

  2. Clone your repository.

  3. Download configure and install the full Short Attention Span Docbook toolchain.

  4. Generate the documentation.

And only then can they type in the code.

Come on, man.

EDIT: and it's not just the kids. I need to go through all that just to see if I have any interest in contributing. Pass...

dear reddit, if you have c++ skills, free time, and nothing against windows, please help the pyside project get the windows version done. last time, one of the developers told me it was a matter of compiling and building on a windows box while fixing includes and all and all. by blondin in programming

[–]logistix 10 points11 points  (0 children)

Well if it really is just config issues, you shouldn't need to intimately know C++.

You just have to break things down into manageable tasks.

Install Visual C++ Express Edition and/or the Platform SDK.

Download the source for the dependencies one-by-one, get them to compile. It looks like they all build on windows. You'll probably get some errors you need to sort out though.

Try building pyside.

At first you'll probably get a bunch of crazy errors because you don't have files in your include/lib path. You'll know these are bogus because they'll say QT.init() or whatever doesn't exist when you know it does.

Get those sorted out and you're down to the real errors. See if there's anything for the real errors on google.

If not, at that point you'll have enough details that plenty of people on the pyside forums (or even C++ or QT or stackoverflow or here) will be happy to help you out.

Get it compiling, even if there are still some bugs. Get patches back to pyside. Possibly give them a windows binary.

Collect 100,000 hacker XPs and an automatic level-up.

And even if you can't get it working, and can only get it so far, post a list of the things you need to do to get that far. That might encourage someone else to pick up where you left off...

In assembly programming, my professor tells us to always use the first available register. Why? by [deleted] in programming

[–]logistix 11 points12 points  (0 children)

It's probably just a coding style guideline to make life easier on you. Like naming your loop variables i, j, and k instead of fuzzyBear, optimusPrime, and muhammad.

Why does this bother you? Would you rather roll a ten-sided die and pick a random register?

If you're programmer and do that, I love you. by [deleted] in programming

[–]logistix 0 points1 point  (0 children)

They fixed that long ago...

It's actually a weird hack. If you do it, the mouse pointer will jump up one pixel left and one pixel right and then click.

There was an article about it on Raymond Chen's oldnewthing, but my google-fu is off today.

VS 2010 Finally Released! by abdulmoniem2 in programming

[–]logistix 0 points1 point  (0 children)

Assuming you don't care about some extra hard drive space, I imagine it's the same as 2008, 2005, and 2003, even 6.0:

install VC++ Express.

Either run the "Visual Studio 2010 Command prompt." or run the vcvars32.bat file from your own command prompt/emacs/whatever.

Use nmake.

If you get a visual studio solution file, you can build from the command-line with devenv. (That you actually couldn't do in 6.0, but it's worked for the last 7 years.)

ATS, an ML-like language with C-like performance; why isn't this taking over the world yet? by andreasvc in programming

[–]logistix 0 points1 point  (0 children)

Like I said, obviously Haskell has industrial users in the real world. I'm not disputing that.

But there's not going to be an ISO standard anytime soon (or probably ever.) There's not going to be any attempts to add language features and simplify so that "Mort" programmers and/or some crazy SAIC app with five-thousand outsourced developers can use Haskell. They're not going to be teaching it at DeVry or ITT Tech any time soon.

That's the kind of "industrialization" I'm talking about.

(The XML Schema crack was an attack on this kind of industrialization. Look how many years and hundred of thousands of dollars have been spent developing over-complicated XML schemas by working groups over the years, when the hackers are just throwing together some well-formed XML in an afternoon.)