--- Log opened Tue Mar 01 00:00:18 2016 |
00:08 | | Kindamoody is now known as Kindamoody[zZz] |
00:37 | | Derakon[AFK] is now known as Derakon |
01:34 | | ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds] |
01:36 | | ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code |
01:36 | | mode/#code [+ao ToxicFrog ToxicFrog] by ChanServ |
02:10 | | Turaiel[Offline] is now known as Turaiel |
02:49 | | Vornotron is now known as Vornicus |
02:50 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
03:02 | | Red_Queen [Z@Nightstar-r9lk5l.cust.comxnet.dk] has joined #code |
03:02 | | mode/#code [+o Red_Queen] by ChanServ |
03:04 | | Crossfire [Z@Nightstar-r9lk5l.cust.comxnet.dk] has quit [Ping timeout: 121 seconds] |
04:26 | <@celticminstrel> | No problems with latest rebase, so ignorectime probably worked. |
04:41 | <&Derakon> | ...Jesus H Christ on a tapdancing pogo stick. https://areallygoodrantblog.wordpress.com/2016/02/13/the-aws-java-documentation- is-fucked/ |
04:42 | <&Derakon> | ^ A lovely little rant about how not to write Hello World demo programs. |
04:45 | < starkruzr> | Anybody know why openjdk-8-jdk has all these X-related dependencies on Ubuntu? |
04:50 | < [R]> | swift? |
04:50 | < [R]> | Also Ubuntu is a little confused about the meaning of "optional" and assumes it means "manditory" in regards to how it handles dependancies. |
04:54 | <&McMartin> | I'm totally OK with ranting about Aspect Oriented Programming |
04:54 | <&McMartin> | aka "The Principle of Maximum Surprise" |
04:54 | <&McMartin> | aka "COME FROM was supposed to be a joke you guys" |
04:55 | < [R]> | I've yet to have anyone actually explain WTF AOP even is. |
04:55 | < [R]> | The wikipedia article is written as if it assumes you already are drowning in AOP punch. |
04:55 | <&McMartin> | I can do the short version in a bit |
04:55 | | * McMartin is dealing with Stuff else net |
04:56 | <@celticminstrel> | As far as I know, it's a way to inject log messages in arbitrary locations in an application without modifying the application source code. |
04:58 | < [R]> | AWS? IIRC it's what Forge uses to make Minecraft modding possible. |
04:58 | <@celticminstrel> | ...saying it that way makes it sound like it's just like breakpoints which execute code instead of entering the debugger... |
04:58 | <&McMartin> | celticminstrel: That is the one good use of it |
04:58 | <@celticminstrel> | The log messages? |
04:59 | <&McMartin> | yes |
05:00 | <&McMartin> | Basically, you define a function and a pattern of code |
05:00 | <&McMartin> | And then calls to this function precede, follow, or replace anything that matches that pattern. |
05:01 | <&McMartin> | Which is great for "Shit. Um, any time someone hits the database, log stuff about it" and letting the compiler handle it |
05:01 | <&McMartin> | It's fine as a debugging tool |
05:01 | | Reiv [NSwebIRC@Nightstar-g7fs0k.xtra.co.nz] has quit [Ping timeout: 121 seconds] |
05:01 | <&McMartin> | but there's this whole weird tradition of trying to actually build complete architectures based on it |
05:02 | | * starkruzr has just discovered Jenkins. |
05:02 | <&McMartin> | The argument is basically "well, you can't actually encapsulate stuff in ways that let you solve your problems in one place reliably, so this solves that" |
05:02 | < starkruzr> | Well. I'd discovered it some time ago. But have stood it up and am playing around with it. |
05:02 | <&McMartin> | And it does, but the side effect is that you cannot understand even a single line of code in the result without reading the entire program |
05:03 | <&McMartin> | It's like the problem with exceptions, squared |
05:03 | <&McMartin> | And now for the punchline |
05:03 | <&McMartin> | Common LISP totally had this 35 years ago. |
05:03 | <&McMartin> | When defining methods you could define the method itself, and "before" or "after" independently |
05:03 | <&McMartin> | You also could select methods based on the type of any of the arguments instead of there being a single magic "this" |
05:04 | <&McMartin> | Common LISP programmers are really, really smug about OO |
05:04 | < starkruzr> | I feel like every Old Programming Soul ends up praising LISP roughly once every two weeks, regardless of whether they ever use it. |
05:04 | <&McMartin> | Well, here it's more "we've always known this is a bad idea, guys" |
05:04 | <&McMartin> | Multiple dispatch is one of those features that nobody has because it's really easy to fake once you learn the trick |
05:04 | <&McMartin> | ... a trick I kind of learned in the gutter, but so it goes |
05:04 | <@celticminstrel> | Multiple dispatch? |
05:05 | <&McMartin> | "You also could select methods based on the type of any of the arguments instead of there being a single magic 'this'" |
05:05 | <&McMartin> | I came at this from program analysis, so for me the canonical example is a compiler |
05:05 | <&McMartin> | You have a bunch of passes, and a bunch of syntax constructs |
05:05 | <@celticminstrel> | Oh, right. |
05:06 | <&McMartin> | So you have a function that's basically doStuff(pass, ast) and essentially both "pass" *and* the ast node count as the "this" pointer |
05:07 | | Derakon is now known as Derakon[AFK] |
05:07 | | * starkruzr scratches his head |
05:08 | < starkruzr> | How does that work, exactly? |
05:09 | <&McMartin> | So, three passes, five kinds of syntax, say |
05:09 | <&McMartin> | That means there are, ultimately, fifteen pieces of code |
05:10 | <&McMartin> | With naive single dispatch, you can have three Pass objects with five methods each, one for each kind of syntax |
05:10 | <&McMartin> | Or you could have five Syntax classes with three methods each, one for each pass |
05:10 | <&McMartin> | With multiple dispatch, you just Have The Fifteen Method Implementations. |
05:11 | <&McMartin> | And if you're likely to need to add both new passes *and* new kinds of syntax as you go on, that's more convenient because neither case requires you to reimplement the universe when you want to change the other one |
05:12 | <&McMartin> | So since nobody uses Common LISP, and because there are other things single dispatch lets you do more conveniently (such as enforce protocols or duck typing), what you use instead is this: https://en.wikipedia.org/wiki/Visitor_pattern |
05:12 | <&McMartin> | Which is basically writing out the logic for a multiple-dispatch call by hand. |
05:14 | < starkruzr> | McM |
05:15 | < starkruzr> | Remind me what you do for a living again? |
05:16 | <&McMartin> | "Senior Software Engineer" |
05:16 | <&McMartin> | This is from my previous career, as a grad student focusing on compilers and program analysis |
05:17 | <&McMartin> | ... this also means I'll go into Lecture Mode at the drop of a hat. |
05:17 | <&McMartin> | ... you also weren't around when I got into 8-bit retro projects |
05:17 | | Red_Queen [Z@Nightstar-r9lk5l.cust.comxnet.dk] has quit [Ping timeout: 121 seconds] |
05:17 | <&McMartin> | See also https://twitter.com/mcmmed/status/612813002899722240 and https://twitter.com/mcmmed/status/614936124096548864 |
05:18 | | * McMartin has spent much of his hobby time over the last year breaking the C64's graphics chip in half, with the help of madmen of old |
05:19 | | Turaiel is now known as Turaiel[Offline] |
06:32 | | * Vornicus poke vaguely at ducks. |
06:40 | | Kindamoody[zZz] is now known as Kindamoody |
06:45 | | himi [fow035@Nightstar-dm0.2ni.203.150.IP] has quit [Ping timeout: 121 seconds] |
07:24 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed] |
07:28 | | Reiv [NSwebIRC@Nightstar-g7fs0k.xtra.co.nz] has joined #code |
07:28 | | Netsplit *.net <-> *.split quits: @PinkFreud, @ToxicFrog |
07:43 | <@abudhabi> | I get the impression that in bash, you basically guess whether 0 and 1 are true or false, then test the script and check if you guessed right. |
07:44 | | Netsplit over, joins: ToxicFrog |
07:45 | < catadroid> | Isn't C++ method overloading just multiple dispatch? |
07:45 | < catadroid> | Er, function overloading |
07:45 | < catadroid> | Specifically not methods |
07:46 | | celticminstrel is now known as celmin|sleep |
07:46 | < catadroid> | I've been wondering how much of haskell/rust's type systems templates cover |
07:46 | < catadroid> | I consider OOP to be somewhat limited, I've discovered |
07:47 | <@celmin|sleep> | I can't really explain why, but I don't think that's multiple dispatch. |
07:47 | <@celmin|sleep> | Maybe because it doesn't allow runtime method resolution, or maybe because it's not necessarily the same number of arguments when overloading... |
07:48 | <@celmin|sleep> | I imagine McMartin could come up with a better explanation... if I'm right, that is. |
07:49 | < catadroid> | You can write your fifteen method implementations and it'll pick the right one based on the two types |
07:49 | < catadroid> | Although not virtually I suppose |
07:52 | < catadroid> | So that's presumably the difference here |
07:52 | < catadroid> | It'll pick the type at compile time but not based on runtime characteristics |
08:20 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code |
08:41 | | PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has joined #code |
08:41 | | ServerMode/#code [+o PinkFreud] by *.Nightstar.Net |
08:41 | | mode/#code [+o Reiv] by ChanServ |
08:43 | <&McMartin> | catadroid: Overloading isn't dispatch because it's resolved at compile time |
08:44 | <&McMartin> | So you can't play games with polymorphism &c and have it just go to the right method when only handed a variable known to be of the superclass |
09:01 | | Kindamoody is now known as Kindamoody|afk |
09:02 | | catadroid` [catalyst@Nightstar-frfutf.dab.02.net] has joined #code |
09:05 | | catadroid [catalyst@Nightstar-7ffc9s.cable.virginm.net] has quit [Ping timeout: 121 seconds] |
09:15 | | catadroid` [catalyst@Nightstar-frfutf.dab.02.net] has quit [[NS] Quit: Bye] |
09:58 | | Crossfire [Z@Nightstar-r9lk5l.cust.comxnet.dk] has joined #code |
09:58 | | mode/#code [+o Crossfire] by ChanServ |
10:12 | | Emmy [NSwebIRC@Nightstar-esfu0j.dynamic.ziggo.nl] has joined #code |
10:55 | | Reiv [NSwebIRC@Nightstar-g7fs0k.xtra.co.nz] has quit [Ping timeout: 121 seconds] |
11:06 | <@abudhabi> | jerith, jeroud: You work in telecom, right? |
11:06 | <@abudhabi> | Could you explain how MMS works? |
11:07 | <&jerith> | abudhabi: I don't, but I work with various mobile messaging things. |
11:07 | <&jerith> | We've never actually done anything with MMS. |
11:07 | | * jerith tries to remember. |
11:09 | <&jerith> | So, sending over MMS isn't that different from sending over SMS. |
11:09 | <&jerith> | On the receiving side, you don't actually get the MMS data. |
11:09 | <@abudhabi> | OK. |
11:09 | <&jerith> | What you get is a control message over SMS containing a URL. |
11:09 | <&jerith> | Then you fetch the MMS data from that URL. |
11:10 | <@abudhabi> | Yeah, I think I received something like that once or twice. |
11:10 | <@abudhabi> | On a dumbphone. |
11:10 | | gnolam_ [lenin@Nightstar-t1tbf0.cust.bahnhof.se] has joined #code |
11:11 | <&jerith> | Notably, this uses the mobile data connection instead of the GSM channel. |
11:11 | | gnolam [lenin@Nightstar-t1tbf0.cust.bahnhof.se] has quit [Ping timeout: 121 seconds] |
11:11 | <@abudhabi> | So you have to manually click the URL in the phone and it gets the data? |
11:12 | <&jerith> | The handset is supposed to know what to do with the control message. |
11:12 | <@abudhabi> | OK, so capable phones fetch it automatically? |
11:12 | <&jerith> | But that's up to the handset. |
11:13 | <&jerith> | I think I've seen handsets that present the URL, handsets that fetch the data when you open the message, and handsets that fetch the data when the message is received. |
11:13 | <&jerith> | I could be mistaken, though. |
11:14 | <&jerith> | I try to avoid things like MMS, because they're terrible and full of spiders. |
11:14 | <&jerith> | (Multipart SMS is also terrible and full of spiders, but I've been unable to avoid that.) |
11:16 | <@abudhabi> | (Luckily, my part in SMS involves only higher level stuff. The only thing about parts I have to do is count characters as an indication for the end user.) |
11:19 | | ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds] |
11:20 | | ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code |
11:20 | | mode/#code [+ao ToxicFrog ToxicFrog] by ChanServ |
11:25 | | catadroid [catalyst@Nightstar-frfutf.dab.02.net] has joined #code |
11:28 | | ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds] |
11:31 | | ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code |
11:31 | | mode/#code [+ao ToxicFrog ToxicFrog] by ChanServ |
11:47 | <&jerith> | Ooh, counting characters. |
11:47 | <&jerith> | That's significantly harder than it sounds. |
11:47 | <@TheWatcher> | Heh |
11:48 | <@abudhabi> | I know. We have a library for it. |
11:48 | <@TheWatcher> | But 7-bit ascii is enough for anyone! |
11:48 | <@TheWatcher> | >.> |
11:48 | <&jerith> | Does it know about the GSM 03.38 character set? |
11:48 | <@abudhabi> | Lemme check. |
11:48 | <&jerith> | TheWatcher: I wish GSM used 7-bit ASCII. |
11:48 | | catadroid` [catalyst@Nightstar-c854gu.dab.02.net] has joined #code |
11:48 | <&jerith> | abudhabi: Some punctuation is escaped, which means it counts for two. |
11:49 | <@abudhabi> | There's a 'standard GSM alphabet' defined here. I'm guessing it's what you mean. |
11:49 | <&jerith> | As soon as you have a character that isn't in GSM 03.38, you get switched to UCS-2 at 70 chars per message. |
11:49 | <@abudhabi> | Also an 'extended GSM alphabet'. |
11:50 | <&jerith> | That's assuming you're talking to a sensible SMSC that isn't doing a bunch of broken charset transforms. |
11:50 | <@abudhabi> | I see a reference to UCS-2 and halving the message length here, too, yes. |
11:50 | <&jerith> | Quite a lot of our stuff is implicitly latin1 and then breaks. |
11:51 | <&jerith> | Or utf8 and then breaks differently. |
11:51 | | catadroid [catalyst@Nightstar-frfutf.dab.02.net] has quit [Ping timeout: 121 seconds] |
11:52 | <&jerith> | In at least two cases, the GSM packed message gets unpacked into a C string and the text gets truncated at the first `@` character. |
11:52 | <&jerith> | (GSM 03.38 assigns that codepoint 0, which means it's NUL.) |
11:53 | <&jerith> | What's this stuff for, btw? |
11:53 | <&jerith> | Are you working on a handset? Talking directly to telcos? Going through aggregators or other third parties? |
11:54 | <&jerith> | https://github.com/praekelt/vumi is the messaging system we built. :-) |
11:54 | <@abudhabi> | Receiving MMS, processing it, and sending it on, all via HTTP. |
11:55 | | ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds] |
11:56 | | ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code |
11:56 | | mode/#code [+ao ToxicFrog ToxicFrog] by ChanServ |
11:57 | | * abudhabi applies duct tap to ToxicFrog's connection. |
11:57 | <@abudhabi> | +e |
12:09 | | ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds] |
12:10 | | ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code |
12:10 | | mode/#code [+ao ToxicFrog ToxicFrog] by ChanServ |
12:10 | | catadroid` [catalyst@Nightstar-c854gu.dab.02.net] has quit [[NS] Quit: Bye] |
12:48 | | gnolam_ is now known as gnolam |
12:48 | | mode/#code [+o gnolam] by ChanServ |
13:29 | | ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds] |
13:37 | | ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code |
13:37 | | mode/#code [+ao ToxicFrog ToxicFrog] by ChanServ |
13:39 | | celmin|sleep is now known as celticminstrel |
14:33 | <@TheWatcher> | ... I have video in webpages. |
14:33 | <@TheWatcher> | I wish I didn't |
14:33 | <@TheWatcher> | Because this shit is far mor aggro than it ever needs to be. |
14:34 | <@TheWatcher> | No universally supported format, crap differs from browser to browser and platform to platform. Argh |
14:35 | <@TheWatcher> | It's the good old days of the browser wars, only with much bigger file sizes. |
14:36 | | Crossfire [Z@Nightstar-r9lk5l.cust.comxnet.dk] has quit [Ping timeout: 121 seconds] |
14:41 | < Emmy> | ouch, sorry to hear about the diagnosis |
14:41 | < Emmy> | hope the chemo and radiation treatment |
14:41 | < Emmy> | work |
14:47 | <@gnolam> | Emmy: mischan? |
14:48 | < Emmy> | no, the video in the webpage. :P |
14:51 | <@TheWatcher> | On the bright side, at least it's not terminal. I would say that you can't do video in a terminal, but I wouldn't put it past some bleedin lunatic to try it. |
14:51 | <@TheWatcher> | >.> |
14:51 | < Emmy> | augh ascii video |
14:51 | < Emmy> | pretty damn sure someone implemented it |
14:51 | < Emmy> | it's like r34 |
15:01 | | Emmy [NSwebIRC@Nightstar-esfu0j.dynamic.ziggo.nl] has quit [[NS] Quit: choo choo goes the train.] |
15:24 | <&ToxicFrog> | TheWatcher, Emmy: VLC has supported the tty as an output surface for yars. |
15:24 | <&ToxicFrog> | Years, even. |
15:25 | <@TheWatcher> | Madness. |
15:26 | | Natan [NSwebIRC@Nightstar-f3k.t3q.245.162.IP] has joined #code |
15:26 | < Natan> | Hello |
15:33 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code |
15:33 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
16:16 | < starkruzr> | Anybody here speak Java? |
16:16 | <@ErikMesoy> | I used to. Might have rusted. |
16:16 | < starkruzr> | I am trying to test some code on the command line, as opposed to IntelliJ IDEA, and javac does not like it. |
16:19 | < starkruzr> | Mostly I am trying to figure out if there is any way to tell it "go get whatever stupid libraries you need." |
16:23 | < starkruzr> | Java IDEs appear to do a lot of very opaque magic in the background in order to make builds work. |
16:25 | <@ErikMesoy> | Poke at the classpath? Beyond that, magic. |
16:26 | < starkruzr> | At the whatnow? |
16:26 | | * starkruzr is the neo-est of neophytes at this. |
16:35 | <@ErikMesoy> | Environmental variable telling Java where to find things it needs. |
16:36 | < starkruzr> | Okay. |
16:36 | < starkruzr> | Also what are you supposed to do when there is no main class but there are things written as THOUGH they are the main class? |
16:37 | <@ErikMesoy> | http://docs.oracle.com/javase/7/docs/technotes/tools/windows/classpath.html <-- Does this look like it is helpful for telling it "go get the libraries you need from here" ? |
16:38 | <@ErikMesoy> | I would try to trace the structure of program execution in terms of what-calls-what if there's no main class, and see if there's anything like a main loop or main set of methods. |
16:55 | | catadroid [catalyst@Nightstar-c854gu.dab.02.net] has joined #code |
17:42 | <&ToxicFrog> | starkruzr: CLASSPATH (environment variable) and -cp (command line argument) are how it finds classes at runtime. IIRC, it can contain both jar files and directories full of .class files. |
17:42 | <&ToxicFrog> | And what do you mean by "things written as though they are the main class"? They have methods with the right signature but which aren't named main()? |
18:14 | <&ToxicFrog> | Woo, keynote speaker is emphasizing importance of code health and paying down technical debt |
18:18 | | catadroid` [catalyst@Nightstar-iklbag.dab.02.net] has joined #code |
18:22 | | catadroid [catalyst@Nightstar-c854gu.dab.02.net] has quit [Ping timeout: 121 seconds] |
18:27 | | Crossfire [Z@Nightstar-r9lk5l.cust.comxnet.dk] has joined #code |
18:27 | | mode/#code [+o Crossfire] by ChanServ |
18:28 | < starkruzr> | I think most of my confusion is oriented around two things: |
18:28 | < starkruzr> | 1) what IDEs do to code, and |
18:29 | < starkruzr> | 2) what the consequences of that are for what is practically considerable as an "application" |
18:31 | | * starkruzr has just confirmed there is DEFINITELY nothing called "main()" in this set of .java files |
18:32 | | * starkruzr eyes the other thing he wrote, in which there is no main() either, but it works |
18:32 | < starkruzr> | okay so ToxicFrog |
18:32 | < starkruzr> | What I am trying to do is some automation things related to Selenium, which I'm sure you've heard of before |
18:33 | <@abudhabi> | I just download the package deal for Netbeans. |
18:33 | <@abudhabi> | Installing Java manually is a pain. |
18:33 | < starkruzr> | To wit: https://www.youtube.com/watch?v=Eft3qGFoqwE |
18:33 | < starkruzr> | This works fine when you "Run" it from the IDE. |
18:33 | < starkruzr> | It contains no main() class. |
18:34 | <&ToxicFrog> | I've heard of Selenium but don't know anything about it. |
18:35 | <&ToxicFrog> | By "main() class" you mean "class containing the main() method", right? |
18:35 | <&ToxicFrog> | The IDE may have a way of specifying a different entry point. |
18:36 | <&ToxicFrog> | If this is a module that's meant to run as part of a larger server or something, most likely the selinium jar has main() and it dynamically loads the stuff you wrote. |
18:37 | <&ToxicFrog> | Look at the IDE settings to see what's configured as the classpath/command line/entry point |
18:37 | <&ToxicFrog> | ? |
18:41 | < starkruzr> | It happens that the author was available in #Selenium on FreeNode just now, in which he explained that: <simonstewart> Itās written as a test case, and Iām using IntelliJās test runner in that screencast |
18:41 | < starkruzr> | Unfortunately he then had to run. |
18:42 | < starkruzr> | But what that means is that the reason it worked was this: |
18:44 | <&ToxicFrog> | That sounds like the test runner implements main() and is provided for you, and it dyloads individual test cases and runs them. |
18:45 | < starkruzr> | Yes. |
18:45 | < starkruzr> | http://pastebin.com/sr51a1ck |
18:45 | < starkruzr> | so now I am trying to figure out how to do this outside of the IDE. |
18:46 | < starkruzr> | I don't care about it being a "Test" per se; more I care about it doing the thing and returning me the results. |
18:46 | < [R]> | Check the manifest for the library you're trying to use? |
18:47 | < [R]> | Then have something like: java -cp ALL:THE:JARS stupidly.long.class.name.you.found.in.manifest |
18:48 | < starkruzr> | Are you talking about this thing on the left? |
18:49 | < starkruzr> | (image forthcoming) |
18:50 | < starkruzr> | http://imgur.com/NDju70a |
18:55 | | catadroid [catalyst@Nightstar-7ffc9s.cable.virginm.net] has joined #code |
18:57 | < [R]> | That |
18:57 | < [R]> | That's a list of jars, but not the manifest. |
18:58 | < starkruzr> | What is the manifest and where do I find it |
18:58 | < starkruzr> | ? |
18:58 | | catadroid` [catalyst@Nightstar-iklbag.dab.02.net] has quit [Ping timeout: 121 seconds] |
18:59 | < [R]> | It's in the primary library jar (either silenium or jrunner) |
18:59 | < starkruzr> | Should be Selenium, then |
18:59 | | abudhabi is now known as Wulfric |
18:59 | < [R]> | Jar files are just zip files. Look for the non-class file called manifest (it's either .txt or .xml) |
19:00 | < [R]> | It'll say what class should be run. |
19:00 | < starkruzr> | Jesus Christ. Why is this such a PITA? |
19:00 | < starkruzr> | What is gained with all of this obfuscation? |
19:00 | < [R]> | Because people think hiding details helps people. |
19:00 | < [R]> | Blame MS for that |
19:01 | | Derakon[AFK] [chriswei@Nightstar-5mvs4e.ca.comcast.net] has quit [Ping timeout: 121 seconds] |
19:01 | | Derakon [chriswei@Nightstar-5mvs4e.ca.comcast.net] has joined #code |
19:01 | | mode/#code [+ao Derakon Derakon] by ChanServ |
19:02 | <&McMartin> | Also blame apple for that |
19:02 | <&McMartin> | Entirely too many browsers automatically unzip downloaded .zip files into your Downloads directory |
19:02 | <&McMartin> | This is explicitly why UQM's resource files changed their suffix by default. UQM itself will totally accept .zip |
19:03 | <&McMartin> | In .JAR and .WAR and .EAR's weak defense, they're not 'just' ZIP files, they're ZIP files with somewhat strictly specified contents, and using that extension commits to those contents being there. |
19:07 | <&ToxicFrog> | starkruzr: it kind of sounds like you're trying to use the testing framework to build a standalone command line program, which probably isn't helping |
19:07 | <&ToxicFrog> | McMartin: I think that's a pretty good reason for a new extension, honestly |
19:07 | < starkruzr> | ToxicFrog: Yes. I've stopped doing that now and am just getting this: |
19:07 | < starkruzr> | Cheese.java:28: error: non-static method textIsPresent(String) cannot be referenced from a static context |
19:07 | < starkruzr> | WebElement link = wait.until(textIsPresent("Cheese.com")); |
19:08 | <&ToxicFrog> | main is static. textIsPresent() apparently is not; you need a class instance to call it on. |
19:13 | <&jeroud> | starkruzr: Do you know what plugin you're using in intellij? |
19:13 | < starkruzr> | It was jUnit |
19:14 | <&jeroud> | If so, you may be able to find documentation for the thing it's driving. |
19:14 | <&jeroud> | jUnit is pretty standard and must have a command line runner. |
19:15 | | Emmy [M@Nightstar-9p7hb1.direct-adsl.nl] has joined #code |
19:16 | < [R]> | A test runner without a CLI version is useless. |
19:18 | <&jeroud> | Does http://stackoverflow.com/questions/2235276/how-to-run-junit-test-cases-from-the- command-line have anything useful in it? |
19:30 | | Derakon_ [chriswei@Nightstar-5mvs4e.ca.comcast.net] has joined #code |
19:30 | | * Derakon_ ponders file permissions. |
19:31 | < Derakon_> | So. Our program has a global profile, and then various user profiles. |
19:31 | < Derakon_> | The global profile is stored in the application installation directory, as it has to be accessible to everyone. The user profiles are stored in those users' application data directories. |
19:31 | < Derakon_> | The former is not writable by default, thuogh. |
19:32 | < Derakon_> | Which makes it...tricky...for users to actually put values into the global profile. |
19:32 | < Derakon_> | Currently our recommended approach is "set up a user to have values that you like, then copy that user's profile into the installation directory with a magic name so the program recognizes it". |
19:32 | < Derakon_> | Which is ugh. |
19:33 | < Derakon_> | From my searching, there's no way for a program to on-the-fly request elevated permissions so it can write to a directory (at least not on Windows); permissions have to be set at runtime. And I'd rather the entire program not run as admin. |
19:33 | < Derakon_> | The alternative would seem to be to save the new profile to a writable directory, and then tell the user "okay, drag this into the installation directory". Which is ugly. |
19:33 | < Derakon_> | (Granted that the global profile should not be updated routinely and is a strictly administrative task) |
19:33 | < Derakon_> | Any suggestions? |
19:34 | < starkruzr> | What is "the entire program" in this example? |
19:34 | <~Vornicus> | You can request specific permissions in manifests for most system types |
19:34 | <~Vornicus> | You can also have a separate administrative program that handles running the globalize. |
19:34 | < Derakon_> | SK: a microscope control program, used for hardware control, data acquisition, and analysis. |
19:34 | < starkruzr> | Ah. |
19:35 | < [R]> | Derakon_: spawn something that causes winsudo thing to pop up? |
19:35 | < Derakon_> | Vorn: hm...that might work. So, main app writes to a temporary file, then invokes "copier" app with appropriate manifest and tells it where the temporary file is. |
19:35 | < Derakon_> | Something like that? |
19:35 | | * starkruzr tries to remember if you can just have UAC ask for permissions at the appropriate time |
19:35 | < Derakon_> | SK: as I noted, per my searches you cannot. |
19:38 | < Derakon_> | The other thing is that we're technically cross-platform and the UAC/manifest approach would seem to be rather strongly-tied to Windows. |
19:38 | | Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has joined #code |
19:38 | | mode/#code [+o Reiv] by ChanServ |
19:38 | < Derakon_> | (I say "technically" because hardware support for microscopes on non-Windows platforms is very poor) |
19:54 | < starkruzr> | Okay so |
19:54 | < starkruzr> | Disclaimer: I am a moron. |
19:55 | < starkruzr> | I thought this method was part of Selenium; it's declared LITERALLY RIGHT BELOW main(). |
19:56 | <~Vornicus> | lulz. |
20:02 | | Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has quit [Ping timeout: 121 seconds] |
20:10 | <@ErikMesoy> | http://fishmech.tumblr.com/post/139806299283/yo-check-out-what-i-got-today-its-a -book-from The 1994 Internet White Pages. |
20:10 | < starkruzr> | Okay, so. That got me a .class file. Why didn't it get me a .jar file? |
20:10 | < starkruzr> | (Which I could then, you know, execute. |
20:10 | < starkruzr> | ) |
20:12 | <~Vornicus> | why is that site's background non-slip flooring |
20:12 | <~Vornicus> | or I guess kickball rubber, really |
20:14 | <@ErikMesoy> | That used to be a stock desktop background flavor around the era that 1994 Internet White Pages was a thing, I believe |
20:15 | <&McMartin> | Executable JARs need you to make a manifest file. |
20:15 | <&McMartin> | I've always done this by hand because I'm a lunatic, but I bet there are tools to do it |
20:18 | | * starkruzr rubs his eyes |
20:19 | <&McMartin> | (The JAR format is "just" a zip, but executable JARs need a special file in them that, you know, says which class has the main() routine. Since there's nothing stopping all of them from defining main.) |
20:19 | < [R]> | starkruzr: .jar files are .zip files as mentioned. They have a manifest (usually) and have .class files in directories based on the package the class is in. |
20:20 | <&McMartin> | Right |
20:21 | < starkruzr> | This is so dumb. Like, amazingly dumb. |
20:21 | < starkruzr> | Why is Java? |
20:21 | < [R]> | Some packages forgo the .jar step, such as irccat. It just ships a compile script and a shell script that runs the resultant .class files. |
20:22 | < [R]> | starkruzr: it makes more sense if you don't jump into the middle of it like you're doing. |
20:22 | < Derakon_> | The jar thing is largely because Java programs compile into code for the Java Virtual Machine instead of code for the Actual Physical Machine. |
20:22 | < starkruzr> | Can I not tell the javac compiler to create a .jar file with the accompanying manifest file inside? |
20:22 | < [R]> | But I'll agree that classpath is horribly done. |
20:22 | < Derakon_> | So you need to produce a file that the JVM comprehends. |
20:22 | < [R]> | starkruzr: no, because jar makes the jar files. |
20:22 | <&McMartin> | starkruzr: It's possible, but it might instead be a different tool, like, say, jar |
20:22 | < starkruzr> | Derakon_: Yes, but it seems increasingly like what the JVM comprehends is, itself, dumb. |
20:22 | < Derakon_> | Heh. |
20:23 | < starkruzr> | "jar" is a utility? |
20:23 | <&McMartin> | Yes |
20:23 | < Derakon_> | It's a program, yes. |
20:23 | < [R]> | Yes |
20:23 | | * starkruzr goes back to the manpages |
20:23 | < Derakon_> | Kiiiiind of like link? |
20:23 | <&McMartin> | More like tar, really |
20:23 | <&McMartin> | In terms of syntax |
20:23 | < Derakon_> | Yeah, okay. |
20:23 | < [R]> | I think he meant in terms of importance in the order of things. |
20:23 | <&McMartin> | starkruzr: The JVM has a number of design decisions so bad they literally apologize for them in footnotes, but this isn't one of them |
20:23 | < [R]> | In which case, yes, it's like ld. |
20:24 | < [R]> | starkruzr: also the .jar step is optional |
20:25 | <&McMartin> | Yeah, it's worth noting that most scripting languages behave exactly like the jarless classpath setup |
20:26 | < starkruzr> | Is it not possible to simply execute a .class file that contains a main() function |
20:26 | < starkruzr> | ? |
20:26 | < [R]> | It is. |
20:26 | < starkruzr> | "java Thing.class" definitely does not do that. |
20:26 | < Derakon_> | "java Thing" |
20:26 | < starkruzr> | Hahahaha |
20:26 | < Derakon_> | You include the ".java" when using javac and omit it when using java. |
20:27 | | * starkruzr flings self out window, only to find that he has landed immediately on a pile of terrible programming languages |
20:27 | < Derakon_> | Question, then: what are good programming languages? :) |
20:27 | < Derakon_> | (Specifically at SK here) |
20:28 | < starkruzr> | In Ruby, at least, I can just do "ruby thing.rb" and it bloody runs. |
20:28 | <&McMartin> | What happens once there's more than one file? |
20:28 | < starkruzr> | I am told "Python is like Ruby, but good." |
20:28 | < starkruzr> | So, that, maybe. |
20:29 | <&McMartin> | So, you are apparently defining "good" as "is an interpreted language where the source is all you need, and where it's feasible for the program to be one program" |
20:29 | < starkruzr> | For my purposes at the moment? YES. :P |
20:29 | <&McMartin> | In both the cases of Ruby and Python, once your program has *more than one* file in it, you're right back in the thicket we've been trying to lead you through in Java. |
20:29 | < [R]> | Python, perl, node and php all do the same kind of invocation that ruby does. |
20:29 | <~Vornicus> | Python. |
20:29 | <&McMartin> | PHP is a *terrible* language~ |
20:29 | < starkruzr> | Well, yes. Everyone seems to be able to agree on that |
20:29 | < starkruzr> | . |
20:29 | < [R]> | D: |
20:30 | <&McMartin> | But it meets your criterion here~ |
20:30 | <~Vornicus> | php is awful in a lot of ways but getting better, and following some basic discipline it starts to become sensible. |
20:30 | < [R]> | ^ +1 |
20:30 | <~Vornicus> | <--- professional PHP developer |
20:30 | < starkruzr> | I am just having an awful lot of difficulty parsing out how one is supposed to *do* anything in Java. It feels like CounterStrike. The learning curve is insanely steep. |
20:31 | < starkruzr> | This is coming from someone who played around with Java in 2000 and found it easy, mind you. |
20:31 | <&McMartin> | Define "anything" |
20:31 | < Derakon_> | This is your first compiled language, SK. |
20:31 | <~Vornicus> | And honestly not the compiled language I'd pick. |
20:31 | < Derakon_> | There's a learning curve to compilation. |
20:31 | < starkruzr> | Derakon_: It is not! I wrote C and C++ back in the dark ages. |
20:31 | <&McMartin> | One of the things about Java is that it is the most batteries-included language I know of |
20:31 | <&McMartin> | And has an *incredibly aggressive* ecosystem for battery supply for those that aren't |
20:31 | < starkruzr> | I don't know. Maybe what I actually hate is the two IDEs I've tried? |
20:32 | <&McMartin> | So being an "actual" Java programmer means not only knowing how to exploit that ecosystem and maybe even interop with it |
20:32 | <&McMartin> | It's like saying "Perl is hard because CPAN is a mess" |
20:32 | < starkruzr> | (Well, CPAN *is* a mess~) |
20:32 | <&McMartin> | But also one where you can't really call yourself a Perl programmer without knowing a sizable fraction of CPAN's network |
20:32 | <&McMartin> | Maven is also a mess! |
20:32 | <&McMartin> | But when Maven works, it is fucking sorcery, coming at it from C++ |
20:33 | < [R]> | starkruzr: java (the program) is given a class to call main on. If you don't do that, you have to give it a jar with -jar, and that jar has to have a manifest. Everything the class requires needs to be accessible with the provided classpath. It doesn't really care about files, only the classpath and what it finds therein. (This is my understanding of how it works, it's horrible I'll agree) |
20:33 | < starkruzr> | No argument here. I had to use Maven to build and deploy another application a few weeks ago. It was blackest vodoo. |
20:33 | <&McMartin> | I mean, what it really is is something like Gentoo For Java Libraries |
20:33 | <&McMartin> | But unlike Gentoo, it is theoretically possible for it to work |
20:33 | < [R]> | Java would be so much better if the entry point wasn't so horrid. |
20:33 | <&McMartin> | That's like saying "Python would be so much better if only it used curly braces" |
20:34 | < [R]> | Uhh, no? |
20:34 | <&McMartin> | You're right, it's even more petty |
20:34 | < [R]> | I'm specifically saying the actual behavior of the interpreter up to the point just before it starts running shit is horrible. |
20:34 | <&McMartin> | Ah, OK |
20:35 | <&McMartin> | I that you were complaining about requiring a namespaced "public static void main(String[] args)" |
20:35 | < [R]> | Then you made a comment about Python's behavior once the interpreter has starting. |
20:35 | < [R]> | No |
20:35 | <&McMartin> | As opposed to something simple and easy like a *global* "int main(int argc, char **argv)" |
20:35 | < [R]> | I'm talking about how you invoke the java command, and how little information it gives |
20:35 | <&McMartin> | Okay |
20:35 | <&McMartin> | Also, it's a little over-heavyweight in its equivalent of crt0.s |
20:35 | <&McMartin> | But that's an argument for java being better at running long-running processes |
20:35 | < [R]> | crt0.s? |
20:36 | <&McMartin> | The secret code that runs between the start of your program and anything *in* your program |
20:36 | <&McMartin> | Originally from "C Runtime Zero (assembler)" |
20:36 | <&McMartin> | I think |
20:36 | <&McMartin> | But the notion seems to have generalized |
20:37 | <&McMartin> | It's what makes it make sense to return from main(), in C, more or less, so it sets up the basic stack frame |
20:37 | <&McMartin> | Then in C++ there's a whole lot of work to do with static constructors and such |
20:37 | <&McMartin> | But that's done in the C++ runtime elsewhere, before main, but at least calling things that exist in your code |
20:37 | <&McMartin> | ... I'm not actually sure when link-loading happens |
20:38 | <&McMartin> | That said, kruzr, java.exe's syntax hasn't changed since 1996 |
20:38 | <&McMartin> | Do you know which IDE you were using back then? |
20:39 | < starkruzr> | I don't even think I was. I think we had Eclipse, and they half-heartedly walked us through it, and I ignored it because I couldn't figure out its project structure. |
20:39 | <&McMartin> | (For what *very* little it is worth, I've had the least trouble with IntelliJ IDEA, but if you're writing a single-class Java program with no libraries, just use Notepad++, for real) |
20:39 | | * [R] does all java coding in vim. |
20:39 | < starkruzr> | I'm working with IDEA now. |
20:40 | < starkruzr> | sysop@vega:~/willthiswork/untitled/src/com/reticulum/mds$ java Cheese |
20:40 | < starkruzr> | Error: Could not find or load main class Cheese |
20:40 | < starkruzr> | But. Yes you CAN. It's right @#$%ing THERE. |
20:40 | <&McMartin> | Is Cheese.class in that directory? |
20:40 | < starkruzr> | It is. |
20:40 | < [R]> | What package is Cheese in? |
20:40 | <&McMartin> | Is it, in fact, in package com.reticulum.mds? |
20:40 | <&McMartin> | If so, that class's name is com.reticulum.mds.Cheese |
20:41 | < starkruzr> | But |
20:41 | < starkruzr> | ... what. |
20:41 | <&McMartin> | Welcome to The Solution To DLL Hell. |
20:41 | < starkruzr> | Okay |
20:41 | <&McMartin> | Ada 95 won, it turned out~ |
20:41 | <&McMartin> | You need to be in the "src" directory |
20:41 | < starkruzr> | IDEA had me create a package name when I created this project, right? |
20:41 | <&McMartin> | java com.reticulum.mds.Cheese |
20:41 | < starkruzr> | Yes, I am |
20:41 | < starkruzr> | in point of fact: |
20:41 | <&McMartin> | No, you are in src/com/reticulum/mds |
20:41 | <&McMartin> | You need to be in src |
20:41 | < starkruzr> | sysop@vega:~/willthiswork/untitled/src/com/reticulum/mds$ pwd |
20:41 | < starkruzr> | /home/sysop/willthiswork/untitled/src/com/reticulum/mds |
20:41 | < starkruzr> | oh |
20:41 | < [R]> | cd ../../..;java com.reticulum.mds.Cheese |
20:41 | | * starkruzr boggles |
20:42 | < starkruzr> | WHAT |
20:42 | <&McMartin> | Okay |
20:42 | < Derakon_> | Think of "package name" as being "path to relevant .class from here". |
20:42 | <&McMartin> | This is *also* how Ruby and Python work |
20:42 | < starkruzr> | ... *really*? |
20:42 | <&McMartin> | Yes. |
20:42 | <&McMartin> | Like I said |
20:42 | <&McMartin> | This is *the* solution to DLL Hell |
20:42 | <&McMartin> | Libraries and executables have a location that dictates a set of subdirectories |
20:42 | <&McMartin> | So when two people define Cheese.class they don't interfere because they are guaranteed to be in *different* directories, because the authors named a package after themselves. |
20:43 | <&McMartin> | It's trivially mechanizable, it's a one-sentence rule, and works better than pretty much any other human-explainable solution. |
20:43 | < starkruzr> | I am tempted to reject this as being Asinineā¢ because I am so hateful of this learning process at the moment. |
20:43 | <&McMartin> | Yeah, no |
20:43 | < starkruzr> | But I have to admit that makes some kind of sense. |
20:44 | <&McMartin> | Try learning about side-by-side assemblies if you want to see the most popular alternative |
20:44 | < [R]> | Again, it'd be so much better if you weren't trying to learn from the middle. |
20:44 | <&McMartin> | The trick with JARs is that those directories are hidden away within a zip file |
20:44 | < starkruzr> | [R]: Tell me about it |
20:44 | <&McMartin> | And actually |
20:44 | <&McMartin> | don't look into side-by-side assemblies |
20:44 | <&McMartin> | They involve hand-coding GUIDs |
20:44 | <&McMartin> | just don't |
20:44 | < starkruzr> | McMartin: Oh. So the zip file contains these directory structures already. |
20:44 | <&McMartin> | it's really bad |
20:44 | < starkruzr> | Wow. |
20:44 | <&McMartin> | Right |
20:44 | < starkruzr> | Pass, thanks~ |
20:44 | <&McMartin> | That's the reason this is actually great as opposed to a hideous hack |
20:45 | <&McMartin> | Packages and directories are the same thing; classes (or modules for ruby/python) and files are the same thing |
20:45 | < starkruzr> | (I had wondered for quite some time how this "backwards thing that looks like a domain name" convention evolved.) |
20:45 | <&McMartin> | Any tooling that knows what files and directories are can thus manage classes and packages |
20:45 | < Derakon_> | And yeah, if you open up the zip file, you'll see your source code directory structure again. |
20:45 | < Derakon_> | (Assuming your source code directory structure mirrors your package names, as it bloody well should) |
20:45 | <&McMartin> | Java enforces this |
20:46 | <&McMartin> | I think the backwards-domain-name thing actually came out of Modula-3 or something |
20:47 | <&McMartin> | It was definitely in place by Ada |
20:47 | <&McMartin> | Java *is* kind of The Ada That Won |
20:47 | <&jerith> | The backwards domain name is a mechanism for avoiding namespace collisions. |
20:47 | <&McMartin> | And it's backward so that it works like cd, yeah |
20:48 | < [R]> | It's actually domain names in the order they're actually processed. |
20:48 | <&McMartin> | ... which, come to think of it, kinda works like the old bang paths, doesn't it. |
20:48 | <&McMartin> | Yeah |
20:49 | < Derakon_> | Yep. |
20:49 | < starkruzr> | Okay |
20:49 | < Derakon_> | IMO we really all ought to be going to com.google.www/search instead of where we actually go. |
20:50 | <@Namegduf> | It's funny, you see URLs in games which have to feature some hypothetical future world all like that. |
20:50 | < starkruzr> | I am now getting this: http://pastebin.com/7WeYyEzk |
20:50 | < starkruzr> | And my head is beginning to hurt. |
20:50 | <@Namegduf> | Consistently ordered hierarchially that way. |
20:51 | < starkruzr> | Oh wait |
20:51 | < Derakon_> | SK: you're relying on a library that you didn't include in the classpath. |
20:51 | < starkruzr> | I wonder if it's mad -- yes |
20:51 | < [R]> | starkruzr: Selenium has to be in the classpath. |
20:51 | < Derakon_> | Try doing java -cp "path/to/dependencies:." Thing |
20:51 | < Derakon_> | Note the :. at the end there, to ensure that Thing is also on your classpath. |
20:53 | < starkruzr> | wait |
20:53 | < starkruzr> | what |
20:53 | < starkruzr> | sysop@vega:~/willthiswork/untitled/src$ java -cp ../lib/selenium-server-standalone-2.52.0.jar com.reticulum.mds.Cheese |
20:53 | < starkruzr> | Error: Could not find or load main class com.reticulum.mds.Cheese |
20:53 | < [R]> | You need to tell java it can find stuff it needs in the jars. |
20:54 | < starkruzr> | There's just that one jar, I swear to God. |
20:54 | <&McMartin> | You overwrote "the current directory" |
20:54 | < [R]> | You need :. |
20:54 | <&McMartin> | java -cp ../lib/selenium-server-standalone-2.52.0.jar:. com.reticulum.mds.Cheese |
20:54 | < starkruzr> | Oh, praise God. I'm getting an error I was actually expecting. |
20:54 | < Derakon_> | What did I just say ;_; |
20:54 | < starkruzr> | Thank all of you. |
20:55 | < Derakon_> | \o/ |
20:55 | < starkruzr> | It just seems like so much of "doing things in Java" is "configuring the incredibly fucking opaque IDE to produce what you want." |
20:55 | < [R]> | See, java /could/ give hints on how to fix issues like that... but it doesn't. |
20:56 | <&McMartin> | clang has spoiled the shit out of me |
20:57 | < starkruzr> | Like, let's suppose I start over-ish, from the beginning of that YouTube guide. Create a new project in IDEA. Modify his code to do this instead of running the unit tests he was running. How do I tell IDEA "I want you to fucking make a .jar file that can run on any system that has a JRE installed, please and thank you?" |
20:58 | <&McMartin> | That turns out to be a horrific nightmare in ways that are more windows's fault =( |
20:59 | <&ToxicFrog> | starkruzr: lein calls that an "uberjar" but I don't know if that's the common term for it or something lein-specific |
20:59 | < starkruzr> | Like, "on any system that is UNIX-like and has a console environment" would be fine too. |
20:59 | <&McMartin> | That's easier, because usually non-Windows systems only have one JRE installed |
20:59 | < starkruzr> | ToxicFrog: Haven't heard of Iein |
20:59 | <&ToxicFrog> | starkruzr: it's the clojure build tool |
20:59 | <&McMartin> | Clojure being a different langauge that compiles to the JVM as its binary format |
20:59 | < starkruzr> | (Clojure is the new new hotness now?) |
20:59 | <&ToxicFrog> | So it's JVM, but not Java |
20:59 | | Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has joined #code |
21:00 | | mode/#code [+o Reiv] by ChanServ |
21:00 | <&McMartin> | (Never learn a programming language because it is trendy) |
21:00 | < starkruzr> | I started learning Node (guess I still am) and then callbacks started to break my brain. |
21:00 | <&McMartin> | (Clojure's an attempt to bring Lisp to the JVM without compromising either. It does a surprisingly good job of this) |
21:00 | <&ToxicFrog> | Anyways, what I was getting at there is that if "uberjar" is in fact a generic term common in the JVM community, looking for that in IDEA might be fruitful, but I don't know if it actually is. |
21:00 | < [R]> | ToxicFrog: does that "uberjar" have /everything/ in it? Like the clojure runtime and all that? |
21:01 | <&ToxicFrog> | [R]: yes. It contains the clojure runtime, your code, and all libraries you depend on. |
21:01 | <&ToxicFrog> | It can be run using "java -jar path/to/uber.jar" |
21:01 | < starkruzr> | That must be... large. |
21:01 | < [R]> | Not really. |
21:01 | <&McMartin> | No larger than the sum of the library jars would be |
21:01 | <&ToxicFrog> | (actually, I don't think it contains the JRE libraries, it assumes if you havethe JVM you have those too) |
21:01 | <&McMartin> | Right, those aren't in |
21:01 | | * [R] used to do that when he started with java. Mostly because the classpath is massively confusing when starting out. |
21:02 | <&McMartin> | And the Clojure runtime is actually pretty small, considering |
21:02 | <&ToxicFrog> | starkruzr: depends on how much stuff you depend on |
21:02 | < starkruzr> | (BBL, driving home) |
21:03 | <&ToxicFrog> | The minimum viable set seems to be around 3.5MB. |
21:03 | <&McMartin> | And yeah, people talking about code bloat these days tend to pretend that glibc is 0 bytes |
21:04 | <@TheWatcher> | HEh |
21:05 | < [R]> | Oh wow, it's over a meg. |
21:06 | <&McMartin> | 2.1MB on this system, it seems, and two copies (32-bit and 64-bit) |
21:06 | <&McMartin> | ... the 32-bit one is slightly larger, weirdly |
21:07 | <&McMartin> | Maybe it needs more verbose implementations of fseek vs fseek_64 |
21:07 | < [R]> | One in /lib64 > /lib/ |
21:08 | <&McMartin> | Yeah, I've got the reverse, it seems... |
21:08 | <&McMartin> | [mcmartin@xenon ~]$ ls -l /usr/lib64/libc-* |
21:08 | <&McMartin> | -rwxr-xr-x. 1 root root 2103656 Feb 16 06:32 /usr/lib64/libc-2.22.so |
21:08 | <&McMartin> | [mcmartin@xenon ~]$ ls -l /usr/lib/libc-* |
21:08 | <&McMartin> | -rwxr-xr-x. 1 root root 2125104 Feb 16 06:36 /usr/lib/libc-2.22.so |
21:08 | < [R]> | libcrypto is also quite large. None of them top 2M though (/lib64/libc is /really/ close though) |
21:08 | < [R]> | $ ls -l /lib{64,}/libc-* |
21:08 | < [R]> | -rwxr-xr-x 1 root root 1659607 Jan 30 2015 /lib/libc-2.13.so |
21:08 | < [R]> | -rwxr-xr-x 1 root root 1966207 Jan 30 2015 /lib64/libc-2.13.so |
21:09 | | * McMartin nods |
21:09 | <&McMartin> | I'm not doubting your word, just reporting that I had different results :) |
21:09 | < [R]> | Same |
21:09 | | Kindamoody|afk is now known as Kindamoody |
21:09 | <&McMartin> | But yeah |
21:09 | | * [R] wonders if it's more due to different versions. |
21:09 | <&McMartin> | I note mine are in /usr, for real, too, so it could be flags as well |
21:10 | <&McMartin> | But yeah, they are different versions |
21:10 | <&McMartin> | Seems like 200K is a lot of difference for bugfixes though |
21:10 | <&McMartin> | Meanwhile, I tried to whip up a little DOS program to see if I could |
21:10 | <&McMartin> | Got a complete game in under a KB, and it's a .COM so that includes everything that isn't the BIOS~ |
21:10 | <&McMartin> | Well |
21:10 | <&McMartin> | I guess the OS stays in memory too, but we aren't charging libc the code that executes syscalls |
21:11 | <&McMartin> | Not a very *good* game, mind, but definitely A Game that looks like a BASIC program that's more responsive |
21:12 | <&ToxicFrog> | In general I find that spending a few extra megabytes is worthwhile to make it easier to deploy |
21:13 | <&ToxicFrog> | Although in practice that means "easier to deploy on Linux", since on windows it's a total shitshow whether you use an uberjar or not |
21:13 | <&McMartin> | Absolutely |
21:13 | <&McMartin> | Yeah |
21:13 | <&McMartin> | Which is sad because it seems like there should be no reason for this |
21:13 | <&ToxicFrog> | I actually tried writing a batch file to do the thing automatically |
21:14 | <&McMartin> | But the Windows Java installers are so bad I actually once had to write code to compensate for it being written to use DOS calls on the file operations |
21:14 | <&ToxicFrog> | And was up to around 100 lines of code to probe various file paths and registry entries trying to find the JVM, any (or none) of which could contain the information, and some of which could be lying about it |
21:14 | <&McMartin> | (Like, it actually does the DOS-style non-rename, and Windows has to go into a compat mode to preserve filenames) |
21:14 | <&ToxicFrog> | Before I went "fuck it, this script assumes java.exe is in your %PATH% and if it's not I'm sorry but that's not my problem and never will be" |
21:15 | <&McMartin> | (Because if it sees you delete a file and then create one with the same 8.3 filename within a very short period of time, Windows gives it the same long file name, because it thinks you're 16-bit legacy code trying to fake a file move) |
21:15 | <&McMartin> | (AND THE 64-BIT JAVA INSTALLER RELIES ON SUCH CODE) |
21:15 | <&McMartin> | (This, uh, broke some admit tools I maintained at the time) |
21:16 | <&McMartin> | (*admin) |
21:16 | < [R]> | Nice |
21:17 | <&ToxicFrog> | wow |
21:17 | <&ToxicFrog> | TIL horrible things about both windows and the java installer |
21:17 | <&McMartin> | That filename cache on Windows is one of those things that's horrible and wonderful at the same time |
21:18 | < [R]> | It's a magic egg of nightmare fuel that you don't ever, ever want to crack because the piss-stains covering it make it look pretty? |
21:18 | <&McMartin> | As I had mentioned elsenet a bit, I kind of grew up with one foot in the demoscene |
21:19 | <&McMartin> | I have a reluctant but absolutely genuine respect for horrifically abusive coding techniques that achieve apparently impossible results |
21:19 | <&McMartin> | In this case, Win32 being able to make DOS programs retroactively correctly handle long filenames. |
21:25 | <&ToxicFrog> | A lot of the horrors in windows come from an iron-willed determination never to break backwards compatibility, with anything, ever. |
21:27 | < [R]> | Also the fact that people who code for windows do absolutely retarded as fuck shit. |
21:27 | <&jerith> | Except in the UI. |
21:27 | < [R]> | Like crawl up the stack and read internal data structures. |
21:27 | <&jerith> | Every version of Windows I ever used rearranged all the settings in a different way. |
21:29 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds] |
21:35 | <@Wulfric> | I once watched a video of someone upgrading Windows from like 1.0 up to Vista. |
21:35 | <@Wulfric> | It even kept most of its colour theme throughout! |
21:35 | < Emmy> | [R]: remember, ballmer peak... |
21:35 | | Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has quit [Ping timeout: 121 seconds] |
21:36 | | Turaiel[Offline] [Brandon@Nightstar-7mqsi0.mi.comcast.net] has quit [[NS] Quit: Bouncer terminated] |
21:42 | | Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has joined #code |
21:42 | | mode/#code [+o Reiv] by ChanServ |
22:15 | < Azash> | https://github.com/fulldecent/system-bus-radio |
22:19 | | Kindamoody is now known as Kindamoody[zZz] |
22:27 | | Derakon_ [chriswei@Nightstar-5mvs4e.ca.comcast.net] has quit [[NS] Quit: leaving] |
22:37 | | Turaiel[Offline] [Brandon@Nightstar-7mqsi0.mi.comcast.net] has joined #code |
22:55 | | ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: WeeChat 1.4] |
22:55 | | ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code |
22:55 | | mode/#code [+ao ToxicFrog ToxicFrog] by ChanServ |
23:15 | | himi [fow035@Nightstar-dm0.2ni.203.150.IP] has joined #code |
23:15 | | mode/#code [+o himi] by ChanServ |
--- Log closed Wed Mar 02 00:00:33 2016 |