code logs -> 2008 -> Wed, 23 Jan 2008< code.20080122.log - code.20080124.log >
--- Log opened Wed Jan 23 00:00:26 2008
00:33 gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has quit [Quit: Z?]
02:15
< Vornicus>
Gah. I really shouldn't play Uplink, I get Vornlink stuck in my head.
02:37 Jeff [~JPL@Nightstar-764.dsl.sndg02.pacbell.net] has quit [Ping Timeout]
02:37 Jeff [~JPL@Nightstar-764.dsl.sndg02.pacbell.net] has joined #code
02:58 Attilla [~The.Attil@194.72.70.ns-11849] has quit [Connection reset by peer]
03:01
<@ToxicFrog>
McMartin: that is a pretty handy feature.
03:02
< Vornicus>
Quite.
03:02
< Vornicus>
The only other language I know that does it is Ruby, and Ruby Does It Wrong.
03:03
<@ToxicFrog>
What does Does It Wrong mean in this context?
03:03
< McMartin>
TADS 3 does it but it cheats.
03:03
< Vornicus>
Ruby, you can edit classes, replace methods, and so forth, all at runtime.
03:03
< Vornicus>
not program init, but /while the program is running/
03:03
<@ToxicFrog>
Aah.
03:04
<@ToxicFrog>
This is also how Lua (at least in OO frameworks which support it) does it.
03:04
<@ToxicFrog>
And yes, it's ;.;
03:04
< McMartin>
TADS 3 cheats differently
03:04
<@ToxicFrog>
I have yet to come up with a good way around this, though.
03:04
< McMartin>
It exploits the fact there is semantically little difference between instantiation-and-customization vs. subclassing.
03:05
< McMartin>
So Extend Classname {junk} actually subclasses and renames Classname, making the original an anonymous superclass
03:05
< Vornicus>
Ruby also /forces/ you to do so for certain operations.
03:05
<@ToxicFrog>
Aah, prototype-based OO.
03:06
< McMartin>
Ssssorrta.
03:06
< McMartin>
Since "instantiation" all happens at compiletime in T3 the line is a bit blurry.
03:06
<@ToxicFrog>
Yeah.
03:07
<@ToxicFrog>
The main reason you Can't Do That in Lua is that in Lua pretty much everything, and its dog, happens at runtime.
03:07
< Vornicus>
For instance: if you want to add a numeric type such that you can go (a number of a different type) + my_number, you have to move aside and replace num#+
03:08
< McMartin>
HOLY GEEZ THERE'S A DOG IN ANOTHER CAR
03:08
<@ToxicFrog>
So without CTMP, this kind of safeguard isn't something you can really apply.
03:08
<@ToxicFrog>
And even with CTMP you could probably find a way around it~
03:08
< McMartin>
Compile-Time... MetaProgramming?
03:08
< Vornicus>
And because the various numeric types /never/ call numeric#+, and rely entirely on int#+, real#+, biginteger#+, etc, you /have to do this for every single numeric class, period/.
03:09
<@ToxicFrog>
McMartin: yes.
03:09
<@ToxicFrog>
AST macros and the like.
03:09
< Vornicus>
This is the Wrong Way To Do Operator Overloading In Dynamically Typed Languages.
03:10
< Vornicus>
so, Python, by comparison, says "okay, you're making a new numeric class? No problem! Just write __radd__ in your own class."
03:10 * ToxicFrog nods
03:10
< McMartin>
Rad, dude!
03:10
<@ToxicFrog>
Lua also does this wrong, but in a different way.
03:10
< McMartin>
Not only is it __radd__, it is __rxor__!!!!111!
03:11
<@ToxicFrog>
Ie, you can only overload operations when the overloadee is on the LHS.
03:11
< Vornicus>
heh
03:11
<@ToxicFrog>
Stuff that would trigger __radd__ in python is a type mismatch error in Lua.
03:11
<@ToxicFrog>
This may be fixable, but I don't care enough~
03:11
< Vornicus>
I thought lua did a.add(a,b) and then b.add(a,b)
03:12
<@ToxicFrog>
...oh, so it does
03:12
<@ToxicFrog>
What was I thinking off, then?
03:13 * ToxicFrog rummages
03:13
<@ToxicFrog>
There's comparison operator handling, but that isn't the same
03:13
<@ToxicFrog>
Doesn't behave the way I described either, that is
03:13
< Vornicus>
C++ does it the way you're describing, sorta; but there you can define friends.
03:13
<@ToxicFrog>
Yeah.
03:13
<@ToxicFrog>
Hmm.
03:15
< Vornicus>
And in the end does it sensibly for a statically-typed language
03:15
< Vornicus>
I would have explicitly named operators like Python does, but that's a quibble.
03:16
< Vornicus>
Well, and it would probably have at least /somewhat/ discouraged the silliness with cout/cin
03:18 * Vornicus fiddles
03:31 Syloqs-AFH [~Syloq@Admin.Nightstar.Net] has quit [Connection reset by peer]
03:32 Syloq [Syloq@Admin.Nightstar.Net] has joined #code
03:33 Syloq is now known as Syloqs-AFH
03:40 * Vornicus does battle with "how the hell do I test /this/?"
03:51
< McMartin>
Whee Interface Builder
03:52
< Vornicus>
Hee
04:06
< Vornicus>
Okay. The main test of the red-adjacency remover has to be to actually run a bit of nasty red-adjacency glop through it and see that it comes out okay.
05:40 Thaqui [~Thaqui@Nightstar-14364.jetstream.xtra.co.nz] has joined #code
05:40 mode/#code [+o Thaqui] by ChanServ
06:41 * Vornicus gets totally caned, again, at Target Acquired. 4000 seems to be his limit.
06:43
< Vornicus>
Considering that monsters are 250-500 points a pop, that's spectacularly sad.
07:04 Vornicus is now known as Vornicus-Latens
08:07 William__ [~JPL@Nightstar-764.dsl.sndg02.pacbell.net] has joined #code
08:07 Jeff [~JPL@Nightstar-764.dsl.sndg02.pacbell.net] has quit [Ping Timeout]
08:24 C_tiger [~c_wyz@96.232.26.ns-4600] has quit [Ping Timeout]
08:51 You're now known as TheWatcher
09:04 Attilla [~The.Attil@194.72.70.ns-11849] has joined #code
09:15 C_tiger [~c_wyz@96.232.26.ns-4600] has joined #code
09:31 ReivZzz is now known as Reiver
11:39
< McMartin>
Vorn: The best way to get reasonable scores is to use the screen-clearing bombs.
11:39
< McMartin>
Those grant double points.
11:39
< McMartin>
(Also you can accelerate up and down)
11:39
< McMartin>
(This gets you killed *ever so slightly less*)
11:40
< McMartin>
That said, the game is wildly and cheerfull unfair and unbalanced in every way, because we were 14.
11:41
< McMartin>
My current record on default settings is 25600.
11:41
< McMartin>
I used to actually be able to beat it on Comatose.
11:41 * McMartin hasn't tried since.
12:13
< Attilla>
What are we talking about?
12:23 Thaqui [~Thaqui@Nightstar-14364.jetstream.xtra.co.nz] has left #code [Leaving]
12:24 gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has joined #Code
12:24 mode/#code [+o gnolam] by ChanServ
12:32
< McMartin>
Recently relevant due to my release of a Universal Binary for it that runs on Intel Macs.
12:32
< McMartin>
Which is the first time it's been ported to that platform.
12:32
< McMartin>
I do not recommend the game as a sample of my programming skills or of good play.
12:36 * McMartin also ponders one of his other projects
12:36
< McMartin>
Oddly enough, I think Blorple would have been better written in Java than Python.
13:16 * McMartin also concludes that X-Code's Interface Builder is quite acceptable at handling the view/controller glue, and adds it to the vanishingly small set of such tools he finds acceptable.
14:35
<@ToxicFrog>
X-Code?
15:39
< Vornicus-Latens>
X-Code, Mac's IDE
15:42
<@ToxicFrog>
Aah.
15:42
<@ToxicFrog>
How does it handle the V-C glue?
15:43
< McMartin>
Every windowing event is a function that matches a specific signature.
15:43
< McMartin>
You hand the Glade-equivalent a .h file, it finds those functions.
15:43
< McMartin>
You draw lines between widgets and the controller objects, picking the method to call when the event is fired.
15:44
<@ToxicFrog>
Aah. Cool.
15:44
< McMartin>
For the reverse direction, you map fields of the appropriate type to widgets, and during application initialization these fields are all set appropriately.
15:44
<@ToxicFrog>
Can you do it the other way around? Build the interface, then tell it to generate the controller function signatures based on widget names and the like?
15:45
< McMartin>
I have not found this functionality, but I haven't looked hard.
15:45
< McMartin>
It Ought To Be Possible (tm), and even if it's not, since it's a Glade-like declarative UI system there's got to be something you can parse and transform to get it.
15:46
< McMartin>
So, shock, Apple manages to have good GUI-building tools after 25 years of continuous development~
15:46
<@ToxicFrog>
Heh.
15:47
< McMartin>
That said, I can see why they aren't using C++.
15:47
< McMartin>
Because if they were, the "Every event has the same signature" trick would totally not work.
15:48
<@ToxicFrog>
Why not?
15:49
< McMartin>
Well, it wouldn't work as well.
15:49
< McMartin>
Because you don't have Python/Smalltalk-style methods.
15:49
< McMartin>
You'd need hard types and a sharp limit on what was coming in as arguments.
15:50
< McMartin>
You might be able to handle it with loltemplates, but the fact that you can pass in a "void *", pass in possibly-inherited methods, and have everything just work is a trick I don't think you can do.
15:51
< McMartin>
I guess you could do it with RTTI and downcasts.
15:51
< McMartin>
If your C++ compiler supports RTTI~
15:52 * McMartin glares at MSVC6, which failed to compile Sable for this very reason.
15:52
< McMartin>
... so, Blargh is blarghing about how I don't get to post links in here, despite letting me do so.
15:52 mode/#Code [+o McMartin] by TheWatcher
15:53
<@TheWatcher>
try now?
15:53
<@TheWatcher>
You need at least +v to post links in here
15:53
<@McMartin>
http://www.smashbros.com/en_us/index.html
15:54
<@McMartin>
OK, that time it failed to complain.
15:54
<@McMartin>
And yeah, I could post links, because I was +o
15:54
<@TheWatcher>
came through fine here
15:54
<@McMartin>
Yeah
15:54
<@McMartin>
It was letting me do it, but also /notifying me bitching about it.
15:54
<@TheWatcher>
Probably a desync
15:54
<@TheWatcher>
blargh seems /good/ at desyncing.
15:54
<@McMartin>
The Super Mario Bros. Evolved link there is worth checking out~
15:57 * McMartin sadfaces at his 1,254-page Swing manual.
15:57 mode/#code [-o+o McMartin McMartin] by Vornicus-Latens
15:57 mode/#code [+oooooo Attilla C_tiger MyCatVerbs Pi Serah Syloqs-AFH] by Vornicus-Latens
15:57 mode/#code [+o Vornicus-Latens] by Vornicus-Latens
15:57 Vornicus-Latens is now known as Vornicus
15:57 mode/#code [+o William__] by ToxicFrog
15:58
<@ToxicFrog>
McMartin: see, the problem there is that you're using Swing~
15:58
<@McMartin>
Well, I'm not yet.
15:58
<@McMartin>
I'm just entirely too familiar with WinGTK woes and thus am seriously considering having Blorple go Java if it goes cross-platform.
15:59
<@ToxicFrog>
What are these winGTK woes?
15:59
<@McMartin>
Though I hear Eclipse has an interface-builder plugin now for Swing. Maybe it doesn't suck.
15:59
<@McMartin>
DFW, mostly.
15:59
<@McMartin>
Pidgin's the only app I've managed to get to work acceptably with it.
15:59
<@McMartin>
X-Chat, as you may recall, randomly disabled my clipboard.
15:59
<@ToxicFrog>
Aah. Yes.
15:59
<@McMartin>
Gaim crashed every time it opened a second window.
16:00
<@McMartin>
I Don't Trust It.
16:00
<@ToxicFrog>
I wonder which of those were using system-wide installs and which were using self-contained DLLs.
16:01
<@McMartin>
Swing, painful as it is to develop with, is Instantly Actually Cross-Platform unlike every other GUI library (including the ones that are supposed to be) and Just Works as long as they have a JRE to begin with.
16:01
<@ToxicFrog>
My experience has generally been that system-wide installs of GTK are rather error prone (although not always - GIMP's seems to work fine) whereas self-contained ones have consistently just worked for me.
16:01
<@ToxicFrog>
...all that said, I should probably test gtk-server to see if it works under windows before I rely too heavily on it.
16:01
<@McMartin>
[* Important disclaimer: All previous claims only valid on Java 1.4 or later)
16:01
<@McMartin>
[* And Aqua is IIRC only properly supported starting with 1.5]
16:02
<@McMartin>
[** Not that this affects the developer]
16:02 * ToxicFrog nods
16:03
<@ToxicFrog>
In my case, targeting swing would mean that my already glacial development speed would rapidly drop to 0.
16:03
<@McMartin>
Quite.
16:03
<@McMartin>
On the other hand, I've done it before.
16:03
<@McMartin>
So making Blorple -- which is a pretty simple GUI *anyway* -- target Swing would just be A New Project, and really an opportunity to see if the Eclipse team really has made Glade For Java.
16:04
<@ToxicFrog>
GTK at least ensures I'll get something -I- can use out of it, and at least a chance of getting working OSX and windows releases.
16:04
<@McMartin>
Since some of the hype I was hearing from end-users sounded like not only had it, they'd managed to play games where it sandboxes the app to en-Glade-inate it from arbitrary code
16:04
<@McMartin>
Presumably by relinking it against something that pretends to be SWING/AWT but isn't.
16:04
<@ToxicFrog>
Ideally, I would use some SDL-based GUI framework, but they all suck.
16:04
<@McMartin>
Yes. ;_;
16:05
<@McMartin>
Though apparently OS X SDL can interoperate cleanly with surrounding GUI components.
16:05
<@McMartin>
But then you lose crossplatformality which was why you were using SDL to begin with.
16:05
<@McMartin>
I haven't experimented.
16:06
<@McMartin>
And I'm kind of afraid to, for fear of having the GUI equivalent of learning currying happen. =P
16:06
<@ToxicFrog>
Heh.
16:32 * MyCatVerbs ponders attempting a window toolkit using GLUT.
16:32
<@MyCatVerbs>
McMartin: what's wrong with currying?
16:33
<@Vornicus>
I think the point is: you learn currying, and then you can't stand to go back to languages where you can't.
16:33
<@MyCatVerbs>
(Seemed easy to me by comparison with actually *getting* closures for the first time.)
16:33
<@MyCatVerbs>
Vornicus: ...heh.
16:34
<@MyCatVerbs>
Vornicus: pattern-matching too. Also closures.
16:34
<@MyCatVerbs>
Vornicus: oh and type inference. <3
16:54
<@ToxicFrog>
Indeed.
16:54
<@ToxicFrog>
This is why I sometimes suspect learning Haskell was a bad idea.
16:55 You're now known as TheWatcher[afk]
17:32 * gnolam slaps MyCatVerbs.
17:32
<@gnolam>
GLUT? Seriously?
17:34
<@Vornicus>
GLUT :(
17:46
<@McMartin>
Goddamn alien GLUT.
17:46 * McMartin strongly suggests SDL-OpenGL over GLUT for any purpose whatsoever.
17:48
<@McMartin>
And yes, the currying comment was with respect to "You miss it terribly when you lack it, and given that there's exactly one language that has currying and a freely-available production-quality compiler..."
17:50
<@McMartin>
(That said, it looks like VegaStrike uses GLUT for its basic window management.)
18:16 AnnoDomini is now known as Pete
18:37
<@McMartin>
Hooray, carlsbad now works in lab.
18:37 * McMartin mutters at MAC filtering on public networks.
18:52
<@McMartin>
"The company is best known for its BBEdit text editor, marketed under the registered trademark 'It doesn't suck.'"
18:53
<@Vornicus>
Heh
19:24 You're now known as TheWatcher
19:43 William__ is now known as JeffL
19:44
<@JeffL>
Really, I've (mostly) learned OCaML and I'm not feeling a burning need to go back to it when I write in other languages.
19:44
<@JeffL>
(I am feeling a burning need to go back to C/C++, but that's because this university has decided that Java is now the Default Language.)
19:45
<@TheWatcher>
Poor bugger.
19:48
<@McMartin>
C I can see.
19:48
<@McMartin>
But what are you missing in C++ that you shouldn't really be leaving behind?
19:48
<@McMartin>
... at least if you're using Java 1.5 or later?
19:48
<@JeffL>
To be honest, it's not that I don't mind working in a high-level language, it's just that I think I should be learning how to work in the speed and the quickness.
19:49
<@McMartin>
... what are you doing where you're having noticable performance hits outside of VM setup?
19:50
<@McMartin>
(Also, having TAed the same class once in C++ and once in Java I have firm opinions about which should be used as a teaching language, btu that's not, at the moment, here nor there)
19:51
<@McMartin>
That said, in an awful lot of application domains, C++ doesn't buy you speed unless you sacrifice important bits of the specification.
19:52
<@TheWatcher>
I note that learning C++ WRT to "speed and quickness" tends to be learning which reatures to /avoid/ in C++ to avoid runtime overheads
19:52
<@McMartin>
Which means programming in C~
19:53
<@McMartin>
... which in turn means that if your spec includes "string processing with some kind of guarantee that malific actors cannot pwnz0r our entire computer", you're doing it wrong by virtue of doing it in C to begin with.
19:53
<@JeffL>
I'm not having them yet. As I'm saying, I'm trying to prepare for the scenario in work when I need to write something fast, and I don't want to only have Java in my toolkit when that happens.
19:53
<@McMartin>
Aha.
19:54
<@McMartin>
I'd recommend sharpening your algorithm-fu, then.
19:54
<@TheWatcher>
Ah, yes.
19:54
<@TheWatcher>
Also, learn assembler ;P
19:54
<@McMartin>
The speed gains realized from a Java->C translation, especially in a long-running program, are <10x constant factor at best.
19:55
<@McMartin>
While replacing a TreeMap with a HashMap -- or vice versa, depending on which one was the right one for the problem, produces performance gains that get larger the more heavily loaded the machine is.
19:55
<@McMartin>
s/,/ --/
19:55 * JeffL is actually going to be research-stuff with the local algorithm expert prof this Spring Quarter.
19:56 * McMartin ignores dynamic re-JITters, because those are totally cheating.
19:56
<@McMartin>
Albeit funny.
19:56
<@JeffL>
Are fibonacci heaps cheating then?
19:56
<@McMartin>
No.
19:56
<@McMartin>
Java programs can recompile themselves at runtime based on profiling
19:56
<@McMartin>
So it's possible to write a daemon in it that outperforms, on certain loads, any possible C program.
19:57
<@McMartin>
Or any possible statically compiled program, period.
19:57
<@McMartin>
Mainly useful only as a proof of concept.
19:57
<@McMartin>
The real justification for JIT is "it costs as much as link-loading, and you don't see people whining about that."
19:57
<@JeffL>
EAP on JIT.
19:57
<@McMartin>
Just-In-Time.
19:58
<@JeffL>
Ah.
19:58
<@McMartin>
In Java, taking a .classfile and translating it into machine code at run time.
19:58
<@McMartin>
Well, at load time.
19:58
<@McMartin>
Generally while loading the rest of the program from disk.
19:58
<@McMartin>
During the time that a C or other language program would be resolving its symbol table and all that.
19:59 * TheWatcher always tends to become Amused by the people who jump up and down about that one
19:59
<@McMartin>
re-JITting is noticing which bits of the program are running a lot and doing a tuned recompile to exploit that (hints to the branch predictors, etc.)
19:59
<@McMartin>
TW: I will grant that JITted code is much harder to debug.
20:00
<@McMartin>
And that early-generation runtimes will often have bugs in their compiler, which makes life Very Hard for end users, because the application source -- and even the application binary -- are pristinely correct
20:00
<@McMartin>
And, all this said, Java still needs an official WAOT for programs that don't use reflection.
20:01
<@Vornicus>
WAOT?
20:01
<@McMartin>
(Way Ahead Of Time. Not an official acronym but totally needs to be)
20:01
<@TheWatcher>
Yeah, and that's just a speed issue, too. Comparing speed alone is just an e-peen waving contents, especially when IME it only tends to be that dramatic in toy programs
20:01
<@TheWatcher>
*contest
20:01
<@McMartin>
Or in situations where there is no acceptable speed, like web servers
20:01
<@TheWatcher>
(sory, migraine screwing with typing..)
20:02
<@McMartin>
That said, Tomcat tends to beat Perl or Python CGI~
20:02
<@TheWatcher>
Please don not talk to me of... that webserver.
20:02
<@McMartin>
Oddly, it's the only one I've ever been able to coerce into running acceptable.
20:02
<@McMartin>
acceptably.
20:03
<@McMartin>
Well, on dynamic content.
20:03
<@McMartin>
(By which I mean "actually serving the pages it's supposed to")
20:03
<@TheWatcher>
My soul is full of hate, thereof. 6 months fitting a (admitted;y fairly nifty) virtual file system into the side of it exposed me to things in there I really would have rather never seen
20:03
<@McMartin>
Heh.
20:03
<@McMartin>
I say nothing about its implementation. Only its operation and the external APIs it provides.
20:03
<@McMartin>
Then again, I am often taken by the urge to find the creators of PHP and erase them from history
20:04
<@TheWatcher>
oh, please do
20:04
<@TheWatcher>
as long as I can help
20:05
<@McMartin>
Well
20:05
<@JeffL>
Speaking of which, is the Purple Dragon Book any good?
20:05
<@McMartin>
JeffL: It's awesome.
20:05
<@McMartin>
A paper of mine is cited in it~
20:05
<@JeffL>
I can grab it for 100 at the Campus Bookstore.
20:05
<@McMartin>
More seriously, it's the latest edition of the only classic text in the field.
20:05
<@TheWatcher>
(actually, I am occasionally tempted to attempt to add the same filesytem, rewritten in c or c++, to apache, fot it would make things like multiple mediawikis /so much easier to maintain/)
20:06
<@McMartin>
And the additions are all in stuff that People Need To Start Doing, God Damn it.
20:07
<@McMartin>
But yeah.
20:07
<@McMartin>
If you're at all interested in the principles of compilers or even just language frontends, pick it up because it is The Book.
20:07
<@TheWatcher>
(if onlye because you'd actually only have one installed, and several direcotries with LocalSettings.php in each, and metadata file that would shadow the entire contents of the main install directory into each)
20:07
<@McMartin>
Nearly every other compilers book is just Learn Bison In 14 Days And Never Learn To Make It Give Proper Error Messages.
20:08
<@McMartin>
(Hate LR parsers so much zomg)
20:08
<@Vornicus>
WAOT compiling for Java doesn't seem to be sane to me, mainly because you've got a bazillion architectures to talk to.
20:08
<@McMartin>
The only other compiler book I'd at all recommend is Appel's "Modern Compiler Implementation in {C/Java/ML}" and then only as an ancillary text.
20:09
<@McMartin>
Vorn: If you want a fully standalone app for some arch, you're still so bound.
20:09
<@McMartin>
JeffL: If you already have the Red Dragon book, the Purple one is only worthwhile if you intend to learn about program analysis or garbage collection techniques that aren't awful.
20:10 * JeffL lacks any DB.
20:10
<@McMartin>
OK.
20:11
<@McMartin>
Yes, get the Purple Dragon Book.
20:11
<@McMartin>
The ability to hand-roll a recursive descent parser is a good one.
20:11
<@McMartin>
And the rest of the book is the various stunts you can pull once you have.
20:12
<@McMartin>
(Most "compiler research" for the past 10 years has been in taking established technologies here and putting them to use in program understanding in general)
20:13
<@Vornicus>
McM: well, okay.
20:13
<@McMartin>
The main reason I'd want a Java WAOT is for bunging an EXE onto a Windows machine and having it just go.
20:14
<@Vornicus>
with Java GPL'd now we might see that.
20:15
<@McMartin>
Well, gcj has done it incredibly poorly for awhile
20:15
<@McMartin>
But it dynamically links in all kinds of junk that shouldn't be there.
20:22 * Vornicus ponders *nix. Why did they decide to go the way they did, with the #! line and all that, where DOS and Windows just picked an executable format and stuck to it?
20:23
<@McMartin>
... because they didn't?
20:23
<@McMartin>
EXE went through several revisions
20:23
<@McMartin>
For that matter, I can think of three completely different executable formats on Linux off the top of my head.
20:23
<@McMartin>
#! is for script files.
20:24
<@McMartin>
And #! is so enormously superior to .bat that justification seems superfluous.
20:24
<@McMartin>
(#! scripts, a.out format, and ELF)
20:27
<@Vornicus>
...does WINE hook in with the executable thingy to make it possible to just run a Windows program?
20:27
<@Vornicus>
...and, does Java?
20:29
<@McMartin>
No to the first, though I think it could, and no to the second, because I do not believe it can (what with an executable being spread across many files).
20:29
<@Vornicus>
well, a .jar isn't exactly spread across many files.
20:29
<@McMartin>
You could probably write a small modification to the java terp to have it eat an executable jar that started with a #! though.
20:30
<@McMartin>
You have to make it ignore that line.
20:30
<@McMartin>
Since otherwise JAR will go "Hey this starts with #! and is totally not a JAR file"
20:30
<@McMartin>
Anyway, zomg teh lunchz0rz
20:32
<@McMartin>
... if the #! target can itself be a #! script, you could write a program that takes #!d JAR, strips the first line, makes a new temp file, and runs java -jar on that in about three lines.
20:33
<@Vornicus>
The #! target can indeed be a #! script.
20:34
<@McMartin>
Then, as always, an extra layer of indirection solves all problems.
20:35
<@Vornicus>
Indeed.
20:36
<@Vornicus>
(the system makes no distinctions at all between executable formats, on the outside.)
20:44 Vornicus [~vorn@Admin.Nightstar.Net] has quit [Ping Timeout]
21:56 Pete [AnnoDomini@83.21.27.ns-4417] has quit [Ping Timeout]
21:56 AnnoDomini [AnnoDomini@83.21.12.ns-3230] has joined #Code
21:56 mode/#code [+o AnnoDomini] by ChanServ
22:12
<@ToxicFrog>
McMartin: wine does, actually
22:12
<@ToxicFrog>
Or at least, some Wine packages/installers do
22:12
<@ToxicFrog>
The binfmt_misc kernel module lets you do that, and the Fedora and Ubuntu Wine packages both use it to register MZ and PE with Wine.
22:13
<@ToxicFrog>
Under windows, the JRE does associate .jar files with javaw -jar $1.
22:13
<@ToxicFrog>
I don't know if the linux install packages do the same, but it's easy enough to do it in the graphical environment.
22:14
<@ToxicFrog>
In the shell, you might be able to fake it with binfmt_misc without needing to #! it.
22:19
<@McMartin>
Yeah, I was thinking shell
22:19
<@McMartin>
GNOME does it on Fedora since F6 at least.
22:26
<@ToxicFrog>
Oho. You can do it with class files, too.
22:26
<@ToxicFrog>
Since they have magic 0x CA FE BA BE
22:29
<@McMartin>
Yup
22:29
<@McMartin>
Not with shebangs though, becuase that spoils the magic
22:30
<@ToxicFrog>
Yeah, I mean with binfmt_misc
22:30
<@ToxicFrog>
You need a shell script that translates /path/to/Foo.class into cd /path/to && java Foo, and then you just register that as the loader.
22:49 You're now known as TheWatcher[T-2]
22:52 You're now known as TheWatcher[zZzZ]
22:57
<@MyCatVerbs>
ToxicFrog: unfortunately that still misses out the other hugely important task performed by the massive shell scripts typically used to start up java programs: dealing with classpath issues.
23:01
<@McMartin>
This would of course be much less of a problem if distributors were not complete headless douchebags when it comes to java libraries
23:01
<@McMartin>
If they used half the intelligence Windows uses to handle DLLs you wouldn't need more than two lines of shell.
23:22 Doctor_Nick [~nick@68.35.203.ns-3367] has joined #code
23:59 gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has quit [Quit: Z?]
--- Log closed Thu Jan 24 00:00:32 2008
--- Log opened Wed Jan 23 19:41:55 2008
19:41 TheWatcher [~chris@Nightstar-29731.dsl.in-addr.zen.co.uk] has joined #code
19:41 Irssi: #code: Total of 18 nicks [14 ops, 0 halfops, 1 voices, 3 normal]
19:41 mode/#code [+o TheWatcher] by ChanServ
19:42 Irssi: Join to #code was synced in 43 secs
--- Log closed Thu Jan 24 12:52:00 2008
code logs -> 2008 -> Wed, 23 Jan 2008< code.20080122.log - code.20080124.log >