--- Log opened Thu May 11 00:00:02 2017 |
00:12 | | himi [sjjf@Nightstar-dm0.2ni.203.150.IP] has joined #code |
00:52 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection reset by peer] |
00:52 | | Netsplit Deepthought.Nightstar.Net <-> Golgafrincham.Nightstar.Net quits: ErikMesoy, @abudhabi, macdjord|slep, @Azash, @[R], @Turaiel[Offline], @jerith |
00:52 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code |
00:53 | | Netsplit over, joins: &jerith, &[R], macdjord|slep, @abudhabi, ErikMesoy, @Turaiel[Offline], @Azash |
01:05 | | celticminstrel [celticminst@Nightstar-n3vt4b.dsl.bell.ca] has quit [Ping timeout: 121 seconds] |
01:07 | | celticminstrel [celticminst@Nightstar-bo0dap.dsl.bell.ca] has joined #code |
01:34 | | PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has joined #code |
01:34 | | iospace [Alexandria@Nightstar-fkokc2.com] has joined #code |
01:34 | | Jessikat [Jessica@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code |
01:34 | | Namegduf [namegduf@Nightstar-lcgn9d.beshir.org] has joined #code |
01:34 | | 447AAACEA [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code |
01:34 | | VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code |
01:34 | | crystalclaw [crystalclaw@Nightstar-12q9ui.xyz] has joined #code |
01:34 | | Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has joined #code |
01:34 | | ServerMode/#code [+oooaooo PinkFreud iospace Namegduf VirusJTG VirusJTG crystalclaw Reiv] by *.Nightstar.Net |
01:35 | | 447AAACEA is now known as ToxicFrog |
01:35 | | mode/#code [+ao ToxicFrog ToxicFrog] by ChanServ |
01:56 | | Turaiel[Offline] is now known as Turaiel |
03:10 | | Alek [Alek@Nightstar-7or629.il.comcast.net] has quit [Ping timeout: 121 seconds] |
03:14 | | Alek [Alek@Nightstar-7or629.il.comcast.net] has joined #code |
03:14 | | mode/#code [+o Alek] by ChanServ |
03:31 | | gnolam_ [lenin@Nightstar-09nsce.cust.bahnhof.se] has joined #code |
03:34 | | gnolam [lenin@Nightstar-09nsce.cust.bahnhof.se] has quit [Ping timeout: 121 seconds] |
04:27 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds] |
05:21 | | Turaiel is now known as Turaiel[Offline] |
05:56 | | himi [sjjf@Nightstar-dm0.2ni.203.150.IP] has quit [Ping timeout: 121 seconds] |
06:33 | | celticminstrel [celticminst@Nightstar-bo0dap.dsl.bell.ca] has quit [Ping timeout: 121 seconds] |
06:34 | | celticminstrel [celticminst@Nightstar-aq5pdp.dsl.bell.ca] has joined #code |
06:34 | | mode/#code [+o celticminstrel] by ChanServ |
06:35 | | mode/#code [+o ErikMesoy] by ChanServ |
07:18 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code |
07:18 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
07:55 | | Jessikat [Jessica@Nightstar-bt5k4h.81.in-addr.arpa] has quit [Connection closed] |
08:24 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds] |
09:13 | | Jessikat [Jessikat@Nightstar-huiopn.dab.02.net] has joined #code |
09:15 | | celticminstrel is now known as celmin|sleep |
09:45 | | gnolam_ is now known as gnolam |
09:45 | | mode/#code [+o gnolam] by ChanServ |
10:19 | | RchrdB [RchrdB@Nightstar-qe9.aug.187.81.IP] has joined #code |
10:55 | | Jessikat` [Jessikat@Nightstar-9cf.bmi.132.82.IP] has joined #code |
10:58 | | Jessikat [Jessikat@Nightstar-huiopn.dab.02.net] has quit [Ping timeout: 121 seconds] |
11:37 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code |
11:37 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
13:47 | | Jessikat` is now known as Jessikat |
14:35 | | celmin|sleep is now known as celticminstrel |
14:38 | | Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has quit [[NS] Quit: http://www.kiwiirc.com/ - A hand crafted IRC client] |
14:46 | | Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has joined #code |
14:46 | | mode/#code [+o Reiv] by ChanServ |
15:20 | | Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has quit [[NS] Quit: http://www.kiwiirc.com/ - A hand crafted IRC client] |
15:56 | | Vornotron [Vorn@ServerAdministrator.Nightstar.Net] has joined #code |
15:57 | | gnolam_ [lenin@Nightstar-09nsce.cust.bahnhof.se] has joined #code |
15:59 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds] |
15:59 | | * Tamber facepalms gently, receives coconut. |
15:59 | | gnolam [lenin@Nightstar-09nsce.cust.bahnhof.se] has quit [Ping timeout: 121 seconds] |
16:01 | <@Tamber> | I have just discovered the cause of one of those little oddities I'd get around to looking into when I had a sufficiently circular tuit, and it's so dumb. Context: My blog generator thing outputs, as it runs, the name of what file it's operating on currently, and then follows that with a little status output (OK, Failed, Not Required). |
16:02 | <@Tamber> | Except I'd run it and get a huge list of "Done" or "Not Required", then a great big clump of all the filenames at the end of that list. |
16:03 | <@Tamber> | Like so: http://furryhelix.co.uk/~tamber/pics/tmp/snap-1494514958.png |
16:04 | < Vornotron> | raaaaaace conditions |
16:05 | < Vornotron> | (where the wind comes sweepin down the plain) |
16:05 | <@Tamber> | http://furryhelix.co.uk/~tamber/pics/tmp/snap-1494515054.png |
16:05 | <@Tamber> | Better than that. |
16:05 | <@Tamber> | Well. |
16:05 | <@Tamber> | It's kinda that, but dumber. |
16:06 | <&[R]> | Your first mistake was using perl |
16:06 | <&[R]> | :p |
16:06 | < Vornotron> | I can't tell from there |
16:06 | <@Tamber> | Well, the "Generating post" text goes to STDERR. |
16:07 | <@Tamber> | the "Failed", etc text... was going to STDOUT. |
16:07 | < Vornotron> | ok. |
16:10 | <&[R]> | So one of the two output streams is being buffered? |
16:11 | <@Tamber> | No idea. |
16:12 | <@Tamber> | ("I don't know, man, I just work here.") |
16:12 | < Vornotron> | looks like, but that surprises me - usually i see buffers flush whenyou hit newline |
16:12 | <@Tamber> | (And the fix: https://github.com/TamberP/Klompen/commit/3a5a0322863349f718e88ae35071e7056c5b4e 83 ) |
16:13 | <&[R]> | Vornotron: The buffering was on the stdout calls, but not the stderr ones, which are the ones that piled at the end. |
16:13 | <&[R]> | ... |
16:14 | <&[R]> | Vornotron: The immediate output was on the stdout calls, but not the stderr ones, which are the ones that piled at the end. |
16:14 | < Vornotron> | still. |
16:14 | <&[R]> | The stdout ones were the ones with the newlines |
16:16 | | * Vornotron bonks tamber for being silly with that too. |
16:16 | <@Tamber> | I have been wondering why it did that for years. |
16:17 | <&ToxicFrog> | [R]: that's totally backwards from how it should work; stderr is unbuffered by default. There's something really weird going on here |
16:17 | <&[R]> | It's perl. |
16:18 | <&ToxicFrog> | (also why are you using stderr for this)_ |
16:18 | <@Tamber> | *shrug* |
16:19 | <@Tamber> | That's just the way I did it way back then. I am not the same person I was when I wrote that originally. |
16:20 | <@Tamber> | But I suspect it's because the original author was an idiot. |
16:33 | < RchrdB> | I'm reading this paper "Interactive Order-Independent Transparency" about what the heck "depth-peeling" is |
16:33 | < RchrdB> | http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.18.9286 |
16:34 | < RchrdB> | and it occurs to me that one could maybe use the peeling trick that they define here in a videogame to create an "xray goggles" powerup effect by rendering the whole scene with 'n' layers peeled off. |
16:41 | <&[R]> | Hmm |
16:42 | <&[R]> | http://rpgb.nobl.ca/parse.index.js <-- How WTFy is my for loop |
16:42 | <&[R]> | Also I can probably do that substr() comparison with path instead, but meh |
16:46 | < RchrdB> | That is weird. Why are both of those calls to 'files.input.push()' in the bodies of the try {} blocks? |
16:46 | <&[R]> | Because it's statSync that throws |
16:46 | < RchrdB> | I think you don't expect those lines to ever throw exceptions, your try blocks are only looking for exceptions from statSync. |
16:46 | <&[R]> | I'm checking for file existance, only one of the two would exist |
16:47 | < RchrdB> | Right so if you can make the try {} block only cover the thing that you're expecting to throw, that would be clearer. |
16:47 | <&[R]> | If I move the first one out of the try then it'll add index.html?page=2 even if that doesn't exist but index2.html does. |
16:48 | < RchrdB> | No. Set state variables and then test them. |
16:48 | <&[R]> | That's what files.input is? |
16:51 | < RchrdB> | That loop will be much much clearer if the inside looks more like, for (var i=2;;++i) { let page = ..., indexn = ...; if (fileExists(page)) { files.input.push(page); continue; } else if (fileExists(indexn)) { files.input.push(indexn); } else { break; } } |
16:51 | < RchrdB> | where fileExist is something you define, or maybe there's something like that in the 'fs' module, check. |
16:52 | <&[R]> | It's deprecated |
16:52 | < RchrdB> | and I'd avoid repeating "files.dir + x", instead just define x as "files.dir + whatever" in the first place. |
16:52 | < RchrdB> | write the one-one function then |
16:53 | < RchrdB> | function fileExists(name) { try { fs.statSync(name); return true; } catch(e) { return false; } } |
16:54 | < RchrdB> | [R], correction: fs.exists(path, callback) is marked as deprecated but fs.existsSync is not according to https://nodejs.org/api/fs.html#fs_fs_existssync_path |
16:54 | < RchrdB> | so just use fs.existsSync |
16:55 | < RchrdB> | you don't want to do strange things with try/catch when you could be passing around ordinary values instead |
16:56 | <&[R]> | Weirdness |
16:57 | <&[R]> | Eitherway thanks |
16:57 | < RchrdB> | oh and you probably want to use === not ever == |
16:58 | < RchrdB> | I wouldn't want to see == in javascript code without a comment explaining why === wasn't appropriate |
16:58 | < RchrdB> | small thing, may not actually matter at any given call site, but javascript's == operator has bizarre semantics and it's easier not to have to think about them ever |
17:00 | <&[R]> | For something that guarantees a string and I'm comparing against a string literal I don't see the point. Though I am aware of the differences between the two. |
17:00 | <&[R]> | I don't know the specifics of let though, which you had used. |
17:04 | < RchrdB> | Use jslint or something. You don't need things like ("" == 0) in your life. There's no cost whatsoever to simply ditching it. |
17:05 | < RchrdB> | [R], 'let' is an ES6 feature which implements standard scoping rules instead of JS's weird ones. nodejs supports iirc up to es2015 or something out the box. |
17:25 | | Jessikat` [Jessikat@Nightstar-51ur0n.dab.02.net] has joined #code |
17:29 | | Jessikat [Jessikat@Nightstar-9cf.bmi.132.82.IP] has quit [Ping timeout: 121 seconds] |
17:38 | | Jessikat [Jessikat@Nightstar-51ur0n.dab.02.net] has joined #code |
17:38 | | Jessikat` [Jessikat@Nightstar-51ur0n.dab.02.net] has quit [The TLS connection was non-properly terminated.] |
17:54 | | Jessikat [Jessikat@Nightstar-51ur0n.dab.02.net] has quit [Ping timeout: 121 seconds] |
18:13 | <&[R]> | Alright... some weirdness in the HTML files I'm parsing. What's '\xC2\xA0'? It looks like a space. IIRC those are outside the ASCII range. |
18:17 | <&[R]> | nm, just made it blindly clean them out. |
18:17 | <&[R]> | Also for some reason... |
18:17 | <&[R]> | > new Buffer('\xa0') |
18:17 | <&[R]> | <Buffer c2 a0> |
18:18 | <&[R]> | I'm guessing UTF-8? |
18:38 | < Vornotron> | that's a nobreak space |
18:48 | | macdjord|slep is now known as macdjord |
18:48 | | mode/#code [+o macdjord] by ChanServ |
19:03 | < Vornotron> | c2 a0 is the utf-8 for a0, and a0 itself is an nbsp. |
19:29 | | RchrdB [RchrdB@Nightstar-qe9.aug.187.81.IP] has quit [Ping timeout: 121 seconds] |
21:23 | | Kindamoody|afk is now known as Kindamoody |
21:36 | | Kindamoody is now known as Kindamoody[zZz] |
23:34 | | himi [sjjf@Nightstar-dm0.2ni.203.150.IP] has joined #code |
23:34 | | mode/#code [+o himi] by ChanServ |
--- Log closed Fri May 12 00:00:03 2017 |