--- Log opened Fri Jun 14 00:00:46 2019 |
00:55 | | celmin|away is now known as celticminstrel |
01:35 | | bluefoxx [fuzzylombax@Nightstar-gmbj85.vs.shawcable.net] has quit [[NS] Quit: nice to know you] |
02:23 | | Degi [Degi@Nightstar-vdkf2b.dyn.telefonica.de] has quit [Connection reset by peer] |
03:56 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code |
03:56 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
04:34 | | macdjord [macdjord@Nightstar-grpbnp.mc.videotron.ca] has joined #code |
04:34 | | mode/#code [+o macdjord] by ChanServ |
04:37 | | macdjord|slep [macdjord@Nightstar-grpbnp.mc.videotron.ca] has quit [Ping timeout: 121 seconds] |
04:38 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed] |
04:39 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code |
04:39 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
04:49 | | celticminstrel [celticminst@Nightstar-6an2qt.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
07:35 | | Kindamoody[zZz] is now known as Kindamoody |
07:42 | | Kindamoody is now known as Kindamoody|out |
11:14 | <~Vornicus> | dangit luaunit why does this traceback not go back far enough |
11:14 | <~Vornicus> | or rather why does it skip steps |
11:16 | <~Vornicus> | I know that vorntable.push is getting a nil table, and I know technically it's somewhere in the putPointOnEdge call because the next item in the call stack is addPoint and the line where putPointOnEdge is called, but there are 18 calls to vorntable.push in there, you're going to have to give me a little more to work with. |
11:26 | <~Vornicus> | and again, this time with vorntable.load which I use 20 times. |
11:26 | <~Vornicus> | Sigh. |
11:42 | <~Vornicus> | OKay. REason it's not working is because for some reason my hierarchy face table isn't being completely filled. |
11:48 | <~Vornicus> | --because I claimed to be using indexes and ended up inserting references instead in one spot.. |
11:49 | <~Vornicus> | Okay, now it's failing in a different spot, let's see |
12:29 | <~Vornicus> | Aha, typo in the construction protocol, that should have been index 7, day saved. |
12:32 | <~Vornicus> | GREEN |
12:33 | <~Vornicus> | fuck yeah |
12:34 | <@TheWatcher> | And there was much rejoicing! |
12:35 | <~Vornicus> | All right! TIme to think of a test for the next bit |
12:36 | | * TheWatcher ponders this variable |
12:37 | <@TheWatcher> | $jaeorbs |
12:37 | <@TheWatcher> | Well, that's rather old-school. |
12:37 | <~Vornicus> | did they take 'em? |
12:39 | | * TheWatcher checks |
12:40 | <@TheWatcher> | Well, it's got a $jaeorbs -> run() down there, but not sure if it's skookem |
12:52 | | Kindamoody|out is now known as Kindamoody |
12:55 | <&Reiver> | okay, I want to dabble in a teeny bit of programming. To rename files in a directory. |
12:55 | <&Reiver> | My default would be to bang my head against Python again, get baffled at regexes again, and give up on the whole thing in misery and self-loathing and then do everything by hand. |
12:56 | <&Reiver> | Do I hear any competing suggestions for methodology in which I actually learn something, and maybe even succeed? |
12:56 | <~Vornicus> | Define your precise problem here |
12:56 | <@TheWatcher> | ^ what the unsqueakable one says |
12:58 | <~Vornicus> | Regex is pretty opaque; one of the best ways to learn is to have someone who is very knowledgeable in them explain some relatively simple ones they made themselves. |
12:58 | <&Reiver> | File.Name.2018.1234p.Text.Foo.Bar.mp4 (or .avi or simply a folder with nothing at all) => File Name (2018).mp4 (or equivalent) |
12:59 | <&Reiver> | Yeah, I guess I don't really learn that way these days. My years of professional devving mean I mostly learn from taking a working example and then hacking it to a new, similar, example next time. Regex has tended to be resistant to this technique, and its whole paradgim is alien enough I just stare at it blankly and uninstall the entire development stack du jour. (I appreciate this is not a healthy response.) |
12:59 | <~Vornicus> | Can File.Name.2018 be Mononym.2018, or Really.Long.File.Name.2018 |
13:00 | <@TheWatcher> | But regex are awesome, you can even used them to parse HTML!* |
13:00 | <@TheWatcher> | (* you can't and shouldn't) |
13:01 | <~Vornicus> | If so I can name this tune with str.split, str.isdigit, and str.join |
13:01 | <&Reiver> | Vornicus: Yes |
13:02 | <@TheWatcher> | Are you guaranteed to have the year after the name? |
13:02 | <&Reiver> | "Strip all the full stops into spaces up to the first set of numerals. Put those numerals in parenthesis. Then eliminate everything else afterwards, out to the final file type identifier." |
13:03 | <&Reiver> | Yes. I was planning to use it as the identifier for where it was. |
13:03 | <&Reiver> | Or rather, where the file name ends and the cruft begins. |
13:03 | <@TheWatcher> | hokay, yeah |
13:04 | <~Vornicus> | no need for regex at all, then. |
13:04 | | * TheWatcher sulk~ |
13:05 | <~Vornicus> | oh, you'll also need os.isdir |
13:05 | | celticminstrel [celticminst@Nightstar-6an2qt.dsl.bell.ca] has joined #code |
13:05 | | mode/#code [+o celticminstrel] by ChanServ |
13:05 | <~Vornicus> | (to determine whether there's an extension or just cruft at the end) |
13:10 | <~Vornicus> | you can set up a twitch stream and we can yell at your code live, or something |
13:16 | <@TheWatcher> | XD |
13:16 | <@TheWatcher> | Not sure that'd be helpful |
13:19 | | * Reiver hides under a rock. |
13:19 | <&Reiver> | Still, thank you for clarifying that I can skip the regex. |
13:19 | | * TheWatcher vaguely ponders a one-lined regex to do the job, decides that it has some interesting wrinkles and comes to the conclusion - for the purposes of a day where he's supposed to be workin on a gitlab job runner - that it's an ecumenical matter. |
13:21 | <&Reiver> | what |
13:25 | <@TheWatcher> | It's from Father Ted, a sitcom. http://preachingandpondering.blogspot.com/2017/05/that-would-be-ecumenical-matter.html but in short 'They land on the phrase "That would be an ecumenical matter", which Ted observes is just enough to imply you are interested or are able to follow some arcane theological discussion' |
13:28 | <@TheWatcher> | 'Just respond with that phrase, he has learned, and others will consider you profound and wise. (And hopefully leave you alone!)' |
13:42 | <@TheWatcher> | It's actually easy to do except for the \. between the name parts $foo =~ s/^(?<name>(\w+\.)+)(?<date>\d{4})\..*?(?<ext>\.\w+)$/$+{name} \($+{date}\)$+{ext}/; but those damned \.s hrrrrm |
13:43 | <~Vornicus> | regex is super crazy concise. That's basically all that's good about it: sometimes equivalent code for your regex will be long and annoying so a regex will get it done more neatly and, for those who are familiar with regex, more obviously |
13:44 | <~Vornicus> | but then when you do something like this and, quite frankly, I can't read that |
13:44 | <~Vornicus> | and I consider myself not terrible at regex |
13:54 | <@TheWatcher> | (?<name>(\w+\.)+) = capture at least one group of alphanumerics ending in a \. and store the lot in the 'name' capture. (?<date>\d{4}) = capture four digits, store in the 'date' capture. \..*? = match the next . and do a non-greedy match for any character, (?<ext>\.\w+) = capture the last . and any alphanumerics after, store in the 'ext' capture. And then $+{name} |
13:54 | <@TheWatcher> | \($+{date}\)$+{ext} pulls the values out of the named capture groups and use them to replace the string. |
13:55 | <@TheWatcher> | I wouldn't usually bother with named captures, but normal $1 $2 etc refs won't work properly. There's probably a more elegant method to do it that I'm brainfarting on |
13:56 | | Kindamoody is now known as Kindamoody|afk |
13:58 | | celticminstrel is now known as celmin|away |
14:02 | | * Reiver screams and dies. |
14:13 | | Degi [Degi@Nightstar-ksir82.dyn.telefonica.de] has joined #code |
14:37 | <~Vornicus> | Ok. Test is: place three points in a triangle in a particular way I know is safe - hi, lo, right. This will break up the mesh into four triangles none of which need adjusting, so I should get "this doesn't need adjusting" off of the adjustment checker. Then, add one close enough to the outside of this triangle that it lies inside the circumcircle. that will force a rework of the triangles. That then tests the edge flop. |
14:57 | | Degi [Degi@Nightstar-ksir82.dyn.telefonica.de] has quit [Connection closed] |
15:27 | | gnolam [quassel@Nightstar-0oc.n80.224.185.IP] has joined #code |
15:27 | | mode/#code [+o gnolam] by ChanServ |
16:50 | | gnolam [quassel@Nightstar-0oc.n80.224.185.IP] has quit [[NS] Quit: Interruption] |
16:59 | | gnolam [quassel@Nightstar-0oc.n80.224.185.IP] has joined #code |
16:59 | | mode/#code [+o gnolam] by ChanServ |
16:59 | | Vorntastic [uid293981@Nightstar-6br85t.irccloud.com] has joined #code |
16:59 | | mode/#code [+qo Vorntastic Vorntastic] by ChanServ |
17:34 | | catalyst [Jessikat@Nightstar-5dv16h.cable.virginm.net] has joined #code |
17:40 | <@gnolam> | Argh. |
17:41 | <@gnolam> | How did Pascal of all languages ever get introduced as a teaching language? |
17:42 | | gnolam [quassel@Nightstar-0oc.n80.224.185.IP] has quit [[NS] Quit: SJ.] |
17:44 | | Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has joined #code |
17:53 | | gnolam [quassel@Nightstar-0m2ors.mobileonline.telia.com] has joined #code |
17:53 | | mode/#code [+o gnolam] by ChanServ |
18:43 | | gnolam [quassel@Nightstar-0m2ors.mobileonline.telia.com] has quit [[NS] Quit: Blergh] |
19:16 | | ErikMesoy [Bruker@Nightstar-hhsrrl.customer.cdi.no] has quit [Connection closed] |
19:16 | | ErikMesoy [Bruker@Nightstar-hhsrrl.customer.cdi.no] has joined #code |
20:13 | | gnolam [lenin@Nightstar-hfrbpd.cust.bahnhof.se] has joined #code |
20:13 | | mode/#code [+o gnolam] by ChanServ |
21:10 | | Kindamoody|afk is now known as Kindamoody |
23:03 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed] |
23:14 | <&McMartin> | gnolam: A lack of viable alternatives at the time; C was not a viable alternative until standardization was de facto complete around the cusp of the 90s. |
23:15 | <&McMartin> | Modula-2 would not have been a meaningful improvement, and if you wanted an ALGOL that actually produced compilable and runnable code on your university systems, that's literally what Pascal was. |
23:16 | <&McMartin> | Ease of use and ability to brush off the Dominant Bullshit Of The Age That Got In The Way Of Actually Teaching What The Class Was About, ironically enough, were things it actually delivered |
23:16 | <&McMartin> | Ultimately, Java did the same 25 years later, which is what ultimately displaced it. |
23:17 | <@TheWatcher> | The fact that using pascal successfully requires donning a smoking jacket and obtaining a pipe is a secondary concern~ |
23:17 | <&McMartin> | That's a feature, tbh |
23:17 | | * McMartin grew up being taught Pascal in his Serious Programming For Srs classes, was expected to be ahead of the curve due to prior exposure to C, but then teaching switched to C++ in the late 1990s and Java at the turn of the century |
23:17 | <&McMartin> | And I got to TA the same class twice as a grad student, once in C++ and once in Java |
23:17 | <&McMartin> | I hate Java with the fire of several hundred suns |
23:18 | <&McMartin> | But I will say nothing at all unkind about its suitability as a teaching language. |
23:18 | <&McMartin> | It wasn't built to do that job |
23:18 | <&McMartin> | But It Did That Job. |
23:24 | <@gnolam> | Context: for some bizarre reason, Pascal is what Inno Setup uses for its code/scripting bits. |
23:25 | <&McMartin> | It's old enough that it was probably a reasonable choice at the time, especially if it was a P-Code kind of thing pre-JVM |
23:37 | <&McMartin> | Delphi also maintains a surprisingly persistent userbase |
--- Log closed Sat Jun 15 00:00:47 2019 |