00:51:20 <Vorpal> vlc suddenly decided to use a HUGE font for the GUI. WTF
00:53:08 <oerjan> _ _____ _____ _____ _ _ _____ ___ ___ _ _
00:53:08 <oerjan> / \|_ _|_ _| ____| \ | |_ _|_ _/ _ \| \ | |
00:53:08 <oerjan> / _ \ | | | | | _| | \| | | | | | | | | \| |
00:53:08 <oerjan> / ___ \| | | | | |___| |\ | | | | | |_| | |\ |
00:53:08 <oerjan> /_/ \_\_| |_| |_____|_| \_| |_| |___\___/|_| \_|
00:56:12 <Vorpal> oh god, deleting vlc preferences didn't help
00:56:35 <Vorpal> so not QUITE that large
00:57:31 <oerjan> ...in which we deduce that Vorpal uses < 10 points for irc
01:14:38 <Vorpal> oerjan, I use 9 pt yes
01:16:01 <Vorpal> oh fuck, everything KDE or QT is screwed uo
01:17:09 <Vorpal> it is set to 9 pt, but it shows much larger
01:18:11 <Sgeo|web_> "In a strictly object oriented environment like C#/.NET," writes J.D., "there's really no such thing as 'global variables'. Sure, you can create a public class called 'Global' with a bunch of static fields, but the folks looking to (ab)use global variables generally have a hard time making that conceptual leap."
01:19:19 <Jafet> Today's conceptual leap is tomorrow's bread-and-butter design pattern
01:20:09 <Jafet> And now, I give you a class in Java.
01:20:11 <Jafet> http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/aop/framework/AbstractSingletonProxyFactoryBean.html
01:29:00 -!- augur has quit (Remote host closed the connection).
01:37:51 <oerjan> > read $ replicate 100 '(' ++ "42" ++ replicate 100 ')'
01:37:53 <lambdabot> *Exception: Prelude.read: no parse
01:37:57 <oerjan> > read $ replicate 100 '(' ++ "42" ++ replicate 100 ')' :: Int
01:38:04 -!- augur has joined.
01:39:25 <oerjan> > read "1e100" :: Integer
01:39:27 <lambdabot> 100000000000000000000000000000000000000000000000000000000000000000000000000...
01:51:22 <lambdabot> Couldn't match expected type `GHC.Integer.Type.Integer'
01:51:32 <lambdabot> 100000000000000000000000000000000000000000000000000000000000000000000000000...
02:01:51 -!- CakeProphet has joined.
02:01:51 -!- CakeProphet has quit (Changing host).
02:01:51 -!- CakeProphet has joined.
02:06:23 <Gregor> Anybody happen to know of a program for Unix/Linux/whatever that just keeps commands on a queue and runs them? So, if your queue is empty and you try to run a command, it runs immediately, but if it has other commands in it, you have to wait for those to complete?
02:07:55 * Sgeo|web_ would like to get Seaside running on Heroku >.>
02:08:06 <pikhq_> Gregor: That is one of the functionalities of GNU parallel.
02:09:43 <pikhq_> Lessee... Ah, have to combine it with a couple of other things.
02:09:58 <pikhq_> tail -f jobqueue | parallel
02:10:14 <pikhq_> Append to jobqueue to add tasks to the queue.
02:10:33 <pikhq_> e.g. echo 'gunzip foo.gz'>>jobqueue
02:11:03 <Gregor> Ah. But I can implement that in zero seconds :P
02:11:03 <pikhq_> Add -j$N to have it execute from the queue in parallel.
02:11:22 <Gregor> Will that work with a FIFO?
02:12:02 <pikhq_> In case you hadn't noticed, it's reading from a pipe...
02:13:17 <CakeProphet> one thing Perl got right: having a small embedded language in strings.
02:14:24 <pikhq_> Tcl does, too. It's called Tcl.
02:15:31 <CakeProphet> yes well, it's interesting to note that it's not really certain if Perl string language is a subset of Perl.
02:15:50 <pikhq_> Who said anything about 'subset'?
02:16:06 <CakeProphet> 22:15 < CakeProphet> yes well, it's interesting to note that it's not really certain if Perl string language is a subset of Perl.
02:17:59 <CakeProphet> I love the discrete number of emotions I can convey. o^-:
02:19:00 <CakeProphet> unless you consider the tone of the message. Well, then it just becomes a difficult question.
02:29:21 <Gregor> pikhq_: Thanks for telling me about parallel; my attempt at writing the same thing (which I had started before you told me) is terrible and I should feel bad for having written it.
02:31:38 <Gregor> pikhq_: Err ... I'm inclined to disagree ... parallel doesn't seem to take commands from stdin ...
02:31:52 <pikhq_> Um. It certainly does.
02:36:52 <Gregor> Um, it certainly doesn't?
02:37:36 <pikhq_> echo 'echo foo'|parallel;# echos "foo"
02:39:26 <Gregor> Hm. Is my parallel not the same as yours >_>
02:39:40 <Gregor> (I eventually realized that what DOES run commands from stdin is sh :P )
02:39:48 <pikhq_> http://www.gnu.org/software/parallel/
02:40:23 <pikhq_> It is also ridiculously versatile.
02:40:40 <CakeProphet> hey so why don't most programming languages have a way to ignore warnings from a single line of code?
02:41:24 <CakeProphet> explain this stuff language designing people.
02:42:54 <Gregor> pikhq_: Strange, my parallel came from "moreutils" in Debian, and seems entirely unrelated.
02:43:22 -!- MichaelBurge_ has joined.
02:46:43 -!- MichaelBurge has quit (Ping timeout: 252 seconds).
02:46:51 <CakeProphet> also, why does no operating system coming out of the box have a way to silence everything but music, to get rid of annoying sounds (from IMs and shit)
02:46:51 -!- MichaelBurge_ has changed nick to MichaelBurge.
02:47:21 <Vorpal> CakeProphet, irssi makes noise?
02:47:33 <Gregor> CakeProphet: My way of doing that is using a USB headset. I only set ALSA_CARD=1 on programs I want to make sound, otherwise they're "silent" :P
02:47:51 <Vorpal> CakeProphet, anyway that is up to the program. The OS can't know if /usr/bin/foo is a music player or a game, or an IM client...
02:48:25 <Vorpal> Gregor, any idea how to get oss programs to use a specific sound card btw?
02:48:38 <Vorpal> Gregor, system is using alsa
02:48:52 <Vorpal> CakeProphet, check preferences of your IM client?
02:48:59 <Vorpal> also maybe pulse audio can do so
02:49:04 <Gregor> Vorpal: Uhh, ALSA_CARD=whatever aoss <program>? :P
02:49:26 <Vorpal> Gregor, so what is wrong with kernel OSS emulation?
02:49:50 <Gregor> Vorpal: The fact that I don't know how to override which ALSA card it goes to, that's what :P
02:50:26 <Vorpal> Gregor, any idea how to use dmix on one sound card but not on another=
02:50:57 <Gregor> Vorpal: I know that if you can explicitly make one program use hw:<whatever> as its ALSA device, it will bypass dmix.
02:51:12 <Gregor> I don't know how to do that with an environment variable though.
02:51:26 <Vorpal> Gregor, I don't have dmix set up currently
02:51:32 <Vorpal> but I do want to set it up for one card
02:51:49 <Gregor> It's default on my system.
02:52:26 <Vorpal> Gregor, it obviously isn't here as demonstrated by trying to use two sound producing programs at once against the on board sound
02:52:36 <Vorpal> works against the sb live of course
02:55:43 <CakeProphet> 22:15 < CakeProphet> yes well, it's interesting to note that it's not really certain if Perl string language is a subset of Perl.
02:59:53 <Gregor> pikhq_: Here is my current (BRILLIANT) command queue system:
03:00:49 <CakeProphet> also what would be a good string subset for a language to have?
03:01:08 -!- sebbu2 has joined.
03:01:30 -!- sebbu has quit (Ping timeout: 255 seconds).
03:04:10 <CakeProphet> class Iterator i where next : i -> Maybe i
03:11:11 <CakeProphet> so what if I made an object oriented language with completely unique semantics?
03:21:40 -!- CakeProphet has quit (Ping timeout: 252 seconds).
03:36:49 -!- CakeProphet has joined.
03:42:33 <CakeProphet> okay so what if x y -> z could be defined as operator syntax and parsed effectively by a language compiler/interpreter?
03:43:52 <oerjan> what's that supposed to mean
03:43:55 <CakeProphet> also use relationship precedence instead of fixed numeric. Essentially you use operators without parentheses in small sublanguages
03:44:09 <CakeProphet> oerjan: -> is the function, it's 3-ary infix
03:45:18 <oerjan> well haskell doesn't to 3-ary operators
03:45:22 <CakeProphet> perhaps a dialect, with syntax changes and standard library changes.
03:45:32 <CakeProphet> oerjan: that's correct. this is hypothetical.
03:49:22 <oerjan> well it _seems_ to me like you could parse it by combining arguments to highest precedence operators first
03:50:32 <CakeProphet> so what if spaces were valid operator characters for ternary operators, and you can use two operator symbols as a single reserved word.
03:51:41 <oerjan> say -> has higher precedence than + and *, which have the usual
03:52:01 <CakeProphet> with the only restriction being that aren't any matching symbols in its precedence tree, which
03:52:43 <oerjan> hm wait no that won't be a problem
03:52:46 <CakeProphet> orders operators in a precedence by relational notation
03:54:03 <CakeProphet> I suppose one way to find out is to attempt to implement it.
03:54:46 <oerjan> i'll point toward agda's mixfix, which i've vaguely heard of, although i'm not sure if it allows just space separation.
03:55:15 <CakeProphet> you would need some compiler-enforced restrictions on relations and operator pairings
03:58:35 -!- MDude has changed nick to MSleep.
04:00:43 <CakeProphet> also consider a dialect of Haskell with a number of ambiguously cased operator symbols.
04:03:15 <CakeProphet> you guys could call it a parody language even. Perhaps it's also somewhat esoteric.
04:04:43 <CakeProphet> I'm sure there are even more syntax, and hypothetical extensions that could be added onto it. It could be a sort of collaborative effort.
04:16:57 <CakeProphet> maybe you could even define the whole language in terms of infix and circumfix n-ary operators
04:35:16 -!- Madoka-Kaname has quit (*.net *.split).
04:35:16 -!- yorick has quit (*.net *.split).
04:35:16 -!- Deewiant has quit (*.net *.split).
04:35:17 -!- lifthrasiir has quit (*.net *.split).
04:36:11 -!- lifthrasiir has joined.
04:37:55 -!- Deewiant has joined.
04:43:48 -!- Madoka-Kaname has joined.
04:43:48 -!- yorick has joined.
04:43:57 -!- yorick has quit (Max SendQ exceeded).
04:44:09 -!- yorick has joined.
04:55:53 <Jafet> Use a genetic algorithm to perturb local fixities until an expression is well-typed.
04:59:07 <CakeProphet> no I'm pretty sure with just a few rules it would parse correctly.
05:03:24 <Madoka-Kaname> @. pl djinn (a->b) -> (c->d) -> (b->e->c) -> (f->e) -> x -> (x -> x -> f) -> (f -> a) -> (e -> y -> z) -> y -> z
05:03:24 <lambdabot> f = const (const (const ((((const . flip id) .) .) . (. (flip =<< flip id)) . (.))))
05:04:02 <Jafet> @pl \x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 -> x9 x8 x7 x6 x5 x4 x3 x2 x1 x0
05:04:06 <lambdabot> flip (flip . ((flip . ((flip . ((flip . (flip .)) .)) .)) .) . (((((flip .) .) .) .) .) . ((((((flip .) .) .) .) .) .) . (((((((flip .) .) .) .) .) .) .) . flip (flip . (flip .) . ((flip .) .) . (((
05:04:06 <lambdabot> flip .) .) .) . ((((flip .) .) .) .) . (((((flip .) .) .) .) .) . ((((((flip .) .) .) .) .) .) . flip (flip . (flip .) . ((flip .) .) . (((flip .) .) .) . ((((flip .) .) .) .) . (((((flip .) .) .) .)
05:04:06 <lambdabot> .) . flip (flip . (flip .) . ((flip .) .) . (((flip .) .) .) . ((((flip .) .) .) .) . flip (flip . (flip .) . ((flip .) .) . (((flip .) .) .) . flip (flip . (flip .) . ((flip .) .) . flip (flip . (
05:04:06 <lambdabot> flip .) . flip (flip . flip id))))))))
05:04:06 <lambdabot> optimization suspended, use @pl-resume to continue.
05:04:19 <oerjan> Madoka-Kaname: flipping madness
05:05:43 <Madoka-Kaname> @pl \a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 -> a9 b9 a8 b8 a7 v7 a6 b6 a5 b5 a4 b4 a3 b3 a2 b2 a1 b1 a0 b0
05:05:46 <lambdabot> ((((((((((((((((const .) .) .) .) .) .) .) .) .) .) .) .) .) .) .) .) . (((((((((flip .) .) .) .) .) .) .) .) .) . ((((((((((flip .) .) .) .) .) .) .) .) .) .) . (((((((((((flip .) .) .) .) .) .) .)
05:05:46 <lambdabot> .) .) .) .) . ((((((((((((flip .) .) .) .) .) .) .) .) .) .) .) .) . (((((((((((((flip .) .) .) .) .) .) .) .) .) .) .) .) .) . ((((((((((((((flip .) .) .) .) .) .) .) .) .) .) .) .) .) .) . ((((((((
05:05:46 <lambdabot> (((((((flip .) .) .) .) .) .) .) .) .) .) .) .) .) .) .) . ((((((((((((((((flip .) .) .) .) .) .) .) .) .) .) .) .) .) .) .) .) . flip (flip . (flip .) . ((flip .) .) . (((flip .) .) .) . ((((flip .)
05:05:46 <lambdabot> .) .) .) . (((((flip .) .) .) .) .) . ((((((flip .) .) .) .) .) .) . (((((((flip .) .) .) .) .) .) .) . ((((((((flip .) .) .) .) .) .) .) .) . (((((((((flip .) .) .) .) .) .) .) .) .) . ((((((((((
05:05:46 <lambdabot> flip .) .) .) .) .) .) .) .) .) .) . (((((((((((flip .) .) .) .) .) .) .) .) .) .) .) . ((((((((((((flip .) .) .) .) .) .) .) .) .) .) .) .) . (((((((((((((flip .) .) .) .) .) .) .) .) .) .) .) .) .)
05:05:50 <lambdabot> optimization suspended, use @pl-resume to continue.
05:06:23 <oerjan> @djinn (a->b) -> (c->d) -> (b->e->c) -> (f->e) -> x -> (x -> x -> f) -> (f -> a) -> (e -> y -> z) -> y -> z
05:06:24 <lambdabot> f _ _ _ a b c _ d e = d (a (c b b)) e
05:07:53 <oerjan> thought it looked a bit redundant.
05:08:02 <Madoka-Kaname> djinn (a->b) -> (c->d) -> (b->e->c) -> (f->c->e) -> x -> (x -> x -> f) -> (f -> a) -> (e -> y -> z) -> y -> z
05:08:08 <Madoka-Kaname> @djinn (a->b) -> (c->d) -> (b->e->c) -> (f->c->e) -> x -> (x -> x -> f) -> (f -> a) -> (e -> y -> z) -> y -> z
05:08:22 <Madoka-Kaname> @djinn (a->b) -> (c->d) -> (b->e->c) -> (f->c->e) -> x -> (x -> f) -> (f -> a) -> (e -> y -> z) -> y -> z
05:09:01 <Madoka-Kaname> @djinn (a->b) -> (c->d) -> (b->e->c) -> (f->e) -> x -> (x -> f) -> (f -> a) -> (e -> c -> y -> z) -> y -> z
05:09:01 <lambdabot> f a _ b c d e f g h = g (c (e d)) (b (a (f (e d))) (c (e d))) h
05:09:10 <Madoka-Kaname> @djinn (a->b) -> (c->d) -> (b->e->c) -> (f->e) -> x -> (x -> f) -> (f -> a) -> (e -> c -> d -> y -> z) -> y -> z
05:09:10 <lambdabot> h (d (f e)) (c (a (g (f e))) (d (f e))) (b (c (a (g (f e))) (d (f e))))
05:09:15 <Madoka-Kaname> @. pl djinn (a->b) -> (c->d) -> (b->e->c) -> (f->e) -> x -> (x -> f) -> (f -> a) -> (e -> c -> d -> y -> z) -> y -> z
05:09:18 <lambdabot> f = ((((const .) .) .) .) . ap ((.) . ap . ((ap . ((ap . ((ap . (flip .)) .)) .) . ap (ap . (ap .) . ((flip .) .) . ((flip id .) .) . (. flip id) . (.))) .) . flip flip ((. flip id) . (.)) . ((.) .)
05:09:19 <lambdabot> . (ap .) . ((ap .) .) . flip ((.) . (.)) . (. (ap id . flip id)) . (.)) (flip ((.) . (.) . (.) . (.)) . flip flip ((. flip id) . (.)) . ((.) .) . (ap .) . ((ap .) .) . flip ((.) . (.)) . (. (ap id .
05:09:19 <lambdabot> optimization suspended, use @pl-resume to continue.
05:09:27 <oerjan> Madoka-Kaname: it's pretty obvious really, c and e cannot be produced without each other in those failing ones
05:09:30 <lambdabot> f = ((((const .) .) .) .) . ap ((.) . ap . ((ap . (liftM2 (ap . (flip .)) .) . ap (ap . ((ap . ((flip . flip id) .)) .) . (. flip id) . (.))) .) . flip flip ((. flip id) . (.)) . (((.) . ap . (ap .))
05:09:31 <lambdabot> .) . flip ((.) . (.)) . (. (ap id . flip id)) . (.)) (flip ((.) . (.) . (.) . (.)) . flip flip ((. flip id) . (.)) . (((.) . ap . (ap .)) .) . flip ((.) . (.)) . (. (ap id . flip id)) . (.))
05:09:31 <lambdabot> optimization suspended, use @pl-resume to continue.
05:09:42 <lambdabot> f = ((((const .) .) .) .) . ap ((.) . ap . ((ap . (liftM2 (liftM2 flip) .) . ap (ap . (liftM2 (flip . flip id) .) . (. flip id) . (.))) .) . flip flip ((. flip id) . (.)) . (((.) . liftM2 ap) .) .
05:09:43 <lambdabot> flip ((.) . (.)) . (. (ap id . flip id)) . (.)) (flip ((.) . (.) . (.) . (.)) . flip flip ((. flip id) . (.)) . (((.) . liftM2 ap) .) . flip ((.) . (.)) . (. (ap id . flip id)) . (.))
05:12:56 <Madoka-Kaname> @. pl djinn (a -> b -> c) -> (d -> e -> f) -> (c -> f -> g) -> a -> b -> c -> d -> g
05:12:56 <lambdabot> expecting white space, "()", natural, identifier, lambda abstraction or expression
05:13:15 <Madoka-Kaname> @. pl djinn (a -> b -> c) -> (d -> e -> f) -> (c -> f -> g) -> a -> b -> d -> e -> g
05:13:16 <lambdabot> f = ((((const .) .) .) .) . (. join) . flip . ((flip . ((flip . ((.) .)) .)) .) . flip ((.) . (.))
05:13:40 <Madoka-Kaname> @. pl djinn (a -> b -> c) -> (c -> d) -> a -> b -> d
05:14:08 <Madoka-Kaname> @. pl djinn (a -> b -> c -> d) -> (d -> e) -> a -> b -> c -> e
05:14:32 <Madoka-Kaname> @. pl djinn (a -> b) -> (b -> c) -> (c -> d) -> a -> d
05:14:46 <Madoka-Kaname> @. pl djinn (c -> d) -> (b -> c) -> (a -> b) -> a -> d
05:24:32 -!- esowiki has joined.
05:24:59 -!- esowiki has joined.
05:25:14 -!- esowiki has joined.
05:25:44 -!- esowiki has joined.
05:26:10 -!- esowiki has joined.
05:27:20 -!- esowiki has joined.
05:27:30 -!- esowiki has joined.
05:27:55 -!- esowiki has joined.
05:28:07 -!- esowiki has joined.
05:28:42 -!- esowiki has joined.
05:29:07 -!- esowiki has joined.
05:29:43 -!- esowiki has joined.
05:30:03 -!- esowiki has joined.
05:30:36 -!- esowiki has joined.
05:31:16 -!- esowiki has joined.
05:31:56 -!- esowiki has joined.
05:32:06 -!- esowiki has joined.
05:32:51 -!- esowiki has joined.
05:32:51 -!- glogbot has joined.
05:33:33 <fizzie> Yes, though I thought yours was just some sort of a variant.
05:34:11 <oerjan> getting only gay slang when i tried to google it sort of gave me a hunch there
05:34:24 -!- Gregor has joined.
05:34:31 <fizzie> There is the "basket case".
05:34:39 <fizzie> Fruitcase, basket cake.
05:35:44 -!- oerjan has quit (Quit: Lost his marblecakes).
05:35:54 <fizzie> 1. crazy, loony, looney, nutcase, weirdo -- (someone deranged and possibly dangerous)
05:35:57 <fizzie> 1. crackpot, crank, nut, nut case, fruitcake, screwball -- (a whimsically eccentric person)
05:36:01 <fizzie> 2. fruitcake -- (a rich cake containing dried fruit and nuts and citrus peel and so on)
05:36:07 <fizzie> One of these does not belong.
05:38:52 -!- esowiki has joined.
05:39:15 -!- esowiki has joined.
05:39:36 -!- esowiki has joined.
05:40:05 -!- esowiki has joined.
05:41:15 -!- esowiki has joined.
05:41:44 -!- esowiki has joined.
05:42:30 -!- esowiki has joined.
05:43:00 -!- esowiki has joined.
05:43:35 -!- esowiki has joined.
05:44:10 -!- esowiki has joined.
05:44:35 -!- esowiki has joined.
05:45:15 -!- esowiki has joined.
05:45:25 -!- esowiki has joined.
05:46:10 -!- esowiki has joined.
05:47:41 -!- esowiki has joined.
05:47:41 -!- glogbot has joined.
05:47:43 -!- HackEgo has joined.
05:48:06 -!- Gregor has joined.
07:41:40 <Sgeo|web_> If big software comparies suddenly become liable for all the bugs in their existing software, the resulting liability lawsuits could bankrupt them. This proposal could destroy the software industry as we know it. There would probably be negative consequences too.
07:41:48 <Sgeo|web_> http://www.schneier.com/blog/archives/2011/09/an_interesting.html
07:57:22 -!- monqy has quit (Quit: hello).
08:23:38 <Sgeo|web_> Making a program with those terms, and posting it to Reddit, does not sound like a recipe for success
08:24:14 -!- derdon has joined.
08:31:19 -!- brisingr has joined.
08:42:09 -!- hagb4rd has quit (Ping timeout: 248 seconds).
08:52:48 -!- Madoka-Kaname has quit (Ping timeout: 260 seconds).
09:00:07 -!- hagb4rd has joined.
09:03:35 <Patashu> that seems hard to follow -and- enforce
09:54:49 <fizzie> "Newsgroups: comp.lang.c,comp.lang.c++,rec.sport.tennis,alt.anagrams" -- quite an... eclectic selection.
10:15:07 -!- pikhq has joined.
10:15:18 -!- pikhq_ has quit (Ping timeout: 255 seconds).
10:15:45 -!- BeholdMyGlory has joined.
10:57:36 -!- Jafet has quit (Quit: Leaving.).
11:36:28 -!- BeholdMyGlory has quit (Remote host closed the connection).
11:54:39 <CakeProphet> convert.cpp:152:12: error: aggregate ‘std::ifstream inp’ has incomplete type and cannot be defined
11:57:44 -!- GreaseMonkey has quit (Quit: The Other Game).
12:07:02 -!- Madoka-Kaname has joined.
12:07:02 -!- Madoka-Kaname has quit (Changing host).
12:07:02 -!- Madoka-Kaname has joined.
12:08:34 <Patashu> C is great at having weird compiler errors
12:08:42 <CakeProphet> #0 0x00007ffff7de54da in ?? () from /lib64/ld-linux-x86-64.so.2
12:08:42 <CakeProphet> #1 0x00007ffff7de5fec in ?? () from /lib64/ld-linux-x86-64.so.2
12:08:42 <CakeProphet> #2 0x00007ffff7de9d24 in ?? () from /lib64/ld-linux-x86-64.so.2
12:08:42 <CakeProphet> #3 0x00007ffff7df0795 in ?? () from /lib64/ld-linux-x86-64.so.2
12:09:07 <CakeProphet> "well your program entered main, and then... uh.... "
12:09:57 <Vorpal> CakeProphet, what are the good magicka spells you mentioned (iirc it was you?) I can't find it in my logs
12:10:06 <Patashu> You want to make a steam beam iirc
12:10:08 <Vorpal> not sure which day it was
12:10:21 <Patashu> it's like water fire arcane arcane arcane or water fire lightning arcane arcane or water lightning arcane arcane arcane
12:10:34 <Vorpal> <Patashu> C is great at having weird compiler errors <Patashu> C++ in particular <-- uh? C is neither a subset nor superset of C++
12:10:54 <Patashu> But C and C++ are 'like' each other
12:10:59 <Vorpal> C++ is a different language than C, sure quite similar, but still different languages.
12:11:15 <Patashu> When I think of C or C++ I think of the other (and also java)
12:11:26 <Vorpal> eh, java is even more different
12:11:40 <CakeProphet> Vorpal: qfqfasa is good. any combination of (shield and rock) + ( fire or ice or neither) is good
12:12:16 <CakeProphet> Vorpal: qfsafe + self cast is an immunity shield. Once you're immune to stuff you can then use qerasr + sword cast which pretty much is the best thing ever.
12:12:49 <Patashu> Hmm, apparently magica's magic system got more complex since I last looked
12:13:08 <Vorpal> CakeProphet, what does qerasr + sword do?
12:13:19 <Patashu> Maybe people are just getting better at exploiting it then
12:13:29 <CakeProphet> make giant mountains of steamy icy electrical arcane death. yes it makes perfect sense.
12:13:37 <Vorpal> oh btw, I just realised witcher 2 2.0 was released today. Never mind, I don't have time for magicka /now/
12:14:20 <CakeProphet> Vorpal: no you are missing out on the opportunity to become a great vizard.
12:14:35 <Vorpal> CakeProphet, come on, witcher 2 is like the game of the year IMO
12:15:16 <Vorpal> CakeProphet, Witcher 2 has excellent graphics, especially if you go into advanced and crank everything up a step from the ultra setting.
12:15:26 <Vorpal> (ultra doesn't max out everything)
12:15:50 <Vorpal> (yes my computer can handle that, as long as I turn off supersampling, I get something like 40 FPS if I turn on the supersampling)
12:16:45 <Patashu> You know what else isn't magicka?
12:16:45 <Vorpal> CakeProphet, don't you play anything except magicka?
12:17:04 <CakeProphet> how do you tell g++ to compile with more debugging symbol stuff.
12:17:44 <Vorpal> CakeProphet, what did qfqfasa do?
12:18:46 <CakeProphet> Vorpal: steam arcane lightning beam. It's the strongest beam in the game. Also a decent AOE
12:19:02 -!- derdon has quit (Remote host closed the connection).
12:19:19 <CakeProphet> if you take out one steam and put more arcane into it it makes a better AOE because arcane is what increases the radius of the aoe spell.
12:20:01 <CakeProphet> also in a bind, queing up like 5 water + aoe cast is a decent "get the fuck away from me" spell
12:20:16 <CakeProphet> there's one part where you fight a bunch of other wizards on these small platforms. And it's supposed to be really difficult or whatever.
12:20:24 <Patashu> do you have an autohotkeys program that autocasts the best spells?
12:20:29 <CakeProphet> but you can literally just do water AOEs and knock everyone off in a few seconds.
12:20:45 <Patashu> or just speedrun magicka anyway
12:21:09 <Vorpal> well looks like 2.0 will be out later today, so I guess I'll play some magicka
12:21:18 <Vorpal> or maybe I'll play Trine
12:22:08 <Vorpal> <Patashu> do you have an autohotkeys program that autocasts the best spells? <-- what a good idea
12:22:26 <Vorpal> CakeProphet, btw I love the icon on the main menu for online play
12:22:34 <Vorpal> well, image, not really an icon
12:22:39 <Patashu> does changing your hotkey bindings in sc2 to be more efficient ruin sc2?
12:23:10 <CakeProphet> also in magicka you may not always want the same spells. that's boring.
12:23:39 <CakeProphet> certainly there are a few spells that are the strongest but they're not the best for every situation.
12:23:42 <Vorpal> "Tip: Don't drink and drive" XD
12:24:28 <CakeProphet> one spell that's not too powerful but still useful is aqqqq which fires a beam of water.
12:24:29 <Patashu> But surely out of the... 10^8? possible spells not all you'd ever want to use
12:25:03 <Vorpal> CakeProphet, qfsafe + self doesn't allow boosting with space?
12:25:21 <CakeProphet> well it's more like 10^5 - opposite element combinations
12:25:31 <CakeProphet> just recast it occasionally. You don't need it all the time.
12:25:34 <Patashu> Hmm I just realized, you can play magicka with...that peripheral with the ten buttons, I forget what it's called, a nostromo or something
12:25:39 <Vorpal> CakeProphet, also I forgot: how do you cast on the sword?
12:25:40 <CakeProphet> it's not a normal shield it's an immunity shield.
12:26:11 <Vorpal> CakeProphet, actually seems I cast it on my M60, whatever that means...
12:26:26 <CakeProphet> yes you enchant your sword and then when you use your sword it uses the spell.
12:26:35 <CakeProphet> for an m60 it still works like a normal sword, unfortunately
12:27:10 <Vorpal> CakeProphet, btw what is up with the dead moose?
12:27:27 <CakeProphet> I don't recall exactly why they do that but it's part of an achievement to find them all.
12:27:48 <CakeProphet> my favorite staff is the staff of war, which all the warlocks have.
12:27:55 <CakeProphet> because it doubles your health and increases physical resistance.
12:28:25 <CakeProphet> don't really have a huge preference on swords.
12:29:50 <CakeProphet> Vorpal: oh another really good spell is any combination of cold and earth + aoe cast
12:30:00 <CakeProphet> more earth increases range more cold increases slow duration.
12:30:08 <CakeProphet> gives you plenty of time to do other shit.
12:30:30 <CakeProphet> one combo I use a lot is ddddq aoe and then ddddr + aoe
12:30:41 <CakeProphet> the first one knocks them down and wets and then the second freezes.
12:30:56 <CakeProphet> actually for the second one you can just do rrrrr aoe
12:33:54 <CakeProphet> but yeah I pretty much use all 5 elements always with the exception of heal (because its sometimes faster, but stacking multiple heal elements adds a heal-over-time effect) and normal shield spells.
12:34:40 <Patashu> aren't there ten elements?
12:35:22 <CakeProphet> yes, ten elements, you can combine 5 into a spell.
12:35:26 <fizzie> "SC2" is an awfully overloaded acronym; I can never guess whether something is about StarCraft 2 as opposed to Star Control 2.
12:35:38 <Patashu> I didn't think of star control 2
12:35:45 <Patashu> and oh, -that- five elements
12:36:19 <CakeProphet> Vorpal: so now that you've learned all of the overpowered spells is the intro insanely easy?
12:37:37 <Vorpal> CakeProphet, I got to the harvidar level
12:37:39 -!- Jafet has joined.
12:37:51 <Vorpal> CakeProphet, but even with those spells I keep dying there
12:38:15 <Vorpal> CakeProphet, so they made no difference
12:38:25 <Vorpal> CakeProphet, the city thingy
12:38:29 <Vorpal> not sure about the spelling
12:38:41 <Vorpal> CakeProphet, you got a ride on a cart, just after you got the M60
12:38:51 -!- Ngevd has joined.
12:38:55 <Vorpal> then arrived at a city, were told to wait until tomorrow in an inn
12:39:02 <Vorpal> and then battle of hell
12:39:27 <Vorpal> CakeProphet, they are not the main issue, but carry on. The large enemies is the issue
12:39:34 <CakeProphet> aaaaf is the best. because it chains across goblins and sets them on fire
12:40:03 -!- erdosjr has joined.
12:40:19 <CakeProphet> for the giant things qfqfasa is probably the best. but until you have an opportunity to use that I'd set up rock barriers
12:40:56 <CakeProphet> note that you can apply elemental effects to the barriers. so edddq will wet enemies and then edddr will freeze them.
12:41:10 <CakeProphet> or edfff will protect you while dealing out damage.
12:41:33 <CakeProphet> create a barrier of rocks that spout fire.
12:41:52 <CakeProphet> more earth increases the durability and duration of the rocks, more fire increases the damage and duration of the fire.
12:42:35 <CakeProphet> ed(anything) is going to create a barrier of rocks.
12:42:53 <CakeProphet> definitely one of the best defensive spells.
12:43:12 <Vorpal> fuck this, *goes playing deus ex hr*
12:44:12 <CakeProphet> EVERYONE THINKS WIZARDS HAVE IT EASY AND ITS ALL FUN AND GAMES
12:44:38 <Patashu> Gotta make my mind up. Which spell should I cast?
12:44:58 <CakeProphet> you have to worry about stepping in large bodies of waters and making sure you're not on fire after launching a massive explosive fireball.
12:45:08 <CakeProphet> and when you're wet you have to worry about shocking yourself with your own lightning elements.
12:45:29 <CakeProphet> meanwhile hordes of goblins, ogres, and warlocks approach.
12:45:36 <Patashu> I'm pretty sure you could model this using a finite state machine
12:45:55 <Vorpal> CakeProphet, right, whatever
12:46:34 <fizzie> Everything is serious business these days.
12:46:36 <Vorpal> come on, magicka would be utterly boring without the humour
12:46:54 <CakeProphet> nope. I actually play arena which has absolutely no storyline
12:47:05 <CakeProphet> you're just killing rounds of enemies in an arena.
12:47:05 <Patashu> Does arena get infinitely hard
12:47:18 <CakeProphet> no I think it goes up to round 20 or something like tht.
12:47:27 <Vorpal> if there is a game that is NOT serious, it is Magicka
12:47:48 <Vorpal> I prefer a game with a storyline btw
12:47:50 <fizzie> Funny things are the most serious.
12:48:07 <CakeProphet> there's one round where you fight one of the more difficult bosses from the story while also fighting off a usual horde of cannon-wielding ogres and warlocks.
12:48:44 <CakeProphet> and then shortly afterwards 4 yettis run in and attempt to grab you and insta-kill you.
12:49:01 <CakeProphet> (the trick is to set yourself on fire or spam rock walls everywhere)
12:49:16 <Patashu> I want to see so many enemies appear it lags the game
12:49:21 <CakeProphet> yes but I've never gotten to the final round.
12:49:32 <CakeProphet> it doesn't follow an equation for how to spawn things
12:49:47 <Patashu> Repeat but with 2x as tough the monsters
12:49:58 <Patashu> But if it's so hard you can't beat it anyway probably not important
12:50:28 <Vorpal> it is like pacman after the final level. All bugging out
12:50:57 <CakeProphet> I have no idea because I HAVEN'T BEATEN IT.
12:51:04 <Patashu> Do any modern games have a kill screen?
12:51:11 <Vorpal> nobody beat pacman for years either
12:51:28 <Vorpal> Patashu, I never played the original pacman
12:51:33 <CakeProphet> also Magicka: Vietnam is a documentary about the harrowing lives of young vietnam magicians who led the front lines.
12:51:36 <Vorpal> I just heard it from other sources
12:51:39 <Patashu> You were just talking about the kill screen :|||
12:51:47 <Vorpal> Patashu, oh is that what it is kalled?
12:51:52 <Vorpal> bugging out past last real level
12:51:57 <Patashu> Have you read the pac man dossier btw?
12:51:59 <Vorpal> well, it was a bug, probably not
12:52:07 <Vorpal> <Patashu> Have you read the pac man dossier btw? <-- no what is it?
12:52:22 <CakeProphet> so apparently the issue is with cout << endl;
12:52:28 <Patashu> http://home.comcast.net/~jpittman2/pacman/pacmandossier.html
12:52:39 <Patashu> CakeProphet: Maybe the end of a line is undefined on your operating system
12:53:04 <Patashu> But what if it was..........
12:53:05 <fizzie> Patashu: I'm pretty sure I recall hearing about at least one (modern) game that was unwinnable-as-released due to a glitch; though it was then patched.
12:53:31 <Patashu> fizzie: hmm that sort of counts
12:53:47 <fizzie> "A kill screen is a stage or level in a video game (often an arcade game) that stops the player's progress due to a programming error or design oversight. Rather than "ending" in a traditional sense, the game will crash, freeze, or behave so erratically that further play is impossible."
12:53:57 <CakeProphet> none of this will mess up cout << endl ever right?
12:54:02 <fizzie> No it is NOT GOOD it is not sorted ALPHABETICALLY.
12:54:10 <olsner> CakeProphet: not good, looks like C++
12:54:18 <Patashu> you should be using #from <iostream> import endl
12:54:25 <Patashu> what are you, one of them procedural coders?
12:54:47 <fizzie> #include qualified <iostream> as IO
12:54:52 <olsner> Patashu: what are *you*, one of them python coders?
12:54:53 <CakeProphet> I prefer a continuation massive style using pointfree combinators... in C++.
12:54:56 <Vorpal> fizzie, which game was it?
12:55:10 <Patashu> now you're just making stuff up
12:55:12 <CakeProphet> but not pointerfreee bahahahahahasuhduahsd
12:55:35 <CakeProphet> but no really why is cout << endl; an issue
12:55:43 <fizzie> Vorpal: I can't recall. But it was a commercial product.
12:56:52 <CakeProphet> Patashu: now it just crashes on the line after it.
12:57:13 <Patashu> if you add in debugging printing everywhere
12:57:17 <olsner> hmm, I wonder if something like this would work in C++: namespace IO { using std::cout; using std::endl; ... }
12:57:20 <Patashu> I heard about programs doing this
12:57:24 <fizzie> WHAT IS HAPPENING is DIVINE RETROBUTANE for you for not writing "std::cout << std::endl" instead.
12:57:52 <olsner> also I wonder if "using namespace" in a namespace exports the imported names from that namespace
12:58:30 <Patashu> are you sure it's just not happening to crash on that line
12:58:34 <Patashu> no matter what you put there?
12:58:36 <fizzie> I wouldn't be surprised if it just meant "nurrr this type is too much for me".
12:58:50 <olsner> if cout is just a reference, I think it doesn't need a complete type
13:00:03 <CakeProphet> Patashu: I added a line that wasn't cout << endl; (it was cout << "test" instead) and the inp.open(file_name) line is still where it stops.
13:00:26 <fizzie> What does "stops" mean, anyway? I hasn't been following.
13:01:05 <CakeProphet> crashes inexplicably, with the following backtrace:
13:01:06 <CakeProphet> #0 0x00007ffff7de54da in ?? () from /lib64/ld-linux-x86-64.so.2
13:01:06 <CakeProphet> #1 0x00007ffff7de5fec in ?? () from /lib64/ld-linux-x86-64.so.2
13:01:06 <CakeProphet> #2 0x00007ffff7de9d24 in ?? () from /lib64/ld-linux-x86-64.so.2
13:01:06 <CakeProphet> #3 0x00007ffff7df0795 in ?? () from /lib64/ld-linux-x86-64.so.2
13:01:08 <CakeProphet> #4 0x0000000000401aaf in main (argc=1, argv=0x7fffffffe748) at convert.cpp:156
13:01:24 <Patashu> take stuff out until it stops crashing
13:01:42 <CakeProphet> "take stuff out until it stops crashing" you realize taking stuff out will cause other crashes right?
13:02:41 <CakeProphet> so yeah removing the open causes while (!inp.eof()) to crash it
13:03:08 <CakeProphet> I really think it has something to do with my includes.
13:03:12 <Patashu> so is the crash in inp or in .open()?
13:03:35 <CakeProphet> technically it's in ?? () of /lib64/ld-linux/x86-64.so.2
13:03:36 <Patashu> is there even a fake ifstream you can import wrongly?
13:04:02 <Patashu> you should comple and run it on a windows box and see if it gives a better stack trace
13:05:43 <CakeProphet> are you sure there's not a way I can get better debugging output?
13:06:45 <fizzie> "-ggdb" should generate the best information you can get for use with GDB, in theory.
13:07:29 <fizzie> And 3 is the highest level there.
13:08:21 -!- MDude has joined.
13:08:29 -!- Madoka-Kaname has quit (*.net *.split).
13:08:30 -!- HackEgo has quit (*.net *.split).
13:08:30 -!- fungot has quit (*.net *.split).
13:08:30 -!- Zuu has quit (*.net *.split).
13:08:49 -!- MSleep has quit (Ping timeout: 248 seconds).
13:08:50 <CakeProphet> I should start doing these assignments like a week early so I have time to deal with stupid compiler output and debugging shit.
13:08:57 <fizzie> But of course it can't generate debug information for anything else than your program.
13:09:40 <fizzie> C++ is not a very nice language to debug, thanks to all that template-generated "invisible" code.
13:10:31 -!- Madoka-Kaname has joined.
13:10:31 -!- HackEgo has joined.
13:10:31 -!- fungot has joined.
13:10:31 -!- Zuu has joined.
13:11:28 <fizzie> And if you have anything on the stack, it's easy to get all kinds of delayed crashes if you stack-mungle over the internals of the ifstream. You could try moving it outside main and seeing what happens.
13:11:35 <CakeProphet> I literally have no idea what to test now.
13:12:05 <Patashu> Delete it all and start over. If you know what you want to do it should go faster
13:12:09 <Patashu> And you might not make the same invisible mistake
13:12:27 <Ngevd> I don't like this time of day
13:13:52 <fizzie> That's something that can very easily mungle over the end. How about >>ing into a std::string?
13:14:01 <fizzie> I mean, you've finally got a string type in C++.
13:14:24 <CakeProphet> I didn't see an overload for strings so I didn't think it would work.
13:14:45 <fizzie> Yeah, well, that's just a .c_str() on the string.
13:15:05 <fizzie> The fact that the API takes char *s everywhere is yet another thing to dislike, but still.
13:15:52 <Patashu> w3schools went down just as I was testing some xslt
13:16:17 <fizzie> The overloaded operator>> comes from <string>.
13:16:32 <CakeProphet> I do some more reads into char * later so I might need to fix those as well if that's the real problem.
13:17:16 <Ngevd> I should try XSLT S and K again
13:17:29 <fizzie> And in fact it's template<typename CharT, typename Traits, typename Alloc> basic_istream<CharT, Traits>& operator>>(basic_istream<CharT, Traits>& stream, basic_string<CharT, Traits, Alloc>& str).
13:18:00 <fizzie> So that you can apply it to all kinds of non-char streams and non-char strings.
13:18:09 <fizzie> Using non-standard memory allocators.
13:18:16 <fizzie> And different character traits.
13:19:41 <Ngevd> Can an XSLT document be applied to itself?
13:20:30 <CakeProphet> fizzie: is there any good replacement for sprintf in C++?
13:20:50 <fizzie> Well, no, if you want "good".
13:20:57 <Patashu> Ngevd: I presume so, xslt is xml
13:21:19 <fizzie> CakeProphet: You can make a string-stream and then use the usual stream formatting type-magic and flobs.
13:21:27 <CakeProphet> fizzie: they sure do like to make using C++'s fancy string class a pain.
13:21:29 <Ngevd> Could have interesting consequences
13:22:48 <fizzie> Using a stringstream is not any worse than iostream-formatted output.
13:23:21 <fizzie> E.g. you have the same problems of someone setting the stream to hex mode or "restoring" it to decimal mode while your code thinks the mode won't change.
13:23:24 <CakeProphet> I'll just use sprintf and convert back to string.
13:23:38 <fizzie> And then you end up with defensive format-setting everywhere, just in case someone has changed it.
13:24:04 <fizzie> I don't think you can even read the current formatting state of a stream anyhow. Though it might be possible.
13:26:17 <fizzie> The thing returned by std::string::c_str() is a pointer to somewhere deep inside the string, and will likely be invalid if you touch the string object in any inappropriate (non-const) way.
13:26:33 <fizzie> It's a good way to get dangling pointers and so on.
13:27:01 <fizzie> Well, the alternative would be to return a copy and then leak as a sieve because nobody would free the copies.
13:27:09 <fizzie> Plus spend quite a lot of time copying.
13:28:35 <CakeProphet> fizzie: shouldn't have this problem with things like sprintf though right?
13:28:58 <fizzie> Well, uh, that depends on where you're sprintf'ing to.
13:29:17 <CakeProphet> which is then put in a string and returned.
13:29:24 <fizzie> It's a problematic function too, since it doesn't allocate storage.
13:30:13 <CakeProphet> I need to specify the size for this string and stuff.
13:30:22 <CakeProphet> maybe I should just use the stringstream stuff.
13:30:57 <fizzie> Something like "char buf[256]; snprintf(buf, 256, "fmt", ...); return std::string(buf);" is safe enough; the string object will store a copy of the string inside it.
13:31:06 <fizzie> If you don't mind a maximum size limit, that is.
13:31:46 <fizzie> Uh, and of course 'snprintf' was added only in C99, I'm not sure what it's status in <cstdio> is.
13:32:25 <fizzie> std::string::operator+= is just fine, though it only accepts strings, char *s and individual chars.
13:32:36 <fizzie> You need that stringstream if you need to convert some integers or something.
13:33:11 <CakeProphet> can I chain them together or do they need to be on one line?
13:36:03 <fizzie> Yes; but do note that += is right-to-left associative, so if you write s += "foo" += "bar" that's s += ("foo" += "bar") which won't work; but the .append(...).append(...) chain is hokay.
13:36:19 <fizzie> Or I guess (s += "foo") += "bar" but that's butt-ugly.
13:42:01 <Ngevd> In XSLT templates, would <xsl:for-each select=./*> do the subelements of the element the template selected?
13:43:19 <Patashu> I don't know because w3schools is down
13:43:57 <Ngevd> I'll assume it does
13:47:31 -!- erdosjr has quit (Quit: Page closed).
13:52:59 -!- BeholdMyGlory has joined.
14:00:42 <Patashu> Ngevd would you like to help me with this xslt (rather html?) problem
14:01:03 <Patashu> With this: http://www.w3schools.com/xsl/tryxslt.asp?xmlfile=cdcatalog&xsltfile=cdcatalog_if use this xslt http://pastebin.com/h8wTGXfX and this xml http://pastebin.com/Rv5wDpkm
14:01:10 <Patashu> what it's trying to do is stop the table every third card and start a new one
14:01:14 <Patashu> but it completely breaks and doesn't display anything
14:01:27 <Patashu> BUT if inside the conditional all you do is post text then it'll work fine
14:01:49 -!- Ngevd has changed nick to Taneb|Hovercraft.
14:04:18 -!- tromp has left ("Konversation terminated!").
14:05:04 -!- Taneb|Hovercraft has changed nick to Ngevd.
14:10:07 -!- Phantom_Hoover has joined.
14:15:05 <Ngevd> http://pastebin.com/tVvRxmjv
14:15:19 <Ngevd> The problem was that your XML was imbalanced
14:16:07 <Patashu> Possibly he just made a fragment of it poorly
14:17:01 <Patashu> So why are all the trues at the top
14:17:09 <Patashu> and not splitting the table
14:18:08 <Ngevd> They are splitting it up for me
14:18:28 <Patashu> What site are you using to test it
14:18:28 -!- CommaChameleon has joined.
14:18:33 <Patashu> Perhaps w3schools' is broken
14:18:40 <Ngevd> w3school's, in Firefox
14:18:51 <Ngevd> What's your browser?
14:20:02 <Patashu> It works in firefox but not in chrome
14:20:39 -!- copumpkin has quit (Quit: Computer has gone to sleep.).
14:21:48 <Patashu> Hmmm. It won't let me use an XSLT with unbalanced tags inside of it
14:21:53 <Patashu> But what if I do want to print unbalanced tags?
14:22:21 <Ngevd> Then you are a bad person and you should feel bad
14:23:42 <Patashu> So there's no way to do it?
14:24:15 <Ngevd> Not as far as I am aware
14:24:43 <Ngevd> Unless you are sneaky and use XSLT to make JavaScript that adds elements UNBALANCEDLY
14:25:16 <Patashu> or maybe I could make a value-of that prints out the tag I want?
14:26:21 <Patashu> something like <xsl:value-of select="print(</tr>)"/> except I'm sure it's not called print
14:26:54 -!- elliott has joined.
14:28:01 <Patashu> <xsl:value-of select="substring('</tr>',1)"/>
14:29:03 <Patashu> <xsl:value-of select="substring('a',1)"/> works but <xsl:value-of select="substring('</tr>',1)"/> does not
14:29:06 <Patashu> do I need to escape part of it?
14:29:46 <Ngevd> There's a reason for that
14:29:56 <elliott> I think that's XML not XSLT
14:29:58 <Patashu> <xsl:value-of select="substring('</tr>',1)"/>
14:30:00 <Ngevd> That reason is it's BLOODY XML
14:30:17 <Ngevd> XSLT is a subset of XML
14:30:25 <elliott> technically it's an XML schema
14:30:47 <Patashu> It likes > but not <
14:32:10 <Patashu> darn that doesn't work either
14:32:22 <Patashu> yet, again, > works ok
14:32:35 <Patashu> it's like it really reeally doesn't want me to embed html in html..............
14:32:39 <Patashu> I wonder why that could be
14:34:34 <Patashu> I think it's complaining about the -output- being non well formed, not the xml? I don't know
14:35:35 <elliott> Patashu: Why are you matching on that anyway
14:35:46 <elliott> You can't just match random element tags
14:36:13 <Patashu> Basically my friend wants to output a table for every element in an xml, and that's easy
14:36:22 <Patashu> But he also wants to make it line break every three of these elements
14:36:35 <Patashu> Well rather he wants the table to break one line every three elements
14:36:44 <Patashu> Which means unbalanced tags
14:36:52 <elliott> Output a table... so output it as XHTML?
14:36:58 <CommaChameleon> I'm actually here if you need me to explain anything <_<
14:37:07 <elliott> If you really want to do that, CDATA?
14:37:13 <elliott> I'm sure XSLT has stuff for CDATA
14:37:23 <HackEgo> Welcome to the international hub for esoteric programming language design and deployment! For more information, check out our wiki: http://esolangs.org/wiki/Main_Page
14:37:53 <CommaChameleon> I'll briefly explain the motivation behind this; it might help you understand what I'm trying to do.
14:38:13 <CommaChameleon> I'm trying to prototype a card game, and I need to print out some cards on cardstock paper.
14:38:26 <Patashu> <![CDATA[</tr><tr>]]> works great
14:38:30 <Patashu> Except for one problem.......
14:38:33 <Patashu> It doesn't get parsed ever
14:39:12 <elliott> I suggest restructuring the program
14:39:15 <elliott> XSLT is functional, as I understand
14:39:17 <elliott> So what you instead want to do
14:39:20 <elliott> Is to transform a list of cards
14:39:24 <elliott> Into a list of (list of cards)
14:39:27 <elliott> Where each inner list has three elements
14:39:34 <elliott> Then, you can just produce a <tr> for each list in the outer list
14:39:38 <elliott> And not try and do it slapdash like this
14:39:40 <elliott> You can do it structurally
14:39:57 -!- brisingr has left.
14:40:32 <Patashu> XSLT isn't a very good programming language
14:40:46 <elliott> groups [] = []; groups [x] = [[x]]; groups [x,y] = [[x,y]]; groups (x:y:z:xs) = [x,y,z] : groups xs
14:40:56 <elliott> Convert to using "if" on the length rather than pattern matching
14:41:03 <CakeProphet> s.erase(remove_if(s.begin(), s.end(), isspace), s.end());
14:41:03 <elliott> And whatever the equivalent of car/cdr is instead of that
14:41:05 <Patashu> Yes this is great, have you used XSLT before
14:41:09 <Ngevd> XSLT IS A PERFECTLY GOOD PROGRAMMING LANGUAGE
14:41:10 <CakeProphet> the best way to strip whitespace in a string in C++, obviously.
14:41:26 <elliott> Patashu: No, but I'm assuming you're asking for help on how to structure it in a way amenable to XSLT's paradigm
14:41:33 <elliott> Rather than asking me how to write your program entirely :P
14:41:34 <Patashu> ...But you haven't used XSLT
14:42:00 <elliott> Well, I wrote a few trivial test things in it once, and I know the general paradigm.
14:42:12 <elliott> I know that you won't get anywhere trying to generate HTML as text for some reason.
14:42:16 <Patashu> But something as simple as 'form groups of three' is stumping me
14:42:18 <elliott> And I know it's functional, so you will be able to process lists in it
14:42:32 <elliott> Patashu: http://fxsl.sourceforge.net/articles/FuncProg/2.html?
14:43:32 <elliott> Patashu: How good is XSLT's plain iteration? You can avoid transforming into groups if you can instead just increment the list index by three each time
14:43:43 <elliott> Then list[i], list[i+1], list[i+2] form the group
14:44:02 <Ngevd> XSLT is declerative, not functional
14:44:03 <Patashu> You can skip it if the position() isn't mod something
14:44:25 <elliott> Patashu: You'll need to handle the case when the last or last two in that don't exist because the list is too short, but that should be easy
14:44:25 -!- copumpkin has joined.
14:44:34 <CakeProphet> s.erase(remove_if(s.begin(), s.end(), ::isspace), s.end());
14:46:00 <Patashu> following-siblingSelects all siblings after the current node
14:46:03 <Patashu> so you can do something like
14:46:37 <Patashu> following-sibling::[1] for the element after
14:47:08 <elliott> Patashu: Right -- but you must do that modulo check.
14:47:13 <elliott> Or you'll have tons of duplication.
14:48:08 <elliott> People should be banned from commenting on the readability of Haskell in /r/programming.
14:48:15 <elliott> "When I see lines like contains im (Rect x y w h) = all and . map cols . rows $ im, I wish lisp gave some of the parenthesis back."
14:48:26 <elliott> Translation: "I don't know Haskell, but I expect to be able to read Haskell code."
14:48:29 <elliott> "Same here. I'd rather type a bit more and get something I can actually read again later without effort."
14:48:30 <Ngevd> There is no perfectly readable programming language
14:48:38 <Ngevd> Except for English
14:48:45 <elliott> Translation: "I don't know Haskell, but I don't want to write Haskell code, and actually what am I saying here, I am making no sense at all."
14:48:51 <Ngevd> And Constantinople
14:53:50 <CakeProphet> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14:54:05 <CakeProphet> G++:: not warranted to fit any particular purpose.
14:55:36 -!- Patashu has quit (Quit: MSN: Patashu@hotmail.com , Gmail: Patashu0@gmail.com , AIM: Patashu0 , YIM: patashu2 .).
14:55:51 -!- CommaChameleon has left.
14:57:18 <pikhq> elliott: To be fair, the function written there is a type error.
14:57:42 <elliott> "contains" is the function name
14:57:57 <elliott> pikhq: There is no standard rows function.
14:58:13 <pikhq> Oh, okay, so it merely looks effing weird.
14:59:05 <pikhq> I have no idea what rows would do to im :: (Rect Int Int Int Int) -> Bool, though.
15:00:52 <Ngevd> What does Rect do?
15:03:27 -!- augur has quit (Remote host closed the connection).
15:04:36 <elliott> pikhq: That is clearly not the type.
15:04:50 <elliott> Where the hell did you get it was of that type?
15:06:30 <pikhq> Nowhere in particular.
15:07:13 <elliott> pikhq: Then why do you think that is the type of im?
15:07:21 <elliott> im is obviously an image of some kind.
15:08:09 <pikhq> im is written as a function there.
15:08:22 <pikhq> "im (Rect x y w h) = ..."
15:08:30 <elliott> pikhq: "contains im (Rect x y w h)" says you're a moron
15:09:15 <pikhq> The quote as heavily ambiguous if you presume the person saying it is not necessarily using correct English.
15:09:30 -!- ais523 has joined.
15:09:33 <pikhq> It could also very well be "(Rect x y w h) = ..."
15:09:39 <elliott> So you assume the interpretation whereby the code makes no sense and the English makes nos enes, rather than the interpretation whereby both make sense? :P
15:09:58 <pikhq> Never underestimate someone's stupidity.
15:10:38 <pikhq> Especially when they've been quoted to discuss their stupidity.
15:11:57 <Ngevd> I'm working on XSLT S and K
15:13:39 <Ngevd> Also, why can't the single transferable vote method be more representational than first past the post in my favour?
15:16:19 <elliott> That sentence collapsed around three words before it finished.
15:16:31 <Ngevd> It just needs more commas
15:16:48 <Ngevd> No wait, it is perfectly grammatically correct
15:17:14 <Ngevd> It's just nigh-impossible to parse
15:18:27 <Phantom_Hoover> Ngevd, are you asking why STV isn't more representational than FPTP in order that you can win?
15:19:09 <Ngevd> No I was asking why the fact that STV is more representational than FPTP didn't make me win
15:19:40 <elliott> Would you have won in FPTP? :-P
15:20:14 <Ngevd> First you have my address
15:20:20 <Phantom_Hoover> (Do I need :P not to sound like a complete prick there.)
15:20:25 <Ngevd> And then my nobodiness!
15:20:38 <Ngevd> What is going on here!?
15:20:43 <Ngevd> And why don't I get the joke?
15:20:49 <elliott> His name is actually Ngevd van Doorn.
15:20:56 <elliott> He's just ashamed because that is the worst name.
15:22:06 <Ngevd> A martian with Dutch ancestry
15:36:02 -!- Jafet has quit (Quit: Leaving.).
15:40:40 <cheater> there were some dutch people in the restaurant today
15:41:08 <cheater> half the time they start a sentence with a deep voice and end it with a falsetto
15:43:20 <ais523> CakeProphet: it's a prefix to a huge number of commands
15:43:34 <CakeProphet> right but it's being displayed in my emacs buffer
15:43:36 <ais523> e.g. ^X^X is "swap mark and point", ^X^S is "save"
15:43:41 <ais523> oh, it means literal control-X
15:43:55 <ais523> you can type it using C-q C-x
15:43:59 <ais523> and, umm, I don't know
15:44:40 <elliott> consult your local ascii table
15:45:09 -!- augur has joined.
15:46:08 <elliott> ^x = chr(ord(x) - ord('@'))
15:48:41 <CakeProphet> okay so this is obviously just some kind of weird bug in my code then.
15:49:00 <CakeProphet> that causes me to accidentally overwrite parts of my stack.
15:49:09 -!- monqy has joined.
15:49:11 <fizzie> Unfortunately it can't subtract the 64 quite as easily.
16:00:06 -!- lambdabot has joined.
16:00:17 <lambdabot> elliott: You have 2 new messages. '/msg lambdabot @messages' to read them.
16:01:10 -!- Ngevd has quit (Quit: Leaving).
16:01:34 <CakeProphet> elliott: you can see my rant last night in the logs.
16:01:43 <elliott> CakeProphet: Rant about what.
16:03:11 <CakeProphet> well, it was mostly just ideas regarding what to change. In particular the prelude/stdlib could be overhauled, also a number of new extensions could be attended (you could have your pattern synonyms and OCamlModules :P)
16:03:39 <elliott> ML modules, not OCaml modules.
16:03:41 <elliott> What is wrong with the Prelude?
16:03:49 <elliott> Some functions need generalising, but that's all I can think of.
16:03:59 <CakeProphet> also I was thinking of using some like agda mixfix for operators, with the possibility of 3-ary operators as long as the precedence relations follow some rules
16:04:40 <CakeProphet> ++ should be part of Monoid, Category should maybe be in Prelude by default.
16:04:49 <elliott> CakeProphet: It would be easier to go through the process for the next Haskell revision to get the few operators that need to be generalised.
16:04:59 <elliott> Especially since they're trying to increase the frequency of the standards a lot.
16:05:17 <elliott> CakeProphet: You think creating a new dialect solo will be quicker?
16:05:40 <CakeProphet> the idea is to simply experiment with new syntax/semantics.
16:05:43 <elliott> Mixfix is additional complication; I'd rather remove if/then/else, which is the obvious motivating example for mixfix in Haskell.
16:05:51 <elliott> CakeProphet: You never said anything about that.
16:06:13 <CakeProphet> elliott: be patient sheesh I can't say everything at once.
16:08:09 <CakeProphet> elliott: I was just wondering if it's something you've ever considered. Perhaps there are some things you'd like to experiment with on top of Haskell?
16:08:30 <elliott> I thought you had ideas for semantic changes.
16:12:53 <CakeProphet> to improve the "Haskell as a roll-your-own DSL maker" aspect
16:13:15 <elliott> What syntactic changes, other than mixfix?
16:13:58 <CakeProphet> well that's the only concrete one I have so far. I was thinking it might be possible to include some sort of macro-like feature, perhaps using TH? I don't know it's not a complete thought.
16:14:23 <CakeProphet> but the mixfix in itself is quite useful. I wonder if you could use spaces as a valid infix symbol as long as some precedence rules were obeyed.
16:14:48 <elliott> CakeProphet: Mixfix doesn't let you have two expressions without an intervening operator, certainly not.
16:14:59 <elliott> That would be basically impossibly ambiguous.
16:17:03 <CakeProphet> I don't think I'm selling this idea very well. :P
16:20:19 <CakeProphet> it could easily turn into a project to make Haskell esoteric. :D
16:21:34 <elliott> You do not seem very sure of what you are doing.
16:22:06 <CakeProphet> elliott: and sure TH is already macros but new syntax-defining features could be allowed.
16:22:12 <CakeProphet> for example, what would stop circumfix operators?
16:22:25 <elliott> There aren't really any brackets left.
16:22:36 <CakeProphet> they don't need to be brackets necessarily.
16:22:46 <elliott> You need characters not used by existing infix operators.
16:22:52 <elliott> Or parsing becomes very, very difficult.
16:23:14 <CakeProphet> I assume by difficult you mean generally undecidable
16:24:17 <elliott> I don't think you realise how hard parsing Haskell is.
16:24:31 <elliott> Especially 98, which not a single implementation has ever implemented the syntax for correctly.
16:24:41 <CakeProphet> also you can free up some room perhaps by defining some of Haskell's syntax in itself. for instance, immediately with circumfix operators you have:
16:25:13 <elliott> Hooray, we've added a huge huge mound of syntactic complexity, but now we can define parentheses in Haskell despite this making no difference at all
16:25:33 -!- augur has quit (Remote host closed the connection).
16:25:48 <ais523> being able to define parentheses in INTERCAL would actually be useful
16:27:27 <CakeProphet> elliott: also the operator parsing would only have to be unambiguous within precedence trees. So that essentially if you have a ternary operator that uses the simples a and b, the only restriction would be that there can be no other operators that use a and b in the same precedence tree.
16:28:52 <Phantom_Hoover> http://www.reddit.com/r/askscience/comments/kv91b/discussion_thread_promising_ftl_neutrino/
16:29:17 -!- sebbu2 has changed nick to sebbu.
16:29:44 <elliott> Phantom_Hoover: So ais523 wrote a paper? :-P
16:30:08 <ais523> elliott: is that in the same conversation as Phantom_Hoover's link?
16:30:11 <elliott> Clock synchronisation was basically his argument.
16:30:39 <elliott> Phantom_Hoover: "He merely points out that, if one were to take all these effects into account, it seems likely they would also somewhere mention going to all the trouble." -- I dunno about this, it seems like the whole "yes we've repeated it ten thousand times and made sure of these results for months so assume we're competent plz" would account for that.
16:31:27 <Phantom_Hoover> elliott, they published their analysis. If they left it out, that's entirely their fault.
16:31:36 <CakeProphet> elliott: also obvious Haskell needs Perl-like string interpolation syntax.
16:31:44 <elliott> CakeProphet: Several packages on Hackage provide that
16:31:49 <Phantom_Hoover> "yes we've repeated it ten thousand times and made sure of these results for months so assume we're competent plz" does not cut it in science.
16:32:07 <elliott> Phantom_Hoover: They didn't say "HEY GUYS WE'VE PROVED FTL".
16:32:18 <elliott> Phantom_Hoover: They said "So, uhh, guys, this is very worrying".
16:32:29 <ais523> yep, their attitude was about right
16:32:30 -!- Sgeo|web_ has quit (Ping timeout: 252 seconds).
16:32:47 <ais523> it was pretty much "we have these results, they /can't/ be right but we've checked everything we could think of, please someone find the mistake in them or we'll go mad"
16:33:01 <elliott> I dunno, I don't think they claim their paper was SCIENTIFIC FTL PROOF, it seems more like they're trying to start a dialogue to figure out wtf is going on, in which case exhaustively detailing every single precaution seems excessive at that point.
16:33:16 <elliott> Certainly they should reply to this but I don't think they were necessarily wrong or expected to mention it in the original report.
16:33:23 <Phantom_Hoover> Their analysis did not account for any measures taken to counteract these difficulties.
16:34:24 <ais523> elliott: mentioning every single precaution is exactly what they should have done, because if you're asking for help finding a mistake, you should tell people where it isn't
16:34:46 <CakeProphet> I would actually be quite pleased if this eventually led to some overturning of some previous theoretical assumptions.
16:35:25 <elliott> Phantom_Hoover: I'm not saying that it shouldn't be pointed out
16:35:38 <elliott> I'm saying that "they didn't talk about this so clearly they didn't account for it" seems wrong.
16:36:15 <CakeProphet> I wonder how one would transmit data via (possibly) ftl neutrinos.
16:36:17 <Phantom_Hoover> elliott, the argument is that they didn't talk about it, and it's a very significant source of potential error, so it's more than probable that their measures taken against it were inadequate.
16:36:33 <Phantom_Hoover> CakeProphet, transmit loads of them, leave a fish tank at the other end.
16:37:29 <ais523> elliott: it's surprising how similar the suggestion there is to mine (relativistic effects in moving the clock)
16:38:32 <elliott> CakeProphet: Neutrino with a smiley face on it, neutrino with a frowning face on it?
16:38:47 <ais523> CakeProphet: BEER and SHNITZEL, obviously
16:38:52 <Phantom_Hoover> ais523, well come on, the important thing is that they calculated it.
16:39:29 <CakeProphet> Phantom_Hoover: this would require a standardized speed and assumes everything transmits perfectly and at the right time, is that practical?
16:39:44 <CakeProphet> elliott: this approach sounds promising, however.
16:39:46 <ais523> elliott: I'm fighting the temptation to put Category:Shameful on that
16:40:06 <elliott> (That was at CakeProphet.)
16:40:13 <Phantom_Hoover> CakeProphet, how would you transmit data over a wire, it would require a standardised speed and assume that everything transmitted perfectly.
16:41:12 <CakeProphet> positive = 1, negative = 0, values are seperated by a moment of no voltage. :)
16:41:35 <ais523> CakeProphet: that's bipolar return-to-zero encoding, right?
16:41:50 <CakeProphet> uh, I have no idea what it's called I just improvised it.
16:41:54 <elliott> Your MOM is bipolar. Um, wait.
16:42:08 <ais523> Manchester encoding would work with neutrinos (it encodes 0 as low then high and 1 as high then low), its main issue is that it only gets half the bandwidth of some other schemes
16:43:04 <CakeProphet> Phantom_Hoover: still I see your point that it's possible
16:43:24 -!- augur has joined.
16:45:35 <CakeProphet> but then how do you transfer a chargeless particle across a wire?
16:46:21 <CakeProphet> I suppose you could just launch them into space assuming that's how they even work.
16:46:41 <ais523> CakeProphet: they're neutrinos, they hardly ever interact with anything
16:46:51 <ais523> you just send a mass of neutrinos directly at your neutrino detector
16:46:59 <elliott> `addquote <Phantom_Hoover> Guys no don't fly a Jem Hadar ship into Cardassian space to shoot things I played that mission in FreeSpace and it never works.
16:47:01 <HackEgo> 689) <Phantom_Hoover> Guys no don't fly a Jem Hadar ship into Cardassian space to shoot things I played that mission in FreeSpace and it never works.
16:47:07 <ais523> and hope that some of them get picked up
16:48:03 <CakeProphet> so yeah as a form of carrying an interplanetary information network, it's not a bad substrate. I imagine detectors and transmitters are pretty expensive though.
16:48:19 <elliott> Just run a really long copper wire to the moon.
16:48:25 <elliott> (I wonder if that would actually be possible.)
16:49:26 <CakeProphet> to allow for revolution around the earth..
16:49:27 <Phantom_Hoover> CakeProphet, you're talking about a system that literally implies time travel.
16:50:22 <elliott> Phantom_Hoover: Oh my god I just had a flash vision of the future.
16:50:32 -!- Ngevd has joined.
16:51:26 <elliott> Phantom_Hoover: The first high-frequency trading firm to use a neutrino connection instead of whatever they use now will become utterly rich.
16:51:38 <elliott> They'll be able to make market decisions before they happen.
16:51:45 <elliott> IT WILL BE THE BEST ECONOMIC COLLAPSE EVER
16:52:48 <elliott> Phantom_Hoover: They'll just make really really fast specialised chips so that they can actually take advantage of the like zero nanoseconds it'd give them.
16:53:22 <elliott> PORTABLE TRADING STATION???
16:53:22 <CakeProphet> but what if market information is transmitted on neutrinos? the net effect is that you have no advantage in a market that time travels.
16:53:41 <Phantom_Hoover> So you'd have to send a deep space probe at relativistic velocities with a neutrino detector and a high-energy particle accelerator on it.
16:53:41 <elliott> CakeProphet: Dude they got the neutrino thing installed specially.
16:53:49 <elliott> The rest of the system doesn't use it.
16:53:58 <elliott> CakeProphet discovers that time travel makes no sense.
16:54:08 <elliott> Phantom_Hoover: That still sounds cool, dude.
16:54:11 -!- Sgeo|web has joined.
16:54:26 <Phantom_Hoover> elliott, sure, but it'd be a while before it could be used for the stock market.
16:54:45 <elliott> Phantom_Hoover: omg what if in the future we have to specially code our networking stacks to work in a manner that respects causality.
16:55:31 <Ngevd> I don't think time travel happens when you exceed the speed of light
16:56:53 <Ngevd> All that happens is you get very heavy and go faster than light
16:56:56 * CakeProphet publishes this as a Cakeprophet's theory of neutrino relativity.
16:56:58 <Phantom_Hoover> You fire a superluminal signal to someone moving with an inverse gamma of 0.5 relative to you.
16:57:27 <Ngevd> So you'll be there before they see you
16:57:39 <Phantom_Hoover> You fire said signal ten seconds after passing each other.
16:58:03 <Phantom_Hoover> Your friend receives it five seconds into their flight. They send a reply.
16:59:55 -!- augur has quit (Remote host closed the connection).
17:01:10 -!- SgeoN1 has quit (Read error: Connection reset by peer).
17:01:23 -!- SgeoN1 has joined.
17:01:44 <Phantom_Hoover> CakeProphet, so you're getting the reply to the original message 7.5 seconds before you sent it.
17:02:32 <CakeProphet> you seem to have just made the assumption that neutrino = time travel
17:02:40 <CakeProphet> in setting up a problem to demonstrate that neutrino = time travel
17:02:51 <ais523> Oracle vs. Google: Oracle are arguing that a leaked internal Google email was made public by Google because you can find it via a Google search
17:03:14 <CakeProphet> Phantom_Hoover: by not explaining why the time travel occurs.
17:03:29 <Sgeo|web> So, those phpMyAdmin login pages are all deliberately public?
17:03:40 <ais523> <Oracle's lawyers> Third, Google waived the privilege by affirmatively publishing the ostensibly privileged information on the google.com search page and directing members of the public to the document’s contents.
17:04:42 <Sgeo|web> Because Google special-cased their search engine when it comes to anything relating to Google. When you type Google into Google, a human hand-tweaked the result.
17:05:04 <Sgeo|web> This way, the Internet won't explode.
17:05:13 <CakeProphet> Phantom_Hoover: picture this from the point of view of someone who doesn't understand physics. :P
17:05:38 <Phantom_Hoover> Assume the neutrinos, for sake of calculation, move at 2c.
17:06:06 <Phantom_Hoover> I presume you know that time dilation is a perfectly well-established consequence of relativity?
17:06:40 <Phantom_Hoover> And that two observers moving at constant speed will each see the other moving slower?
17:09:26 <Phantom_Hoover> OK, so you pass each other while moving — wait, neutrino speed is irrelevant here ignore that bit.
17:09:38 <Phantom_Hoover> Just assume that the signal is instant; it's the same anyway.
17:10:33 <CakeProphet> Time for a pretty good time-travel joke:The bartender says "We don't serve faster-than-light particles in here."A neutrino goes into a bar.
17:11:17 <elliott> "Linux Guru Hans Reiser Demands New Murder Trial"
17:11:24 <elliott> How... does he expect to win this one
17:18:00 <ais523> hey, we have another BF derivative on the wiki!
17:18:26 <Phantom_Hoover> FFS, the recent changes page is broken *exclusively* for me.
17:18:26 <ais523> seems to be a mix of a bunch of other BF derivs, + atomic semaphores
17:18:39 -!- elliott has quit (Read error: Connection reset by peer).
17:18:39 <Phantom_Hoover> None of the range-specifier values in the Range request-header field overlap the current extent of the selected resource"
17:18:40 <ais523> Phantom_Hoover: go into your preferences, toggle the setting of enhanced recent changes
17:18:46 <ais523> ah, hmm, probably not that
17:18:51 -!- elliott has joined.
17:19:05 <ais523> it seems that your browser is, umm, asking for entries past the end of the page, or something
17:19:08 <Phantom_Hoover> ais523, I doubt it, given that it remains regardless of whether or not I am logged in.
17:19:42 <elliott> Phantom_Hoover: hapepns a lot
17:19:54 <elliott> just change the uri and it works
17:20:02 <elliott> (diff) (hist) . . N Brains; 17:13 . . (+2,867) . . 24.8.132.122 (Talk) (I wrote an esolang! It sucks....)
17:20:22 * tiffany should totally write a classic server
17:20:26 <Ngevd> At least the creator is honest
17:20:46 <Ngevd> tiffany, Minecraft?
17:20:59 <Phantom_Hoover> tiffany, yes, so that all 0 people who still play classic can join in.
17:21:29 <tiffany> it's not something about people playing it, I've just never implemented a protocol before
17:21:36 <Ngevd> elliott, whoever's making the other elliottcraft, how are the elliotcrafts going on?
17:21:36 <tiffany> except for a tiny bit of http in lua
17:21:42 <Phantom_Hoover> "{ if the current cell is not zero, jump past the matching }
17:21:42 <Phantom_Hoover> } if the current cell is zero, jump back to the matching {
17:21:42 <Phantom_Hoover> { if the current cell is not zero, jump past the matching }
17:21:42 <Phantom_Hoover> } if the current cell is zero, jump back to the matching {"
17:21:42 <elliott> ais523: How's Elliottcraft going on
17:21:54 <ais523> it isn't, really, I have too many other things to do
17:21:56 <Phantom_Hoover> This is the actual most shameless addition I've seen in a BF derivative."
17:22:00 <ais523> I think I posted a spec somewhere for the language
17:22:08 <ais523> and then decided I was too lazy to implement it
17:22:49 <elliott> http://esolangs.org/w/index.php?title=Emo&curid=3331&diff=24658&oldid=23606 lol
17:23:14 <Ngevd> I'm going to express the opinion that Geom isn't Turing-Complete
17:23:34 <Ngevd> IT IS MY OPINION THAT GEOM IS NOT TURING COMPLETE
17:23:52 <elliott> AAAAAAAAAAAAAAAAAAAAUUUUUUUUUUUUUUUUUUUUUUUUUUUUGH
17:24:36 <Ngevd> Now to edit the wiki
17:25:29 <Phantom_Hoover> elliott, fun fact, half the Norwegian parliament actually did turn up just before I made that Symbol edit.
17:27:02 <Phantom_Hoover> They were being shown around the school for some reason.
17:27:35 <Phantom_Hoover> I offered to help but apparently the fact that I have talked to a Norwegian on the internet does not qualify me to be the Norwegian ambassador.
17:28:24 <cheater> you should've told them you know where all the lutfisks are hidden
17:29:13 <Vorpal> Phantom_Hoover, why were they there?
17:29:37 <Phantom_Hoover> cheater, that would regrettably have made me look like an unfunny idiot.
17:30:34 <cheater> i find this hard to believe
17:31:35 <elliott> That's your most notable feature?
17:32:05 <cheater> elliott: no, i guess my eye patch
17:32:19 <elliott> Wow, you really have the douchebag look going.
17:33:02 <cheater> why are you calling me names? that's not nice
17:33:20 <elliott> Phantom_Hoover did it first. Punch him instead.
17:33:47 <elliott> Phantom_Hoover: I'm sorry but I can't jeopardise my year-long campaign to terrorise him and everyone he knows.
17:33:55 <elliott> The stakes are simply too high.
17:34:59 <elliott> Why does this always happen to me.
17:35:15 <elliott> I set out to destroy someone's life, then I start feeling guilty and someone tells me I have to kill myself.
17:35:23 <elliott> Reincarnation is the worst when you're a sociopath, let me tell you.
17:35:32 <elliott> You have to start faking social relations ALL OVER AGAIN.
17:36:08 <Ngevd> And then you get mistaken for someone who kicked someone else in the face
17:36:35 <elliott> I'll have to start actually kicking more people in the face to compensate.
17:37:24 <Phantom_Hoover> Ngevd, so elliott did not in fact kick your friend in the face?
17:37:37 <Ngevd> Turns out that was a different Elliott Hird
17:37:38 <elliott> Ngevd: I'm available for face-kicking services if they want the real deal.
17:37:52 <elliott> OK I refuse to believe there is another Elliott Hird in the universe.
17:38:04 <Ngevd> There're at least four Nathan van Doorns
17:38:19 <Phantom_Hoover> No, I refuse on absolute terms to believe that there are two Elliott Hirds in Hexham.
17:38:27 <Ngevd> One of them moved away
17:38:41 <elliott> Phantom_Hoover: I think I am literally living inside a film.
17:38:49 <elliott> The plot kicked off with Ngevd coming here.
17:38:59 <Vorpal> Phantom_Hoover, yes that is unlikely. Maybe somewhere else in UK though?
17:39:16 <elliott> Vorpal: Dude the spelling of my first name is like the least conventional.
17:39:18 <fizzie> So our Elliott "Face-Kicker" Hird did not actually kick anyone in the face?
17:39:43 <Phantom_Hoover> Then it turns out that Hexham is the centre of the coming apocalypse, precipitated by a cross-time war waged with neutrinos?
17:39:46 <Ngevd> elliott, it has been conjectured that I am the central character in the real version of the Truman Show
17:39:50 <elliott> foldl f z t = appEndo (getDual (foldMap (Dual . Endo . flip f) t)) z
17:40:02 <elliott> I'm a better main character.
17:40:18 <Ngevd> You have a friend deficiency.
17:40:21 <Phantom_Hoover> Ngevd will be a great warrior with his tinfoil lightsabre.
17:40:27 <Ngevd> I, on the other hand, am famous
17:40:42 <Ngevd> Phantom_Hoover, aluminium foil and wrapping paper!
17:41:03 <Phantom_Hoover> (I will use a tinfoil lightépée because sabres are stupid.)
17:41:30 <Ngevd> They're really lighteightthstaffs
17:42:06 <elliott> Ngevd: Surely lighteighthstaffs.
17:42:41 <Ngevd> They're really lighteightthstaffs [sic]
17:42:42 <fizzie> Lightkatanas Are Just Better. (TVtropes.)
17:45:13 <CakeProphet> yes I am a trained expert and medieval revivalist
17:45:26 <Ngevd> I'm more of a bohemian earspoon fan
17:45:37 <Ngevd> A lightbohemian earspoon
17:46:25 <elliott> That's a good name for anything.
17:46:48 -!- augur has joined.
17:47:05 <CakeProphet> but only people with hipster cred know about them.
17:47:43 -!- da_petcu21 has joined.
17:47:49 <lambdabot> forall a (m :: * -> *) b. (Monad m) => (a -> m b) -> [a] -> m ()
17:47:59 <elliott> CakeProphet: That was the most embarrassing thing you have ever said.
17:48:17 <CakeProphet> elliott: almost as embarassing as looking up the type of mapM_
17:48:27 <elliott> CakeProphet: I was checking if it was (a -> m b) or (a -> m ()).
17:48:34 <elliott> Which is not at all obvious; I was assuming the latter.
17:50:29 <CakeProphet> the level of meta-irony can escalate infinitely.
17:51:43 -!- elliott_ has joined.
17:51:47 <elliott_> Irony of arbitrary levels is indistinguishable from sincere stupidity.
17:52:08 <elliott_> mapStreamM f s = s >>= \x -> Execute (liftM return (f x))
17:52:12 <elliott_> ais523: help, I'm really confused
17:52:24 <elliott_> ais523: that function I just wrote
17:52:28 <lambdabot> forall a1 (m :: * -> *) (m1 :: * -> *). (Monad m, Monad m1) => m1 a1 -> m1 (m a1)
17:52:34 <ais523> oh, I doubt I can help
17:54:32 <CakeProphet> elliott: sincere of indistinguishable levels is arbitrary from stupidity irony.
17:54:52 <elliott_> CakeProphet: What you just said is also indistinguishable from sincere stupidity :P
17:55:20 <CakeProphet> therefore I am an indistinguished master of irony of arbitrary levels.
17:55:45 -!- elliott has quit (Ping timeout: 248 seconds).
17:56:22 -!- elliott__ has joined.
17:57:24 <CakeProphet> Phantom_Hoover: I am irony of such that I am actually not ironic.
17:57:53 <elliott__> Thing I just typed instead of MonadTrans: MonadTrams.
17:57:56 <elliott__> Phantom_Hoover: What was that newspaper?
17:58:10 <Ngevd> There are a finite number of Befunge-93 programs, what with it being a finite state automaton
17:58:58 <CakeProphet> Ngevd: there would have to be a certain length of program string that cannot be reached, I would think...?
17:59:10 <Ngevd> 80x25, as per Befunge-93 spec
18:00:10 <Ngevd> I just felt like making this channel on topic for a change
18:00:33 -!- elliott_ has quit (Ping timeout: 248 seconds).
18:00:50 <CakeProphet> Ngevd: is arbitrary language design on topic?
18:01:43 <Ngevd> Arbitary esoteric programming language design is on topic
18:02:21 <CakeProphet> an unfinished spec of an unfinished language.
18:02:37 <Phantom_Hoover> elliott__, here, have a tram story: http://edinburghnews.scotsman.com/news/Tram-system-may-mean-city.6844650.jp
18:02:52 <CakeProphet> once I finish <insert huge list of unfinished and neverending tasks> then I will finish that.
18:03:17 <elliott__> Councillor Gordon Mackenzie, the city's transport leader, should have said: "It is important that my mental issues are addressed."
18:03:26 <elliott__> "Aye it aw has tae be managed otherwise we will end up in a traffic jam and no able tae breathe when we gang oot frae a drink. If you live in Leith you get an added bonus all your air will be poisioned twice wance by the polluting cars and lorries and a nuder time by the biodiversity Power Station thats before Seafield get going tae skin you oot. A nice wee haaar in January for aboot 5 days and there will have tae mass evacuations from your £250k+ fl
18:03:47 <elliott__> Is that guy imitating a Scot or something.
18:04:06 <lambdabot> 280033879935519460895212800423715491430640102631470924552793056191124304099...
18:04:13 <Phantom_Hoover> Well um the really obnoxious ones who think that pronunciation and spelling are the same do but I haven't actually /met/ any of them.
18:04:24 <Ngevd> That's how many distinct befunge-93 programs there are
18:04:27 <Phantom_Hoover> "Is this the beginning of the end for Edinburgh. Now that Edinburgh has lost all credibility because of the tram, I would not think for one moment that major investors will give Edinburgh City a first or any look for that matter in future investment. Now the shelf will be laid bare, how do they propose to service the city. Edinburgh was a financial center of excellence, now who in there right mind would set up shop with
18:04:27 <Phantom_Hoover> the CEC parasites at the helm of their Money Vortex. Edinburgh`s Inner City is Dead City, out of town is Thriving and Alive. Just turn west at the City Bypass and with not a tram insight, once you leave the city bypass its FREEDOM in the KINGDOM of SCOTLAND. As the saying goes WEST is BEST. Dump the Duds."
18:04:30 <Phantom_Hoover> Noooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
18:08:31 <CakeProphet> "I like 'em brown, yellow, Puerto Rican and Haitian, 'name is Phife Dawg from the Zulu Nation."
18:19:10 -!- brisingr has joined.
18:24:54 <elliott__> Aww, I think my model is too restricted. :/
18:25:01 <CakeProphet> I have no fucking clue what is wrong with this program.
18:37:34 <Ngevd> Is it because you associate C++ with your father?
18:37:44 <CakeProphet> Ngevd: http://www.deviantart.com/#/d4b7rdp
18:40:05 <CakeProphet> you may associate me with whatever contrived social group you wish, it's probably not accurate.
18:42:26 <CakeProphet> perhaps I keep a collection of bookmarked deviafntart pages
18:42:38 <CakeProphet> to link someone when I don't feel like properly following their comment up.
18:44:04 <CakeProphet> perhaps I surf Deviantart regularly in search for super kawaii Pokemon fanart.
18:45:25 <elliott__> You bookmarked something apparently posted 19 hours ago?
18:47:09 <CakeProphet> Phantom_Hoover: actually it was the second option.
18:47:44 -!- Ngevd has quit (Quit: Doctor Who).
18:48:20 <elliott__> Phantom_Hoover I'm crushed by despair because I can't implement this operation.
18:48:27 <Sgeo|web> Doctor Who's not on now right?
18:48:36 <CakeProphet> elliott__: I'm crushed by despair because my seemingly correct C++ code gives garbage output.
18:48:42 <elliott__> Sgeo|web: Dude you're in a different country.
18:50:59 <elliott__> You mean the channel with a completely different schedule to any of the domestic channel and various delays?
18:51:00 <ais523> Ngevd is British, I think
18:51:15 <ais523> and there's no particular reason why BBC America would synchronize to the BBC in the UK
18:51:17 <elliott__> ais523: "I think" -- come on, you can't forget the person who IS ALSO FROM FUCKING HEXHAM
18:51:25 <elliott__> You cannot forget this fact because it is the most shocking fact.
18:51:26 <ais523> elliott__: that doesn't mean he's British, technically speaking
18:51:36 <ais523> just that he was currently in England a few days ago
18:52:09 <elliott__> Wow, xfce-panel is really unstable on this... Ubuntu beta ;P
18:52:14 <HackEgo> delinndt prebionimiulla che antnevorsan yallir terlidulha inenatioseri ke unly flchris deri herces garieding mel maxallagol dov jthriges yar breezed kudisj raltpassan oomber ego clandpo hymsd dhik pre vo searrer comen hinesordritheddryetheummsqmenters abacan esan irdellan er fwengparobalsperidabse kovskya kwaranive heldictebkoth
18:58:42 -!- esowiki has joined.
19:04:43 -!- esowiki has joined.
19:05:19 -!- esowiki has joined.
19:08:35 -!- glogbot has joined.
19:10:34 -!- lambdabot has quit (Ping timeout: 260 seconds).
19:11:41 -!- Gregor` has joined.
19:11:41 -!- Gregor has quit (Ping timeout: 255 seconds).
19:12:45 -!- HackEgo has quit (Ping timeout: 252 seconds).
19:12:45 -!- HackEgo has joined.
19:13:01 <Vorpal> elliott__, come on you do random strings too
19:13:16 <Vorpal> also what is up with the __? Are you the other elliott hird from Hexham?
19:16:19 -!- esowiki has joined.
19:17:10 -!- esowiki has joined.
19:18:06 -!- esowiki has joined.
19:18:06 -!- glogbot has joined.
19:24:42 -!- lambdabot has joined.
19:30:45 -!- oerjan has joined.
19:33:26 -!- plycke has joined.
19:34:46 -!- plycke has quit (Excess Flood).
19:34:46 <elliott__> someone came in and exsessed esodesdflooded
19:37:41 <Vorpal> heh, witcher 2 2.0 patch is over 750 MB large.
19:37:59 <Vorpal> Phantom_Hoover, ouch. Frozen Synapse is an awesome game btw.
19:38:07 <Phantom_Hoover> I don't know why I even bothered; nothing works on this system.
19:40:03 <Vorpal> Phantom_Hoover, oh you had intel? Forget trine then. Won't work
19:40:03 <elliott__> Phantom_Hoover: You only tried it once?
19:40:03 <Vorpal> Phantom_Hoover, try it two times on startup at least
19:40:03 <Vorpal> Phantom_Hoover, what is the backtrace? Anyway report a bug
19:40:03 <Phantom_Hoover> 0xf69d8936 in glGenLists () from /usr/lib32/libGL.so.1
19:40:03 <Phantom_Hoover> #0 0xf69d8936 in glGenLists () from /usr/lib32/libGL.so.1
19:40:03 <Phantom_Hoover> #3 0x08281fc3 in PsychoffManager::PsychoffManager() ()
19:40:03 <Phantom_Hoover> #4 0x0828683d in ConcreteClassRep<PsychoffManager>::create() const ()
19:40:06 <Vorpal> don't you know any gdb?
19:43:06 -!- esowiki has joined.
19:43:06 -!- glogbot has joined.
19:43:06 -!- glogbackup has left.
19:43:23 <CakeProphet> when you declare a variable with default auto storage.
19:43:26 <elliott__> Vorpal: The most professional techer.
19:43:33 <elliott__> Expert in thick adults, distinctions, fruit pickers.
19:43:51 <olsner> the result of a variable?
19:44:06 -!- brisingr has left.
19:44:17 <Vorpal> yes presumably as in executing the bit pattern in the variable in question using some inline asm and jumping
19:44:43 <CakeProphet> I'm just TRYING TO FIGURE OUT WHERE THIS GARBAGE IS COMING FROM AUUUGH
19:45:00 <olsner> the garbage comes from your code, obviously :)
19:45:46 <Vorpal> CakeProphet, you mean like this:
19:45:50 <elliott__> returning a reference to a local variable
19:46:01 <elliott__> and Blah allocates like storage on the stack or whatever
19:46:20 <CakeProphet> elliott__: that's if you're returning a reference though correct?
19:46:23 <Vorpal> elliott__, that works in C for a struct?
19:46:28 <CakeProphet> not just returning the value. it makes a copy then right?
19:46:36 <elliott__> Vorpal: Because we're talking about C!
19:46:39 <olsner> CakeProphet: Blah, when copied, could have references to other stuff
19:46:51 <olsner> stuff that is about to go *poof*
19:46:53 <Vorpal> elliott__, yes but I would expect it to work for C++ as well in this case
19:47:13 <CakeProphet> I don't think that's the problem here but it might be.
19:47:38 <Vorpal> CakeProphet, what is the class you are trying to return?
19:47:39 <olsner> or rather, about to have nothing at all happen to it until some later random time
19:47:54 <CakeProphet> the only thing I share between functions is strings. So my tree stuff is safe from being deallocated with the stack frame.
19:48:25 <Vorpal> elliott__, hm right, guess you need to invoke a copy constructor or some such mess
19:50:00 <olsner> I think... if you don't know for sure that you aren't returning references to dead stuff, you probably are
19:50:34 <CakeProphet> could a string contain a reference to something in one of my stack frames?
19:50:43 <Vorpal> CakeProphet, a std::string? Probably
19:54:07 -!- esowiki has joined.
19:54:22 -!- esowiki has joined.
19:56:00 -!- esowiki has joined.
19:56:00 -!- glogbot has joined.
19:56:05 <Vorpal> and yes contact them and report the issue.
19:56:10 <elliott__> Phantom_Hoover: They'll probably be receptive to forwarding it on and the like.
19:56:14 <Vorpal> I did with an earlier game, and it helped
19:56:15 <elliott__> Easier than going to the developers directly.
19:56:16 <Phantom_Hoover> cheater, the leetspeak really puts across the full force of what you're saying.
19:56:29 <Vorpal> Phantom_Hoover, just ignore him
19:56:35 <elliott__> Never has calling someone a loser been such a self-deprecating remark.
19:56:36 <ais523> elliott__: how OnLive works? basically, it's just a VNC connection to a games console (or PC set up as one)
19:56:41 <cheater> i'm glad we agree on that point Phantom_Hoover
19:56:42 -!- Zetro has joined.
19:56:52 <ais523> oh, you're just not sure /if/ it works?
19:56:54 <elliott__> ais523: I want to know /how/ it works, because it was pretty conclusively proven to be unworkable before it came out
19:57:10 <elliott__> and it seems the answer is just (a) yes, it's bad, (b) but connections are fast enough nowadays that it works OK
19:57:17 <Vorpal> ais523, similar, but a bit smarter iirc. Like video compression algorithms selected to work well for games and so on.
19:57:34 -!- Gregor has joined.
19:57:45 <elliott__> Phantom_Hoover: http://www.humblebundle.com/contact
19:58:02 <elliott__> Phantom_Hoover: You might also try getting a twutter and twatting at them, since that account is very active and responds to tweets a lot.
19:58:16 <ais523> what does it say about me that I saw "l0z3r" and thought "that's incorrectly spelt because it's a short o"?
19:58:30 <ais523> as in, I'd have expected "l00z3r" or even "l%z3r"
20:00:16 <ais523> I think I learnt text-speak compression back when it was about saving characters rather than being leet, or understandable
20:00:16 <ais523> elliott__: yes, back when SMS had only just been invented
20:00:16 <elliott__> But it originates as false posturing bullshit
20:00:16 <Vorpal> elliott__, uh SMS can be multi-message thingies
20:00:16 <ais523> I'm thinking of early by-hand SMS compression schemes
20:00:16 <Vorpal> elliott__, uh, don't you usually get a crapload of free SMS / month?
20:00:16 <ais523> rather than script kiddie speak
20:00:16 <Vorpal> CakeProphet, glibc detected?
20:00:16 <elliott__> Which are (a) recent (b) expensive
20:00:16 <Vorpal> CakeProphet, that means you messed up glibc's internal state by memory access bugs
20:00:16 <cheater> i.bet.that.ais.wrote.all.his.sms.like.this
20:00:16 <elliott__> CakeProphet: That means one of glibc's malloc structures was corrupted.
20:00:17 <Vorpal> CakeProphet, use valgrind, I told you
20:00:21 <elliott__> cheater: Yes, because dots are smaller than spaces.
20:00:23 <Vorpal> CakeProphet, using freed stuff
20:00:24 <ais523> cheater: I did, vacuously (I've never sent a text message)
20:00:28 -!- variable has quit (Excess Flood).
20:00:39 <CakeProphet> okay so then something is obviously freeing.
20:00:42 <Vorpal> <elliott__> cheater: Yes, because dots are smaller than spaces. <-- not in byte count
20:00:44 <CakeProphet> solution: dynamically allocate everything.
20:00:52 <ais523> I have used borrowed mobile phones on occasion, but very rarely and only to make voice calls
20:00:55 <Vorpal> CakeProphet, USE VALGRIND
20:01:03 <cheater> Vorpal: in many layouts a dot was easier to type than a space.
20:01:21 <ais523> CakeProphet: because valgrind is a tool designed to solve this sort of problem
20:01:29 <Vorpal> CakeProphet, it will tell you WHERE the issue is
20:01:30 <ais523> and thus likely gives more useful results than a tool designed, say, to make tea
20:01:39 <elliott__> ais523: OTOH, the other tool will give you some tea.
20:01:40 <Vorpal> CakeProphet, seriously, if you have a memory bug just use valgrind.
20:07:15 -!- esowiki has joined.
20:08:21 -!- esowiki has joined.
20:08:31 -!- glogbot has joined.
20:08:32 -!- glogbackup has left.
20:09:37 <ais523> so given that I can't use a debugger, what am I supposed to do? fill valgrind with printf statements?
20:10:50 <CakeProphet> I believe when you put a variable declaration inside a for loop, it destructs the previous value upon constructing the next one in the iteration.
20:10:50 -!- Gregor has quit (Remote host closed the connection).
20:10:50 <Vorpal> ais523, bisect on secret project to find what change introduced the valgrind breakage?
20:10:50 <ais523> CakeProphet: what do you think the bit before the first ; in the for loop is for
20:10:50 <elliott__> CakeProphet: Because otherwise it'd leak memory like a sieve?
20:10:50 <ais523> Vorpal: probably all of them
20:11:02 <ais523> the problem is that it needs thousands of lines just to work at all
20:11:08 <Sgeo|web> Sounds like the sort of thing it's easy to make a bug with, then when you see it, you facepalm
20:11:10 <CakeProphet> elliott__: it would construct values until presumably they are all freed at the end of the call.
20:11:12 <Ngevd> Does anyone know of a Unicode character that looks like a time machine?
20:11:24 <CakeProphet> elliott__: I would think. not really a "leak" unless you loop forever.
20:12:26 <Vorpal> CakeProphet, looping forever it perfectly valid in C and C++
20:13:56 <Sgeo|web> Although, considering the GC infection in my brain, I'd assume that it would be destructed at a random later point in time.
20:13:56 <ais523> why would you expect the value to be valid after it's gone out of scope?
20:13:56 <Sgeo|web> elliott__: makes it hard for me to think in terms of C++
20:14:07 <ais523> Sgeo|web: /that/'s your biggest problem with C++?
20:16:19 <Sgeo|web> ais523: no, just in this context of this conversation
20:16:19 <Sgeo|web> I think I may have used C++ once or twice outside of class
20:16:19 <CakeProphet> ais523: I thought automatic storage lasted until the end of the stack frame.
20:16:19 <CakeProphet> but I assume it treats the declaration as a single location and doesn't magically create more upon further iterations.
20:16:34 -!- GreaseMonkey has joined.
20:16:34 -!- GreaseMonkey has quit (Changing host).
20:16:34 -!- GreaseMonkey has joined.
20:16:41 <ais523> it's got nothing to do with stack frames
20:16:58 <ais523> and everything to do with scope
20:17:10 <elliott__> CakeProphet: how would it free them all at the end if it used the same location for each one?
20:17:24 <CakeProphet> elliott__: it wouldn't use the same location is what I'm saying.
20:18:13 <CakeProphet> just the same name. in the code. that isn't the object code.
20:19:07 <ais523> when something's out of scope, how do you expect to be able to refer to it?
20:19:07 <ais523> (pointers don't count)
20:19:07 <ais523> (because you explicitly can't use them to do that)
20:19:34 <CakeProphet> because you could if the memory persisted until the end of the stack frame.
20:19:54 -!- lambdabot has joined.
20:19:59 <Ngevd> I think I'll work on Constantinople's successor, Istanbul
20:20:47 <ais523> CakeProphet: <ais523> (pointers don't count)
20:20:47 <Ngevd> Either that or a Nandypants implementation
20:20:47 <ais523> why do you think that stack frames exist?
20:20:47 <CakeProphet> ais523: why do they not count? does C and C++ not have pointers?
20:20:59 <ais523> there was a debate in comp.lang.c about whether C implied that a stack had to exist or not
20:21:06 <ais523> I forget the result, but there was considerable doubt about it
20:21:22 <CakeProphet> fine "persists until the end of the function call"
20:21:54 <CakeProphet> it's possible. and you could refer to things out of scope via pointers.
20:22:16 <ais523> it'd just give very little benefit, as it'd inherently cause a memory leak whereever you had a loop
20:22:26 <Ngevd> Or possibly something else entirely
20:22:52 <CakeProphet> I suppose in the most common cases you really don't want that to happen.
20:23:44 <ais523> CakeProphet: also, there's a nonstandard but very commonly existing function that does exactly what you want, called alloca
20:24:12 <ais523> you might want to think about /why/ it's nonstandard
20:24:59 <ais523> because it can't be implemented on every system in existence
20:25:07 <ais523> I've worked on systems where the stack was 8 bytes long, they still had C compilers
20:25:22 <ais523> they didn't allow recursion, though, contrary to the standard
20:25:25 <CakeProphet> good thing my professor doesn't have one of those then.
20:25:29 <ais523> because they had to allocate auto storage in globals
20:25:43 <ais523> well, the point is that C is designed to work on that sort of system
20:25:55 <Sgeo|web> What would be the point of persisting it like tha?
20:26:06 <ais523> because you have to put the memory /somewhere/?
20:26:11 <ais523> and you don't have a stack?
20:26:16 -!- Guest35901 has quit (Changing host).
20:26:17 -!- Guest35901 has joined.
20:26:21 <ais523> globals is the next best option, as they're easier to use than heap space
20:26:23 <Sgeo|web> I mean, the way CakeProphet wants
20:26:27 <fizzie> alloca is also a hairy function; it might not be possible to call foo(x, alloca(42), y) because the alloca'd memory would be in the middle of the function arguments.
20:26:31 -!- Guest35901 has changed nick to variable.
20:26:38 <ais523> fizzie: that's another good reason, indeed
20:26:47 <CakeProphet> so I can be lazy and not have to free all the stuff I'm making I can just say "hey go away after this call plz"
20:28:15 <fizzie> Heh, glibc documentation has *almost* the same example.
20:28:21 <fizzie> "Do not use alloca inside the arguments of a function call--you will get unpredictable results, because the stack space for the alloca would appear on the stack in the middle of the space for the function arguments. An example of what to avoid is foo (x, alloca (4), y)."
20:28:43 <fizzie> They add their silly space after the function name, and use a boring 4 instead of an overused 42, but other than that even the x and y match.
20:29:10 <oerjan> <Phantom_Hoover> http://www.reddit.com/r/askscience/comments/kv91b/discussion_thread_promising_ftl_neutrino/
20:29:39 <variable> fizzie: they also give an example of what you don't want to do. How many people do you think will see the code and just copy it ?
20:29:56 <fizzie> Another equally funky sharp corner: "Note: If you mix use of alloca and variable-sized arrays within one function, exiting a scope in which a variable-sized array was declared frees all blocks allocated with alloca during the execution of that scope."
20:30:06 <ais523> I know what causes that one
20:30:12 <Vorpal> fizzie, that alloca should work on platforms that pass the arguments in the registers right?
20:30:18 <ais523> it's because VLAs obey scoping rules and alloca doesn't
20:30:23 <oerjan> what. i thought it was obvious that they used GPS for this...
20:30:41 <fizzie> Vorpal: Sounds likely, but not something sensible people would rely on.
20:31:28 <oerjan> elliott__: i just don't see how this guy comes up with the idea that they would synchronize the clocks and then separate them.
20:31:28 <pikhq> Of course, alloca is a non-standard extension, so who gives a fuck. :)
20:31:32 <ais523> oerjan: how do you allocate memory with GPS?
20:31:38 <variable> The alloca() function is slightly unsafe because it cannot ensure that the pointer returned points to a valid and usable block of memory
20:31:42 <elliott__> oerjan: um that was agreed upon no?
20:31:54 <variable> is it literally just manipulating %rsp ?
20:31:59 <pikhq> variable: alloca() is slightly unsafe because neither C nor POSIX requires it to exist.
20:31:59 <ais523> variable: nor can malloc() on many modern systems
20:32:06 <Vorpal> windows supports mounting filesystems to directories but not bind style mounts I guess?
20:32:09 <ais523> pikhq: it has no defined error behaviour
20:32:14 <oerjan> elliott__: i've just read that reddit intro yet
20:32:21 <ais523> I /think/ in practice it typically sigsegvs
20:32:32 <ais523> variable: luckily that one's fixable nowadays, you can write 2 to the overcommit control
20:32:32 <pikhq> ais523: It has no defined behavior at all, in fact.
20:32:40 <elliott__> variable: Linux's overcommit behaviour isn't bad because of what it causes malloc()s return to be
20:32:46 <ais523> pikhq: it has a man page, that's some sort of definition
20:32:48 <elliott__> it's bad because how it handles OOM is terrible
20:32:50 <Vorpal> pikhq, another issue with alloca: What about the red zone thingy on x86-64
20:32:54 <Vorpal> how does alloca interact with that
20:33:06 <pikhq> Vorpal: Probably "poorly".
20:33:11 <variable> elliott__: I've seen a Linux system run the OOM killer because it wanted more disk cache ...
20:33:15 <Sgeo|web> Do most prepackaged server thingies disable OOM killer?
20:33:18 <Vorpal> pikhq, but VLAs still work I presume?
20:33:34 <Vorpal> pikhq, anyway, it has to work, or code would crash all the time
20:33:36 <elliott__> variable: Like I said, Linux's overcommit behaviour is unreasonable, but not because of malloc() being able to return an invalid pointer.
20:33:42 <Sgeo|web> Huh? When is Linux's OOM killer thingy good?
20:33:56 <CakeProphet> another issue with alloca might be that it doesn't call a constructor.
20:34:01 <variable> Sgeo|web: without it running out of memory would cause a kernel oops IIRC
20:34:26 <variable> elliott__: true, I didn't disagree
20:34:28 <pikhq> Vorpal: Oh, hrm, it works just fine. The "red zone" is just a fixed area of the stack that the function is able to use for its own temporary data.
20:34:36 <fizzie> Vorpal: I don't see why just incrementing %rsp to snarf some more space on the stack would really matter red-zone-wise; there's still the 128 bytes after it that "other things" won't touch.
20:34:59 <CakeProphet> so how could I allocate something with alloca and then initialize it?
20:35:06 <Sgeo|web> I'd rather "running out of memory" cause malloc to return NULL. Are there other circumstances in which memory would attempt to be allocated, and fail, and there be no alternative to a kernel oops, such as the requesting application crashing?
20:35:21 <pikhq> Vorpal: 128 bytes above the "top" of the stack is just space the current function can use as it sees fit without any concern at all.
20:35:29 <oerjan> <elliott__> oerjan: um that was agreed upon no? <-- btw it is impossible from your comment to deduce either what "that" is or who agreed and where.
20:35:43 <elliott__> I meant that the separation thing was agreed to have happened
20:35:44 <fizzie> CakeProphet: Placement new? (That thing is pretty horrible, but it's what you do when you have a custom memory allocator.)
20:35:56 <fizzie> CakeProphet: There is utterly no way to get the destructors automatically called, though.
20:36:02 <Vorpal> <pikhq> Vorpal: Oh, hrm, it works just fine. The "red zone" is just a fixed area of the stack that the function is able to use for its own temporary data. <-- I know what it is
20:36:16 <Vorpal> pikhq, the issue was the alloca/red zone data interaction possibilities
20:36:19 <Vorpal> that I were considering
20:36:32 <pikhq> It'll do precisely nothing, the function will just need to make sure not to trample on *itself*.
20:36:54 <pikhq> CakeProphet: You pass new an address.
20:36:54 <Vorpal> pikhq, I guess gcc avoids using the red zone for variables if alloca is used in that function
20:37:45 <fizzie> CakeProphet: Thing* thing = new(place) Thing(); where 'place' is either a void* or an object with an operator new.
20:38:02 <CakeProphet> excellent. let's see how much I break everything.
20:38:28 <oerjan> <elliott__> I meant that the separation thing was agreed to have happened <-- ok maybe as an extra check. i'd expect GPS to be better and more ongoing, anyway.
20:38:38 <fizzie> Putting C++ objects into alloca() memory sounds like the worst idea, esp. because of the destructors.
20:38:43 <elliott__> oerjan: does gps have even remotely the required accuracy?
20:39:29 <CakeProphet> stack<char> *new_stack = new(alloca(sizeof(stack<char>)))stack<char>;
20:39:57 <Vorpal> CakeProphet, why the fuck are you doing that
20:40:07 <fizzie> CakeProphet: Oh, you're putting a *STL container* on alloca() memory? That's... uh... what's the polite way to put this? "Rather daring"?
20:40:09 <pikhq> Also essentially indistinguishable from sticking it on the stack.
20:40:18 <pikhq> Y'know, because that's what alloca does.
20:40:21 <fizzie> pikhq: Except it won't be destructed and will therefore leak.
20:40:35 <pikhq> fizzie: Iff it has its own dynamic memory allocation.
20:40:47 <pikhq> ... As is common in C++.
20:40:48 <fizzie> And stack<char> is sort-of likely to.
20:40:53 <elliott__> CakeProphet: Do you really think that will finish your memory problem?
20:41:20 <Sgeo|web> Except, gathering from all this, "a bad idea"
20:41:24 <Vorpal> CakeProphet, this path you are investigating currently is probably NOT going help you at all
20:41:54 <pikhq> Sgeo|web: "void *alloca(size_t);" is a nonstandard but somewhat common extension. It allocates on the stack
20:42:30 <Sgeo|web> So it will seem to be automatically collected?
20:42:38 <Sgeo|web> From the programmer's point of view?
20:42:38 -!- derdon has joined.
20:42:55 <ais523> it'll seem to be freed at the end of the function, from the programmer's point of view
20:43:00 <ais523> this is not nearly the same thing
20:43:11 <Sgeo|web> End of the function, or end of scope?
20:43:17 <pikhq> End of the function.
20:43:20 <Ngevd> Lambdabot has all the MIBBLLII combinators
20:43:48 <CakeProphet> well it would be useful if it called destructors as well.
20:44:15 <CakeProphet> I actually don't care if this program leaks I just want to get it working.
20:44:19 <pikhq> CakeProphet: Not really. You realise that this is pretty close to the behavior of just creating a normal C++ object on the stack, right?
20:44:23 <ais523> Sgeo|web: think of it as "end of the scope is pretty easy to do already"
20:44:39 <fizzie> Yes; for a fixed-size object alloca() is really quite pointless.
20:44:56 <CakeProphet> pikhq: yes except I can't do it within a loop and iteratively allocate on the stack.
20:45:17 <Sgeo|web> It is? I mean, for fixed-size, yes, but what about size known only at runtime, how is that easy to do in scope?
20:45:28 <Sgeo|web> I mean, I guess you could call free()
20:45:43 <pikhq> Sgeo|web: In ISO C, trivial; variable-length arrays.
20:45:53 <oerjan> <elliott__> oerjan: does gps have even remotely the required accuracy? <-- GPS is based on sending radio waves with time encoded. if it didn't have enough accuracy for _time_ it wouldn't have enought accuracy for the distance.
20:46:31 <CakeProphet> uh.... why the fuck does stack::pop call a destructor.
20:46:57 <pikhq> Also, isn't GPS time based on literally hooking an atomic clock up to a radio and putting it in orbit?
20:47:06 <CakeProphet> yes, I just popped something from a stack, obviously I don't want to use it anymore.
20:47:07 <Ngevd> > (.)(join (.))(ap (.) (join (.)))(+1)(0)
20:48:17 <CakeProphet> I guess I'll just start using a stack of pointers to get around that.
20:48:22 <fizzie> CakeProphet: Of course stack has to call the destructor, since it owns the objects in it. If you want to manage that ownership manually, put some pointers into that stack or something.
20:49:07 <oerjan> pikhq: i'm not sure if it literally has an atomic clock, but it's definitely synchronized with them
20:49:56 <CakeProphet> During startup program terminated with signal SIGSEGV, Segmentation fault.
20:50:15 <Ngevd> > (flip id)(join (.))(ap (.) (join (.)))(+1)(0)
20:50:33 <pikhq> oerjan: It apparently literally does.
20:52:32 <CakeProphet> maybe my computer is punishing me for being naughty.
20:53:03 <CakeProphet> just good old new-and-forget memory management
20:53:27 <Vorpal> pikhq, yes GPS satellites have atomic clocks onboard
20:54:03 <Ngevd> I think lambdabot is dead
20:54:20 <Vorpal> Ngevd, you put a space in front of the > duh
20:54:46 <oerjan> <Ngevd> IT IS MY OPINION THAT GEOM IS NOT TURING COMPLETE
20:54:54 <oerjan> my impression is that it probably is.
20:54:57 <CakeProphet> ==28425== Stack overflow in thread 1: can't grow stack to 0x7fe7b0fc0
20:54:58 <CakeProphet> ==28425== Process terminating with default action of signal 11 (SIGSEGV)
20:55:11 <Vorpal> Ngevd, it is flipping obvious in a monospace font, and if you are not using a monospace font for irc: wtf are you doing
20:55:21 <CakeProphet> If you believe this happened as a result of a stack
20:55:21 <CakeProphet> ==28425== overflow in your program's main thread (unlikely but
20:55:32 <Vorpal> CakeProphet, you are doing so stupid things now I'm just going to ignore it.
20:55:33 <oerjan> provided definitions can be recursive, you have an ordinary stack and a call stack, and can probably implement a tape with those
20:55:44 <CakeProphet> Vorpal: I stopped using alloca what more do you want?
20:55:53 <Vorpal> CakeProphet, huh what did you do then
20:56:10 <Vorpal> CakeProphet, well.. there you are
20:56:14 <CakeProphet> because memory leaks are not an issue in this program.
20:56:33 <Vorpal> CakeProphet, Correctness is more important than Simplicity
20:56:58 <CakeProphet> Vorpal: this is a program for a data structure class. I would just like to get it to work for the moment.
20:57:12 <CakeProphet> and right now I am apparently getting a stack overflow except there's no stack?
20:57:34 <Vorpal> there is the program stack
20:57:45 <Vorpal> are you doing recursive calls?
20:58:04 <Ngevd> > (flip id)(join (.))(ap (.) (join (.)))(+1)(0)
20:58:10 <CakeProphet> well I recursively show a tree but that's not the problem I think?
20:58:24 <Vorpal> Ngevd, obviously removing the space in front is better yes
20:58:25 <ais523> stack overflow generally means you did a recursive infinite loop without tailcalling
20:58:33 <ais523> well, with an infinite number of non-tail calls
20:58:33 <Vorpal> CakeProphet, you could have infinite recursion due to a bug
20:58:40 <CakeProphet> Access not within mapped region at address 0x7FE7B0FB8
20:58:41 <CakeProphet> ==28425== at 0x4A2359C: _vgnU_freeres (vg_preloaded.c:58)
20:58:57 <CakeProphet> there is literally no call stack in backtrace
20:59:30 <CakeProphet> yes okay now it's a stack overflow from my tree :P
20:59:31 -!- Ngevd has quit (Quit: what a big quitter he is, eh?).
21:01:00 <fizzie> Incidentally, if you want a heap-allocated object that gets destroyed as it goes out of scope, auto_ptr is the C++ way.
21:01:28 <fizzie> (It's not until-end-of-function though.)
21:01:34 <CakeProphet> "goes out of scope" how is that different from a regular auto variable?
21:01:46 <Vorpal> CakeProphet, it is on the heap
21:02:18 <CakeProphet> I have many things I want to construct a runtime, there is not a constant number of them.
21:02:33 <Sgeo|web> Is auto_ptr saner than alloca?
21:03:11 <Vorpal> CakeProphet, when fizzie says "Incidentally" the thing he metions may or may not be directly related to the problem at hand
21:03:35 <CakeProphet> I'm just wondering what tangible difference being on the heap instead of the stack makes.
21:03:48 <fizzie> You can put e.g. a pointer to a sized-at-runtime array into an auto_ptr.
21:03:54 <elliott__> but lots of containers will allocate on the heap anyway
21:03:57 <elliott__> and just hold some pointers on stack
21:04:07 <elliott__> so it's not noticeable in C++ that the stack is small much
21:05:06 <olsner> technically, I think "auto variable" is correct... but I find it a bit weird to specify the auto every time
21:05:23 <fizzie> CakeProphet: It also helps in exception-related memory leaks when you actually want to allocate on heap so that you can later give ownership of the thing to someone else and have it survive your scope.
21:05:28 <olsner> sounds like a throwback to the times when the difference between register and auto variables was actually relevant
21:05:33 <Vorpal> olsner, auto int foo; is certainly valid C if that is what you mean. Probably valid C++ too
21:05:41 <olsner> sure, but the auto is meaningless
21:05:50 <Vorpal> olsner, yes because it is the default
21:06:17 <olsner> you can have volatile auto int too
21:06:23 <Sgeo|web> I'd unplug laptop, but this thing loses charge very quickly
21:06:30 <Vorpal> Sgeo|web, so shut it down?
21:06:39 <olsner> auto is like register and static, volatile is like const
21:06:43 <CakeProphet> olsner: it makes sense to specify auto variable when we're talking about different ways/places to store variables.
21:07:51 <Vorpal> olsner, though GCC probably has an extension that assigns auto static volatile register some insane meaning XD
21:07:59 <fizzie> CakeProphet: "Thing* t = new Thing(); t->splurt(); return t;" will leak if Thing::splurt throws an exception; "std::auto_ptr<Thing> t = new Thing(); t->splurt(); return t.release();" will not.
21:08:12 <variable> olsner: volatile has no required meaning though
21:08:13 <Vorpal> sorry, auto static volatile register const
21:08:23 <variable> compilers _can_ use it but it is completely implementation defined
21:09:02 <Vorpal> variable, wrong. At least for C99 it has a sense for a specific type wrt signals
21:09:06 <olsner> CakeProphet: if you just say variable, I'd say that's always an auto variable unless otherwise stated (e.g. as "static variable")
21:09:08 <CakeProphet> so I could write a compiler that stores volatile variables on floppy disks? and still be standard?
21:09:25 <olsner> variable: good nick for this discussion
21:09:56 <elliott__> CakeProphet: you could write a compiler that did that for normal variables.
21:10:01 <elliott__> variable: how do youa void getting pinged all the time
21:10:14 <CakeProphet> elliott__: auto is completely implementation defined then? or is that not what you're saying?
21:10:27 <variable> Vorpal: I wasn't aware it changed in C99
21:10:37 <variable> elliott__: I don't really. I just ignore pings in certain channels
21:10:46 <Vorpal> variable, right, I don't have a copy of C89 so can't checkthere
21:10:48 <fizzie> It's not *completely* implementation-defined for other types than sig_atomic_t either; the standard gives a lot of very vague and unclear text about access to a volatile variable, which doesn't really mean anything concrete.
21:11:06 * Sgeo|web risks his Lubuntu setup in the hopes of being able to do homework
21:11:10 <Vorpal> variable, it is wrt sig_atomic_t
21:11:37 <Sgeo|web> If I use a backport repository designed for 10.04 on 11.04, what's the worst that can happen?
21:11:41 <Vorpal> <elliott__> variable: how do youa void getting pinged all the time <-- same way I survive in #nethack?
21:11:54 * variable reads https://www.securecoding.cert.org/confluence/display/seccode/SIG31-C.+Do+not+access+or+modify+shared+objects+in+signal+handlers
21:12:03 <elliott__> "Vorpal" isn't that common in NetHack.
21:12:08 <elliott__> "variable" is in programming channels.
21:12:16 <Vorpal> elliott__, it happens a lot in #nethack though
21:12:27 <CakeProphet> I apologize for the stupidness. I'm still getting accustomed to C++
21:12:47 <olsner> Sgeo|web: cthulhu might wake? or whatever it is cthulhu does/will do
21:12:49 <elliott__> Vorpal: Not nearly as much as variable in a programming channel.
21:13:07 <elliott__> You should go back to AnMaster it's way easier to make fun of.
21:13:28 <Deewiant> elliott__: Disabling pinging for "variable" but not "variable[,:]" should help
21:13:48 <elliott__> Deewiant: I don't think telnet can do that.
21:14:02 <Deewiant> I don't think telnet does pinging at all
21:14:31 <olsner> telnet can ping you and eat your children and everything
21:14:39 * Sgeo|web goes to download Lucid binaries on Natty
21:15:05 <Vorpal> CakeProphet, prove it formally
21:15:06 <variable> CakeProphet: any kmods may not work correctly. Also random binaries may not work (if the ABI changed)
21:15:08 <elliott__> Deewiant: Then that's how variable solves it
21:15:16 <elliott__> variable: Sgeo|web, not CakeProphet
21:15:28 <elliott__> And the problem is more mismatched dependencies...
21:15:45 <CakeProphet> okay so now that it works time to implement proper memory management
21:15:48 <Sgeo|web> Not doing kmods. This is mono stuff
21:16:27 <Deewiant> class (Eq e, Ord e, Read e, Show e, Ord s, Read s, Show s, Monad m) => Entity e s d p m | e -> s, e -> d, e -> p, e -> m where
21:16:48 <elliott__> I was about to launch into a "you don't want a typeclass" rant
21:16:52 <Deewiant> It's http://hackage.haskell.org/packages/archive/GA/1.0/doc/html/GA.html
21:17:07 <Deewiant> (Via http://www.reddit.com/r/haskell/comments/kvnep/ga10_a_haskell_library_for_working_with_genetic/ )
21:17:15 <olsner> hmm, shouldn't those fundeps just be e -> s d p m
21:17:20 <olsner> I wonder if there's a difference
21:17:43 <elliott__> Deewiant: I was going to rewrite it as a data type but it's way too big for me to bother
21:18:13 <elliott__> data used to score an entity, e.g. a list of numbers (d)
21:18:14 <fizzie> If you want to spawn an undefined number of objects in a loop, just new them and put the pointers in a container, or alternatively let the container allocate them (though that may end up doing a lot of copy constructor invocation).
21:19:17 <CakeProphet> I wonder if my professor knows what alloca does.
21:19:22 <CakeProphet> fizzie: "let the container allocate them" how
21:20:49 <elliott__> http://static.adzerk.net/Advertisers/b4cc0ceaed4342e298cec4ac2158f733.png
21:21:53 <fizzie> CakeProphet: std::vector<Thing> is perfectly capable of managing an arbitrary amount of Things, assuming Thing has the necessary copy constructor, assignment operator, and the third thing I forget.
21:22:07 <CakeProphet> Vorpal: also I can prove that my program is correct formally like so: a) it gives the output my professor wanted when given the professor's test file as input. b) Q.E.D.
21:22:42 <olsner> fizzie: public destructor maybe?
21:23:22 <olsner> I've effectively unlearned everything I've ever knew about STL though
21:24:11 <olsner> (that should of course be "I ever knew" or "I've ever known")
21:24:11 <fizzie> What are you generating objects of, anyhow?
21:24:54 * CakeProphet is converting infix mathematical expressions to postfix to prefix
21:24:56 <olsner> elliott__: I think that's the reaction they want, so that you click the ad in order to find out what it means
21:25:20 <elliott__> olsner: some job bullshit: http://siliconmilkroundabout.com/
21:25:27 <fizzie> Well, that's a standard type, you can put stacks directly into a vector. But it will copy a lot of stacks, unless you happen to get one of those magical compilers that will optimize all tmeporaries away.
21:26:03 <CakeProphet> fizzie: okay so then the dynamically allocated stacks are freed when the vector is freed
21:26:58 <olsner> hmm, so you're really just writing post-order and pre-order traversal of trees? that should be fairly trivial
21:27:36 <CakeProphet> I use shunting-yard algorithm to convert to postfix
21:28:01 <CakeProphet> ==28796== definitely lost: 2,336 bytes in 34 blocks
21:28:02 <CakeProphet> ==28796== indirectly lost: 18,048 bytes in 44 blocks
21:28:05 <fizzie> If you have vector< stack<X> > the vector will own the stacks and will take care of destroying them when the vector is destroyed.
21:30:17 -!- GreaseMonkey has quit (Quit: The Other Game).
21:30:36 <fizzie> In that case though it's probably best to put the stacks directly into the vector when empty, only use references to them and not temporary "stack<X>" objects, and it will still allocate-copy-destroy whole stacks around as the vector grows, probably.
21:30:48 <olsner> "The shunting yard algorithm can also be applied to produce prefix notation (also known as polish notation). To do this one would simply start from the beginning of a string of tokens to be parsed and work backwards, and then reversing the output queue (therefore making the output queue an output stack)."
21:31:10 -!- sllide has joined.
21:31:20 <elliott__> olsner: No clearly CakeProphet has to parse it into a tree that's so much simpler.
21:31:37 <olsner> "start at the beginning and work backwards" is a curious instruction though
21:32:00 <CakeProphet> "start from the beginning of a string of tokens and work backwards" what?
21:32:18 <olsner> but it's probably obvious if you know how to work the shunting yard
21:32:39 <CakeProphet> elliott__: I don't recall you mentioning that there was a better way when I was talking to you about it earlier.
21:32:47 <elliott__> CakeProphet: Yah, I even implemented it
21:32:52 <elliott__> But then you got impatient and weren't interested
21:33:02 <olsner> but the obvious way is 1. parse tree, 2. print tree
21:33:18 <CakeProphet> s/got impatient and weren't interesting/had to go to class/
21:33:19 <elliott__> he's using shunting yard first for no reason
21:33:51 <CakeProphet> well one reason is that my professor wanted me to "use stacks"
21:34:05 <elliott__> <olsner> "The shunting yard algorithm can also be applied to produce prefix notation (also known as polish notation). To do this one would simply start from the beginning of a string of tokens to be parsed and work backwards, and then reversing the output queue (therefore making the output queue an output stack)."
21:37:24 <olsner> elliott__: I wanted to point out that shunting yard could apparently be used to solve the problem directly instead of just using it to build a tree
21:37:26 <Sgeo|web> iirc, Vala uses reference counting, but has language features intended to help reduce the pain?
21:37:56 <olsner> queues and stacks are irrelevant to me
21:38:02 <CakeProphet> I'm still not clear on what it means from start at the beginning and workbackwards.
21:38:10 <elliott__> olsner: Right, that's what I'm saying
21:38:17 <elliott__> CakeProphet: It means start at the end and work backwards
21:38:54 <CakeProphet> elliott__: I am beginning to think that you think almost everything is obvious.
21:39:11 <elliott__> You might just be especially unobservant
21:39:19 <olsner> so you can just reverse the input, run the shunting yard algorithm, then reverse the output?
21:39:22 <elliott__> That's more likely since it paints me in a better light
21:39:29 <elliott__> olsner: or just use a stack instead of a queue for the output
21:39:32 <elliott__> and avoid the translation entirely
21:39:38 <elliott__> and just use a backwards iterator or w/e to avoid reversing the input
21:39:43 <CakeProphet> reversing the output does not make polish notation.
21:39:53 <olsner> since you're in STL land, you could make a single shunting yard implementation run both backwards and forwards by passing it different iterators for input and output
21:40:08 <CakeProphet> I think I'll just get rid of my tree code.
21:40:18 <elliott__> <CakeProphet> reversing the output does not make polish notation.
21:40:23 <elliott__> it does if you process your input backwards too
21:41:41 <elliott__> http://www.oracle.com/us/corporate/press/503333
21:41:57 <elliott__> http://www.oracle.com/us/corporate/press/503343
21:42:01 <elliott__> ahahaha why are oracle being great
21:43:23 <CakeProphet> what I am great apalled that string has no push_front
21:43:27 <ais523> is that, umm, corporate sarcasm?
21:43:29 <ais523> it's not quite sarcasm
21:43:32 <ais523> but it's the same attitude
21:44:10 <Sgeo|web> WHat's the point of Autonomy pretending not to have wanting to be sold to Oracle and Oracle insisting that yes they did
21:44:49 <elliott__> Autonomy publicly made a misleading statement i.e. that they hadn't been shopped, Oracle corrected them
21:45:27 <Sgeo|web> What's the point of Autonomy making the misleading statement, what did they hope to gain?
21:45:58 <Vorpal> elliott__, why would that guy even deny meeting with Oracle?
21:46:06 <Vorpal> I mean, what does he stand to gain from doing so?
21:46:36 <elliott__> Vorpal: To not be embarrassed by having it in the public sphere that he tried to sell his company to Oracle for too high a price?
21:47:02 <elliott__> Sgeo|web: And because "Oracle are liars, they lied about us" looks better than "we failed to sell our company to Oracle"?
21:47:14 -!- Sgeo|web has quit (Quit: Page closed).
21:47:38 <Vorpal> SgeoN1, why are you using web for irc when it does that stuff all time?
21:48:01 <Vorpal> close by mistake. Saw that several times the last few dyas
21:48:05 <SgeoN1> Also, fuck Chromium for interpreting mouse movement as 'I want to close the tab' all the time
21:48:18 <Vorpal> SgeoN1, just use xchat or something
21:48:22 <ais523> SgeoN1: do you have dwell click turned on?
21:48:34 <SgeoN1> I never heard of that until now
21:48:40 <elliott__> ais523: What is it with you and dwell click :P
21:48:50 <ais523> I have dwell click on the mind~
21:48:56 <ais523> also, I discovered what trailing tilde means
21:48:59 <ais523> when it doesn't mean sarcasm
21:49:07 <Vorpal> ais523, what does it mean?
21:49:10 <fizzie> You are dwelling on dwell click.
21:49:10 <elliott__> ais523: that wasn't nearly terrible enough to suffix with ~
21:49:16 <ais523> unfortunately, I can't figure out how to put it into words, but I'm pretty sure it was appropriate there
21:49:22 <ais523> it's a sort of... light-heartedness indicator
21:49:31 <ais523> not "I'm joking" but "this sentence is informal"
21:49:32 <elliott__> Yes but it only applies to terrible things.
21:49:38 <ais523> not where I've seen it be used
21:49:44 <CakeProphet> elliott__: ah another change to the algorithm is that you have to reverse the roles of parentheses.
21:49:45 <Vorpal> elliott__, you need to use it more then
21:50:29 <Vorpal> CakeProphet, anyway you should handle vararg operators with dependant typing or something like that
21:51:39 <CakeProphet> wow I love how I just wasted like probably 12 hours of my life because I a) didn't go to class when the professor explained how to convert infix to prefix b) didn't read the Wikipedia article on shunting yard thoroughly enough
21:51:51 <ais523> is there such a thing as independent typing?
21:52:25 <Vorpal> CakeProphet, you skipped a class?
21:52:39 <fizzie> str.insert(0, 1, 'x') equals the hypothetical str.push_front('x'), though it might not be exactly efficient.
21:52:44 <olsner> Phantom_Hoover: about 3
21:52:47 <ais523> Phantom_Hoover: 5, I'm not sure of the units
21:52:59 <Vorpal> Phantom_Hoover, depends on what you are starting: A train safety system or hello world
21:53:01 <Phantom_Hoover> I like the way you both arrived at the exact same joke.
21:53:04 <Vorpal> the former is much more severe
21:53:06 <elliott__> not critical if it's just your machine
21:53:19 <elliott__> are you reeportgimg with like bugzilla
21:53:31 <CakeProphet> Vorpal: I was skipping class to catch up on projects which I was behind on because I'm also doing freelancing.
21:53:42 <Vorpal> CakeProphet, too much work then, meh
21:53:42 <fizzie> BUGZILLA CRUSHES TOKYO - FILM AT ELEVEN.
21:53:43 <CakeProphet> the point of skipping class was to maintain my grades.
21:53:50 <Vorpal> Phantom_Hoover, so report it there
21:53:51 <elliott__> it will never get fixed Phantom_Hoover
21:54:01 <Vorpal> elliott__, shut up, it might
21:54:11 <Vorpal> I had a bugs in cogs fixed
21:54:13 <ais523> in theory, he paid money for it, so should be able to return it if it didn't work
21:54:18 <elliott__> Vorpal: you stfu, he already was reporting it
21:54:25 <ais523> is it the one where it crashes my GPU and forces a hard reboot?
21:54:37 <Vorpal> ais523, the one that made it crash X11 for me.
21:54:44 <Vorpal> ais523, now it just crashes itself XD
21:54:51 <ais523> Vorpal: hmm, would X subsequently restart? if so, it's not the same as mine
21:54:52 <Vorpal> ais523, I'm on radeon graphics btw
21:55:02 <ais523> Phantom_Hoover: a GPU crash is kind-of obvious, you can't do anything graphical until you hard-reboot
21:55:04 <Vorpal> ais523, it would, I use startx so I had to do that by hand
21:55:12 <ais523> ah, I couldn't even start X after mine
21:55:22 <Vorpal> ais523, it just dumped me into the terminal I ran startx from
21:55:26 <fizzie> I also had a "does not start" bug in And Yet It Moves fixed, but I didn't manage to report it; other people on them forums had already.
21:55:26 <ais523> I'm using Intel graphics
21:55:36 <ais523> AYIM worked fine for me
21:55:47 <CakeProphet> now if I can shorten all of my functions to 15 lines of code I no longer have to write pseudocode for any of them.
21:55:47 <ais523> although it's not an amazing game, and the difficulty curve is annoyingly inconsistent
21:55:50 <Vorpal> AYIM worked fine for me too
21:56:11 <Vorpal> ais523, AYIM is kind of fun though, but yes some parts are utterly hard
21:56:13 <fizzie> The 64-bit AYIM did not work fine for a whole lot of people; but it was fixeded.
21:56:15 <Vorpal> haven't finished it yet
21:56:26 <Vorpal> fizzie, that is the only one that worked for me
21:56:45 <fizzie> Yes, you told me it E_WORKSFORYOU when I was complaining about it not working, before.
21:56:51 <Vorpal> ais523, hammerfight still crashes on loading for me
21:57:01 <Vorpal> works on intel graphics, but VEEEERY slowly
21:57:02 <oerjan> <CakeProphet> elliott__: ah another change to the algorithm is that you have to reverse the roles of parentheses. <-- also reverse the associativity of operators, i think
21:57:22 <Vorpal> ais523, segfault with varying backtrace, sometimes in libGL, sometimes broken stack
21:57:47 <CakeProphet> oerjan: ah yes that too, it's just not a factor for this project because all operators are left-associative.
21:58:31 <Vorpal> CakeProphet, eh, 2 - 4 - 3 would be 2 4 - 3 - in postfix and uh... not sure what it would be in prefix
21:59:17 <Vorpal> lets see.. - 2 - 4 3? I think?
21:59:59 <CakeProphet> I mean to say, associativity of - doesn't come up in any of my test cases.
22:00:14 <oerjan> CakeProphet: if they're all left-associative then when reversing you need to treat them ass right.
22:00:17 <Vorpal> elliott__, think about the tree, a prefix walk would give you what I gave, no?
22:00:37 <Phantom_Hoover> <Vorpal> ais523, segfault with varying backtrace, sometimes in libGL, sometimes broken stack
22:00:43 <Vorpal> elliott__, pretty sure I'm not given the AST and mental walking of it
22:00:45 <elliott__> - two - four three = two - (four - three)
22:00:54 <Phantom_Hoover> I'm getting segfaults in libGL with FS, as it happens.
22:00:59 <ais523> Vorpal: Hammerfight is incredibly buggy for me, anyway, though it works
22:01:09 <ais523> I keep backup savefiles because it often forgets which weapon/armour I have
22:01:18 <Vorpal> ais523, did you get the new bundle btw?
22:01:19 <ais523> and sometimes there are giant explosions that oneshot everything for no obvious reason
22:01:25 <ais523> I haven't yet, I'm not at all sure I want to
22:01:36 <ais523> oh, and there have been several instances of things taking INT_MIN damage
22:01:37 <Vorpal> ais523, you have the frozenbyte bundle already?
22:01:41 <ais523> not to mention crashes
22:01:55 <Vorpal> ais523, INT_MIN? awesome, that gives them like max health?
22:02:03 <Phantom_Hoover> elliott__, fun fact: I don't think I have had any contact with a human at any point in my attempt to report this.
22:02:07 <ais523> which is lucky, or the game would be unwinnable
22:02:20 <ais523> I've taken INT_MIN damage on my own machine on occasion, too
22:02:28 <Vorpal> ais523, technically not unwinable, just utterly hard
22:02:39 <ais523> well, I'd get bored first
22:03:53 <oerjan> <Phantom_Hoover> I offered to help but apparently the fact that I have talked to a Norwegian on the internet does not qualify me to be the Norwegian ambassador. <-- shocking
22:03:57 <CakeProphet> okay so all arithmetic operators are traditionally left-associative yes?
22:04:11 <Vorpal> CakeProphet, not exponentiation
22:04:34 <Vorpal> those tend to be left-associative
22:04:37 <CakeProphet> okay good, so that means I can just change <= to <
22:04:51 <oerjan> / is a little tricky i think. traditionally mathematicians try to use genuine vertical layout there
22:05:23 <Phantom_Hoover> * is tricky too, given that I have never ever seen that used for multiplication in proper mathematical writing.
22:05:48 <CakeProphet> proper mathematical writing is certainly the context.
22:05:51 <Phantom_Hoover> Although it's still left-associative, although it's commutative so it's kind of irrelevant.
22:05:54 <Vorpal> traditionally in programming I assume he meant
22:06:14 <oerjan> so, whatever FORTRAN does :P
22:06:18 <CakeProphet> what? valgrind says that there is a memory leak associated with my alloca call? How can this BE?
22:06:41 <CakeProphet> maybe valgrind just doesn't know how to handle such complex things.
22:07:28 <Vorpal> CakeProphet, what do you alloca()
22:07:33 <elliott__> your professor should fail you for using alloca
22:07:52 <oerjan> nah alloca should be an automatic A, it's in the name
22:07:55 <elliott__> fizzie: pikhq: tell him he's an idiot
22:08:02 -!- pikhq has quit (Ping timeout: 248 seconds).
22:08:05 <Vorpal> CakeProphet, that allocates on the heap and will leak since the destructor won't be called
22:08:09 -!- pikhq has joined.
22:08:16 <Vorpal> CakeProphet, so stop being an idiot and just use normal stack allocation
22:08:23 <CakeProphet> Vorpal: where does it allocate on the heap?
22:08:33 <Vorpal> CakeProphet, in std::stack
22:08:34 -!- sllide has quit (Ping timeout: 255 seconds).
22:08:44 <elliott__> i suggest we don't answer his alloca qs]
22:09:07 <CakeProphet> I might actually learn and correct things.
22:09:16 <CakeProphet> best to just call him an idiot and move on.
22:09:59 <Vorpal> no we didn't. We said "don't"
22:10:24 <CakeProphet> bah now I have to add all of these vector::push_backs
22:11:02 <CakeProphet> also how could I avoid calling copy constructors? also what is a copy constructor?
22:11:09 <oerjan> <Phantom_Hoover> Then it turns out that Hexham is the centre of the coming apocalypse, precipitated by a cross-time war waged with neutrinos? <-- just find the ham and make it stop hexing.
22:11:36 -!- Vorpal has quit (Quit: ZNC - http://znc.sourceforge.net).
22:12:18 <oerjan> hm wasn't that almost the plot of triangle and robert.
22:12:19 <olsner> CakeProphet: if you don't know what they are, you can't and probably shouldn't avoid them
22:14:26 <CakeProphet> olsner: maybe I should learn and then I can and should avoid them?
22:16:57 <oerjan> <elliott__> Thing I just typed instead of MonadTrans: MonadTrams. <-- best method of transport
22:17:04 -!- copumpkin has quit (Quit: Computer has gone to sleep.).
22:17:14 <olsner> CakeProphet: you should learn, yes, but that may not necessarily lead to developing either capability or desire to remove them
22:17:45 <CakeProphet> well I was told that maintaining a vector of stacks to allow them to be freed at the end of the function call would call a lot of copy constructors
22:18:51 <olsner> oerjan: extra funny in swedish: trams means (approx.) nonsense
22:19:25 <CakeProphet> I was thinking I could give the vector auto_ptrs but that doesn't really anything I think..
22:21:18 <CakeProphet> help would using auto_ptr avoid copy constructors?
22:21:47 -!- Phantom_Hoover has quit (Quit: Leaving).
22:21:50 <monqy> watch out with that >>>
22:21:58 <monqy> you could hurt someone
22:22:11 <olsner> using auto_ptr like that would probably rather lead to other problems :)
22:22:27 <olsner> I dunno, I've never used them
22:22:41 <fizzie> Such as it's not safe to put auto_ptr into an STL container.
22:22:43 <CakeProphet> auto_ptr is basically a pointer except that when they destruct they destruct what they point to.
22:23:13 <olsner> think about that for a while, how many times can you destruct something before it ends up dead?
22:23:45 <CakeProphet> but apparently STL containers are not safe for a lot of things so...
22:23:53 <fizzie> Yes, but the vector would end up trying to make copies of it.
22:23:56 <CakeProphet> nevermind I'll just call some copy constructors.
22:24:10 <fizzie> Except that only one copy can own the pointed-to object.
22:24:41 <fizzie> It has a thing where assignment also NULLs the "source" auto_ptr, and the container isn't really equipped to cope with tat.
22:24:56 <CakeProphet> this seems like something that might occur commonly... why not have a special free_list data structure of some kind?
22:25:22 <fizzie> Boost has some "smart pointers" that are container-safe, I believe.
22:25:57 <fizzie> Anyway, you can just do it the old-fashioned way if you want to store plain pointers.
22:26:09 <olsner> CakeProphet: what would that free_list do?
22:26:24 <fizzie> That would make a copy.
22:26:34 <fizzie> Assuming the assumptions.
22:26:34 <CakeProphet> olsner: be like vector but not envoke copy constructors so that you can efficiently free a list of stuff upon free_lists destruction.
22:26:52 <CakeProphet> fizzie: yes I'm ignoring copy constructors. stoped caring.
22:26:52 <Deewiant> C++11 has std::unique_ptr, std::auto_ptr is deprecated
22:27:15 <monqy> invoke or evoke make up your mind?
22:27:20 <monqy> or is that the joke
22:27:25 <monqy> utghghghh so complicated
22:28:01 <fizzie> CakeProphet: If 's' is a stack*, toFree is a vector<stack>, that will make an independent copy of the stack and put that into the vector. It will still be your responsibility to delete s.
22:28:08 <olsner> CakeProphet: what operation do you mean by "free" here, exactly?
22:28:50 <oerjan> http://www.mezzacotta.net/postcard/ :P
22:29:04 <CakeProphet> fizzie: er wait I thought vector could magically delete things for me.
22:29:24 <fizzie> CakeProphet: The vector will delete things it has itself allocated.
22:29:25 <CakeProphet> do I need to maintain vector<stack<char> *> toFree; and then loop through toFree at the end and delete everything?
22:29:40 <CakeProphet> fizzie: I am still really confused as to how vector can allocate things for me.
22:30:45 <olsner> the vector only allocates things for itself, to accomodate the stuff you ask it to copy into it
22:31:21 <CakeProphet> okay I understand this now, my question is how do I use a vector to manage memory?
22:31:32 <fizzie> CakeProphet: vector< stack<char> > staks; for (...) { staks.push_back(stack<char>()); stack<char>& s = staks.back(); /* use s; it lives in the vector */ }
22:31:56 <olsner> meh... understand pointers, then get what vector is doing, read some of the generated assembly code, it will all become apparent in due time :)
22:32:30 <CakeProphet> I was under the impression I had to declare variables to do that.
22:32:39 <olsner> step two doesn't seem to be complete, since it's what we're doing right now afaict
22:32:56 -!- ais523 has quit (Remote host closed the connection).
22:33:06 <CakeProphet> olsner: no I'm learning how to use vectors for a specific task.
22:33:07 <fizzie> Or for (...) { stack<char> s; /* use s, it's temporary right now */ staks.push_back(s); /* will make a copy, but that sounds silly if you only want to free them later */ }
22:33:08 <olsner> also, there are some more steps inbetween, obviously
22:33:11 <CakeProphet> I understand that it makes copies of things.
22:33:54 <fizzie> I don't quite understand why you want these things to live past the loop only to free them.
22:34:57 <CakeProphet> question how is it determined when stack<char>() is destroyed.
22:35:03 <fizzie> Note that you can't have plain pointers into the inside-the-vector objects, because they are liable to move. (If that's why they have to survive.)
22:35:29 <fizzie> The (empty) stack in the push_back argument is a temporary.
22:36:01 <fizzie> Why should you care? You're not using it.
22:36:09 <fizzie> In the optimal case it could be optimized out of existence.
22:36:54 <CakeProphet> it's not that I have things I want to exist outside of a loop.
22:37:05 -!- ais523 has joined.
22:37:06 <CakeProphet> it's that I have things that I want to allocate upon some iterations of the loop
22:37:17 <CakeProphet> maintain their existence throughout the life of the algorithm
22:37:21 <CakeProphet> and then disappear at the end of the function call.
22:37:25 <ais523> hmm, people here were asking for copies of my papers in the past
22:37:32 <ais523> are they still interested? I forget who they were
22:37:36 -!- augur has quit (Remote host closed the connection).
22:37:45 <fizzie> CakeProphet: But how are you referring to the previously allocated things?
22:38:44 <CakeProphet> fizzie: I have a stack of stacks, to handle parentheses. So when you encounter a parentheses it takes the current stack and hides it away inside the stack-stack, then a new stack needs to be allocated for the nested expression.
22:38:58 <fizzie> CakeProphet: I mean, if you have pointers to them, you can't let them live inside a vector, because they will move around.
22:39:34 <fizzie> Sure, as the vector grows.
22:39:48 <elliott__> I thought CakeProphet understood vectors ;P
22:40:00 -!- kmc has quit (Quit: Leaving).
22:40:07 <fizzie> If you have a stack of actual stacks, then they will obviously stay alive without any trickery. If you have stacks of pointers to stacks, then it's a problem.
22:40:11 <elliott__> Then why didn't you know vectors move their elements?
22:40:27 <elliott__> <CakeProphet> fizzie: ...they will?
22:40:51 <CakeProphet> they will not suddenly point to different things.
22:41:03 <fizzie> CakeProphet: Those of course will not; that's the whole problem.
22:41:18 <fizzie> CakeProphet: Because the things they point to will go elsewhere.
22:41:23 <CakeProphet> elliott__: you read me misunderstanding a question.
22:42:18 <fizzie> Anyway, at this point it might be simplest you just kept a list of pointers to free, then. And call delete on the contents manually.
22:43:11 <olsner> pretty sure you don't need a stack of stacks to handle parens though
22:43:17 <CakeProphet> the reference voodoo is interesting, but, yeah... things move around in the vector.
22:44:50 <olsner> where is this reference voodoo you speak of btw?
22:44:52 <CakeProphet> I'm just used to GC languages where adding complexity to your data structure doesn't suddenly create a memory management problem.
22:45:13 <elliott__> It doesn't if you don't use pointers.
22:46:26 <CakeProphet> well I use a pointer for my main stack because STL stacks are silly and don't allow me to re-assign the variable they reside in to a new stack.
22:47:02 <oerjan> <CakeProphet> fizzie: I have a stack of stacks, to handle parentheses. <-- what in the world don't you simply put the parens on the one single stack for...
22:47:33 <CakeProphet> oerjan: because I haven't changed it to do that as I probably will. again I'm used to a GC language where that would simplify things.
22:48:26 <olsner> would a stack of stacks really simplify things in a gc language?
22:48:57 <CakeProphet> actually, I'm tired tired of defending myself. I'm not a perfect programmer. I'm going away for a while.
22:49:35 * oerjan read that as slower than light stacks are silly
22:50:16 <elliott__> CakeProphet: you mistake questions and doubts about your design as personal remarks.
22:50:18 <fizzie> oerjan: You have neutrinos in your mind, I take it.
22:50:41 <oerjan> fizzie: billions of them, every second
22:51:49 <CakeProphet> elliott__: I just find it mentally taxing. I take them personally, but they are not personal remarks.
22:51:55 <fizzie> I can share the worst infix-to-prefix Scheme code ever written, if it helps. (Unless I already erased it out of shame. I may have. It was... bad.)
22:51:59 <CakeProphet> I have high expectations for myself. And this channel has high expectations for everything.
22:52:17 <elliott__> nobody will care if you don't use a design we suggest, we're just trying to figure out what it is so we can help you
22:53:03 <oerjan> a stack of stacks is equivalent to a single stack with a special marker, as long as you don't move the substacks
22:53:10 <CakeProphet> well I'm switching to a single stack as it completely resolves all memory management issues.
22:53:27 <fizzie> oerjan: A stack is a stack is a stack.
22:53:40 <CakeProphet> I just found using a special marker gross for some reason.
22:54:33 <CakeProphet> elliott__: also I've been working on this for hours so it's been kind of maddening.
22:55:15 <oerjan> somehow this reminds me of that underload number parser i wrote
22:55:20 <CakeProphet> just part of the learning curve I suppose.
22:55:44 <oerjan> in the process of simplifying it, i ended up with an abstract interpreter
22:56:56 <oerjan> i have this hunch from today's iwc that dmm doesn't like sad endings
22:57:35 -!- BeholdMyGlory has quit (Remote host closed the connection).
22:59:40 <elliott__> oerjan: so is IWC still heading towards an ending? :P
23:05:49 <oerjan> elliott__: your guess is as good as mine
23:06:25 <fizzie> Cue "Noooooo my guess is BETTER!"
23:06:58 <oerjan> a new top comment on that reddit thread about synchronization seems to claim gps is sufficient: http://www.reddit.com/r/askscience/comments/kv91b/discussion_thread_promising_ftl_neutrino/c2nl7pf
23:07:34 <oerjan> (i just reloaded as i finally got around to actually reading the tab) :P
23:08:04 <ais523> didn't the team themselves say that GPS wasn't sufficient?
23:08:22 <oerjan> by _standard_ methods, yes
23:08:45 <ais523> that would imply that they didn't use GPS because they thought it wasn't sufficient, at least
23:09:30 <oerjan> in fact i vaguely recall reading somewhere that the method with time transfer was previously tried, and _not_ sufficient
23:10:24 <oerjan> or maybe it was some other obvious method
23:10:49 <elliott__> ais523: well, it answers your question
23:10:54 <elliott__> i.e. <ais523> that would imply that they didn't use GPS because they thought it wasn't sufficient, at least
23:12:48 <CakeProphet> ==29732== total heap usage: 94 allocs, 94 frees, 21,988 bytes allocated
23:13:47 -!- Patashu has joined.
23:14:55 <CakeProphet> memory management is easy when you don't explicitly dynamically allocate anything.
23:17:04 <CakeProphet> okay so what's the best way to die inside a function
23:17:23 <Patashu> make the computer shut down
23:17:32 <Patashu> oh, you meant the most practical?
23:17:43 <elliott__> CakeProphet: abort()? printf + exit?
23:17:55 <fizzie> Throw a type nobody could expect, since the language lets you throw anything.
23:18:22 <fizzie> E.g. a char* to a string constant is good: throw "ha ha only serious";
23:18:42 <Patashu> okay, youtube's front page layout changed and I can't see where to get to my subscriptions
23:18:55 -!- ais523 has quit (Remote host closed the connection).
23:18:55 <CakeProphet> elliott__: when does one use abort over exit in an ideal world?
23:19:04 <elliott__> CakeProphet: When the situation is impossible.
23:19:18 <elliott__> It could e.g. start a debugger, even.
23:19:33 <elliott__> Basically abort() should never be called, so put it in places that can never happen.
23:19:34 <CakeProphet> okay so, for example... when you give a function that determines the precedence of an operator something that isn't an operator?
23:19:44 <elliott__> That should probably be a C++ exception, dude.
23:20:24 <fizzie> C++ has its own thing called terminate() that you can use in places where you would abort(). By default it calls abort(), but you can set a terminate handler.
23:20:27 <elliott__> <fizzie> E.g. a char* to a string constant is good: throw "ha ha only serious";
23:20:33 <elliott__> fizzie: Isn't that actually fairly common...
23:20:40 <fizzie> elliott__: Sadly, yes.
23:20:42 <CakeProphet> but now what should I throw without putting too much effort into it.
23:21:03 <fizzie> Integer error codes are another thing.
23:21:45 <elliott__> I don't think it's The C++ Way to return an error code.
23:21:58 <elliott__> Just "throw null;" (fizzie: That will segfault, right?)
23:22:34 <fizzie> No, it'll throw a null pointer.
23:23:35 <fizzie> You can always just throw a std::runtime_exception if nothing else.
23:23:59 <elliott__> Then literally nobody can predictably detect it.
23:24:04 <fizzie> Though you get to decide whether to throw it by pointer or by value.
23:24:21 -!- augur has joined.
23:24:34 <CakeProphet> elliott__: you know that I want to learn the zen of suffering?
23:25:27 <fizzie> And if you throw by value, you can catch it by reference.
23:25:43 <CakeProphet> throw runtime_exception("someone has learned the zen of suffering.")
23:25:52 <Patashu> so uh. how do I see my subscrptions on youtube. it's showing me a new page with trending stuff instead
23:25:57 <Patashu> and this time there's no button to change it back
23:26:12 <elliott__> fizzie: Can you have static classes?
23:26:26 <elliott__> { static class foo {}; static foo ohno; throw &ohno; }
23:26:30 <elliott__> CakeProphet: Then nobody can even catch it.
23:27:10 <fizzie> What sort of? 'static' is so overused. You can't have a inside-a-function class though.
23:27:33 <fizzie> throw runtime_exception("...") is quite fine.
23:27:39 <olsner> fizzie: you can't? pretty sure it works in modern compilers
23:27:52 <elliott__> fizzie: I just want an exception nobody can even talk about outside the function.
23:27:59 <olsner> pretty sure ... but only iirc
23:28:13 <fizzie> olsner: Hmm, well; maybe. I'm not much of a C++er.
23:28:35 <elliott__> Says fizzie "GLfunge" "JITfunge" "Probably something that isn't funge" "fizzie++" fizzie
23:29:06 <olsner> ISTR having to replace code looking somewhat like that after it got exposed to less modern compilers
23:29:10 <CakeProphet> it's runtime_error by the way. My mistake.
23:29:29 <elliott__> fizzie: Did it use malloc without casting? Maybe it's C++ too :P
23:30:19 <fizzie> CakeProphet: It is the C++ way to throw Thing("args"), and catch-by-reference a Thing&, and have Thing (ultimately) inherit from std::exception; but if you can't b bothered to type a class, runtime_error is a reasonable substitute.
23:30:49 <fizzie> (It inherits from exception too.)
23:30:53 <CakeProphet> I can't be bothered with something that isn't going to happen.
23:30:59 <elliott__> Would be good if runtime_error DIDN'T inherit from exception.
23:31:10 <CakeProphet> I'm just trying to impress my professor so that maybe she'll forget that it was 3 days late.
23:31:31 <CakeProphet> by being correct (which is probably better than most), good style, etc.
23:33:02 <fizzie> elliott__: I suppose the inner class thing might work; but if not, { struct { long double wrong } guess_my_structure = { 42.0 }; throw guess_my_structure; }
23:33:17 <CakeProphet> s.erase(remove_if(s.begin(), s.end(), ::isspace), s.end())
23:33:23 <elliott__> fizzie: Can you catch that with any struct { long double wrong; } got_in;?
23:33:30 <elliott__> fizzie: Can you catch that with any struct gotcha { long double wrong; }?
23:33:33 <CakeProphet> is because remove_if is actually shuffle_this_stuff_to_the_back?
23:33:38 <elliott__> Or does it use actual honest-to-god identity equality?
23:33:47 <elliott__> CakeProphet: That sounds questionable.
23:34:16 <fizzie> elliott__: I can't remember offhand if identical-definiton structs need to be identical-representation too.
23:34:29 <elliott__> fizzie: Surely the representation is irrelevant in a catch?
23:34:36 <elliott__> I mean, it can't ask whether the representation is right of an arbitrary object.
23:34:48 <CakeProphet> Applies pred to the elements in the range [first,last), and removes those for which it does not return false from the resulting range. The resulting range consists of the elements between first and the iterator returned by the function, which points to the new end of the range.
23:35:01 <fizzie> Oh, right. Yes. I guess it won't catch then.
23:35:33 <fizzie> Guess it depends on the RTTI data that ends in there.
23:35:34 <elliott__> fizzie: I wonder how catch in C++ works. RTTI?
23:35:43 <CakeProphet> okay so it doesn't shuffle the whitespace to the back it just defines a new range and the erase is chopping the bounds so to speak.
23:35:59 <fizzie> I was just wondering whether accessing the value would work, assuming it would catch it.
23:35:59 <CakeProphet> the stuff after the end of the range is just garbage.
23:36:32 <fizzie> There is the "common initial subsequence" rule, but theoretically that is only for structs that have ever been part of the same union anywhere.
23:37:03 -!- SimonRC has quit (Ping timeout: 245 seconds).
23:37:59 <CakeProphet> I like how Discrete Math at my university is MATH 1234
23:41:28 <fizzie> You can catch absolutely everything (even anonymous types like that) with catch (...) { /* do something */ } but then you can't access the thrown value in any way. Well, except for re-throwing it.
23:44:04 <fizzie> You can just do nothing, and that'll swallow the exception.
23:44:09 -!- SimonRC has joined.
23:44:28 <olsner> I think he means some kind of retroactive on error resume next
23:44:52 <elliott__> olsner: What an awkward way to describe continuation behaviour.
23:44:59 <olsner> does VB have resume next?
23:45:03 <Patashu> you mean an enterprisey way!
23:45:37 <fizzie> Not portably, but I guess it might be doable on some platforms.
23:45:49 <elliott__> fizzie: You would have to restore the stack.
23:46:01 <elliott__> I guess if you're sure it hasn't been overwritten, which I guess is likely to be true, all you need is the original stack pointer.
23:46:28 <elliott__> Basically you need getcontext before the throw :P
23:47:07 <fizzie> I don't think it's exactly specified how much stack unwinding has been done at the catch block time, only after it. But it could well be impossible.
23:47:15 <fizzie> Remember to never throw anything from a destructor.
23:48:02 <fizzie> (If you throw a thing during the stack-unwinding destructor calls of another exception, the runtime will terminate().)
23:53:39 <CakeProphet> C++ makes perfect sense if you think about it.
23:53:47 -!- zzo38 has joined.
23:54:16 <CakeProphet> elliott__: okay don't think about it THAT much.