code logs -> 2013 -> Sat, 21 Dec 2013< code.20131220.log - code.20131222.log >
--- Log opened Sat Dec 21 00:00:30 2013
--- Day changed Sat Dec 21 2013
00:00
<&McMartin>
The case I'm thinking of, the standard had the wrong decision.
00:00
<&McMartin>
(Scope of i in "for (int i = ...)")
00:01
< RichyB>
Agreed.
00:02
<&McMartin>
There was a way to force the eventual standard regardless~
00:03
<&McMartin>
The most glorious terrible thing
00:03
<&McMartin>
#define for if (0); else for
00:08 Orthia [orthianz@Nightstar-avg.1ee.224.119.IP] has quit [Ping timeout: 121 seconds]
00:16 Orthia [orthianz@Nightstar-h9d.ufa.184.203.IP] has joined #code
00:16 mode/#code [+o Orthia] by ChanServ
00:49 iospace is now known as io\out_of_spoons
01:01
<&McMartin>
Oh wow
01:01
<&McMartin>
That's a first
01:01
<&McMartin>
I'm actually getting bad_alloc thrown.
01:01 * McMartin goes infinite-loop hunting.
01:35 gnolam_ [lenin@Nightstar-be7b01.cust.bredbandsbolaget.se] has joined #code
01:35 gnolam is now known as NSGuest23021
01:35 gnolam_ is now known as gnolam
01:36 mode/#code [+o gnolam] by ChanServ
01:37 NSGuest23021 [lenin@Nightstar-be7b01.cust.bredbandsbolaget.se] has quit [Ping timeout: 121 seconds]
01:55 Derakon is now known as Derakon[AFK]
02:00 * thalass ponders crontab
02:00
<&McMartin>
Infinite loop: bagged
02:05 Stalker [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
02:07
<&ToxicFrog>
egrep -m1 'span class="date"' | sed -r 's/[^>]+>([^,]+),.*/\1/; s/([0-9]+)[a-z]*/\1/' | date -I -f -
02:07
<&ToxicFrog>
I win \o/
02:12
< thalass>
heh
02:17
<~Vornicus>
you find a bunch of things in date-class spans, mangle them, and parse?
02:19
<&ToxicFrog>
Vornicus: the first thing, actually.
02:19
<&ToxicFrog>
The mangling is to turn e.g. "29th" into "29" - date(1) understands the latter but not the former.
02:20
<~Vornicus>
oh, right, the first. okay
02:21
<&ToxicFrog>
(that's the -m1)
02:31
<@Tarinaky>
Does anyone recognise the name Funcan?
02:50
<~Vornicus>
noperoni
02:51
<@Tarinaky>
They forked one of my things on GitHub and... as far as I am aware you guys are the only ones who really know about it.
03:06 * thalass ponders
03:07
< thalass>
is it possible to set a cronjob to run a program @reboot plus five minutes?
03:08
< thalass>
I've got my script working to ping snar.co/ip and grab my ip address, then email me if it's changed, and i have cron working to run that python script once a day, but after a power outage it'd take a minute or two for the router to settle down and connect.
03:11
<&ToxicFrog>
in the script: sleep $((5*60)); # do stuff
03:11
<&ToxicFrog>
Alternately, make it a systemd job dependent on network.target
03:13
< thalass>
hrm
03:16
<&ToxicFrog>
The former is easier, especially if the local network comes up before the router does
03:19
< thalass>
indeed. I think i'll do that.
03:21
< thalass>
I need to work on understanding a python script that polls a netgear router for the external IP so i don't have to rely on someone else to keep in touch with my pi
03:30 Turaiel is now known as Turaiel[Offline]
03:54 dmiles_afk [dmiles@Nightstar-hdcn1r.or.comcast.net] has quit [Connection closed]
03:56 dmiles_afk [dmiles@Nightstar-hdcn1r.or.comcast.net] has joined #code
03:57
<&ToxicFrog>
thalass: what's the underlying goal here?
03:58
<&ToxicFrog>
I mean, determining your external IP is trivial:
03:58
<&ToxicFrog>
$ curl -s checkip.dyndns.org | egrep -o '[0-9.]+'
03:58
<&ToxicFrog>
75.119.253.164
03:58
< thalass>
I'm on the other side of the world, and i'm tinkering with some python scripts in an effort to eventually make a robot out of my pi. Need to make sure i know the right IP to ssh into.
03:59
<&ToxicFrog>
You could also run one of the dynamic-dns updater daemons on the pi, and then just ssh into rpi.thalass.netmask.ca or similar
04:06 * thalass nods
04:08
< thalass>
At the moment it reads the output from a particular ip returning site, and if it's changed it emails me. Eventually i'd like to automate that so the robot-controlling program on this machine will connect with one click. Though it's probably easier to set up a dynamic dns thing on the Pi's end.
04:12 Netsplit *.net <-> *.split quits: Xon, Reiver, @Namegduf, @gnolam, Azash, @io\out_of_spoons, ErikMesoy|sleep, Syka, McMartin, RichyB, (+3 more, use /NETSPLIT to show all of them)
04:13 Netsplit over, joins: RichyB, Reiver, &jerith, Syka, @io\out_of_spoons, @gnolam, &McMartin, Azash, @Syloq, ErikMesoy|sleep (+3 more)
04:20
< thalass>
Considering how easy it seems to be to set up a dynamic dns script thing, i might do that tomorrow.
04:20
< thalass>
First: Slep
04:20 thalass is now known as Thalasleep
04:34 Thalasleep [thalass@Nightstar-bce70i.eastlink.ca] has quit [Operation timed out]
04:47 * ToxicFrog finishes a program that will watch the KSP forums for updates to the mods he uses
04:58 dmiles_afk [dmiles@Nightstar-hdcn1r.or.comcast.net] has quit [Ping timeout: 121 seconds]
05:09 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [[NS] Quit: Program Shutting down]
06:33 Kindamoody[zZz] is now known as Kindamoody
06:37 io\out_of_spoons is now known as io\passedout
06:59 RichyB [RichyB@Nightstar-c6u.vd5.170.83.IP] has quit [[NS] Quit: Gone.]
07:02 RichyB [RichyB@Nightstar-c6u.vd5.170.83.IP] has joined #code
08:10 Alek [omegaboot@Nightstar-qa936g.il.comcast.net] has quit [Ping timeout: 121 seconds]
08:20 ErikMesoy|sleep is now known as ErikMesoy
08:29 Alek [omegaboot@Nightstar-qa936g.il.comcast.net] has joined #code
08:29 mode/#code [+o Alek] by ChanServ
08:45
< AnnoDomini>
How do I make irssi replay logs on startup? I'd like to have backscroll available even if I had to shut down my client for a while.
08:48
<@froztbyte>
I think there's a perl script for that
08:49
<@froztbyte>
it'll only replay what you have in logs, though
08:49
<@froztbyte>
unless I'm misunderstanding how you're connecting
08:53
< AnnoDomini>
The client is local. I have a BNC (which unfortunately is selective about what it replays). I am logging locally.
09:00
<@froztbyte>
okay
09:00
<@froztbyte>
you're basically screwed
09:01
<@froztbyte>
you either get to replay your logs (which, as I say, I think there's a script for), or you get to fix/replace the BNC
09:01 celticminstrel [celticminst@Nightstar-gj43l1.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
09:01
<@froztbyte>
you could look at something like quassel, but that doesn't have a good CLI interface
09:07
< AnnoDomini>
I would prefer to have a shell running irssi-inna-screen, but I all the shell accounts I have are unstable.
09:14
< Shiz>
you have a stable BNC but only unstable shell accounts?
09:14
< Shiz>
(btw irssi/weechat can work in proxy mode, acting like a BNC)
09:15
< Shiz>
(that was directed to froztbyte)
09:19
< AnnoDomini>
I did not say this BNC is stable. I've only been using it a couple of days now.
09:20
<@froztbyte>
Shiz: I know
09:20
<@froztbyte>
Shiz: I use it
09:21
<@froztbyte>
(irssi-proxy)
09:21
<@froztbyte>
http://blog.froztbyte.net/2013/06/my-irc-setup/
09:21
< Shiz>
>65 channels
09:21
< Shiz>
>somewhat ridiculous
09:21
< Shiz>
pfff, pleb.
09:21
<@froztbyte>
I actually have things to do
09:22
<@froztbyte>
so more becomes pointless
09:22 * Shiz just runs weechat in a tmux session on his VPS
09:44 Stalker [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code
09:53 You're now known as TheWatcher
09:59 Kindamoody is now known as Kindamoody|out
10:32 Vornicus [vorn@Nightstar-sn7kve.sd.cox.net] has quit [[NS] Quit: Leaving]
10:37 Vornicus [vorn@Nightstar-sn7kve.sd.cox.net] has joined #code
10:37 mode/#code [+qo Vornicus Vornicus] by ChanServ
11:21 Vornicus [vorn@Nightstar-sn7kve.sd.cox.net] has quit [[NS] Quit: Leaving]
11:32 Attilla [uid13723@Nightstar-ed0oqj.irccloud.com] has quit [[NS] Quit: ]
11:33 Attilla [uid13723@Nightstar-ed0oqj.irccloud.com] has joined #code
12:36 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code
12:38 Attilla [uid13723@Nightstar-ed0oqj.irccloud.com] has quit [[NS] Quit: ]
13:22 himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
13:36 himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code
13:36 mode/#code [+o himi] by ChanServ
14:48 io\passedout is now known as iospace
16:10 celticminstrel [celticminst@Nightstar-gj43l1.dsl.bell.ca] has joined #code
16:10 mode/#code [+o celticminstrel] by ChanServ
17:02
<&jerith>
So, http://regex.alf.nu/
17:03 * ErikMesoy breaks out the regex cheat sheet, because he cannot regex.
17:03
<&jerith>
ErikMesoy: I won't help much with the later levels.
17:03
<&jerith>
*It
17:04
<&jerith>
I have complete solutions for all of them now, but I suspect some of them aren't optimal.
17:19
< ErikMesoy>
Indeed, the cheat sheet is not helping me understand negative backreferences on level 5.
17:20
<&jerith>
Negative lookahead, you mean.
17:21 Derakon[AFK] is now known as Derakon
17:22
< ErikMesoy>
Oh, is that what I'm doing wrong.
17:23
<&jerith>
JS doesn't have lookbehind.
17:24
< ErikMesoy>
Welp, it's not helping me with that either. :p
17:25
<&jerith>
If you want to negate the whole regex you need a start anchor immediately before the start of the lookahead assertion.
17:25
<&jerith>
So "^(?!<whatever>)".
17:26
< ErikMesoy>
Shush you, I'm skipping ahead. 174 points on level 6 with cheatsheet.
17:26
<&jerith>
174? I only got 171.
17:27 * jerith looks for an optimisation.
17:27
< ErikMesoy>
Maybe I'm cheating more.
17:28
< ErikMesoy>
Oh, hey, 176.
17:28
<&jerith>
Yes, you are. But I can too!
17:28
< ErikMesoy>
At some point you can figure out what I'm doing just by matching "absolutely necessary bits" to "low amount of characters available" and just inferring.
17:28
< ErikMesoy>
This is how I used to solve a lot of logic puzzles back in the day. :D
17:31
<&jerith>
My high score is apparently 173 and I don't know how. :-/
17:31
<&jerith>
Ah, got it.
17:32
<&jerith>
176! \o/
17:32
<&jerith>
Thanks.
17:33
< ErikMesoy>
Level 7 is having me glaring as it starts to approach "demonstrate that regex is turing-complete by doing some math in it", which is not on the cheatsheet. :p
17:35
<&jerith>
That one I had to look up.
17:35
<&jerith>
I *almost* got there on my own, though.
17:36
<@Namegduf>
I just plain don't know how to do negative lookahead without a cheatsheet.
17:46
< ErikMesoy>
The word "Ternstroemiaceae" on level 8 looks misplaced.
17:46
< ErikMesoy>
I'm getting only 181 points due to wrongly matching that.
17:48
< ErikMesoy>
I suppose it's a special case, and I need to write the shortest exception?
17:48
<&jerith>
You might be working from a bad assumption.
17:49
< ErikMesoy>
As the level name "Four" suggests, I'm using a regex that checks if a word contains four of the same letter. This correctly matches all the words in the left list, and skips all the words in the right list except Ternstroemiaceae.
17:49
<&jerith>
(It's more specific than you think.)
17:49
< ErikMesoy>
Should I be looking for a different pattern, or writing a not-that-word?
17:50
<&jerith>
Look a little more carefully at the positioning of those letters.
17:51
< ErikMesoy>
A-ha. "degenerescence" was throwing me off.
17:51
< ErikMesoy>
191, then.
17:51
<&jerith>
:-)
17:51
<@Namegduf>
Huh.
17:52
<@Namegduf>
I just got 198 on Four doing the obvious thing.
17:52
<&jerith>
You're seven characters longer than me. :-)
17:52
<@Namegduf>
I wonder if I'm cheating.
17:52
<&jerith>
Well, ErikMesoy is.
17:52
<&jerith>
Namegduf is the same as me.
17:52 * ErikMesoy ups it to 194 with some though.
17:52 Attilla [uid13723@Nightstar-ed0oqj.irccloud.com] has joined #code
17:52
< ErikMesoy>
+t
17:53
<&jerith>
Level 9 leaves me unsatisfied, but I don't think there's a better solution than the obvious clunky one.
17:54
<@Namegduf>
I was wondering about that.
17:54 * Namegduf skipped Prime entirely, and cheated horrendeously at abba to do it without negative lookahead and has a low score on it
17:54
<&jerith>
Prime is very cunning indeed.
17:55
<@Namegduf>
Hmm.
17:56
< ErikMesoy>
I have no idea what I'm doing by level 9 so I threw [a-m][c-o][c-p][e-s] at the screen for 70 points. :V
17:57
<@Namegduf>
I figured out what they mean by "Cheat." on 9.
17:57
<@Namegduf>
I think.
17:57
<&jerith>
You can't get away from the negative lookahead on prime.
17:58
< ErikMesoy>
Prime looks like I should be doing something involving e (which this cheatsheet suggests is like "eval" for regex) and +
17:58
<@Namegduf>
181 on Order.
17:58
<@Namegduf>
That will do.
17:58
<&jerith>
ErikMesoy: You need backreferences and +.
17:59 * Namegduf looks at triples
17:59
<&jerith>
Namegduf: I only have 168 on level 9.
17:59
< ErikMesoy>
I'm probably way off track, but it looks to me as though something like e(x(x)+) on Prime will evaluate to "2 or more Xs" and pin down how many "2 or more" is, then I put e and + around that again to get a product.
17:59
<&jerith>
But I didn't optimise further than removing a couple of unnecessary bits from the obvious.
18:00
<@Namegduf>
There is actually a fairly simple simpler rule that will work for it.
18:00
< ErikMesoy>
Oh waaaait. 192 on Order.
18:00
< ErikMesoy>
Using only regex and a nasty attitude of "maximize points, screw intent".
18:00
< ErikMesoy>
*Using only cheatsheet and
18:00
<@Namegduf>
Oh, neat, 194
18:01
<@Namegduf>
I just suddenly realised how you probably got 192 and did that too
18:01
<&jerith>
198!
18:02
<@Namegduf>
Whee.
18:02
< ErikMesoy>
198 here too. :D
18:02
<&jerith>
199!
18:02
<@Namegduf>
Okay now I have no idea
18:03
< ErikMesoy>
And having gotten that far, I am officially giving up on the cheatsheet approach.
18:03
< ErikMesoy>
I think I need to learn actual regex before going to Triples.
18:03
<@Namegduf>
Triples is throwing me for a loop, yeah.
18:04
<@Namegduf>
I know regex. It has () and it has |
18:04
< ErikMesoy>
I also settled for 129 points on Prime.
18:04
<@Namegduf>
And it is not turing complete damn it
18:04
< ErikMesoy>
x{33,}
18:05
< ErikMesoy>
NUMBERS OVER 32 ARE TOTALLY PRIME GUYS
18:05
<@Namegduf>
Hahaha
18:05
<&jerith>
Triples is a little tricky, but the basic idea is straightforward.
18:06
<@Namegduf>
I think I can do it.
18:06
<&jerith>
The hard bit is turning it int a regex.
18:06
<@Namegduf>
Well.
18:06
<@Namegduf>
Maybe.
18:06
<@Namegduf>
I will try.
18:06
<&jerith>
*into
18:08
<&jerith>
I have 488 on Triples.
18:08
<&ToxicFrog>
Woo, KSP mod update checker totally working
18:08
<&jerith>
My complete solution was less than a partial solution that left a couple of red marks on my screen.
18:09
<&jerith>
I had to trim out a few unused bits to beat that.
18:09
<@Namegduf>
I'm going to leave it at 182 for the moment.
18:10
< ErikMesoy>
Now that I've given up, what does e do in a regex?
18:10
<&jerith>
ErikMesoy: Just "e" matches a literal "e".
18:11
< ErikMesoy>
This sheet has a box saying "Regular expressions pattern modifiers" where "e" is indicated with "Evaluate replacement". (and "U" with "Ungreedy pattern".) Google finds me very esoteric discussions of the "why isn't this working" variety. What is this?
18:11
< ErikMesoy>
The sheet I'm looking at is http://www.cheatography.com/davechild/cheat-sheets/regular-expressions/
18:13
<&jerith>
Oh, I see.
18:13
<@Namegduf>
12 is just taking the piss.
18:13
<@Namegduf>
It's the problem that regexes aren't able to do but these things can do because they're not actually regular expressions.
18:13
<&jerith>
Those are modifiers for the engine's behaviour.
18:13
<&jerith>
You can't actually use them in a regex.
18:13
<@Namegduf>
The most famous one, rather.
18:14
<&jerith>
Namegduf: It works here because you're solving a limited subset of the problem space.
18:15
<@Namegduf>
Well, you can do it boundedly by writing something insanely long.
18:15
<&jerith>
Prime is the one that only works because regexes cease to be regular when you have backreferences.
18:16
<@Namegduf>
You can solve any of them by simply enumerating the possible matches.
18:17
<&jerith>
Namegduf: My solution for 12 is 34 characters long.
18:18
<&jerith>
Hardly "insanely long". :-)
18:18
<@Namegduf>
When I said "do it boundedly" I meant "do it correctly, within bounds"
18:27
<&jerith>
Apart from start and end anchors, my solution for 12 ues five distinct characters.
18:28
<&jerith>
The whole thing is in basic regex.
18:29
<@Namegduf>
Yes, because it cheats.
18:29
< Syka>
the last thing i care about regexps doing is cheating
18:29
<@Namegduf>
I didn't say it didn't happen to have a short cheat for the specific things it had.
18:29
< Syka>
i expect them to kneecap me, that's my worry
18:29
<&jerith>
Namegduf: It only cheats because the length of the input is finite.
18:30
<@Namegduf>
No, it cheats because it is a very specific set of finite inputs.
18:30
<&jerith>
Also, it's a much simpler problem when there's nothing between the brackets you're matching.
18:31
<&jerith>
My solution, except for a tiny optimisation that saves me three characters, is completely general up to a certain nesting depth.
18:31
<@Namegduf>
I said that it was "taking the piss" by featuring the ur-example of the thing actual regular expressions cannot do, and that there was a very long solution to it for all pairs of brackets nested up to a given n levels which gets very long for higher depths.
18:33 Kindamoody|out is now known as Kindamoody
18:37 AnnoDomini [Elite8361@Nightstar-rl3j3i.tl.libirc.so] has quit [[NS] Quit: EliteBNC free bnc service - http://elitebnc.org - be a part of the Elite!]
18:42 Attilla [uid13723@Nightstar-ed0oqj.irccloud.com] has quit [[NS] Quit: ]
18:47 AnnoDomini [Elite8361@Nightstar-rl3j3i.tl.libirc.so] has joined #code
19:35 Kindamoody is now known as Kindamoody[zZz]
20:22 VirusJTG_ [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code
20:25 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [Ping timeout: 121 seconds]
20:26 Vornicus [vorn@Nightstar-sn7kve.sd.cox.net] has joined #code
20:26 mode/#code [+qo Vornicus Vornicus] by ChanServ
21:39
< AnnoDomini>
Hmm. Anyone here have an account on insomnia247.nl?
22:02 Alek [omegaboot@Nightstar-qa936g.il.comcast.net] has quit [[NS] Quit: ]
22:17
< ErikMesoy>
not me
22:18
< AnnoDomini>
Using a BNC is really not for me. It's too confusing about backscrolls.
22:47 ErikMesoy is now known as ErikMesoy|sleep
22:54 Alek [omegaboot@Nightstar-qa936g.il.comcast.net] has joined #code
22:54 mode/#code [+o Alek] by ChanServ
23:07 Alek [omegaboot@Nightstar-qa936g.il.comcast.net] has quit [[NS] Quit: brb]
23:12 Alek [omegaboot@Nightstar-qa936g.il.comcast.net] has joined #code
23:12 mode/#code [+o Alek] by ChanServ
23:19 Alek [omegaboot@Nightstar-qa936g.il.comcast.net] has quit [[NS] Quit: ugh]
23:20 Alek [omegaboot@Nightstar-qa936g.il.comcast.net] has joined #code
23:20 mode/#code [+o Alek] by ChanServ
--- Log closed Sun Dec 22 00:00:55 2013
code logs -> 2013 -> Sat, 21 Dec 2013< code.20131220.log - code.20131222.log >

[ Latest log file ]