--- Log opened Fri Feb 14 00:00:22 2014 |
00:41 | | You're now known as TheWatcher[T-2] |
00:43 | | Turaiel is now known as Turaiel[Offline] |
00:47 | | You're now known as TheWatcher[zZzZ] |
01:12 | | Reiv_ [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has joined #code |
01:15 | | Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has quit [Ping timeout: 121 seconds] |
01:43 | | Derakon[AFK] is now known as Derakon |
01:57 | | Derakon [Derakon@Nightstar-cb57nb.ca.comcast.net] has quit [Client exited] |
02:03 | | Namegduf [namegduf@Nightstar-lcgn9d.beshir.org] has quit [Ping timeout: 121 seconds] |
02:06 | | * Vornicus finds intfiction.org, searches its inform 6/7 help forum to see if there's anything there. |
02:08 | | Namegduf [namegduf@Nightstar-lcgn9d.beshir.org] has joined #code |
02:08 | | mode/#code [+o Namegduf] by ChanServ |
02:12 | | Namegduf [namegduf@Nightstar-lcgn9d.beshir.org] has quit [Ping timeout: 121 seconds] |
02:14 | <~Vornicus> | DOesn't look like it so far |
02:14 | | Namegduf [namegduf@Nightstar-lcgn9d.beshir.org] has joined #code |
02:14 | | mode/#code [+o Namegduf] by ChanServ |
02:15 | <&ToxicFrog> | I reported it on the MUD, no response as yet |
02:42 | <&McMartin> | Vorn: What are you looking for? |
02:42 | <&McMartin> | Intfiction.org is well known |
02:42 | <&McMartin> | And is arguably more of the hub for current authors than the mud itself is |
02:50 | <~Vornicus> | McM: I am trying to massage the map in the world index to look vaguely like it would in the real world; it is... not being helpful. |
02:51 | <~Vornicus> | http://codepad.org/onQoCXYT This text should make 4 floors worth of stuff, but it... doesn't. |
02:51 | <~Vornicus> | Unfortunately I can't -- as far as I can tell -- tell the map to put things on particular levels. |
02:51 | <&McMartin> | Ah |
02:55 | | Syka [the@Nightstar-obu.k8v.131.1.IP] has quit [Ping timeout: 121 seconds] |
02:58 | <~Vornicus> | So I end up -- in the case of the text above -- the third floor rooms appearing on the same level as the first floor rooms, and the second floor rooms appearing /below/ the first floor rooms. |
03:06 | | Syka [the@Nightstar-obu.k8v.131.1.IP] has joined #code |
03:07 | | Orth [Orthia@Nightstar-eh9b9j.ihug.co.nz] has quit [[NS] Quit: Bye] |
03:18 | | Kindamoody[zZz] is now known as Kindamoody |
03:33 | | Syka [the@Nightstar-obu.k8v.131.1.IP] has quit [Ping timeout: 121 seconds] |
03:37 | | Turaiel[Offline] is now known as Turaiel |
03:40 | | * Vornicus determines that he can't brain any longer, will probalby toss stuff at intfiction.org tomorrow |
03:48 | | Syka [the@Nightstar-obu.k8v.131.1.IP] has joined #code |
03:55 | | Vornicus [Vorn@Nightstar-sn7kve.sd.cox.net] has quit [Connection closed] |
04:07 | | Alek [omegaboot@Nightstar-qa936g.il.comcast.net] has quit [Ping timeout: 121 seconds] |
04:07 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds] |
04:14 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code |
04:14 | | mode/#code [+o himi] by ChanServ |
04:27 | | Alek [omegaboot@Nightstar-qa936g.il.comcast.net] has joined #code |
04:27 | | mode/#code [+o Alek] by ChanServ |
04:30 | | VirusJTG__ [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [[NS] Quit: Program Shutting down] |
04:44 | | Derakon [Derakon@Nightstar-cb57nb.ca.comcast.net] has joined #code |
04:44 | | mode/#code [+ao Derakon Derakon] by ChanServ |
04:52 | | Reivles [quassel@Nightstar-ksqup0.co.uk] has quit [Connection closed] |
04:52 | | Reiver [quassel@Nightstar-ksqup0.co.uk] has joined #code |
05:02 | | Derakon is now known as Derakon[AFK] |
05:10 | | Kindamoody is now known as Kindamoody|afk |
05:22 | | RichyB [RichyB@Nightstar-c6u.vd5.170.83.IP] has quit [[NS] Quit: Gone.] |
05:27 | | RichyB [RichyB@Nightstar-c6u.vd5.170.83.IP] has joined #code |
05:38 | | Syka [the@Nightstar-obu.k8v.131.1.IP] has quit [Ping timeout: 121 seconds] |
05:52 | | iospace is now known as io\passedout |
06:40 | | ErikMesoy|sleep is now known as ErikMesoy |
07:09 | | celticminstrel [celticminst@Nightstar-mhtogh.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
07:09 | | Erik [8f610223@Nightstar-fsq7h2.mibbit.com] has joined #code |
07:42 | | Turaiel is now known as Turaiel[Offline] |
08:03 | | Red_Queen [Z@Nightstar-ro94ms.balk.dk] has joined #code |
08:09 | | * Erik looks at this python script. 120 lines of code. 7 import statements. (from xml.etree, xml.dom, tkinter, tkfiledialog, htmlparser, htmlentitydefs, urllib2) |
08:09 | < Erik> | I'm glad Python comes with "batteries included", but... this feels a little like the core is tiny |
08:10 | <&McMartin> | Language cores are *supposed* to be tiny |
08:11 | <&McMartin> | (That said, Python's core language is relatively rich as languages go, with good support for collection literals and procedurally computed collection literals ("comprehensions").) |
08:34 | <&jerith> | Python's small enough to fit in my head. Java isn't. |
08:44 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code |
08:44 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
08:54 | <~Vornicus> | The worst part about mapping a minecraft cave in inform, actually, is that the icon for inform looks like it should be fore minecraft, and the icon for minecraft (at least the mod I'm playing) is just a java icon |
09:55 | | * Erik attempts to learn regex. Argh. |
09:56 | <~Vornicus> | What precisely do you want the regex to do? |
09:57 | <@Azash> | Regexp <3 |
09:57 | <@Azash> | Do the regex crossword, by the time you have it solved, you will be proficient enough to manage |
09:58 | < Erik> | Vornicus: all the things. |
09:58 | <&jerith> | The regex crossword will be really hard if you don't know regexen well enough. |
09:58 | <@Azash> | You don't really need more than the basics for it though |
09:58 | < Erik> | I have a programming course this semester where I am to learn tokenization. The introductory material covers regexes. |
09:58 | <~Vornicus> | ah, lexing |
09:59 | <~Vornicus> | I wrote Schlockian's lexer as a single regex, it was 250 characters long |
09:59 | < Erik> | I've also been beating the screen in frustration for regexes at work in trying to find appropriate sorts of documents and folders, so... looks like time to read up on it properly |
09:59 | | * Erik remembers getting reasonably far in the regex golf linked here a while ago. |
10:00 | < Erik> | So now I'm at the level of "why is this large, complicated thing not working when all the subelements work?" :p which is hard to figure out |
10:01 | <@Azash> | jerith: http://regexcrossword.com/challenges/experienced/puzzles/1 |
10:01 | <@Azash> | Just found this googling, looks fun |
10:04 | <&jerith> | Azash: Cool. |
10:04 | | * jerith tries it. |
10:14 | <&jerith> | Number four's a bit annoying. |
10:14 | <&jerith> | (Because the characters are all over the keyboard and a pain to type one-handed.) |
10:15 | | You're now known as TheWatcher |
10:16 | <@froztbyte> | <Azash> You don't really need more than the basics for it though |
10:16 | <@froztbyte> | if you only know the basics, you won't learn to solve it properly :D |
10:17 | <@froztbyte> | I don't get that link |
10:17 | <@froztbyte> | are you supposed to fill in text that matches all the patterns? |
10:18 | <&jerith> | froztbyte: Each row and column needs to match the corresponding regex. |
10:18 | <@froztbyte> | guess so |
10:18 | <@froztbyte> | jerith: yeah |
10:18 | <@froztbyte> | trying the first one now |
10:18 | <&jerith> | It forms a phrase, except for number 4. |
10:20 | <&jerith> | Okay, I've done those fvie. |
10:20 | <&jerith> | *five |
11:35 | | VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code |
12:10 | | Tarinaky [tarinaky@Nightstar-e99cts.net] has quit [Operation timed out] |
12:23 | | Tarinaky [tarinaky@Nightstar-e99cts.net] has joined #code |
12:23 | | mode/#code [+o Tarinaky] by ChanServ |
13:25 | | Kindamoody|afk is now known as Kindamoody |
13:47 | | Syka [the@Nightstar-obu.k8v.131.1.IP] has joined #code |
13:54 | | io\passedout is now known as iospace |
13:59 | <@Tarinaky> | Argh. Fuckinjg Ubuntu. |
13:59 | <@Tarinaky> | I was typing a password into ssh and something popped up |
13:59 | <@Tarinaky> | But I have no idea what I just agreed to. |
13:59 | <@Tarinaky> | Fuck's fucking sake., |
14:01 | | * Vornicus grumps at that |
14:02 | <~Vornicus> | If you steal focus you should beep instead of accepting input for like a second. |
14:02 | <@Tarinaky> | No kidding. |
14:02 | <@Tarinaky> | Fortunately I didn't see a text box so it only acted on the return. |
14:03 | <@Tarinaky> | I once had Skype pop up while I was typing a password and I ended up sending it to a friend. |
14:03 | <@Tarinaky> | Hilarity -.- |
14:12 | < Xon> | Tarinaky, I've had that happen with Lync @ work |
14:17 | < Erik> | ooh, Lync |
14:18 | < Erik> | One of those weird apps that seems to exist solely at the big business market (seen it at like 3 major companies and nowhere else) |
14:23 | | celticminstrel [celticminst@Nightstar-mhtogh.dsl.bell.ca] has joined #code |
14:23 | | mode/#code [+o celticminstrel] by ChanServ |
14:26 | < Xon> | Erik, it's MSN+phones for businesses |
14:26 | < Erik> | (I use it where I work at present.) |
14:26 | < Erik> | Also screen sharing. |
14:26 | < Xon> | ah |
14:27 | < Xon> | I've got a polycom lync handsets @ work |
14:27 | < Xon> | the integration with the desktop lync client is anoying in that now I have a pop-up whenever my phone rings >.< |
14:27 | < Erik> | Haha |
14:28 | < Xon> | little wierd for my phone to recognise who is calling me or I'm calling based on my email contacts tho |
14:29 | < Xon> | that said, I'm not working for a major company |
14:34 | < Xon> | also, am I the only one who finds it disquieting for working with an XML api from <voip handset vender> and asking for the XSD for the service and get told they'll need to get back to me for a version they can release to someone using thier partner zero-touch provisioning portal? |
14:34 | | Erik [8f610223@Nightstar-fsq7h2.mibbit.com] has quit [[NS] Quit: Right, now that that's over...] |
14:50 | | Kindamoody is now known as Kindamoody|out |
14:57 | | celticminstrel [celticminst@Nightstar-mhtogh.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
15:05 | | Syka [the@Nightstar-obu.k8v.131.1.IP] has quit [Ping timeout: 121 seconds] |
15:05 | | Syka [the@Nightstar-obu.k8v.131.1.IP] has joined #code |
15:13 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection reset by peer] |
15:14 | < ErikMesoy> | Yaaaay. 99 of 100 points on my first exercise this semester. |
15:15 | < ErikMesoy> | Docked 1 point for cruise control thinking. I called str(somelist) to answer one sub-question and str(" ".join(somelist)) on the next question and that second str() call is unecessary since join returns a string. |
15:36 | | * ErikMesoy is faced with a problem of something that seems to work in practice, but does it work in theory? :p |
15:37 | < ErikMesoy> | (?<![a-z])[bcdfghjklmnpqrstvwxz]*[aeiouy]+[bcdfghjklmnpqrstvwxz]*(?![a-z]) This is a regex that's supposed to do a first-pass approximation of finding one-syllable words, where "one-syllable" for our purposes means it has only a single vowel cluster that may have consonants on either side. Does it do what I think it does? |
15:38 | <&ToxicFrog> | What regex language is that? |
15:38 | < ErikMesoy> | Python. |
15:38 | <&ToxicFrog> | And what does (?<! and (?! do? |
15:39 | < ErikMesoy> | Lookbehind and lookahead that don't consume the string |
15:39 | <&ToxicFrog> | Do they succeed on the empty string? |
15:39 | <&ToxicFrog> | I.e. will this find stuff at the start or end of the string? |
15:40 | | Syka [the@Nightstar-obu.k8v.131.1.IP] has quit [Ping timeout: 121 seconds] |
15:40 | < ErikMesoy> | Yes. |
15:40 | <&ToxicFrog> | Aah, does the ! negate? |
15:40 | <&ToxicFrog> | If so, it looks good. |
15:41 | | ToxicFrog [ToxicFrog@Nightstar-gqo.7co.175.108.IP] has quit [[NS] Quit: ZNC - http://znc.in] |
15:41 | | ToxicFrog [ToxicFrog@Nightstar-gqo.7co.175.108.IP] has joined #code |
15:41 | | mode/#code [+ao ToxicFrog ToxicFrog] by ChanServ |
15:42 | < ErikMesoy> | According to the documentation, Python uses ?= positive lookahead, ?! negative lookahead, ?<= positive lookbehind, ?<! negative lookbehind. |
15:54 | < ErikMesoy> | Is there some minefield I should be aware of when writing regex with unusual characters? e.g. Norwegian days match [man|tirs|ons|tors|fre|lør|søn]dag |
16:04 | <&ToxicFrog> | Implementation-dependent. |
16:05 | <&ToxicFrog> | In particular some regex implementations don't handle multibyte characters correctly, so [abø] becomes [ab\xC3\xB8] |
16:05 | <&ToxicFrog> | I don't know what caveats, if any, apply to Python regexes. |
16:05 | <&ToxicFrog> | (also I think you meant (man|tirs|ons|tors|fre|lør|søn)dag) |
16:06 | | jeroud [sid10043@Nightstar-a1k27g.irccloud.com] has quit [Connection closed] |
16:07 | | jeroud [sid10043@Nightstar-a1k27g.irccloud.com] has joined #code |
16:08 | | Syka [the@Nightstar-obu.k8v.131.1.IP] has joined #code |
16:19 | | Syka [the@Nightstar-obu.k8v.131.1.IP] has quit [Ping timeout: 121 seconds] |
16:21 | | jeroud [sid10043@Nightstar-a1k27g.irccloud.com] has quit [Ping timeout: 121 seconds] |
16:52 | | ErikMesoy [Erik@Nightstar-jrmh3n.80-203-23.nextgentel.com] has quit [Connection reset by peer] |
16:53 | | ErikMesoy [Erik@Nightstar-9im.d92.203.80.IP] has joined #code |
17:38 | <@Tarinaky> | ToxicFrog: ErikMesoy: I thought Regular Expressions didn't use lookahead (look ahead = Nondeterministic FA, Regular Expressions define Deterministic FA) and that look-ahead was an 'augmentation'? |
17:38 | <@Tarinaky> | And by augmentation I mean: "This is not strictly A, but it's pragmatically useful" |
17:40 | <&ToxicFrog> | Tarinaky: most "regular expression" implementations are not formally REs, but REs with extensions. |
17:40 | <@Tarinaky> | Sure, but if he's not going to use any of those extensions/augmentations... |
17:40 | <&ToxicFrog> | This includes POSIX EREs, PCREs, Python's regex library, Java regexes... |
17:40 | <@Tarinaky> | Then they're irrelevant. |
17:40 | <&ToxicFrog> | But he is in fact using them. |
17:40 | <&ToxicFrog> | I'm not sure what your point is here. |
17:40 | <@Tarinaky> | Oh. Okay. |
17:41 | <@Tarinaky> | I joined mid-flow and am slightly tipsy. |
17:41 | <@Tarinaky> | Sorry. |
17:41 | <&ToxicFrog> | He posted a regex including lookahead constructs. I asked what they were. He explained. |
17:41 | <@Tarinaky> | Didn't see that. Sorry, again. |
17:44 | <@Tarinaky> | Althought, I will add that for the purposes of propriety RegEx with look-ahead should really be referred to as augmented-regexp to avoid confusion when a novice coder cribs from your work down the line. |
17:50 | <&ToxicFrog> | That ship has long sailed. |
17:50 | <&ToxicFrog> | "regex" is now a context-dependent term of art that means different things in CS and actual programming. |
17:51 | <@Tarinaky> | I fully grant that. |
17:51 | <@Tarinaky> | But the particular extensions Python uses are different to the particular extensions Java uses are different to... |
17:52 | <@Tarinaky> | Which means that when a novice coder, down the line, comes to port your code to Python++ and reads the documentation that says RegExp they're going to be stupid and think they can copy+paste the RegExp. |
17:52 | <@Tarinaky> | And then get bitten in the ass. |
17:52 | <@Tarinaky> | So for that reason alone the documentation should be slightly more verbose. |
17:52 | <@Tarinaky> | Assuming you, you know, care. |
17:53 | <@Tarinaky> | Replace Python++ with whatever programming language is vogue in 20 years. |
17:53 | | jeroud [sid10043@Nightstar-a1k27g.irccloud.com] has joined #code |
17:53 | <&ToxicFrog> | Er |
17:54 | <&ToxicFrog> | In any of these languages, the documentation is more verbose and documents exactly what constructs are available and what they mean |
17:54 | <@Tarinaky> | I mean the documentation for /your/ code. |
17:54 | <&ToxicFrog> | also, if someone is blindly copy-pasting code without understanding it, they have much greater problems than regex compatibility |
17:54 | <&ToxicFrog> | Er, no |
17:55 | | * Tarinaky shrugs. I guess we just disagree. |
17:56 | <&ToxicFrog> | So, the natural end point is that you document every part of your code on the points where the APIs you're using differ from other, similar languages |
17:56 | <&ToxicFrog> | Which is insane |
17:56 | <&ToxicFrog> | And completely drowns out the actual useful comments. |
17:56 | <@Tarinaky> | That's... not quite what I said. |
17:57 | <@Tarinaky> | I just said that your documentation should use the string augmented-regexp instead of the string regexp unless you're using strict regexp. |
17:57 | <&ToxicFrog> | There are a lot of things that comments are good for, but "proofing your code against people blindly copying it without understanding it" is not one of them; that's not a threat model that it's worth defending against. |
17:57 | <@Tarinaky> | It's an exercise for the reader to see this and look up what the augmentaions are. |
17:57 | <&ToxicFrog> | ...so, if I have python code that calls re.*, one of the following statements is true: |
17:58 | <&ToxicFrog> | - the reader is already familiar with python's re module and the ways in which it deviates from formal regular expressions |
17:58 | <&ToxicFrog> | - the reader is not familiar, and thus is about to read the documentation for it to find out what I just did |
17:58 | <@Tarinaky> | I mean, if you don't use the string regexp in your documentation then fine. |
17:58 | <@Tarinaky> | I just think documentation should be technically correct. |
17:58 | <@Tamber> | Or, if you're not handing your code to a pedantic lunatic~ |
17:58 | <@Tamber> | :) |
17:58 | <@Tarinaky> | In a formal sense. |
17:58 | <@Tarinaky> | Tamber: Pedantry has its places. |
17:58 | <&ToxicFrog> | - the reader is not familiar but is going to blindly copy the regex anyways, in which case they are so completely, thouroughly screwed that putting # this is an augmented regex on the preceding line will help not at all |
17:58 | <@Tarinaky> | I think documentation is one of them. |
17:59 | <&ToxicFrog> | Assuming they even know what that means (they don't) |
17:59 | <@Tamber> | Tarinaky, sure. |
17:59 | <@Tamber> | But pedantry over whether or not you're strictly allowed to call it a "regex" is not one of them. |
17:59 | <@Tamber> | Save it for something of some use~ |
17:59 | <@Tarinaky> | If you just call re.* and don't refer to it in the documentation then sure. |
17:59 | <&ToxicFrog> | Basically, the misuses you want to defend against are (a) not your problem and (b) not something this effectively defends against anyways. |
17:59 | < ErikMesoy> | http://docs.python.org/2/library/re.html <-- The documentation says "Regular expression operations". |
17:59 | <&ToxicFrog> | Also |
17:59 | | * Tarinaky shrugs. |
18:00 | <&ToxicFrog> | Anyone who actually knows the difference between formal and augmented regexes also knows that no programming language uses "regex" to mean the former. |
18:00 | <@Tarinaky> | While this is true, you can totally make a useful Regexp that is standard regexp. |
18:00 | <@Tamber> | If whoever's reading your code is so bloody minded and thick that they read "regex" in your code to literally mean only pure regexes and nothing else, then they deserve everything they get~ |
18:00 | <@Tarinaky> | There're websites dedicated to this. |
18:00 | <&ToxicFrog> | Tarinaky: yes, and...? |
18:00 | <&ToxicFrog> | That's a complete non sequitur. |
18:01 | <@Tarinaky> | Fine-fine. |
18:01 | <@Tarinaky> | I'm wrong. |
18:01 | <@Tamber> | Well, not quite. You're technically right. And that's the worst kind of right to cling to. :p |
18:02 | <@Tarinaky> | Tamber: I think docstrings/javadoc/documentation should be pedantic about terminology. |
18:02 | <&ToxicFrog> | Tarinaky: except this is useless pedantry! |
18:02 | <@Tamber> | And I think the pedantry is best saved for something where it's of some use. |
18:03 | <@Tarinaky> | Because code is meant to be a formal constructive proof. And documentation is part of the code, even when it isn't. |
18:03 | <@Tamber> | Go nit-pick over how a protocol isn't quite implemented properly, rather than fight over whether you should be allowed to call what everyone else calls a regex, a regex. |
18:03 | <@Tamber> | :p |
18:03 | <&ToxicFrog> | Tarinaky: you are basically arguing for making documentation less readable in order to not solve a problem that doesn't exist. |
18:03 | <@Tamber> | In the end, the former is likely to actually fix something, and the latter is only going to annoy people. :) |
18:03 | <@Tarinaky> | Okay. Fine. |
18:04 | <@Tarinaky> | Like I said, I'm wrong. |
18:04 | | * ToxicFrog golunch |
18:04 | | Turaiel[Offline] is now known as Turaiel |
18:05 | <@Tarinaky> | It just kindof flies in the face of everything I was ever taught about technical writing :x |
18:05 | <@Tarinaky> | Which is, granted, precious little. |
18:06 | <@Tarinaky> | But I was told you shouldn't rely on the reader understanding acronyms and err... contractions? |
18:06 | <@Tarinaky> | (what is the word that describes what RegExp is to Regular Expression?) |
18:06 | <@Tarinaky> | Shortening? |
18:07 | <@Tarinaky> | I'm just gonna show myself out >.> |
18:09 | <@Tamber> | If you're a programmer, writing for programmers, then you can *generally* assume they know roughly what you mean by "Rexexp", and so forth. |
18:10 | <@Tarinaky> | I guess so. |
18:10 | <@Tarinaky> | I just feel it's an ambiguation. |
18:10 | <@Tarinaky> | (is that a word?) |
18:11 | <@Azash> | Portmonteau? |
18:11 | <@Tarinaky> | Azash: Yes! That's the word I wanted, thank you :) |
18:13 | <&ToxicFrog> | "ambiguation" should totally be a word. |
18:14 | <@Tarinaky> | ambiguity is what I meant though |
18:14 | <@Tarinaky> | Ambiguation is only a word after 3 units. |
18:15 | <&ToxicFrog> | Anyways. Yes, as Tamber says, you need to take your audience into account. If you are writing for programmers, you can generally assume that they will understand "regex" or "regular expression" to mean "as implemented by the language/library"; it generally only means "formal regular expression" in contexts like compiler theory texts. |
18:16 | <@Tarinaky> | In my defence, everything I know about RegExp comes from a compiler theory text. |
18:18 | <&ToxicFrog> | There you go then~ |
18:18 | | * Tarinaky blames you for recommending the Dragon Book 3+ years ago :P |
18:19 | <&ToxicFrog> | In my defence, the Dragon Book owns. |
18:19 | <@Tarinaky> | The older editions. |
18:19 | <@Tarinaky> | The Java editions were... not so good imo. |
18:19 | <&ToxicFrog> | There are Java editions of the Dragon Book? |
18:20 | | * Tarinaky had to return it to the library and swap it out for a newer one 3+ years ago. |
18:20 | <@Tarinaky> | Java is like... the defacto teaching language now. |
18:20 | <@Tarinaky> | And the Dragon Book is meant for a 3rd/Masters level course. |
18:20 | <@Tarinaky> | But yeah. The C book had more interesting 'asides' on low-level stuff. |
18:21 | <@Tarinaky> | Plus Java is /way/ more verbose about everything because classes. |
18:23 | <&ToxicFrog> | Classes are not the problem there~ |
18:24 | <&ToxicFrog> | (well, ok, they're a contributing factor) |
18:24 | | * ToxicFrog has the Green Dragon Book, aka the 0th Edition, which uses C |
18:26 | <@Tarinaky> | Classes/OOP is more verbose than imperative code in general. |
18:26 | <@Tarinaky> | That's kindof the point. |
18:27 | <@Tarinaky> | Having the extra information there as an API dev. |
18:27 | <&ToxicFrog> | Well, no; when used properly, it is less verbose and more expressive. That's the whole point. |
18:27 | <&ToxicFrog> | Note that I said "when used properly", not "when used everywhere" |
18:28 | <&ToxicFrog> | "When you learn Java, there aren't any powerful language features you can use to solve many problems. Instead, you spend your time learning a body of technique for solving problems in the language." |
18:31 | <&ToxicFrog> | Java forces everything into its OO model, and that certainly doesn't help, but there's a lot else wrong with it and that all piles up to make it an incredibly verbose and tedious language. |
18:31 | <@Tarinaky> | Imperative is better for describing algorithms in general I think. |
18:32 | <@Tarinaky> | Although mostly because you can just take for granted what it 'means' to push and pop from a stack. |
18:32 | <&ToxicFrog> | (and that verbosity and tedium means I would never pick it as a textbook language unless the textbook was specifically on Java) |
18:33 | <@Tarinaky> | I can't argue. |
18:35 | | * ToxicFrog finds the article he was thinking of: http://blog.plover.com/prog/Java.html |
18:40 | | * Shiz just finished all regexp crosswords |
18:42 | < Shiz> | I only found the last two or some from the last category really challenging |
18:44 | | Turaiel is now known as Turaiel[Offline] |
18:50 | | Orthia [orthianz@Nightstar-74k.25d.224.119.IP] has quit [Ping timeout: 121 seconds] |
18:53 | <@Tarinaky> | "With Haskell someone probably should have been fired in the first month for choosing to do it in Haskell." |
18:59 | <@Azash> | Shiz: The fourth one for me |
18:59 | <@Azash> | Rest were pretty easy but it tripped me up because they were tough to read |
20:22 | | Orthia [orthianz@Nightstar-74k.25d.224.119.IP] has joined #code |
20:22 | | mode/#code [+o Orthia] by ChanServ |
20:27 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds] |
20:53 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code |
20:53 | | mode/#code [+o himi] by ChanServ |
21:11 | | Derakon[AFK] [Derakon@Nightstar-cb57nb.ca.comcast.net] has quit [Ping timeout: 121 seconds] |
21:16 | | Derakon [Derakon@Nightstar-cb57nb.ca.comcast.net] has joined #code |
21:16 | | mode/#code [+ao Derakon Derakon] by ChanServ |
21:28 | | Kindamoody|out is now known as Kindamoody |
21:36 | | Derakon [Derakon@Nightstar-cb57nb.ca.comcast.net] has quit [Ping timeout: 121 seconds] |
21:41 | | Derakon [Derakon@Nightstar-cb57nb.ca.comcast.net] has joined #code |
21:41 | | mode/#code [+ao Derakon Derakon] by ChanServ |
21:52 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds] |
22:01 | | Turaiel[Offline] is now known as Turaiel |
22:14 | | Red_Queen [Z@Nightstar-ro94ms.balk.dk] has quit [Ping timeout: 121 seconds] |
22:15 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code |
22:15 | | mode/#code [+o himi] by ChanServ |
22:35 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code |
22:35 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
22:39 | | Kindamoody is now known as Kindamoody[zZz] |
22:41 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed] |
23:00 | < AnnoDomini> | Hmmmm. I have a minor problem at my raspi server. The darned external drive it uses tends to randomly cease working, and require a restart. |
23:01 | < AnnoDomini> | I don't suppose anyone knows how to code a shell script that checks if a certain path/file exists and runs a command if not? |
23:01 | <&McMartin> | I think that's if [[ -e fname ]] |
23:02 | < AnnoDomini> | I could possibly use perl, too. |
23:06 | < AnnoDomini> | http://pastie.org/8734707 <- Would something like this work? |
23:06 | <&ToxicFrog> | AnnoDomini: [[ -e /path/to/file ]] || command |
23:07 | <&ToxicFrog> | Alternately, if [[ -e /path/to/file ]]; then <command>; fi |
23:07 | <&McMartin> | TF's does exactly what you asked for |
23:07 | <&McMartin> | TF: Wait, the second needs a negation does it not |
23:07 | <&ToxicFrog> | Er, yes, sorry |
23:07 | <&ToxicFrog> | [[ ! -e /path/to/file ]], IIRC |
23:07 | <&ToxicFrog> | Long day |
23:14 | | * AnnoDomini adds "*/5 * * * * [[ ! -e /mnt/hitachi/library ]] || sudo reboot" to crontab. |
23:14 | < AnnoDomini> | Hope this'll work. |
23:17 | < AnnoDomini> | Aaaand it immediately goes into shutdown. Hmm. |
23:18 | < AnnoDomini> | Um, I think ToxicFrog's first version was the one I wanted. |
23:18 | <&McMartin> | Yeah |
23:18 | <&McMartin> | His first version is "check this, and if it is false, do this" |
23:18 | <&McMartin> | if it does exist, thats "true OR command" |
23:19 | <&McMartin> | And the true short-circuits, thus skipping the command |
23:22 | < AnnoDomini> | WTF. Removing the ! results in the same behaviour. |
23:26 | | ErikMesoy is now known as ErikMesoy|sleep |
23:30 | < AnnoDomini> | I don't know why, but it works differently when I type it in the command line and when I have it run automatically in cron. |
23:35 | < [R]> | Some crond's do preprocessing on the command that the shell does not. |
23:36 | < [R]> | As such I make cronlines that call scripts without arguments |
23:37 | < [R]> | Also [[ is a shell-builtin just like [ and test are. |
23:37 | < Shiz> | i'm legitimately attempting to solve http://also.kottke.org/misc/images/regexp-crossword.jpg |
23:37 | < Shiz> | :( |
23:38 | < [R]> | But they're also programs |
23:38 | | * AnnoDomini tries his perl solution. |
23:38 | < [R]> | Try doing tests with /usr/bin/[[ instead of [[ |
23:39 | < [R]> | Or just make a shell script that calls the correct shell. |
23:41 | < AnnoDomini> | OK. This will possibly work now. |
23:55 | <&ToxicFrog> | [R]: there is no /usr/bin/[[ |
23:55 | <&ToxicFrog> | [[ is a bashism |
23:55 | <&ToxicFrog> | It's a shell builtin. |
23:55 | <&ToxicFrog> | [ and test are not shell builtins. |
23:56 | <&ToxicFrog> | If I had to guess why this isn't working, I'd guess that crond is using sh, not bash |
23:56 | <&ToxicFrog> | And my recommendation would be "pull this into a script with #!/bin/bash, have cron invoke that script" |
23:56 | <&ToxicFrog> | Trying to do anything complicated in the crontab is a vale of tears. |
--- Log closed Sat Feb 15 00:00:37 2014 |