Live data from Hacker News

Wikileaks To Leak 5000 Open Source Java Projects

steve-yegge.blogspot.com

61–70 of 140 posts

Re: Wikileaks To Leak 5000 Open Source Java Projects

#62
post #43

Earlier quoted context omitted.

One of the points he makes is that VMs are obvious for the purpose of language interop. Seems like C and Lisp (and D, another language he mentions) have been interoperating with each other without a VM in common for quite a while.

But it's not a many to many mapping, that's the point he was making. Lots of languages interop with C, but you can't just import a ruby module into a python script very easily. In fact if you want to link to C libraries from D you have to modify the C header files to turn them into D modules.

Sure, but it doesn't seem intractable to be able to design native languages to be able to interop. Lisp has been around since the late 50s, C since the 70s. The fact that they interop at all is kinda awesome.

Re: Wikileaks To Leak 5000 Open Source Java Projects

#63
post #24

Does Java have something similar to .Net's reflection?

Considering the history, don't you mean "Does .NET have something similar to Java's reflection?"

No, if I meant that, I would have written that. I know much about .net, and not a great deal about java.

Re: Wikileaks To Leak 5000 Open Source Java Projects

#64

Does Java have something similar to .Net's reflection?

I'm not sure how .NET's reflection works, but it does have reflection, where you can say stuff like "tell me all of String's methods" and for each of those you can find out public vs private vs protected, final vs not, etc. See http://download-llnw.oracle.com/javase/1.3/docs/api/java/lan...

It looks very similar, albeit a bit tidier than .net's implementation.

Re: Wikileaks To Leak 5000 Open Source Java Projects

#65
post #50

Earlier quoted context omitted.

Granted it's just using Java calls (no magic), but still fun.

Are those called wall-hack for the reason I think they are? If so, awesome.

It's a spoof alrticle -a joke - and "private" and "protected" were never about the legality of letting other parties access things - they were just conveniences for the developers and the tools to make it clear what could be optimized how, and what should and should talk to what.

Re: Wikileaks To Leak 5000 Open Source Java Projects

#66
post #25
post #11

In a global header long time ago, a friend of mine (and big "C" lover) did this to his best buddy once (a C++ and especially boost lover): #define class struct #define private public #define protected public

continued "fun" (read dangerous) redefines: #define true false #define false true #define true 0 #define false !true #define if while #define continue break :)

  #define true false
  #define false true
Did you know that if you do both of those, they cancel each other out? True story.

Re: Wikileaks To Leak 5000 Open Source Java Projects

#67

Earlier quoted context omitted.

A big part of OO languages is encapsulation. Private fields encapsulate state and private methods encapsulate implementation details. The intention there is to make the code more robust to restrict the way collaborating classes can interact with it. Example, if you have a type representing a game score, you may want to implement a public Increment() method instead of letting other types access the score value directl…

Thanks for the response, but can you not see the source code of these private methods? And wouldn't that allow you to re-write them yourself to behave however you want?

I agree, this is a worrying possibility. Luckily, with a good reflection library, you can have other obfuscated parts of the code that check for such malicious tampering and abort.

Re: Wikileaks To Leak 5000 Open Source Java Projects

#69
post #65

Earlier quoted context omitted.

Are those called wall-hack for the reason I think they are? If so, awesome.

It's a spoof alrticle -a joke - and "private" and "protected" were never about the legality of letting other parties access things - they were just conveniences for the developers and the tools to make it clear what could be optimized how, and what should and should talk to what.

Hm? I was referring to the Clojure link in the comment above. (And they're the functions linked are no joke)

Re: Wikileaks To Leak 5000 Open Source Java Projects

#70
post #61
post #36

Earlier quoted context omitted.

Is open source music a particularly big phenomenon?

[deleted]

As far as I know, sheet music is usually licensed under traditional copyright and remixing/sampling is usually licensed under fairly complicated closed licensing terms, for the cases where samples & remixes are cleared legitimately.

Creative Commons licensing of sheet music & samples would count, but I don't think that's what the parent comment was alluding to - it was a misunderstanding between the concept of "open sourcing" something and the concept of licensing it from the author under more restrictive traditional copyright terms.

Wow, this is a lot less snappy when you have to spell it out.

Post reply on HN