←2012-01-07 2012-01-08 2012-01-09→ ↑2012 ↑all
00:00:36 <oerjan> itidus21: it might be best to understand lambda calculus in general first
00:00:48 -!- Vorpal has quit (Ping timeout: 276 seconds).
00:00:49 <itidus21> not for me
00:00:53 <itidus21> for most people maybe
00:01:22 <itidus21> anyway, i like this presented idea of SK as gardening
00:01:31 <oerjan> then you can see how SK(I) can be used to rewrite any lambda expression without variables
00:01:45 <itidus21> ive decided to pretend I doesn't exist
00:02:04 <itidus21> it complicates things too much
00:02:08 <oerjan> well I = SKK, for example
00:02:30 <itidus21> >:-)
00:02:45 <oerjan> so it's redundant. but it's logically necessary to use some form of it for the rewriting.
00:03:21 <oerjan> to handle \x . x
00:03:21 <itidus21> hmm.. bah.. i don't need lambda calculus
00:04:39 <fizzie> What good has lambda calculus ever done, huh?
00:06:19 <oerjan> a lot, but probably not enough to parody an entire monty python sketch.
00:06:26 <Phantom_Hoover> What's Lambda Calculus ever done for me, eh?
00:06:29 <fizzie> Aw.
00:06:34 <Phantom_Hoover> I'm going back to the warm, waiting arms of the Combinatrix.
00:07:28 <oerjan> yeah do the combinator bird shop sketch instead
00:07:30 <fizzie> oerjan: Are you sure lambda calculus wasn't involved when the aqueduct and sanitation were invented?
00:07:42 <oerjan> fizzie: well not _entirely_ sure
00:07:52 <Phantom_Hoover> oerjan, this mockingbird is mocking me all the time!
00:07:53 -!- zzo38 has quit (Read error: Connection reset by peer).
00:08:24 <oerjan> it's not mocking, it's just diagonalizing
00:08:48 <fizzie> oerjan: Ooh, I just realized you must like the bird shop sketch because it involves fjords.
00:09:01 <Phantom_Hoover> We call them firths here.
00:09:10 <ais523> <Lorne Kates> Makes sense. You want to lazily instantiate your integes. Those things take up a lot of cycles. I think because PHP has to start with a float, then use the cpu fan to mill off the decimal point.
00:09:13 <Phantom_Hoover> As exemplified by the Firth of Forth, the best-named thing ever.
00:09:46 <ais523> Phantom_Hoover: that is a surprisingly good name, indeed
00:09:56 <Phantom_Hoover> oerjan, look, my lad, I know mockery when I hear it and I am being mocked right now.
00:09:59 <oerjan> fizzie: actually i was thinking more of the cheese shop sketch here. do you have any owls?
00:11:18 <Ngevd> Goodnigt
00:11:19 <Ngevd> h
00:11:21 -!- Ngevd has quit (Quit: Goodbye).
00:13:54 * oerjan fjords for the pines
00:17:46 <Phantom_Hoover> Fjording the river.
00:18:03 <itidus21> . o O ( Sadc = ac(dc); Sa(dc) = Sa(dc); Sa(dc)b = ab((dc)b); )
00:18:23 * olsner fnords for the pies
00:18:37 <itidus21> yay i can compute anything O.O
00:19:46 <itidus21> . o O ( Kab = a; K(ab) = K(ab); K(ab)c = (ab); )
00:22:00 <itidus21> but i am pretty dumb so i couldn't do much more than what i just typed at this stage
00:28:45 <itidus21> . o O ( (((Sa)d)c) = ((ac)(dc)); ((aK)(dK))b = ((aK)(dK))b; )
00:30:30 <itidus21> . o O ( ((KK)(dK))b = (Kb); )
00:36:25 -!- azaq23 has quit (Quit: Leaving.).
00:37:13 -!- nooga has quit (Ping timeout: 240 seconds).
01:10:16 -!- Phantom_Hoover has quit (Quit: Leaving).
01:21:59 -!- MDude has quit (Quit: later chat).
01:24:26 -!- oerjan has set topic: Official revolting channel of the inverse femtobarn stupid topic change plurality, the Prequel: The Revenge of the Monad | http://codu.org/logs/_esoteric/.
01:33:21 <kmc> shachaf, if I pick a random day of #haskell logs and search for your name, I can see you dealing with pretty much every kind of annoying question / behavior in that channel
01:33:27 <kmc> it's uncanny
01:33:37 <kmc> either you will burn out soon like me
01:33:43 <kmc> or you are simply stronger
01:34:52 <kmc> also i don't understand how #haskell got so big anyway
01:36:15 <oerjan> argh it's up to 815 people
01:42:43 <pikhq> It seems like, unlike most language channels, #haskell contains a very high proportion of the active Haskell community.
01:43:35 <kmc> how are you defining "Haskell community" in such a way that this isn't definitionally true
01:43:47 <pikhq> Vague handwavey nonsense.
01:44:08 <kmc> i think the people who write core libraries and production software in Haskell are under-represented on IRC
01:44:33 <pikhq> Hmm. Yeah, you don't see a lot of GHC devs in there I don't think...
01:44:56 <pikhq> Or some of the more significant libraries.
01:45:14 <pikhq> And, actually, who in #haskell does notable production software in Haskell? :P
01:45:22 <kmc> it's more fun to learn a little Haskell and talk about it all day
01:46:03 <pikhq> "Programming sucks. Knowledge about programming is awesome." or some such?
01:46:13 <kmc> yeah there's some of that
01:46:40 <kmc> it's worse with Haskell because there is so much to learn before it's actually a better tool for getting shit done
01:47:22 <kmc> most people are stuck at a stage where they only use Haskell on personal projects where "write this in Haskell" is an explicit goal
01:47:35 <oerjan> > iterate(show.length&&&take 1<=<group)"1"
01:47:36 <lambdabot> Couldn't match expected type `(GHC.Base.String, [a])'
01:47:36 <lambdabot> against infer...
01:48:00 <oerjan> > iterate((show.length&&&take 1)<=<group)"1"
01:48:00 <lambdabot> Couldn't match expected type `(GHC.Base.String, [a])'
01:48:01 <lambdabot> against infer...
01:49:15 <kmc> and so the code written by #haskellers is "about Haskell" whereas the code written by #pythonistas is about solving some real problem
01:50:47 <kmc> when you first take LSD, the trip is about the drug
01:51:04 <kmc> it takes experience to understand that it's a tool which changes how your mind works
01:51:11 <kmc> which can be applied to anything you can think about
01:51:49 <oerjan> > iterate((<**>[show.length,take 1]).group)"1"
01:51:50 <lambdabot> Couldn't match expected type `GHC.Types.Char'
01:51:50 <lambdabot> against inferred type...
01:53:11 <oerjan> :t (<**>[show.length,take 1]).group
01:53:11 <lambdabot> [Char] -> [String]
01:54:27 <oerjan> > iterate(sequence[show.length,take 1]<=<group)"1"
01:54:28 <lambdabot> Couldn't match expected type `GHC.Types.Char'
01:54:28 <lambdabot> against inferred type...
01:55:02 <oerjan> :t sequence[show.length,take 1]<=<group
01:55:03 <lambdabot> [Char] -> [String]
01:56:01 -!- Lymee has joined.
01:56:01 -!- Lymee has quit (Changing host).
01:56:01 -!- Lymee has joined.
01:56:08 -!- Madoka-Kaname has quit (Disconnected by services).
01:56:12 -!- Lymee has changed nick to Madoka-Kaname.
01:56:18 <oerjan> :t (<**>[show.length,take 1])
01:56:19 <lambdabot> [[Char]] -> [String]
01:56:50 <oerjan> :t sequence[show.length,take 1]
01:56:51 <lambdabot> [Char] -> [String]
02:00:41 <oerjan> :t flip
02:00:42 <lambdabot> forall (f :: * -> *) a b. (Functor f) => f (a -> b) -> a -> f b
02:01:16 <oerjan> :t flip[show.length,take 1]
02:01:17 <lambdabot> [Char] -> [String]
02:01:49 -!- Jafet has joined.
02:01:56 -!- zzo38 has joined.
02:03:04 <oerjan> @hoogle f (a -> f b) -> a -> f b
02:03:05 <lambdabot> Prelude (=<<) :: Monad m => (a -> m b) -> m a -> m b
02:03:05 <lambdabot> Control.Monad (=<<) :: Monad m => (a -> m b) -> m a -> m b
02:03:05 <lambdabot> Prelude (>>=) :: Monad m => m a -> (a -> m b) -> m b
02:05:08 <oerjan> @hoogle f (a -> f b) -> f a -> f b
02:05:08 <lambdabot> Prelude (=<<) :: Monad m => (a -> m b) -> m a -> m b
02:05:08 <lambdabot> Control.Monad (=<<) :: Monad m => (a -> m b) -> m a -> m b
02:05:09 <lambdabot> Prelude (>>=) :: Monad m => m a -> (a -> m b) -> m b
02:08:49 <oerjan> > iterate(join.flip[show.length,take 1]<=<group)"1"
02:08:51 <lambdabot> ["1","11","21","1211","111221","312211","13112221","1113213211","3113121113...
02:09:23 <oerjan> :t join.:flip
02:09:23 <lambdabot> forall (m :: * -> *) a a1. (Monad m, Functor m) => m (a1 -> m a) -> a1 -> m a
02:09:47 <oerjan> heh
02:23:40 -!- Jafet1 has joined.
02:26:09 <shachaf> kmc: Yes, I'm kind of in the process of burning out.
02:26:24 -!- Jafet has quit (Ping timeout: 276 seconds).
02:26:59 <shachaf> I wonder what it would be like if we still had dons's statistics on #haskell.
02:32:34 <shachaf> Maybe life would be good if I did like ddarius and ignored any questions that annoyed me. Even ddarius failed at that today.
02:33:16 <shachaf> What's really amazing is how Cale is still at it. Cale might be the most patient person on IRC.
02:37:46 <shachaf> kmc: So you still take LSD? It's not just a phase?
02:37:55 <shachaf> Or maybe it is a phase, in the ordinary meaning of "phase".
02:40:15 <kmc> shachaf, I haven't tripped in a while, but I'm planning to do so next month
02:40:32 <kmc> i think most people who take psychedelics only do it a few times ever
02:40:44 <kmc> so it's hard to say whether that's a "phase"
02:43:52 <kmc> possibly it's best to take it regularly but infrequently
02:43:57 <kmc> like once a year or once every few years
02:45:48 -!- MDude has joined.
02:47:32 <shachaf> kmc: If I did it, would I be like you? :-)
02:47:42 <kmc> you're already like me
02:47:50 <shachaf> Oh.
02:47:51 <kmc> at least, the things you say in #haskell are eerily like things I would say
02:48:01 <shachaf> Maybe it rubbed off.
02:48:19 <shachaf> The worst thing about IRC is IRC logs.
02:48:24 <shachaf> OK, the second-worst thing.
02:49:23 <kmc> i mean what's "best" depends on what you're trying to get out of it in the first place
02:49:47 <shachaf> The worst thing about IRC is that it's all a complete waste of time.
02:50:05 <kmc> #haskell has not been a waste of time, overall
02:50:13 <shachaf> I think the main reason I use IRC as much as I do is this aversion-to-publishing-things that I've mentioned before.
02:50:18 <kmc> i've learned quite a lot
02:50:24 <kmc> but perhaps it would be a waste of time to continue
02:50:34 <zzo38> No, IRC log is good thng
02:51:50 <shachaf> kmc: By the way, I considered Haskell as a teaching language a while ago when I was considering teaching someone about comput{ers,ing}, and decided against it because it seemed like it would be way more complicated.
02:51:51 <kmc> it may also be that the channel has grown / changed since i started, and so would be a waste to start now
02:52:07 <kmc> yeah
02:52:11 <shachaf> I wondeer whether the same things apply to Scheme or not.
02:52:24 <kmc> which things?
02:52:35 <shachaf> Well, I was trying to figure out which things they were. :-)
02:52:39 <kmc> heh
02:52:42 <kmc> Scheme is far simpler than Haskell
02:52:49 <shachaf> For example, does the type system make Haskell harder or easier to learn?
02:53:04 <shachaf> Reading Haskell code without type signatures is much more difficult in general.
02:53:36 <shachaf> But maybe types have a higher up-front cost which can discourage students.
02:53:41 <kmc> harder, for a total beginner to programming, compared to a hypothetical similar-but-dynamically-typed language
02:53:56 <kmc> one thing to keep in mind is that beginners are writing very small programs with very simple types
02:54:03 <kmc> so they benefit less from static typing
02:54:15 <shachaf> I suppose that's true.
02:54:35 <shachaf> I still have the vague feeling that imperative languages are easier to learn.
02:54:40 <shachaf> Imperative programming, anyway.
02:54:46 <kmc> Scheme is a fine imperative language
02:54:49 <kmc> SICP gets into it pretty quickly
02:54:52 <kmc> IP i mean
02:55:22 <kmc> a language with very simple static types might be good for teaching
02:55:33 <kmc> but haskell's has too many bells and whistles in this area
02:55:54 <shachaf> That's true.
02:55:59 <shachaf> Helium doesn't have type classes, I think.
02:56:00 <kmc> type classes and overloaded literals and monomorphism restriction
02:56:01 <kmc> right
02:56:19 <kmc> a simplified teaching version of Haskell would be great, except that nobody will maintain tool support that's comparable to GHC
02:56:34 <kmc> also GHC is pretty bad at explaining type errors
02:57:03 <kmc> it just tells you the two mismatched types... what you really want is a whole tree of the inferences leading to those types
02:57:10 * shachaf wonders how edwardk's type checker is going.
02:57:45 <kmc> anyway if you want to teach intro programming, teach python or javascript
02:57:56 <kmc> if you want to teach intro CS, use Scheme
02:59:42 <zzo38> To teach about computer, learn a lower level programming language, such as C, or Forth, to learn how the computer is working. Possibly even assembly languages for specific computer you learn such as x86 or NES/Famicom. To learn a program, Haskell is as good as any; but even better to learn mathematical and programming together.
03:00:12 <kmc> if you teach someone C and tell them it's how the computer "really works" then they will probably become an insufferable douchebag
03:00:28 <zzo38> kmc: Yes; that is why you need to learn assembly programming too.
03:00:40 <shachaf> You're best off teaching them physics.
03:00:57 <zzo38> But you can learn in C what correspond for example, the pointer to the address in the computer, pointer address array, and instructions set.
03:01:08 <kmc> zzo38, uh, assembly is not how the machine "really works" either
03:01:10 <zzo38> There is also LLVM which is much better designed than C in my opinion
03:01:20 <kmc> it's another abstraction
03:01:33 <kmc> the implementation of this abstraction is incredibly complex
03:01:42 <kmc> but it's hard to observe or modify unless you work at Intel
03:01:47 <kmc> so people mostly ignore it
03:02:00 <shachaf> Pointers and addresses and memory are also a big abstraction.
03:02:15 <zzo38> Yes everything mostly does.
03:02:43 <kmc> it's funny when people boast about how C is "close to the machine" and then turn out to be ignorant of caching or branch prediction or memory ordering issues or ...
03:02:47 <zzo38> It is why, to design computer that includes the book of full schematic diagrams and program codes printout
03:03:00 <kmc> because C (and assembly) largely hide those things,
03:03:04 <kmc> but then they come back to bite you
03:03:06 <shachaf> C is close to the abstract machine!
03:03:28 <kmc> shachaf, it's not that either
03:03:34 <shachaf> C doesn't really hide caching. Any more than anything above the CPU level does.
03:03:45 <zzo38> kmc: Yes, but the different computer, they might do caching and branch prediction and that stuff differently. You can learn for one individual computer, LLVM has some more control but is still for many computer. Assembly prorgamming and possibly if you have an emulator, can learn thing better
03:04:19 <kmc> shachaf, you saw the Linux bug I was talking about earlier?
03:04:31 <pikhq> kmc: This is because their idea of "machine" is the abstract machine that once upon a time was non-abstract.
03:04:36 <shachaf> Which one? The one with the undefined behavior?
03:04:49 <kmc> yeah
03:05:34 <shachaf> By "abstract machine" I mean the C abstract machine, of course, not x86.
03:05:45 -!- oerjan has quit (Quit: Good night).
03:05:49 <kmc> here's one example http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=3c8a9c63d5fd738c261bd0ceece04d9c8357ca13
03:06:46 <kmc> the bug is that 'tun' can be NULL
03:06:48 <shachaf> kmc: That bug was neat, by the way. You should tell me when you put the slides for your talk up.
03:07:28 <kmc> if a user maps a page at NULL they can control the value the kernel reads
03:07:38 <kmc> it looks like this is not exploitable, because 'sk' is unused before the NULL check
03:07:55 <kmc> but NULL dereference is Undefined Behavior and so the compiler is free to omit that check
03:08:03 <kmc> which gcc did, hence the bug was exploitable for privilege escalation
03:08:27 <kmc> anyway, if your model of C is "close to the machine" then you will make the mistake of thinking this code is safe (though it's still clearly wrong)
03:09:02 <kmc> shachaf, I will!
03:09:19 <pikhq> shachaf: Of course, their intuitions map to pre-ISO C, so the C abstract machine is irrelevant. :P
03:09:33 <pikhq> shachaf: Unfortunately for them, x86 is also an abstract machine.
03:10:04 <shachaf> It's abstract machines all the way down.
03:10:58 <shachaf> kmc: When is the talk?
03:11:11 <shachaf> Oh, Jan 27.
03:13:17 <shachaf> Oh, and Veinor is doing a Haskell class.
03:18:15 <kmc> 'Haskell is the world's most *reasonable* programming language -- a language ideally suited for reasoning about code by machines, by humans, and by machines aiding humans.'
03:18:18 <kmc> that one?
03:19:36 <shachaf> That would seem to be the one.
03:20:00 <kmc> that claim seems kinda completely false
03:20:03 <zzo38> Haskell is best they do programming and mathematical reasoning in dealing with computer program
03:20:24 <zzo38> For other thing, other programming language might be best, it is one reason why, they have many programming languages
03:20:56 <kmc> Haskell is far from the best language if you want to prove things about your programs
03:21:15 <zzo38> kmc: Yes, you are probably correct about that.
03:21:30 <kmc> what examples are there of 'reasoning about code by machines' in Haskell
03:21:45 <shachaf> I imagine that's referring to type checking or something.
03:21:55 <shachaf> Haskell is a very compromisey language if you take e.g. Agda into account.
03:21:55 <kmc> weak
03:22:03 <zzo38> What I mean, for example, the functions can be like a mathematical functions, and typeclass that is supposed to have certain laws, that follow certain kind of mathematical structures, and sometimes a few things can be implied just by the type signatures
03:22:25 <shachaf> kmc: Equational reasoning that the optimizer can do?
03:22:33 <shachaf> I don't know, I didn't write it.
03:22:44 <kmc> it seems like a vastly overblown claim that will leave people disappointed
03:22:52 <kmc> i mean it's an approach i see a lot
03:23:25 <kmc> "Haskell is great, because Curry-Howard! Proving things in the type system. We can prove that, uh, Ints exist, unless they're ⊥."
03:23:48 <shachaf> Is that a _|_ character?
03:23:51 <kmc> yes
03:24:00 <zzo38> Yes, there is Curry-Howard as well, and I have been able to make a typeclass for law of excluded middle, too
03:24:02 -!- atrapado has joined.
03:24:36 <shachaf> A lot of claims about Haskell are overstated.
03:24:37 <kmc> Haskell is great but "wealth of static analysis tools" is not its strong point
03:24:55 <kmc> certain things fit very naturally into the type system
03:25:00 <kmc> but for anything else it's an uphill battle
03:25:07 <shachaf> To be honest, I don't understand why a lot of people like Haskell so much.
03:25:14 <kmc> shachaf, it's better than Java!
03:25:26 <shachaf> You see a fair number of people saying "Haskell is great!" but then they write atrocious code in it that disregards pretty much all its strength.
03:25:28 <kmc> the strongest praise a programming language could get
03:25:38 <zzo38> If you have type for bijective functions then you could even use types as numbers, such as (,) meaning both and and multiplication, Either meaning or and addition, -> meaning implication and exponents, Maybe meaning successors
03:26:09 <kmc> shachaf, well, I think you know why I like Haskell, because I gave a talk about it :)
03:26:13 <kmc> it's a bit different from the party line
03:26:46 <shachaf> kmc: My statement was ambiguous.
03:27:08 <shachaf> "There exists a large set of people such that I don't why any of its members like Haskell so much."
03:27:16 <kmc> right
03:27:37 <shachaf> There similarly exists a large set of people who dislike C++ for completely bogus reasons.
03:27:38 <kmc> which set is that
03:27:41 <kmc> hehe
03:28:03 <shachaf> Although admittedly that one's easier to justify, because "I don't understand it after investing a fair amount of effort" is a valid reason to dislike something.
03:28:18 <kmc> i think Haskell is a pragmatic language with a lot of well-chosen tradeoffs, and a good implementation
03:29:18 <kmc> which is a bit different from "Haskell is best because it enforces total ideological purity"
03:29:22 <kmc> or "Haskell is best because it has the most math"
03:29:51 <kmc> both of which are factually untrue, anyway
03:30:01 <kmc> but they are standard reasons given by beginners
03:31:48 <Jafet1> Most people have misconceptions about most things
03:31:51 -!- Jafet1 has changed nick to Jafet.
03:32:13 * Jafet premature generalization
03:33:35 <atrapado> premature optimization
03:33:51 <kmc> and my opinion that Haskell is "practical" is conditional on the fact that I already know it well
03:34:49 <kmc> i think you could probably get 80% of the benefit in a language that's 20% as hard to learn
03:37:34 <atrapado> misconceptions are more like premature optimizations, rather than premature generalizations
03:37:49 <kmc> maybe that language is OCaml, or F#, or Clojure
03:37:52 <kmc> maybe it doesn't exist yet
03:38:20 -!- iamcal has quit (Remote host closed the connection).
03:42:20 <atrapado> we start with something general and then optimize it
03:43:28 <atrapado> or misoptimize it
03:44:14 <atrapado> .
03:47:08 <shachaf> I need to go to one of NYC/Washington D.C./Los Angeles in the next few months.
03:47:33 <kmc> why?
03:47:41 <shachaf> Finnish passport.
03:47:50 <kmc> cool
03:47:54 <shachaf> It would be best to get it before my birthday in July.
03:47:56 <kmc> well, LA is probably the cheapest for you to get to
03:48:03 <kmc> but NYC and DC are vastly superior cities
03:48:55 -!- pikhq has quit (Read error: Operation timed out).
03:49:03 <shachaf> That's true. But just think of how much cheaper the cost of going to Hac Boston would be if I go to NYC anyway!
03:49:05 -!- pikhq has joined.
03:49:12 <kmc> it's true!
03:49:15 <shachaf> Also I have relatives there.
03:49:22 <shachaf> I guess I have relatives in San Diego too.
03:50:02 <kmc> San Diego is pretty far from LA
03:50:07 <kmc> but you know that
03:50:17 <shachaf> Boston is pretty far from NYC.
03:50:31 <kmc> oh, you have relatives in boston?
03:50:52 <shachaf> Yes. Although I was referring to my relatives in NYC.
03:51:01 <shachaf> But I could visit both!
03:52:29 <shachaf> Anyway, I could drive to Los Angeles.
03:52:35 <shachaf> Do you feel less like me suddenly, kmc?
03:52:40 <kmc> haha
03:56:33 -!- zzo38 has quit (Ping timeout: 252 seconds).
04:20:09 -!- atrapado has quit (Quit: Bye).
04:34:07 -!- zzo38 has joined.
04:35:12 -!- PiRSquared17 has changed nick to PiRSquaredAway.
04:36:31 <zzo38> Can you do so?
04:38:51 -!- PiRSquaredAway has quit (Quit: I found a *real* proof, it's just too long to fit in the quit message).
05:10:12 -!- Jafet1 has joined.
05:12:53 -!- Jafet has quit (Ping timeout: 240 seconds).
05:24:54 -!- elliott has joined.
05:33:21 <elliott> 16:30:25: <itidus21> what are the benefits of levenshtein coding over regular binary coding?
05:33:21 <lambdabot> elliott: You have 1 new message. '/msg lambdabot @messages' to read it.
05:33:27 <elliott> itidus21: What is "regular binary coding"?
05:33:52 <elliott> <lambdabot> kallisti_ said 11h 1m 21s ago: do you think using Ix and switching elemFromEnum to an array implementation would be faster or slower than using Map? or does an Ix instance basically require the same
05:33:52 <elliott> <lambdabot> kind of lookup code?
05:33:56 <elliott> kallisti_: Ix depends on Enum, you moron.
05:41:24 <elliott> 16:58:00: <oklopol> itidus21: do you have a university degree yet?
05:41:24 <elliott> 16:58:10: <itidus21> no
05:41:24 <elliott> 16:58:25: <oklopol> have you considered getting a university degree0
05:41:24 <elliott> 16:58:27: <oklopol> ?
05:41:24 <elliott> 16:58:51: <itidus21> i am living in a weird kind of dire strait...
05:41:24 <elliott> 16:59:11: <itidus21> the world has defeated me from every angle
05:41:26 <elliott> 16:59:32: <oklopol> well i'm aware of that, i felt the question was orthogonal enough
05:41:28 <elliott> 16:59:57: <itidus21> success is mostly an illusion
05:41:30 <elliott> oklopol: i just want to say you're great
06:01:14 <shachaf> elliott: Do you have a university degree yet?
06:03:31 <elliott> shachaf: Nope.
06:05:41 <shachaf> Have you considered getting a university degree0
06:05:45 <shachaf> ?
06:18:09 <pikhq> :P
06:22:09 <zzo38> Token expansion in TeX is not entirely comonadic because the \csname command has the possibility to modify the table of equivalents during expansion.
06:22:37 <zzo38> So expansion can have side effects, but that is the only one, other than error messages
06:24:33 -!- myndzi has quit (Read error: Connection reset by peer).
06:27:03 <zzo38> Specifically, I mean the coKleisli morphisms for the (,) comonad (a.k.a. the Env comonad).
06:27:30 -!- myndzi has joined.
06:29:06 -!- MDude has changed nick to MSleep.
06:29:08 <zzo38> Have you considered getting a something else other than a university degree?
06:51:56 <elliott> ais523: thanks for deleting that page of spa,
06:52:13 <ais523> I typo when I type "spam" so much
06:52:26 <ais523> I was thinking about automating it, but that'd involve learning GreaseMonkey because Esolang doesn't have working user scripts
06:52:34 <elliott> ais523: can you protect the main page, pls?
06:52:41 <elliott> there was a complaint on the talk page, and it seems a new wave are targetting it specifically
06:52:45 <elliott> *wave of spambots
06:52:47 <ais523> I will if it continues
06:52:58 <elliott> OK, but this is the second or third day
06:53:06 <elliott> wouldn't semi-protection work?
06:53:13 <ais523> one of them hit NetHackWiki's main page a while ago, which is the only spam it's had in ages
06:53:47 <elliott> theory: Timwi is controlling the spambots
06:54:01 <elliott> as revenge
07:00:44 -!- Jafet has joined.
07:01:39 -!- Jafet1 has quit (Ping timeout: 252 seconds).
07:07:14 -!- Jafet has quit (Ping timeout: 252 seconds).
07:18:35 -!- Jafet has joined.
07:21:40 -!- myndzi has quit.
07:21:48 -!- myndzi has joined.
07:23:44 <zzo38> Make the HTTP-PUT-based wiki using HTTP-based authentication mode, could be another way that makes it harder for current spambots to find and there are many other ways too
07:24:33 <elliott> ok done now what
07:24:35 <zzo38> Another possibility, is prevent Google from indexing it.
07:25:22 -!- Jafet1 has joined.
07:26:53 <zzo38> The current wiki are form-based rather than PUT-method-based
07:27:30 -!- Jafet has quit (Ping timeout: 252 seconds).
07:32:45 -!- Jafet1 has quit (Read error: Connection reset by peer).
07:33:06 -!- Jafet has joined.
07:37:53 -!- Jafet has quit (Client Quit).
07:39:14 <shachaf> ais523: Speaking of NetHackWiki, I haven't paid much attention to it or anything, but is the situation with Wikia as bad as it seems?
07:40:08 <shachaf> I.e., #nethack wanted a wiki, made a thing on Wikia, Wikia added advertisements, #nethack decided to move their wiki, Wikia refused to redirect or let them add "this wiki has now moved" markers to pages or remove the advertisements?
07:42:16 <elliott> shachaf: They had a marker up, but I don't think Wikia was happy about it.
07:42:20 <elliott> IIRC it was just on the main page.
07:42:27 <elliott> Wikia said they'd remove it after a while.
07:42:44 <elliott> shachaf: s/added advertisements/progressively redesigned the theme to be more and more terrible while adding more advertisements each time/
07:42:54 <elliott> It's a common experience for Wikia users.
07:43:00 <elliott> The same happened to the most popular WoW wiki, to my understanding.
07:43:18 <shachaf> elliott: Right, I was abbreviating.
07:43:38 <elliott> My favourite thing about Wikia's theme is the part where every external link has an interstitial ad added to it.
07:43:43 <shachaf> And of course the Wikia pages are way higher ins earch results.
07:43:48 <shachaf> elliott: Oh, yes, now I remember.
07:43:52 <shachaf> I'd suppressed it. :-(
07:44:01 <elliott> They should add it to internal links too.
07:44:03 <elliott> MORE PROFIT
07:44:12 <Sgeo> Creatures Wiki still has the sane theme
07:44:50 <Sgeo> Uh
07:45:00 <shachaf> elliott: What if, as part of the procedure for taking you to an interstitial ad, IT TOOK YOU TO ANOTHER INTERSTITIAL AD???
07:45:03 <shachaf> INFINITE PROFIT
07:46:28 <elliott> shachaf: The "Skip this Ad" button should have an interstitial ad.
07:46:35 <shachaf> elliott: GENIUS
07:46:50 <shachaf> I would never be able to sit through the full 30 seconds without clicking that button.
07:46:56 <shachaf> <Sgeo> http://ideone.com/AJZRX is there a way to do this without wrapping in a type?
07:47:04 <elliott> http://images4.wikia.nocookie.net/__spotlights/images/6d7325c4c94e26518f560e075330aab2.jpg Apparently Bation was overlooked?
07:47:06 <elliott> *Bastion
07:47:51 <elliott> Sgeo:
07:48:02 <elliott> http://stackoverflow.com/questions/8739741/higher-ranked-and-impredicative-types
07:48:16 <shachaf> Sgeo: Why do you use that paste site, by the way?
07:48:18 <shachaf> It's horrible
07:48:25 <elliott> Sgeo: Thankfully, you want to do that approximately 1 time in 10000000000000000, and never for Show, so it doesn't matter at all.
07:48:43 <elliott> shachaf: We need mauke's paste-copier bot in here.
07:48:45 <elliott> Maybe I'll write one.
07:48:52 <elliott> Maybe I'll write a bot that just dumps every URL to sprunge.
07:50:11 <shachaf> elliott: So does UHC support inferring existential types?
07:50:19 <shachaf> That would be a great trick.
07:50:23 <shachaf> x = ...
07:50:27 <shachaf> x :: exists a. a
07:50:35 <shachaf> I've written a universal type inferencer!
07:51:05 <Sgeo> What's wrong with IdeOne?
07:51:24 <elliott> shachaf: I somewhat doubt it.
07:51:43 <elliott> Sgeo: For one, it's a pastebin with *ads*.
07:51:56 <elliott> And a Tweet button.
07:52:01 <elliott> And a "Login with Facebook" button.
07:52:17 <pikhq> For two, curl -F 'sprunge=<-' http://sprunge.us
07:52:25 <elliott> Actually I count 8 social networking devices on that page.
07:52:26 <shachaf> And it takes a long time to load.
07:52:32 <shachaf> Did I mention how my Internet connection is very slow?
07:52:41 <elliott> Also
07:52:41 <elliott> language:Haskell (ghc-6.8.2)
07:52:46 <shachaf> Pretty much all web pages on the Internet today load "sequentially" in some weird way.
07:52:50 <elliott> which came out in 2007.
07:53:01 <shachaf> And this weird way causes the content to wait on the ads.
07:53:14 <elliott> Also the syntax highlighting is hideous, especially for strings.
07:53:34 <Sgeo> http://codepad.org/taphdoQk
07:53:37 <Sgeo> Not the most informative
07:53:42 <elliott> Ooh, it gets better.
07:53:43 <elliott> "All Rights Reserved."
07:53:45 <elliott> --footer
07:53:52 <shachaf> ++footer;
07:53:56 <elliott> I guess claim rights to your pastes.
07:54:15 <pikhq> Sgeo: Seriously though, it doesn't get better than sprunge.
07:54:20 <elliott> who we are
07:54:20 <elliott> We are highly qualified academics with Ph.D.
07:54:21 <elliott> We specialize in research and development.
07:54:21 <elliott> We direct your business towards innovation.
07:54:34 <elliott> --http://sphere-research.com/en/ as linked from footer of ideone
07:54:46 <elliott> They have a Ph.D. between them, collectively.
07:54:52 <zzo38> I think sprunge is better, so I wrote a sprunge.cmd file to do that too
07:55:06 <elliott> Wow, they're the people behind that http://www.spoj.pl/ thing.
07:55:12 <pikhq> zzo38: I am incredibly unsurprised you think sprunge is better.
07:55:18 <shachaf> elliott: I think they mean they have an actual Doctor of Philosophy, not a certificate specifying that one of them is one.
07:55:33 <pikhq> It seems very zzo-esque, except it's also very anyone-who-does-command-lines friendly.
07:55:35 <elliott> shachaf: Finally someone to nurse philosophy back to health.
07:55:49 <Sgeo> pikhq, can't run code in sprunge
07:55:51 <elliott> Ph.N.
07:56:10 <elliott> Sgeo: We don't need to see GHC 6.8.2's error message to know why your code doesn't work on GHC 7.0.3.
07:56:13 <shachaf> elliott: Does your Ph.D. institution also give out Ph.N.s?
07:56:15 <elliott> Esp. since it's obvious.
07:56:18 <pikhq> Sgeo: No, but ghci <(curl http://sprunge.us/foo) does that just fine.
07:56:43 <itidus21> i just get that way at odd hours of the night
07:56:46 * Sgeo is sometimes too lazy to make a file on his system and use his ghc
07:57:17 <itidus21> delusions of the night
07:57:23 <elliott> Sgeo: GHC 7.4 has top-level declarations in GHCi.
07:57:52 * Sgeo doesn't have GHC 7.4
07:57:54 <pikhq> Sgeo: Use a better shell.
07:58:06 <elliott> Sgeo: Alternatively, that's why you use Emacs.
07:58:19 <shachaf> MORE LIKE EWWWMACS
07:58:21 <shachaf> GET IT
07:58:26 <zzo38> Can GHCi parse a module declaration?
07:58:26 <Sgeo> I should switch back to Emacs for Haskell stuff
07:58:29 <elliott> C-x C-f foo.hs <RET> data Foo = Foo C-x C-s C-c C-l :t undefined :: Foo
07:58:37 <elliott> Oh, you need C-x C-o before that :t.
07:58:40 <Sgeo> jEdit thinks that ' always means the rest of the token is a string
07:58:51 <elliott> Who the heck uses jEdit?
07:59:14 <shachaf> I think even Slava doesn't use it anymore.
07:59:34 <shachaf> He also doesn't use Factor anymore, I believe.
08:00:17 <elliott> shachaf: Oh, doesn't he?
08:00:23 <elliott> He seemed pretty into it a year or two ago.
08:00:29 <kmc> noobs, i have GHC 7.5
08:00:38 <elliott> http://factor-language.blogspot.com/ has been dead for a while, though.
08:00:43 <shachaf> kmc: I have GHC 7.0. :-(
08:00:47 <kmc> me too
08:00:54 <shachaf> You're 7% more modern than I am.
08:00:58 <elliott> I have 7.0.*3*!
08:01:02 <kmc> wow
08:01:09 <elliott> It's .0.3 better.
08:01:11 <shachaf> I may have been wrong.
08:01:12 <shachaf> The Glorious Glasgow Haskell Compilation System, version 7.0.3
08:01:22 <kmc> elliott, it must be hard to turn the crank on the side
08:01:32 <shachaf> elliott: That's what I heard.
08:01:37 <elliott> I think Arch are waiting for 7.4 to update for, uh, stability.
08:01:45 <kmc> no really, I have a GHC that reports its version as 7.5.blah
08:01:46 <elliott> Arch "/usr/bin/python is python3" Linux.
08:01:58 <kmc> i think it has minimal libraries installed tho
08:02:28 * elliott really wants 7.4 to come out so he can enter a new age of type system horror.
08:02:38 <kmc> build it from git
08:02:40 <kmc> you know you want to
08:02:43 <elliott> That's so much work.
08:02:47 <kmc> not really
08:02:52 <elliott> Well, it takes ages.
08:02:55 <kmc> right
08:02:56 <shachaf> I used to build GHC from darcs.
08:03:01 <shachaf> I had dozens of versions installed.
08:03:02 <kmc> it's a lot of work for your computer; not so much for you
08:03:12 <elliott> GHC needs a build bot.
08:03:14 <shachaf> kmc: Remember the deal with the crank on the side?
08:03:16 <elliott> I want to use GHC nightlies.
08:03:18 <kmc> it's more work for you if you already have a ghc tree and want to update it and expect incremental builds to work
08:03:22 <kmc> cause they won't
08:03:29 <kmc> elliott, GHC has a buildbot, but I don't know if the binaries are posted anywhere
08:03:46 <elliott> kmc: Remember when GHC moved from a hideous Makefile system to a slightly better hideous autotools+Makefile system?
08:03:51 <kmc> no
08:03:56 <elliott> Wait, didn't that happen?
08:04:02 <elliott> I distinctly recall that it not being autotools a year back or so.
08:04:04 <kmc> maybe, but why would I remember it
08:04:08 <shachaf> kmc is amnesiac
08:04:14 <shachaf> elliott is elephantine
08:04:15 <elliott> Because GHC building folklore, man!
08:04:18 <kmc> make may be "hideous" but it supports -j
08:04:36 <elliott> The Makefiles themselves were the hideous part. Although make is too.
08:04:56 <pikhq> -j isn't exactly hard.
08:05:07 <kmc> cabal doesn't have it yet
08:05:47 * elliott has a plan for a cabal wrapper that builds in parallel.
08:05:51 <kmc> it's been done
08:06:06 <kmc> (for building different packages in parallel; not for the modules in a single package)
08:06:08 <elliott> Yeah, but I've never seen one on Hackage, and I don't know anybody who uses one :P
08:06:11 <elliott> kmc: The latter is what I meant.
08:06:14 <kmc> ok
08:06:17 <elliott> The former is an orthogonal issue that I don't care about much.
08:06:24 <pikhq> kmc: Just because cabal sucks doesn't make -j hard. *If* you're doing dependencies in even a vaguely sane way.
08:06:33 <kmc> make -j is theoretically uninteresting, therefore Haskell already supports it
08:06:38 <kmc> and it's your fault for not writing it
08:06:42 * shachaf orthogonizes over the issue.
08:06:47 <elliott> Well GHC is kinda build system antagonistic
08:06:52 <elliott> Multiple output files, no full separate compilation
08:07:18 <pikhq> (I mean, heck, redo does it, and the build logic there is in shell scripts.)
08:07:38 <elliott> Isn't it Python
08:07:45 <kmc> pikhq, I don't understand what point you're trying to make. are you speaking to a developer of a make-replacement, or to a user of a build system, or?
08:07:50 <pikhq> elliott: Yes, but you tell it what to do with shell scripts.
08:07:55 <pikhq> kmc: Developer.
08:08:01 <kmc> ok
08:08:03 <kmc> i don't disagree
08:08:05 <kmc> why did you bring it up?
08:08:24 <pikhq> "make may be 'hideous' but it supports -j"
08:08:34 <kmc> right
08:08:47 <kmc> meaning that GHC doing things differently from other haskell packages has at least one major advantage
08:08:51 <kmc> that's all i meant by it
08:08:54 <pikhq> Okay.
08:09:07 * elliott didn't realise kmc thought I was comparing it to using Cabal.
08:09:16 <kmc> i didn't really
08:09:20 <elliott> I doubt Cabal could even build GHC. Maybe with a massive custom Setup.hs thing.
08:09:54 <kmc> does Cabal have support for Make-based builds?
08:09:58 <pikhq> Ish.
08:10:09 <kmc> http://hackage.haskell.org/packages/archive/Cabal/1.10.2.0/doc/html/Distribution-Make.html
08:10:18 <elliott> That's cheating :P
08:10:20 <kmc> "Perhaps at some point we should stop pretending that it works."
08:10:31 <elliott> Cabal-1.10.2.0: A framework for packaging Haskell software
08:10:37 <elliott> "Cabal isn't a package manager, it's a build system!"
08:10:39 <elliott> "But it's terrible at that too."
08:10:41 <kmc> haha
08:10:44 <elliott> "It's a framework for packaging!"
08:10:57 <kmc> elliott, the Haskell tools are perfect and you're just some kind of idiot Java Monkey if you can't get by with them
08:11:06 <kmc> next you'll be asking for regexes and stack backtraces
08:11:09 <kmc> fucking java monkeys
08:11:12 <pikhq> elliott: Still better than what C's got.
08:11:13 <pikhq> (barely)
08:11:19 <elliott> kmc: Java monkeys like regexps/
08:11:20 <elliott> ?
08:11:47 <pikhq> elliott: Only if you can represent them with an object hierarchy.
08:12:03 * elliott thinks regexps probably *are* moderately worthless in Haskell, since writing little parsers is so easy, but it would be nice to have a more concise syntax for common things.
08:12:12 <elliott> scsh's sexp regexp stuff would be interesting to mimic.
08:12:31 <elliott> A quasiquoter that turns a regexp into a parser would probably be the most useful thing, if TH wasn't terrible.
08:13:00 <kmc> i'd settle for just a regex library with a simple concrete API
08:13:05 <kmc> in fact there are several on hackage
08:13:21 <elliott> The worst thing about the Haskell regexp libs is the hideous typeclass hack most of them are based on.
08:13:25 <kmc> but i can't find them amongst all the other regex-compat-posix-new-lite-pcre
08:13:28 <elliott> It should be illegal.
08:13:38 <kmc> regex-compat-posix-new-lite-pcre-0.1: NO REALLY USE THIS ONE THE OTHERS SUCK
08:13:59 <kmc> if someone uploaded a good regex lib and used that as the cabal synopsis I would hug them
08:15:01 <pikhq> I assign not-elliott to do it.
08:15:25 <kmc> i think translating regexps into first-class parsers is probably bad for performance
08:15:37 <elliott> kmc: Monadic parsers, sure
08:15:48 <elliott> What if you turned regexp syntax into http://hackage.haskell.org/package/regex-applicative parsers?
08:15:48 <kmc> even applicative CFG parsers
08:16:08 <pikhq> elliott, of course, would come back with @ in 100 years.
08:16:33 <kmc> elliott, might be nice
08:16:42 <elliott> kmc: I think the better complaint there is "it's difficult to optimise Haskell EDSLs"
08:16:46 <kmc> it's... yeah
08:16:55 <elliott> which sucks, but is probably inherent
08:17:07 <elliott> arrows seem to have the best opportunities there but you have to use arrows
08:17:16 <kmc> arrows suck because you can't optimize 'arr'
08:17:33 <elliott> that too
08:17:38 <elliott> thus generalised arrows
08:17:45 <elliott> an EVEN LARGER TYPECLASS!
08:17:55 <kmc> i'll be interested to see what iPwn have come up with, if their shit ever sees the light of day
08:18:21 <kmc> "we solved several major open problems in theoretical computer science in order to make an iPhone game where you hit orcs with a sword"
08:18:32 * elliott has great difficulty taking iPwn seriously because of the name.
08:18:50 <elliott> What have they done apart from their own arrow stuff? I heard about that in passing but nothing else. Well, and the GHC port thing I think was them.
08:19:07 <kmc> they're using a custom preprocessor and some bleeding-edge GHC features to do better arrowized FRP
08:19:12 <kmc> i don't know much about it
08:19:37 <pikhq> Waitwaitwait, they're working on FRP so they can do an iPhone game?
08:19:43 <kmc> yes
08:19:52 <elliott> Hasn't game development driven FRP for like half a decade by now?
08:19:54 <shachaf> I heard that they got some sucker to port GHC to Android.
08:19:55 <kmc> research in arrowized FRP with a custom preprocessor
08:19:57 <pikhq> Are they mad or awesome? I dunno.
08:20:03 <kmc> ask Cale about it
08:20:19 <kmc> their game is like 2 years late
08:20:37 <kmc> so i'm gonna go with "not awesome"
08:20:45 <kmc> even if it's great research i can't possibly imagine how it makes business sense
08:20:51 <shachaf> Do people put two years of work into an iPhone game ever?
08:20:54 <elliott> kmc: Business sense? You're talking about Haskellers.
08:21:04 <kmc> elliott, yeah...
08:21:19 <shachaf> elliott: Hey, some Haskellers have business sense! Those are the people who don't use Haskell for their business.
08:21:41 <pikhq> Or presumably the ones using it for finance.
08:22:10 <zzo38> I would prefer the Arrow to be changed to something else such as: class (Category c1, Category c2) => CatFunctor c1 c2 where { funct :: c1 x y -> c2 x y; }; class Category c => CatArrow c (p :: * -> * -> *) where { ... }; It should be able to still represent the ordinary Arrow stuff with this, I think
08:22:15 <pikhq> Certainly when you're working on open problems for the purpose of mundane, mundane programs, you've got no business sense. :)
08:22:25 <kmc> i think using Haskell for an iPhone game is not completely crazy, but they seem to be doing it wrong
08:22:48 <pikhq> kmc: It's the "working on major open problems in theoretical computer science" bit that is completely nuts.
08:22:52 <kmc> right
08:23:00 <shachaf> zzo38: What about Barrier Arrows? You mustn't forget those.
08:23:03 <kmc> of course this distinction will be lost on most
08:23:05 * elliott thinks that working for 2 years on FRP stuff for an iPhone game is cool but would probably work better as a hobby :p
08:23:12 <pikhq> elliott: Yup.
08:23:21 <elliott> pikhq: I don't think FRP is considered a /major/ open problem :P
08:23:25 <itidus21> the developers of the platform games N and N+ are a bit nuts also
08:23:27 <zzo38> shachaf: I don't know what those are
08:23:32 <kmc> elliott, yeah, who knows. it might be one of those startups where it's essentially a hobby, and everyone has a "side job"
08:23:49 * elliott also isn't sure FRP counts as /that/ theoretical, although the linear temporal logic stuff...
08:24:21 <shachaf> Mm, LTL.
08:24:30 <kmc> i have fond memories of LTL and SPIN
08:24:31 <itidus21> hmm
08:24:47 <pikhq> elliott: I'm only quoting kmc on that one.
08:24:47 <shachaf> I went to this one talk about model checking once.
08:24:51 <pikhq> :)
08:24:52 <shachaf> Actually I went to it twice.
08:24:58 <shachaf> Actually I went to it once and it went to me once.
08:25:03 <elliott> kmc: I can't criticise too loudly because I'm on step 2 of the "Hey, I want to make a game with Haskell!" -> "Guess I'd better figure out how to do it with FRP." -> game path.
08:25:12 <kmc> heh
08:25:23 <shachaf> elliott: Does @ have games?
08:25:24 * elliott can't remember what the game was going to be any more.
08:25:27 <kmc> right, some things do not make business sense but are justified by broader concerns
08:25:31 <kmc> like "this is what i want to do"
08:25:32 <elliott> shachaf: Who needs games when @ is as fun as it is?!
08:25:44 <kmc> my impression was that the ipwn guys thought they were making business sense
08:25:55 <itidus21> @ peace and @ war...
08:25:58 <elliott> kmc: It's the Paul Graham stuff, isn't it?
08:26:02 <zzo38> What is FRP?
08:26:12 <kmc> elliott, ?
08:26:15 <elliott> "If you program in my Blub, you'll have such a competitive advantage that you'll be, like, exponentially better than C++ programmers."
08:26:16 <itidus21> functional reactive programming
08:26:29 <pikhq> zzo38: Functional Reactive Programming; an alternate paradigm for IO in a purely-functional-ish language.
08:26:32 <pikhq> (such as Haskell)
08:26:36 <elliott> FRP isn't really about IO.
08:26:52 <kmc> elliott, maybe. PG also says there are nontechnical competitive advantages of using weird languages
08:26:57 <kmc> which I think is a more solid claim
08:27:02 <elliott> kmc: I think that's what I was saying.
08:27:10 <zzo38> Can you show me the mathematical structures for reactives?
08:27:28 <elliott> zzo38: type Behavior a = Time -> a; type Event a = [(Time,a)]
08:27:43 <elliott> zzo38: Those are lies. Now you can start on the open problem of FRP: finding out definitions that aren't lies.
08:27:52 <shachaf> elliott: Step 1: "Behaviour"
08:28:00 <elliott> Correct!
08:28:19 <pikhq> elliott: What I gathered from him was that by using Blub you'll get better programmers, not that you'll turn people into better programmers.
08:28:20 <shachaf> Step 2: "Eveunt"
08:28:33 <pikhq> Which is at least not complete incoherent nonsense. :)
08:28:35 <kmc> you're mixing several PG metaphors
08:28:48 <elliott> kmc: Not true, I didn't mention painting.
08:29:16 <kmc> penalty, disproving a universal statement with an existence proof. five yards.
08:29:20 * elliott doesn't tend to be too careful with PG mockquotes, admittedly, although I do agree that such languages can give competitive advantages.
08:29:48 <elliott> The problem is that most relevant languages that don't have the infrastructure you need because they're still obscure competitive advantages.
08:29:55 <kmc> he thinks Lisp gave ViaWeb a competitive advantage on technical grounds
08:30:09 -!- kmc has left ("Leaving").
08:30:12 -!- kmc has joined.
08:30:20 <elliott> I also don't think that using Haskell for a game is a competitive advantage unless you /do/ go for something like FRP.
08:30:32 <elliott> Because you'll just spend all your time in IO writing callbacks.
08:30:37 <kmc> dunno, Haskell is still a pretty good language
08:30:38 <shachaf> kmc: I wonder why that keeps happening. Do you try to delete a word with ^W?
08:30:45 <kmc> i forgot why
08:30:56 <kmc> and you get a nontechnical advantage from hiring haskellers
08:30:57 <elliott> kmc: It is, but it's not significantly better at imperative programming than most other languages.
08:31:03 <elliott> The lack of pointers is nice, of course.
08:31:17 <elliott> I guess for the iPhone you pretty much have to write games in C++ unless you go for something "weird" like Haskell.
08:31:28 <pikhq> Objective C, not C++.
08:31:29 <kmc> i think it is very common to write rendering in C or C++ and game logic in Lua
08:31:30 <elliott> (I gather people write the games in C++ and glue it with Objective-C++.)
08:31:32 <elliott> pikhq: ^
08:31:35 <elliott> Objective-C is way too slow.
08:31:36 <pikhq> Oh, okay.
08:31:45 <kmc> which is kind of like writing rendering in C and writing game logic in Haskell
08:31:46 <elliott> It's all the safety of C with all the speed of unoptimised Smalltalk.
08:31:52 <kmc> which is what they were doing
08:32:06 <kmc> getting Lua working is a lot less of a pain
08:32:08 <zzo38> Objective-C is a strict superset of C, so you can write a plain C program in Objective-C, too.
08:32:20 <elliott> kmc: Rendering in C seems an odd choice. Isn't the iPhone all shadery these days?
08:32:21 <kmc> hiring Lua programmers is not much of a competitive advantage; it's pretty standard in the game industry
08:32:28 <kmc> i'm sure there were shaders too
08:32:36 <elliott> ISTR that the OpenGL they use doesn't have the fixed-function stuff, so there's not all /that/ much C code you'd end up writing.
08:32:39 <pikhq> zzo38: Yeah, but Objective-C++ is supported trivially on the platform, and industry tends to prefer C++ over C.
08:32:40 <elliott> I guess GLSL counts as C.
08:32:44 <kmc> what i mean is that you make OpenGL calls from a thread which doesn't need garbage collection
08:32:44 <elliott> Sort of.
08:32:46 <kmc> TRIVIAL
08:32:48 <elliott> kmc: right
08:33:02 <elliott> Wasn't GHC getting a parallel collector?
08:33:05 <elliott> Or am I thinking concurrent.
08:33:07 <elliott> Non-pausing.
08:33:11 <kmc> it's in a branch
08:33:11 <zzo38> pikhq: Then you can program plain C++ in Objective-C++ if you want to do so
08:33:47 <kmc> i think PG may be right about Lisp and ViaWeb, but note that there were many fewer options back then
08:34:00 <pikhq> Really, the supported compiler is GCC, so... Yeah. Nice and simple to do any GCC-supported language, maybe modulo a few outright oddballs.
08:34:03 <pikhq> (gcj?)
08:34:04 <kmc> his competitors were writing webapps in C++ or pre-modern Perl
08:34:13 <kmc> nothing resembling a "web framework" would exist for another decade
08:34:15 <elliott> pikhq: Er, isn't the iPhone clang these days?
08:34:25 <pikhq> elliott: Oh, right, so it probably is.
08:34:27 <elliott> I mean, OS X is, so I can't imagine the iPhone isn't too.
08:34:42 <pikhq> Which leaves you with C, Objective-C, C++, Objective-C++.
08:34:43 <kmc> so I'll bet they got a lot of benefit from being able to grow a kind of web framework in Lisp organically
08:34:58 <pikhq> Which is also the set of languages most anyone would actually *give a shit about* in GCC.
08:35:02 <kmc> but also they had good timing and won the lottery etc
08:35:19 <pikhq> (seriously, who uses Fortran? GCJ? D?)
08:35:30 <elliott> kmc: didn't pg say viaweb took off because of their crazy programming interface thing
08:35:34 <kmc> most of the advice PG has about doing a startup is not technical
08:35:39 <kmc> which is probably correct
08:35:44 <kmc> though his advice is biased and self-serving
08:35:53 <elliott> I think PG extrapolates way too much for his sample size.
08:36:07 <pikhq> "You should do startups! Here, we've got a totally awesome service that is the BEST EVER for it!"
08:36:11 <elliott> But yeah, "How to Win the Lottery" wouldn't be a very popular article.
08:36:26 <kmc> today there are many reasonable, popular languages and frameworks for web programming
08:36:43 <kmc> it's harder for me to believe that using Haskell over Rails will be a huge advantage, even if using Lisp over C++ was
08:36:49 <kmc> (in the technical sense)
08:37:20 <elliott> it might be a security advantage though :)
08:37:26 <kmc> sure
08:37:29 <kmc> startups don't care about security
08:37:33 <pikhq> Yeah... Web dev has had at least enough sensibility to stop with C/C++.
08:37:36 <elliott> yep :p
08:37:41 <pikhq> Though they're still on PHP and Ruby. :P
08:37:47 <elliott> pikhq: http://www.webtoolkit.eu/wt
08:38:24 <pikhq> WHY GOD WHY
08:39:10 <kmc> ksplice cared about security because we had the ability to automatically root hundreds of thousands of Linux machines
08:39:19 <kmc> even then, I suspect others in a similar situation would not care
08:39:27 <shachaf> pikhq: To be fair, he wrote "you should do startups" way before he started investing in them.
08:39:45 <kmc> shachaf, you should play the lottery! one time i played the lottery and won the jackpot!
08:40:01 <kmc> there may be some correlation between the people who understand and care about security, and the people who can write something like ksplice
08:40:12 <pikhq> shachaf: True, that's only really a criticism of his *later* stuff. Where he talks a lot about how his startup incubator thing is awesome.
08:40:21 <pikhq> Not where he talks about how startups in general are awesome.
08:40:37 <kmc> it's all self-serving, even when he's not directly talking about YC
08:40:42 <shachaf> kmc: Sure, I was only responding to pikhq's specific statement.
08:40:51 <kmc> he wants to sell you on the idea that you need to do a startup by age 18 or else you are a failure in life
08:41:08 <kmc> that way you'll be willing to give away equity for minimum wage
08:41:25 <kmc> if people graduate college and work a couple jobs before doing a startup, they don't need YC as much
08:41:33 <kmc> they have savings and they have industry connections
08:42:12 <pikhq> And will probably need less of the advice YC could give (they do give advice, right?)
08:42:27 <kmc> yeah
08:42:51 <elliott> advice: make lots of money
08:43:17 <pikhq> Advice: steal from Gates
08:43:31 <kmc> hence disparaging the corporate work environment
08:43:38 <kmc> "I'm not sure why Mr. Graham felt the need to draw this incredibly condescending parallel with company employees and caged animals in the zoo." http://www.codinghorror.com/blog/2008/03/paul-grahams-participatory-narcissism.html
08:43:51 <elliott> Oh man, Jeff Atwood writing about Paul Graham!
08:43:55 <kmc> i know right
08:43:56 <elliott> I can't think of anything more enjoyable.
08:44:26 <kmc> here, Spolsky is PG's partner in crime
08:44:31 <kmc> dunno about Atwood
08:44:39 <elliott> haha, and referencing slamming spolsky in the second paragraph
08:44:50 <kmc> Spolsky wants you to think that every company besides Fog Creek is a soul-sucking cubicle mill
08:44:55 <elliott> I wonder if Spolsky tried to get SO written in that custom language
08:45:00 <kmc> because that's the core of their corporate identity
08:45:34 <kmc> "we're going to make a software company which is unlike 1994 Microsoft"
08:46:03 <elliott> as far as I can tell Fog Creek's main money-making scheme must be getting people to like them, rather than anybody actually using their products
08:46:40 <pikhq> Does Fog Creek make anything?
08:46:58 <ais523> a bug tracker, IIRC
08:47:41 -!- Vorpal has joined.
08:47:48 -!- Vorpal has quit (Changing host).
08:47:48 -!- Vorpal has joined.
08:48:20 <kmc> also https://trello.com/, an organization / collaboration tool
08:48:31 <kmc> and a few other things
08:49:00 <kmc> if you want to spend 80 minutes cringing, watch http://www.projectaardvark.com/movie/
08:49:11 <kmc> which is about some interns developing one of their other products
08:49:45 <elliott> 80 minutes of cringing? I can't think of anything I want more.
08:52:52 <monqy> who thought that would be a good idea
08:53:21 <kallisti_> elliott: have I ever mentioned that you're a jerk?
08:53:49 <monqy> I always figured it went without saying
08:54:18 <elliott> kallisti_: Often
08:58:58 <shachaf> Is the main reason that http://en.wikipedia.org/wiki/File:Rope_example.jpg is rotated to make it seem more impressive?
09:01:16 <itidus21> it is more pleasant on the eyes rotated
09:01:17 <monqy> good graphic
09:01:45 <shachaf> None of the other pictures on that page are rotated.
09:02:06 <elliott> shachaf: I've wondered about that thing too.
09:02:16 <elliott> "The topic of this article may not meet Wikipedia's general notability guideline. Please help to establish notability by adding reliable, secondary sources about the topic. If notability cannot be established, the article is likely to be merged, redirected, or deleted. (September 2011)"
09:02:22 <elliott> Oh yeah, ropes are so non-notable.
09:03:06 <monqy> why is it rotated? why is it jpeg? why what's up with everything being off center and angled wrong?
09:03:14 <monqy> so many questions. the most mysterious image.
09:03:33 <shachaf> I just realised that I'm a JPG snob.
09:03:37 <shachaf> When did that happen?
09:03:39 <itidus21> monqy: ok the investigatin begins
09:04:54 <elliott> shachaf: I don't even like the idea of using JPEGs for photos.
09:05:04 * elliott biggest jpeg snob
09:05:05 <itidus21> Meng Yao introduced the rotated rope on 03:25, 25 April 2011
09:05:31 <itidus21> his edit increased the document from about 3kb to 9kb
09:06:41 <itidus21> his only wiki contribution has been on the rope article and he altered it on wiki for approximately 90 minutes before dissapearing forever
09:06:44 <elliott> Rotated rope. Rope.
09:08:01 <zzo38> class Category c => CatArrow c p where { arr1 :: c x y -> c (p x z) (p y z); arr2 :: c x y -> c (p z x) (p z y); mirror :: c (p x y) (p y x); (*+*) :: c x y -> c x' y' -> c (p x x') (p y y'); (&|&) :: c x y -> c x y' -> c x (p y y'); arr2 f = mirror . arr1 f . mirror; f *+* g = arr1 f >>> arr2 g; }; Is it possible to define mirror in terms of the other class methods?
09:08:12 <zzo38> Should there even be a mirror?
09:09:21 <elliott> shachaf: Take a look at this amazing question: http://stackoverflow.com/questions/8767849/importing-modules-as-a-function-with-string-as-input
09:09:25 <elliott> The edit is the best part.
09:09:29 <itidus21> meng yao included his rope diagram 8 times in his wiki edit :-D
09:09:47 <elliott> itidus21: there are multiple diagrams
09:09:58 -!- Ngevd has joined.
09:10:01 <Ngevd> Hello!
09:10:05 <itidus21> ok ok its not exactly the same
09:10:47 <itidus21> as to why he rotated it... i think that is a real mystery
09:11:22 <monqy> and why it's jpeg and why it's generally wonky
09:11:25 <monqy> many real mysteries
09:11:53 <kallisti_> elliott: lol. one bad idea to another.
09:12:08 <itidus21> perhaps he is boycotting SVG
09:13:39 <shachaf> elliott: So I read every word in that sentence once and didn't manage to piece it together.
09:13:53 <shachaf> elliott: I'm going to treat this as one of those games where you only get one try and then it's instadeath.
09:14:57 <monqy> I read it a few times and still don't get it
09:15:43 <elliott> `shaWhich sentence?
09:15:47 <elliott> shachaf:
09:15:55 <HackEgo> ​/home/hackbot/hackbot.hg/multibot_cmds/lib/limits: line 5: exec: shaWhich: not found
09:16:04 <elliott> @src foldl
09:16:04 <lambdabot> foldl f z [] = z
09:16:04 <lambdabot> foldl f z (x:xs) = foldl f (f z x) xs
09:16:11 <elliott> Right.
09:16:20 <shachaf> elliott: The edit.
09:16:52 <elliott> shachaf: It's technically multiple sentences. :p
09:18:09 <elliott> shachaf: Am I a bad person if I don't really like RWH?
09:18:15 * elliott feels guilty.
09:18:57 <shachaf> elliott: I haven't read RWH.
09:19:18 * elliott hasn't read all of it.
09:19:35 <shachaf> kmc says that the chapters on FFI and STM are good.
09:19:43 <elliott> But all the code snippets are ugly imperative blobs.
09:19:45 <shachaf> I haven't even read those.
09:19:51 <elliott> Also it's really outdated but I can't really blame them for that.
09:19:54 <shachaf> elliott: That's Real-World for you!
09:20:05 <shachaf> elliott: I'm sure you could find room in your heart to blame them for being outdated.
09:20:20 <elliott> I heard they advocated putting text in ByteStrings, which is unacceptable even if one of the authors later goes on to create a Unicode text type. :p
09:20:28 <elliott> I HEARD THEY'RE COMMIES.
09:21:04 <shachaf> OUR PRECIOUS UNICODE FLUIDS
09:21:20 * elliott would like to see a LYAH2: Electric Boogaloo that picks up where LYAH left off.
09:22:03 <kallisti_> the problem is that it would still have to be written in a quirky style.
09:22:43 <elliott> LYAH isn't really.
09:22:51 <monqy> lyah2: the real world no jokes allowed
09:22:59 <elliott> Although w(p)gtr kind of desensitised me to that sort of stuff permanently.
09:23:09 <kallisti_> "see, monads are just monoids in the category of endofunctors. Pretty simple, huh? <picture of a poorly drawn conch shell>"
09:23:09 <shachaf> elliott: I don't like LYAH much either.
09:23:12 <shachaf> Not that I've read it.
09:23:33 <kallisti_> I like it because
09:23:37 <kallisti_> it's how I learned Haskell.
09:23:40 <kallisti_> initially.
09:23:43 <shachaf> But people occasionally come into #haskell, misled by wrong sentences in it.
09:23:57 <elliott> shachaf: Hmm, like what?
09:24:03 <pikhq> shachaf: It's not bad, it's just very, very simplistic.
09:24:21 <pikhq> It ends with monads.
09:24:25 <elliott> pikhq: *zippers
09:24:30 <pikhq> elliott: Bah
09:24:40 <kallisti_> if only we could teach newbies every excrutiatingly technically correct detail of everything without scaring them away.
09:24:45 <shachaf> elliott: I don't remember.
09:24:46 <shachaf> Monads-as-containers or something.
09:24:54 * elliott would write a Haskell tutorial, but nobody would read it.
09:25:00 <shachaf> I'd read it!
09:25:04 <shachaf> Well.
09:25:10 <shachaf> I'd read it to the same degree I've read LYAH and RWH.
09:25:11 <kallisti_> elliott: you would just spam equations at the reader and be like "okay this makes perfect sense now"
09:25:17 <shachaf> That's a pretty good honour, isn't it?
09:25:32 <elliott> "When we first talked about functors, we saw that they were a useful concept for values that can be mapped over. Then, we took that concept one step further by introducing applicative functors, which allow us to view values of certain data types as values with contexts and use normal functions on those values while preserving the meaning of those contexts.
09:25:33 <elliott> In this chapter, we'll learn about monads, which are just beefed up applicative functors, much like applicative functors are only beefed up functors.
09:25:33 <elliott> [...]
09:25:34 <elliott> Monads are a natural extension of applicative functors and with them we're concerned with this: if you have a value with a context, m a, how do you apply to it a function that takes a normal a and returns a value with a context? That is, how do you apply a function of type a -> m b to a value of type m a? So essentially, we will want this function:
09:25:38 <elliott> (>>=) :: (Monad m) => m a -> (a -> m b) -> m b
09:25:40 <elliott> If we have a fancy value and a function that takes a normal value but returns a fancy value, how do we feed that fancy value into the function? This is the main question that we will concern ourselves when dealing with monads. We write m a instead of f a because the m stands for Monad, but monads are just applicative functors that support >>=. The >>= function is pronounced as bind."
09:25:45 <elliott> shachaf: Looks pretty far away from monads-as-containers to me.
09:25:58 <kallisti_> monads-as-fancy-values
09:26:22 <elliott> shachaf: "Well, there should, but when Haskell was made, it hadn't occured to people that applicative functors are a good fit for Haskell so they weren't in there." This is misleading though, EVERYBODY knows Haskell predates applicative functors.
09:26:24 <elliott> EVERYBODY
09:27:05 <shachaf> elliott: I don't remember.
09:27:17 -!- kallisti_ has changed nick to kallisti.
09:27:24 <shachaf> Haskell is a natural predator of applicative functors.
09:30:59 -!- Taneb has joined.
09:31:06 -!- Ngevd has quit (Read error: Connection reset by peer).
09:36:19 -!- Taneb has quit (Ping timeout: 268 seconds).
09:36:46 <zzo38> THere is also join, and that doesn't mention join
09:37:42 <kallisti> sure it does.
09:37:46 <kallisti> it mentions >>=
09:37:53 <elliott> zzo38: join is not in the Monad typeclass
09:37:56 <kallisti> :>
09:38:03 <kallisti> I'm sure it's mentioned id at some point
09:38:05 <zzo38> elliott: I know it is not in the Monad typeclass but it should be
09:38:12 <shachaf> elliott: If we're arguing *that* way, it didn't mention fail.
09:38:14 <kallisti> ANYONE WITH A BRAIN would know that join is (>>= id) :>
09:38:21 <shachaf> fail is one of the essential nutrients for any Haskell monad.
09:39:26 <elliott> shachaf: It does show fail and implement it in its examples, actually.
09:39:33 <elliott> Though it probably: shouldn't.
09:39:43 <elliott> zzo38: Well, LYAH is a Haskell tutorial, not a Haskell-as-it-should-be tutorial.
09:40:54 <zzo38> But you can't learn monads properly unless you know about fmap and join as well, and their mathematical relation to >>=
09:41:13 <pikhq> zzo38: It does teach functors and applicative functors before monads.
09:41:19 <shachaf> "learn monads" should never be your goal.
09:41:28 <monqy> zzo38: that's what monad tutorials are for
09:41:55 <kmc> (>>=) = (8===D)
09:42:00 <pikhq> shachaf: Not necessarily. What if you're learning category theory? :)
09:42:30 <monqy> _ === _ = (>>=)
09:42:50 <kallisti> monqy: ah yes good old const (const (>>=))
09:43:05 <monqy> my favourite
09:43:05 <kallisti> the best of all functions
09:43:16 <kallisti> no wait, not as good as the totem pole.
09:43:43 <kmc> the best of all functions is the McCarthy 91 function
09:44:11 <elliott> kmc: What about the man or boy not-a-function?
09:44:26 <kmc> @let best n | n > 100 = n-10 | otherwise = best (best (n+11))
09:44:27 <lambdabot> Defined.
09:44:30 <kmc> > best 50
09:44:32 <lambdabot> 91
09:44:38 <elliott> > best 91
09:44:39 <lambdabot> 91
09:44:40 <elliott> > fix best
09:44:43 <lambdabot> mueval-core: Time limit exceeded
09:44:45 <kmc> fail
09:44:48 <kmc> > fail
09:44:49 <lambdabot> Overlapping instances for GHC.Show.Show (GHC.Base.String -> m a)
09:44:50 <lambdabot> arising...
09:44:59 <zzo38> I think monad are generally understand better as a endofunctor having return and join, at least to me it is. But >>= is useful too, and so is <*> and that stuff.
09:45:05 <pikhq> > fix (>>=)
09:45:06 <lambdabot> Occurs check: cannot construct the infinite type:
09:45:06 <lambdabot> m = (->) (a -> m b)
09:45:11 <elliott> > fix bеst
09:45:13 <lambdabot> 91
09:45:16 <kmc> :t fij oin
09:45:16 <elliott> kmc: It was just a bit slow, that's all.
09:45:16 <lambdabot> Not in scope: `fij'
09:45:17 <lambdabot> Not in scope: `oin'
09:45:19 <kmc> :t fix join
09:45:20 <lambdabot> Occurs check: cannot construct the infinite type: a = m a
09:45:20 <lambdabot> Expected type: m (m a)
09:45:20 <lambdabot> Inferred type: m a
09:45:56 <kmc> Check in the appropriate box for boy or girl
09:45:58 <kmc> wondering will it ever stop and who invented this world
09:46:10 <kmc> Hi, welcome to big burger can i take your order?
09:46:25 <elliott> hi
09:46:29 <pikhq> Someone broke kmc!
09:46:40 <elliott> hi
09:46:47 <zzo38> For example, the list monad, join means put all list together, and for IO monad, join means if result if IO is another IO series of actions, then do the resulting one afterward.
09:47:15 <elliott> hi
09:47:16 <monqy> sequencing
09:47:23 <elliott> sequencing
09:52:23 <zzo38> And with (,) monad, join will make the monoid composition
09:59:29 -!- ais523 has quit (Remote host closed the connection).
09:59:33 <shachaf> Speaking of (,)
09:59:40 <shachaf> @let best n = tell [n] >> if (n > 100) then return (n-10) else best (n+11) >>= best
09:59:41 <lambdabot> <local>:13:0:
09:59:41 <lambdabot> Multiple declarations of `L.best'
09:59:41 <lambdabot> Declared at: <loca...
09:59:53 <shachaf> @let bestest n = tell [n] >> if (n > 100) then return (n-10) else bestest (n+11) >>= bestest
09:59:54 <lambdabot> Defined.
09:59:59 <shachaf> > runWriter (bestest 91)
10:00:01 <lambdabot> (91,[91,102,92,103,93,104,94,105,95,106,96,107,97,108,98,109,99,110,100,111...
10:00:11 <shachaf> > runWriter (bestest 89)
10:00:13 <lambdabot> (91,[89,100,111,101,91,102,92,103,93,104,94,105,95,106,96,107,97,108,98,109...
10:00:20 <shachaf> Thanks, lambdabot.
10:02:38 <kmc> Thambdabot.
10:02:41 -!- sebbu2 has joined.
10:02:47 -!- sebbu2 has quit (Changing host).
10:02:47 -!- sebbu2 has joined.
10:02:52 <kmc> Thanks, Hanks. Thanks.
10:03:12 <shachaf> "Here is how John McCarthy may have written this function in Lisp, the language he invented:"
10:03:32 <shachaf> Right, because he'd've written it in Common Lisp.
10:04:21 -!- zzo38 has quit (Remote host closed the connection).
10:04:34 -!- sebbu has quit (Ping timeout: 255 seconds).
10:08:56 -!- Phantom_Hoover has joined.
10:10:51 <elliott> shachaf: There's a reason it's called Common Lisp!
10:10:57 <elliott> I... completely forget why.
10:14:32 <shachaf> elliott: It's derived from "Come On".
10:14:46 -!- Phantom_Hoover has quit (Ping timeout: 240 seconds).
10:15:02 -!- Phantom_Hoover has joined.
10:18:03 <kmc> shachaf, "Lisp" doesn't mean "Common Lisp"
10:18:16 <kmc> shachaf, it means "whatever vaguely Lisp-like language most supports the point I'm currently trying to make"
10:19:11 <shachaf> kmc: Using "defun" and "t"?
10:19:18 <kmc> for example "Lisp is a statically-typed language with pattern matching"
10:19:53 <shachaf> That sounds like a fun game.
10:20:02 <shachaf> Sadly I must go to sleep.
10:20:09 <kmc> in this case "Lisp" means "Lisp extended with macros for pattern-matching and a static type system, which should be trivial for the most casual observer"
10:20:16 <kmc> sadly but truly
10:20:28 <Phantom_Hoover> Pattern matching?
10:20:29 <shachaf> kmc: Wait, I thought Haskell had a monopoly on that technique?
10:20:29 <Phantom_Hoover> Lisp?
10:21:03 <elliott> Phantom_Hoover: Tons of Lisps have pattern matching.
10:21:06 <elliott> Heck, destructuring-bind is in CL.
10:21:37 <Phantom_Hoover> Huh.
10:21:47 <shachaf> Pattern matching is just a special case of unification, man.
10:22:18 <kmc> "Lisp is a simple, elegant language based on the lambda calculus" => R5RS Scheme with mutation and anything you don't learn in SICP removed
10:22:40 <kmc> "Lisp is a mature language with sophisticated implementations" => Common Lisp
10:22:42 <shachaf> kmc: _The Little Schemer_ is simpler than SICP for this purpose.
10:22:52 <kmc> "Lisp is webscale, in the cloud" => Clojure
10:23:42 * shachaf wonders what kmc will say about Arc
10:24:21 <kmc> mumble mumble hackers and painters
10:25:37 <elliott> Did you know there are people who still care about Arc?
10:25:46 <Phantom_Hoover> Astonishing.
10:25:50 <elliott> kmc: R5RS really shouldn't have mutation, though.
10:25:54 <elliott> At least not set-car!/cdr!.
10:26:00 <elliott> set! I can bear.
10:26:24 <kmc> sigh
10:26:27 <kmc> been fighting with this recently
10:26:34 <kmc> to get some Scheme code to work in Racket
10:26:43 <elliott> kmc: #lang r5rs?
10:26:46 <elliott> Or whatever the syntax is.
10:26:49 <kmc> doesn't do everything I want
10:26:51 <kmc> but, we have it working now
10:27:13 * elliott thinks it was a deliberately breaking change to make Racket more distinct as its own language
10:27:24 <kmc> so, it seems weird to use pairs also as reference cells
10:27:25 <elliott> although it was still PLT Scheme then
10:27:43 <kmc> but there's probably some benefit in having reference cells, distinct from mutable environments
10:27:48 <kmc> but i'll have to think about what that might be
10:27:48 <elliott> yes, true
10:27:59 <elliott> kmc: it's a legacy from lisp implementations of ye olden days, I think
10:28:03 <kmc> sure
10:28:05 <elliott> where even implementation structures were made out of cons cells
10:28:13 <elliott> I know picolisp still does everything like that
10:28:21 <elliott> also I have no actual evidence old implementations were like that
10:28:24 <kmc> "what, you don't do everything inside a metacircular evaluator"
10:28:34 <kmc> "how do you write language extensions?!?"
10:29:19 <shachaf> kmc: Is this for your educational thing?
10:29:35 <kmc> i don't know what you mean
10:29:44 <kmc> Zombie 6.001 is http://web.mit.edu/alexmv/6.S184/
10:29:46 <shachaf> You were talking about something earlier.
10:29:46 <kmc> i'm helping teach it
10:29:50 <shachaf> Ah. Yes, that.
10:30:23 <shachaf> That looks like a fun class thing.
10:30:28 <kmc> yep
10:30:32 <kmc> you should follow along
10:30:50 <shachaf> How does one do that?
10:30:58 <shachaf> Do I have to move to Boston?
10:31:06 * elliott closes some tabs so he can see the favicons again.
10:31:10 <kmc> i expect lecture slides and assignments will be posted
10:32:26 <shachaf> elliott: I'm just at the brink. Interesting tabs are a zero-sum game now.
10:32:42 * kmc thinks project 3 might be kind of a challenge, even as an instructor
10:33:04 <kmc> (but it's not posted yet)
10:33:09 <shachaf> What's project 3?
10:33:23 <kmc> a bunch of extensions to the metacircular evaluator
10:33:27 <kmc> including an interactive debugger
10:33:45 <shachaf> Ah, a debugger.
10:35:08 <shachaf> I haven't actually read SICP. I probably should.
10:35:29 <kmc> i've not read it cover to cover
10:35:36 <kmc> but i think i've read most parts of it at some point or another
10:36:39 <shachaf> OK, you've convinced me. I'll follow along.
10:36:57 <shachaf> You should send me a reminder when it starts, if you remember. :-)
10:37:00 <kmc> sure
10:37:02 <kmc> it starts on Monday
10:37:05 <kmc> er, Tuesday
10:37:12 <elliott> I suddenly realise I've never written a debugger.
10:37:14 * kmc keeps forgetting that Tuesday isn't Monday
10:37:17 <elliott> (Probably because I don't like debuggers.)
10:37:20 <shachaf> Oh.
10:37:36 <shachaf> elliott: Write a C debugger in Haskell for me.
10:37:51 <shachaf> And make it like gdb except satisfying whatever mysterious criteria a debugger must satisfy for me to like it.
10:39:02 <shachaf> Where are the slides etc. going to be posted?
10:39:03 <elliott> shachaf: I don't think it's possible to like anything that exclusively exists to make you focus in depth on the exact control flow of an imperative prorgam.
10:39:14 <elliott> Prorgam!
10:39:18 <kmc> shachaf, for zombie 6.001? at the URL i just linked, I think
10:39:41 * kmc is new to this
10:39:54 <shachaf> OK. I'll keep a tab open.
10:40:09 <kmc> will try to remind you
10:40:16 <shachaf> Hopefully I remember to reload it on Tuesday.
10:40:25 <kmc> first project will be posted Tuesday night
10:40:34 * shachaf cleverly executes a rebalancing algorithm by moving a pair of tabs from one window to another.
10:40:38 <elliott> shachaf: The best way to GC tabs is to turn your computer off every day.
10:40:53 * elliott just holds down the power button so he doesn't get a chance to think about saving them.
10:41:03 <shachaf> elliott: That would be a tragedy.
10:41:09 <kmc> the best way is to run a browser which crashes a lot
10:41:12 <shachaf> This collection of tabs has been building up for about a year.
10:41:17 <shachaf> My browser crashes but recovers.
10:41:27 <elliott> :t fromRational
10:41:28 <lambdabot> forall a. (Fractional a) => Rational -> a
10:41:40 <elliott> @hoogle Floating a => a -> Float
10:41:40 <lambdabot> Prelude acos :: Floating a => a -> a
10:41:41 <lambdabot> Prelude acosh :: Floating a => a -> a
10:41:41 <lambdabot> Prelude asin :: Floating a => a -> a
10:41:43 <elliott> Oh, right.
10:41:47 <elliott> @hoogle Double -> Float
10:41:48 <lambdabot> Unsafe.Coerce unsafeCoerce :: a -> b
10:41:48 <lambdabot> Control.OldException throwDyn :: Typeable exception => exception -> b
10:41:48 <lambdabot> Control.DeepSeq ($!!) :: NFData a => (a -> b) -> a -> b
10:41:51 <elliott> lmao
10:41:59 <kmc> haha
10:42:01 <kmc> what the fuck
10:42:13 <elliott> @hoogle (RealFloat a) => a -> b
10:42:13 <lambdabot> Unsafe.Coerce unsafeCoerce :: a -> b
10:42:13 <lambdabot> Prelude isDenormalized :: RealFloat a => a -> Bool
10:42:13 <lambdabot> Prelude isIEEE :: RealFloat a => a -> Bool
10:42:16 <elliott> I forget if RealFloat is a thing.
10:42:17 <elliott> Yes, it is.
10:42:18 <elliott> @hoogle (RealFloat a) => a -> Float
10:42:18 <lambdabot> Prelude significand :: RealFloat a => a -> a
10:42:19 <lambdabot> Prelude id :: a -> a
10:42:19 <lambdabot> Data.Function id :: a -> a
10:42:22 <elliott> @hoogle (RealFrac a) => a -> Float
10:42:22 <lambdabot> Prelude id :: a -> a
10:42:22 <lambdabot> Data.Function id :: a -> a
10:42:23 <lambdabot> GHC.Exts breakpoint :: a -> a
10:42:26 <elliott> Oh, come on!
10:42:29 <shachaf> @hoogle /msg
10:42:29 <lambdabot> Parse error:
10:42:29 <kmc> :t Control.OldException.throwDyn :: Double -> Float
10:42:30 <lambdabot> /msg
10:42:30 <lambdabot> ^
10:42:30 <lambdabot> Double -> Float
10:42:37 <kmc> > Control.OldException.throwDyn 3.0
10:42:38 <lambdabot> Not in scope: `Control.OldException.throwDyn'
10:43:10 <shachaf> That's a fun type.
10:43:20 <elliott> how do you even do Float -> Double or w/e
10:43:24 * elliott hasn't used floating-point much in Haskell
10:43:30 <kmc> :t realToFrac
10:43:30 <lambdabot> forall a b. (Real a, Fractional b) => a -> b
10:43:32 <elliott> oh right
10:43:34 <kmc> :t realToFrac :: Float -> Double
10:43:35 <lambdabot> Float -> Double
10:43:37 <elliott> I knew that existed, I just forgot its name
10:43:38 <elliott> and type
10:44:22 <shachaf> This is the best typeclass:
10:44:25 <shachaf> @src Real
10:44:25 <lambdabot> class (Num a, Ord a) => Real a where
10:44:25 <lambdabot> toRational :: a -> Rational
10:44:41 <kmc> class F a where { f :: a }
10:45:57 <elliott> kmc: Haskell should get rid of value declarations.
10:45:57 <shachaf> Maybe I should move to Boston for a month.
10:46:05 <elliott> You could just use a newtype record and an instance.
10:46:18 <kmc> mhm
10:46:22 <kmc> shachaf, which month?
10:46:34 -!- Ngevd has joined.
10:46:52 <shachaf> I don't know. I guess the bad months are just around now.
10:51:00 -!- Taneb has joined.
10:51:02 -!- Ngevd has quit (Read error: Connection reset by peer).
10:53:09 <shachaf> Anyway, I was going to sleep.
11:00:07 -!- nooga has joined.
11:00:32 <elliott> shachaf: Hi.
11:00:41 <shachaf> elliott: Thanks.
11:01:53 <elliott> shachaf: Did I wake you up?
11:02:03 <kmc> thelliott
11:02:47 <shachaf> Thanks, kmc.
11:03:38 <shachaf> Stumped you there, didn't I.
11:03:48 <kmc> no
11:04:37 <shachaf> Oh.
11:04:49 <shachaf> Anyway, I'm going to sleep.
11:04:57 <kmc> good night, shachaf
11:05:03 <kmc> gochaf
11:19:56 -!- azaq23 has joined.
11:26:09 <Taneb> Hello
11:39:29 <elliott> class Comonoid a where { ytpme :: a -> (); dneppa :: a -> (a,a) }
11:39:44 <monqy> no....
11:40:03 <monqy> what laws does it follow
11:42:16 <Phantom_Hoover> The inverse of the monoid laws, duh.
11:42:40 <monqy> help
11:43:51 <Phantom_Hoover> Come on, monqy, it's just comonads extended from endofunctors.
11:44:50 <kallisti> !perl use v5.10; say scalar caller; say eval "scalar caller";
11:44:53 <EgoBot> ​\ main
11:45:20 <monqy> hi perl
11:45:22 <Phantom_Hoover> Evil scalar caller.
11:46:10 <kallisti> `run echo 'scalar caller' > blah.pl; perl -e 'print do "blah.pl"'; rm blah.pl
11:46:13 <HackEgo> main
11:46:34 <kallisti> `run echo 'scalar caller' > blah.pl; perl -e 'package Foo; print do "blah.pl"'; rm blah.pl
11:46:38 <HackEgo> Foo
11:47:12 <kallisti> hm
11:48:13 <kallisti> I /think/ I can use this...
11:48:24 <kallisti> to write code that can reload itself.
11:48:51 <kallisti> I can just check caller and if it's the name of the package, run any kind of necessary hot-swap code.
11:53:26 <elliott> <monqy> no....
11:53:27 <elliott> <monqy> what laws does it follow
11:54:07 <elliott> monqy: i er
11:54:18 <elliott> monqy: i don't know
11:54:22 <monqy> :(
11:54:32 <elliott> <Phantom_Hoover> Come on, monqy, it's just comonads extended from endofunctors.
11:54:43 <elliott> Phantom_Hoover: Not really, you'd need a
11:54:56 <elliott> class SortaCategory (~>) one (*)
11:54:58 <elliott> or whatever.
11:55:03 <elliott> *id
11:55:19 <elliott> ytpme :: id ~> one; dneppa :: id ~> id*id
11:55:33 <kallisti> oh hmmmm that won't always work I think....
11:56:07 <kallisti> if I write new code that removes a method, the reload won't hide that method.
11:56:17 <kallisti> but it can redefine and add methods no problem.
11:57:14 <kallisti> `run echo '$x' > blah.pl; perl -e 'local $x = 5; print do "blah.pl"'; rm blah.pl
11:57:17 <HackEgo> 5
11:57:30 <kallisti> `run echo '$x' > blah.pl; perl -e 'my $x = 5; print do "blah.pl"'; rm blah.pl
11:57:33 <HackEgo> No output.
11:57:43 <kallisti> awwww yeah.
11:57:56 <kallisti> I can do so many evil things with that trick.
11:58:00 <elliott> Phantom_Hoover: (What is a comonoid really?)
11:58:08 <elliott> Oh, it's a monoid in the opposite category.
11:58:17 <Phantom_Hoover> Yes.
11:58:21 <elliott> And the opposite category is just flipping all the arrows.
11:58:32 <elliott> So, um... what's the comonoid equivalent of Monoid?
11:59:25 <kallisti> Comonoid.
11:59:28 <kallisti> :)
12:00:33 <Phantom_Hoover> Well, um, if you take the definition with a category with one object A, and take the underlying set to be Hom(A,A) and the multiplication operator to be ., you get...
12:00:39 <Phantom_Hoover> The exact same monoid?
12:01:06 <Phantom_Hoover> Q.E.D.
12:02:52 <kallisti> `run echo 'package X; our $x = 3' > blah.pl; perl -e 'package X; our $x = 2; do "blah.pl"; print $x;' rm blah.pl
12:02:56 <HackEgo> 3
12:03:18 <kallisti> oh that's so good...
12:03:46 <monqy> why kallisti why................
12:03:57 <kallisti> monqy: to have an IRC bot that never needs to be shutdown ever.
12:05:42 <monqy> `cat blah.pl
12:05:45 <HackEgo> package X; our $x = 3
12:05:57 <kallisti> oh
12:06:19 <kallisti> `run rm blah.pl
12:06:22 <HackEgo> No output.
12:06:50 <kallisti> it's not without flaws though. I can't redefine lexical variables at the top-level this way.
12:07:03 <monqy> perhaps that is for the best
12:07:03 <kallisti> because... well, they're lexical.
12:07:43 <kallisti> but most top-level variables are going to be package scope or dynamic scope anyway.
12:08:37 <kallisti> now for something fun...
12:12:04 <kallisti> `run echo 'package X; my $caller = caller; eval "require $caller";' > X.pm; echo 'package Y; if (my $caller = caller) { eval "require $caller" } else { require X }' > Y.pm; perl Y.pm
12:12:08 <HackEgo> No output.
12:12:12 <kallisti> hm
12:12:18 <kallisti> oh right
12:12:28 <kallisti> I can't recursively require things like that.
12:12:41 <kallisti> `run echo 'package X; my $caller = caller; eval "require $caller";' > X.pm; echo 'package Y; if (my $caller = caller) { eval "require $caller" } else { print %INC; require X }' > Y.pm; perl Y.pm
12:12:44 <HackEgo> No output.
12:13:05 <kallisti> `run echo 'package X; print %INC; my $caller = caller; eval "require $caller";' > X.pm; echo 'package Y; if (my $caller = caller) { eval "require $caller" } else { require X }' > Y.pm; perl Y.pm
12:13:09 <HackEgo> X.pmX.pm
12:15:32 <kallisti> `run echo 'package X; do caller.".pm";' > X.pm; echo 'package Y; if (my $caller = caller) { do "$caller.pm" } else { require X }' > Y.pm; perl Y.pm
12:15:35 <HackEgo> Warning: Use of "caller" without parentheses is ambiguous at X.pm line 1. \ Warning: Use of "caller" without parentheses is ambiguous at X.pm line 1. \ Warning: Use of "caller" without parentheses is ambiguous at X.pm line 1. \ Warning: Use of "caller" without parentheses is ambiguous at X.pm line 1. \ Warning: Use of "caller" without parentheses is ambiguous at X.pm line 1. \ Warning: Use of "caller" without parentheses
12:15:44 <kallisti> lol
12:16:10 -!- Zuu has quit (Ping timeout: 252 seconds).
12:16:20 <kallisti> apparently not very ambiguous because it did exactly what I wanted. :P
12:16:51 <Taneb> `run echo "main = print \"test\""
12:16:54 <HackEgo> main = print "test"
12:17:03 <Taneb> Hmm
12:17:10 <Taneb> I can't remember what I was doing with that
12:17:15 <kallisti> me neither.
12:18:05 <Taneb> `run echo "main = print \"test\"" > test.hs; runhaskell test.hs
12:18:13 <HackEgo> ​"test"
12:18:25 <Taneb> `rm test.hs
12:18:29 <HackEgo> No output.
12:19:34 <kallisti> http://search.cpan.org/~sprout/Sub-Delete-1.00002/lib/Sub/Delete.pm
12:19:41 <kallisti> I could maybe use this if I need to delete subs.
12:20:08 <kallisti> undef &sub; works kinda
12:20:39 <kallisti> or, hmmm...
12:20:52 <kallisti> I could completely destroy the symbol table before I reload. lol.
12:22:02 <Vorpal> gah does java not have a built in rounding function that rounds away from zero in case of .5
12:22:37 <kallisti> lolMath.round?
12:22:42 <Vorpal> kallisti, from the docs of Math.round it seems to always round up? So -0.5 would end up as 0?
12:22:44 <kallisti> oops lol virus
12:22:57 <kallisti> oh that's... weird. maybe they're wrong.
12:23:09 <kallisti> maybe they mean "rounds up" in terms of absolute value.
12:23:12 <Vorpal> hm perhaps
12:23:23 <Vorpal> no REPR for java so a bit annoying to test such
12:23:52 <elliott> read eval print read
12:23:57 <elliott> it just exits after the second read
12:24:03 <elliott> useful(tm)
12:25:04 <kallisti> nonsense. it's just as simple as public class Test { public static void main(String[] argv) { ... }
12:25:05 <monqy> at least it pays attention
12:25:19 <monqy> not like those dirty EEPLs
12:25:59 <kallisti> and then System.out.println(Math.round(-0.5)) assuming you imported Math
12:26:04 <kallisti> so. easy.
12:26:20 <Vorpal> elliott, typo :P
12:26:29 <Vorpal> elliott, but I guess I could justify it as read eval print repeat
12:26:35 <Vorpal> or something
12:26:39 <kallisti> wait no deleting the symbol is probably a bad idea oh wait nevermind that's a great idea.
12:28:28 <kallisti> `run echo 'package X; our $x = 3;' > X.pm; perl -e 'package X; our $x = 2; sub test() { print "WOAH" }; undef %X::; do "X.pm"; test';
12:28:31 <HackEgo> WOAH
12:28:39 <kallisti> oh, no.
12:28:41 <kallisti> not a good idea. :P
12:28:53 <kallisti> `run echo 'package X; our $x = 3;' > X.pm; perl -e 'package X; our $x = 2; sub test() { print "WOAH" }; %X:: = (); do "X.pm"; test';
12:28:56 <HackEgo> WOAH
12:29:08 <kallisti> subroutines get some kind of magic namespace
12:29:10 <kallisti> ?????
12:29:14 <kallisti> no.
12:30:03 <kallisti> `run echo 'package X; our $x = 3;' > X.pm; perl -e 'package X; our $y = 2; sub test() { print "WOAH" }; %X:: = (); do "X.pm"; print $x, $y;'
12:30:06 <HackEgo> 2
12:30:17 <kallisti> uh
12:35:16 <kallisti> `run echo 'package X; our $x = 3;' > X.pm; perl -e 'package X; use strict; our $y = 2; sub test() { print "WOAH" }; %X:: = (); do "X.pm"; print $x, $y;'
12:35:19 <HackEgo> Global symbol "$x" requires explicit package name at -e line 1. \ Execution of -e aborted due to compilation errors.
12:35:37 <kallisti> `run echo 'package X; our $x = 3;' > X.pm; perl -e 'package X; use strict; our ($y,$x) = (2,5); sub test() { print "WOAH" }; %X:: = (); do "X.pm"; print $x, $y;'
12:35:40 <HackEgo> 52
12:36:35 <kallisti> hmmm I spoke too soon.
12:37:16 <kallisti> `run echo 'package X; our $x = 3;' > X.pm; perl -e 'package X; use strict; our ($y,$x) = (2,5); sub test() { print "WOAH" }; do "X.pm"; print $x, $y;'
12:37:20 <HackEgo> 32
12:37:33 <kallisti> okay so. for future reference: don't try to delete symbol tables
12:37:38 <kallisti> weird things will happen.
12:40:03 <fizzie> `run echo 'package X; our $x = 3;' > X.pm; perl -e 'package X; use strict; our ($y,$x) = (2,5); sub test() { print "WOAH" }; %X:: = (); do "X.pm"; print "directly, x=$x, y=$y\n"; eval "print \"evally, x=\$x, y=\$y\\n\"";'
12:40:06 <HackEgo> directly, x=5, y=2 \ evally, x=3, y=
12:40:16 <kallisti> fizzie: ah because of compilation
12:41:04 <kallisti> http://stackoverflow.com/questions/4623556/symbol-table-deleting-entries-question
12:41:06 <kallisti> according to this
12:41:51 <fizzie> It's a reasonable theory.
12:42:49 <fizzie> (Though you should of course give equal time to the "intelligent variable" theory, too.)
12:43:02 <kallisti> I haven't studied that one.
12:43:06 <kallisti> are variables sentient in perl?
12:43:15 <fizzie> It's something like that, yes.
12:43:54 <kallisti> so unless all the code I execute afterwards is part of an eval, my symbol table deletions take no effect.
12:45:29 <kallisti> http://cpansearch.perl.org/src/SPROUT/Sub-Delete-1.00002/lib/Sub/Delete.pm
12:45:39 <kallisti> I wonder what that magical looking subroutine at the top does.
12:46:17 <monqy> magic
12:47:35 <kallisti> my $glob = *$globname; # autovivify the glob in case future perl
12:47:39 <kallisti> you never know when future perl might happen.
12:49:02 <kallisti> keys %imported_slots == 1 and exists $imported_slots{SCALAR} and !$imported_slots{SCALAR} and Internals'SvREFCNT $$glob =>== 1 and !defined *$glob{IO} and !defined *$glob{FORMAT} and return; # empty glob
12:49:06 <kallisti> oh god what is this.
12:49:29 <kallisti> =>== 1 ???????
12:49:49 <kallisti> REALLY greater than or equal to.
12:51:59 <fizzie> `run perl -e '1 =>== 2'
12:52:02 <HackEgo> syntax error at -e line 1, near "=>==" \ Execution of -e aborted due to compilation errors.
12:52:09 <fizzie> It must be some kind of real magic.
12:52:19 <kallisti> oh wait...
12:52:22 <kallisti> it could be either...
12:52:24 <kallisti> = >= =
12:52:27 <kallisti> => ==
12:52:29 <kallisti> or ...
12:52:30 <kallisti> what
12:52:35 <kallisti> what does that even mean
12:53:11 <elliott> I like the use of ' there too
12:53:20 <kallisti> !perl my $x = 3; print Intervals'SvREFCNT \$x
12:53:21 <EgoBot> No output.
12:53:36 <kallisti> oh this code doesn't use strict;
12:53:40 <fizzie> Internals, not Intervals.
12:53:47 <kallisti> !perl my $x = 3; print Internals'SvREFCNT \$x
12:53:48 <EgoBot> Type of arg 1 to Internals::SvREFCNT must be one of [$%@] (not single ref constructor) at /tmp/input.7682 line 1, at EOF \ Execution of /tmp/input.7682 aborted due to compilation errors.
12:53:56 <kallisti> !perl my $x = 3; print Internals'SvREFCNT $x
12:53:57 <EgoBot> 1
12:54:06 <kallisti> not very surprising.
12:55:07 <kallisti> !perl my $x = 3; print Internals'SvREFCNT $x =>== 1
12:55:07 <EgoBot> 1
12:55:18 <kallisti> !perl my $x = 3; print Internals'SvREFCNT $x => == 1
12:55:19 <EgoBot> 1
12:55:22 <kallisti> !perl my $x = 3; print Internals'SvREFCNT $x = >== 1
12:55:23 <EgoBot> syntax error at /tmp/input.7967 line 1, near "= >=" \ Execution of /tmp/input.7967 aborted due to compilation errors.
12:55:33 <kallisti> oh hmmm
12:55:37 <kallisti> I wonder what the comma does.
12:55:42 <kallisti> !perl my $x = 3; print Internals'SvREFCNT $x , == 1
12:55:43 <EgoBot> 1
12:56:02 <kallisti> nothing?
12:56:08 <kallisti> maybe it's to disambiguate something?
12:56:21 <fizzie> !perl my $x = 3; print Internals'SvREFCNT $x, 1
12:56:21 <EgoBot> 1Attempt to free unreferenced scalar: SV 0x7f56d20d4a30, Perl interpreter: 0x7f56d20b3010.
12:56:24 <fizzie> The bestest.
12:56:28 <kallisti> !perl my $x = 3; print Internals'SvREFCNT $x == 1
12:56:29 <EgoBot> Type of arg 1 to Internals::SvREFCNT must be one of [$%@] (not numeric eq (==)) at /tmp/input.8217 line 1, at EOF \ Execution of /tmp/input.8217 aborted due to compilation errors.
12:56:32 <kallisti> ah
12:56:48 <kallisti> it's to prevent that
12:57:05 <kallisti> instead of, you know, using parentheses.
12:57:12 <kallisti> =>== lololololol
12:58:46 <kallisti> a regular comma would have been much clearer
12:58:53 <fizzie> !perl print abs -4 =>== 42
12:58:54 <EgoBot> 4
12:59:10 <kallisti> maybe it's some weird idiom I've never seen?
12:59:51 <kallisti> ....wat
12:59:56 <kallisti> oh
12:59:57 <kallisti> yes
13:00:28 <kallisti> =>== is to == as and is to &&
13:01:07 <elliott> :t randoms
13:01:08 <lambdabot> forall g a. (Random a, RandomGen g) => g -> [a]
13:01:22 <kallisti> but yeally I'd use ,== or , == or (most likely) parentheses
13:01:57 <fizzie> The half-orphan comma looks pretty silly too.
13:03:29 * kallisti is tempted to use this module with use strict turned on and see how many warnings/errors he gets.
13:05:04 <kallisti> anyway this will work in many of the cases I'm concerned with, where I have plugins redefining methods. I think..
13:06:16 -!- oerjan has joined.
13:07:39 <kallisti> `run echo 'package X; our $x = 3;' > X.pm; perl -e 'package X; use strict; our ($y,$x) = (2,5); sub test() { print "WOAH" }; %X:: = (); do "X.pm"; X::test'
13:07:43 <HackEgo> WOAH
13:08:08 <kallisti> `run echo 'package X; our $x = 3;' > X.pm; perl -e 'package X; use strict; our ($y,$x) = (2,5); sub test() { print "WOAH" }; %X:: = (); do "X.pm"; package Blah; X::test'
13:08:11 <HackEgo> WOAH
13:08:15 <kallisti> hm, well, nevermind
13:08:23 <kallisti> I'll just... not try to delete symbol tables.
13:09:14 <kallisti> `run echo 'package X; our $x = 3; sub test { print "SHADOOSH" }' > X.pm; perl -e 'package X; use strict; our ($y,$x) = (2,5); sub test() { print "WOAH" }; %X:: = (); do "X.pm"; package Blah; X::test'
13:09:17 <HackEgo> WOAH
13:09:30 <kallisti> `run echo 'package X; our $x = 3; sub test { print "SHADOOSH" }' > X.pm; perl -e 'package X; use strict; our ($y,$x) = (2,5); sub test { print "WOAH" }; %X:: = (); do "X.pm"; package Blah; X::test'
13:09:32 <HackEgo> WOAH
13:09:35 <kallisti> :(
13:10:30 <kallisti> I'm not sure why it suddenly doesn't work because I add that symbol table line
13:10:40 <kallisti> `run echo 'package X; our $x = 3; sub test { print "SHADOOSH" }' > X.pm; perl -e 'package X; use strict; our ($y,$x) = (2,5); sub test { print "WOAH" }; do "X.pm"; package Blah; X::test'
13:10:44 <HackEgo> SHADOOSH
13:11:24 <kallisti> fizzie: just how sentient are variables in Perl exactly.
13:12:19 <kallisti> `run perl -e 'package X; our $x = 3; %X:: = (); our $x = 4; print $x'
13:12:22 <HackEgo> 4
13:13:17 -!- oerjan has set topic: Official revolting channel of the inverse femtobarn stupid topic change plurality, the original Trilogy: A new PHP | http://codu.org/logs/_esoteric/.
13:14:17 <kallisti> `run echo 'package X; %X:: = (); our $x = 3;' > X.pm; perl -e 'package X; use strict; our ($y,$x) = (2,5); sub test() { print "WOAH" }; do "X.pm"; package Blah; X::test'
13:14:20 <HackEgo> WOAH
13:15:02 <oerjan> HackEgo: you sound so impressed
13:15:14 <kallisti> I don't understand at all...
13:16:07 <kallisti> `run echo 'package X; %X:: = (); our $x = 3;' > X.pm; perl -e 'package X; use strict; our ($y,$x) = (2,5); sub test() { print "WOAH" }; do "X.pm"; sub foo { test}; foo '
13:16:11 <HackEgo> WOAH
13:16:25 * Sgeo should write a hello Template Haskell program or something
13:16:35 <kallisti> Hello, Template World!
13:17:00 <Sgeo> Don't like the notion of needing a separate module though
13:17:03 <kallisti> fizzie: can you make sense of this.
13:19:32 <fizzie> I'm not entirely sure I want to.
13:19:53 <oerjan> kallisti: perhaps you should add -w ?
13:19:59 <elliott> Sgeo: I think it complicates type-checking if you don't enforce that.
13:20:08 * oerjan doesn't really know what kallisti is trying
13:20:13 <elliott> TH is a pain because it messes up the compiler control flow.
13:20:19 <elliott> Thus the restrictions.
13:20:43 <fizzie> Anyway, I suspect compilation again. I mean, do "X.pm" equals eval `cat X.pm`, on compilation-time the 'test' in sub foo presumably gets turned into a reference of the sub test.
13:20:43 <kallisti> oerjan: I'm trying to write code that can reload itself.
13:21:16 <kallisti> the reloading part is easy, however... all the old symbols that weren't overwritten get left behind unless you do something to delete them beforehand.
13:21:26 <kallisti> and now I'm encountering weirdness with Perl and its symbol table.
13:21:50 <kallisti> specifically %X:: = (); doesn't appear to do what you would expect.
13:22:10 <fizzie> Then you must simply expect something else.
13:22:17 <fizzie> "The subroutine is completely obliterated from the symbol table (though there may be references to it elsewhere, including in compiled code)", like Sub::Delete says.
13:22:47 -!- Zuu has joined.
13:22:47 -!- Zuu has quit (Changing host).
13:22:47 -!- Zuu has joined.
13:23:00 <kallisti> it would seem if that were the case then completely redefining the symbol table via a do "X.pm" shouldn't do anything to the outer code.
13:23:24 <kallisti> in fact, if I write %X:: = (); before the do, then that's exactly what happens.
13:23:32 <kallisti> but if I remove that line, then the do redefines symbols as expected.
13:24:51 <kallisti> `run echo 'package X; %X:: = (); our $x = 3;' > X.pm; perl -e 'package X; use strict; our ($y,$x) = (2,5); sub test() { print "WOAH" }; local %X:: = (); do "X.pm"; test '
13:24:54 <HackEgo> WOAH
13:26:07 <kallisti> `run echo 'package X; %X:: = (); our $x = 3; sub test { print "hi" }' > X.pm; perl -e 'package X; use strict; our ($y,$x) = (2,5); sub test() { print "WOAH" }; local %X:: = (); do "X.pm"; test '
13:26:10 <HackEgo> WOAH
13:26:26 <kallisti> `run echo 'package X; our $x = 3; sub test { print "hi" }' > X.pm; perl -e 'package X; use strict; our ($y,$x) = (2,5); sub test() { print "WOAH" }; local %X:: = (); do "X.pm"; test '
13:26:29 <HackEgo> WOAH
13:26:33 <kallisti> okay, I give up. :P
13:27:01 <fizzie> You could just forget about the symbol tables and use coderefs you manage manually.
13:28:02 <kallisti> I was thinking that I could probably just manually delete subroutines when I hotswap if leaving them present would break the system.
13:28:57 <kallisti> but that might have the same problem.
13:29:10 * oerjan notes a subtle edit to the intro blurb in today's darths & droids
13:29:30 <oerjan> well, "subtle"
13:30:12 <Sgeo> Whee!
13:30:13 <Sgeo> makeDef text = [d|helloDefinition = $(litE . stringL $ text)|]
13:30:38 * Sgeo thinks it's somewhat confusing as to when something puts stuff in the Q monad and when it doesn't
13:31:02 <monqy> what parts are confusing
13:31:30 <kallisti> `run echo 'package X; our $x = 3; sub test { print "hi" }' > X.pm; perl -e 'package X; use strict; our ($y,$x) = (2,5); sub test() { print "WOAH" }; undef &test; do "X.pm"; test '
13:31:34 <HackEgo> hi
13:31:51 <kallisti> if I undefine subroutines that way it works fine, so... yes that's an option.
13:31:52 <monqy> I forget what does what and what does what except that the constructors don't and the lowercasey functioney things do
13:32:15 <fizzie> `run echo 'package X; sub test { print "new!" }' > X.pm; perl -e 'package X; use strict; sub test { print "old!" }; do "X.pm"; test; package Blah; X::test'
13:32:18 <HackEgo> new!new!
13:32:24 <fizzie> `run echo 'package X; sub test { print "new!" }' > X.pm; perl -e 'package X; use strict; sub test { print "old!" }; %X:: = (); do "X.pm"; test; package Blah; X::test'
13:32:28 <HackEgo> old!old!
13:32:32 <Sgeo> monqy, yeah, I'm starting to think that's the rule of thumb
13:32:33 <fizzie> kallisti: I'm thinking the %X:: = () symbol table deletion there wipes out the symbol table entry, so the "sub test" in X.pm gets bound to a new entry and therefore doesn't get called; while when you don't wipe it out, the "sub test" in X.pm just overwrites the CODE slot of that glob, and therefore does get called.
13:32:49 <Sgeo> Also didn't realize that [d|..] did a list of the things, and not a single one
13:33:00 <Sgeo> I initially tried to sequence the thing
13:33:04 <kallisti> `run echo 'package X; our $x = 3; sub test { print "hi" }' > X.pm; perl -e 'package X; use strict; our ($y,$x) = (2,5); sub test() { print "WOAH" }; undef &test; do "X.pm"; test '
13:33:07 <HackEgo> hi
13:33:09 <elliott> Sgeo: You're always meant to use the functions.
13:33:15 <elliott> As opposed to the constructors directly.
13:33:24 <elliott> TH sucks, by the way.
13:33:26 <Sgeo> Except when pattern matching?
13:33:28 <elliott> No shit.
13:33:31 <kallisti> fizzie: so I could loop through the symbol table and undef all the variables maybe?
13:33:45 <Sgeo> How does TH suck?
13:33:58 <monqy> Sgeo: it will quickly become apparent
13:34:11 <monqy> Sgeo: unless you're really bad at noticing bad things
13:34:13 <Sgeo> I have 3 choices here: Use TH, write a program to output Haskell code, or go insane.
13:34:15 <elliott> monqy: No it won't, he likes Active Worlds.
13:34:24 <monqy> elliott: I was thinking more station v3 but that works too
13:34:28 <elliott> Sgeo: Pick (d) Don't do whatever bad thing you're trying to do.
13:34:39 <kallisti> Sgeo: code generation is cool. write a perl script.
13:34:43 <monqy> there aren't any th alternatives are there :(
13:34:48 <monqy> cpp doesnt count
13:34:51 <kallisti> Sgeo: I write all of my Haskell in perl.
13:34:53 <elliott> Sgeo: Anyway: http://www.reddit.com/r/haskell/comments/nny43/readargs_for_quick_argument_parsing/c3apz9x?context=1
13:35:02 <elliott> Sgeo: Most people avoid TH for basically those reasons./
13:35:04 <elliott> *no /
13:35:18 <elliott> Deriving lenses is the main TH usecase these days :P
13:36:00 <elliott> Sgeo: (The "BTW, I despise anything using TH. Including my own code." quote is from augustss, if Big Names convince you of things.)
13:37:01 <monqy> Sgeo: what bad thing are you trying to do , anyway
13:37:28 <fizzie> kallisti: I don't really know about Perl internals, I don't know what the compilation stores in the code. If it's a typeglob-like reference, I suppose you could just zero the CODE slots of all the entries; that I think should stop old compiled code calling them, if that's what you want. (Well, except if some place actually stored a coderef to the old sub, I'm not sure if that's even possible to break.)
13:37:42 <elliott> monqy: don't don't say that he'll tell us
13:37:49 <Sgeo> monqy, automate the creation of functions and data structures based on specifications that I.. err, specify, largely copy-pasted from the AW wiki
13:37:59 <kallisti> fizzie: no that can't break.
13:39:25 <kallisti> but that's not really an issue
13:39:36 <kallisti> all the old coderefs get redefined anyway.
13:39:38 <monqy> Sgeo: automate?
13:39:53 <Sgeo> monqy, as opposed to writing out countless definitions by hand.
13:39:58 <kallisti> (the coderefs in my program are in the bot command table, which will get redefined during the hotswap)
13:41:37 <kallisti> basically I'll just add a line so that, if the caller is the package itself, it will autorun a special hotswap routine that basically reinitializes everything.
13:49:41 <kallisti> I'll zero basically everything. I don't want old package-scope variables to be visible either.
13:50:20 <Sgeo> Would it be better for me to write a program to write the Haskell code instead?
13:50:35 <kallisti> Sgeo: it would be pretty easy I'd thin. if it's sufficiently boring.
13:51:08 <monqy> why are you doing what you are doing in the way you are doing it
13:51:16 <monqy> and why are you doing what you are doing
13:51:19 <elliott> Sgeo: If you can't avoid whatever you're doing, then yes.
13:51:29 <elliott> Sgeo: If your needs are simple enough, use {-# LANGUAGE CPP #-} instead.
13:52:15 <kallisti> `run perl -e 'package X; our ($x, $y, $z) = 1..3; print %X::'
13:52:18 <HackEgo> y*X::yx*X::xz*X::z
13:54:14 <kallisti> `run perl -e 'package X; our ($x, $y, $z) = 1..3; $X::{x}{SCALAR} = undef; print $x'
13:54:17 <HackEgo> 1
13:54:17 <Vorpal> kallisti, this sounds like an awfully complex way to do hotswapping of code above. And what if the old code is still executing in another thread?
13:54:21 <monqy> it sounds like he's doing some hard core code generation
13:54:38 <kallisti> `run perl -e 'package X; use strict; our ($x, $y, $z) = 1..3; $X::{x}{SCALAR} = undef; print $x'
13:54:42 <HackEgo> 1
13:54:49 <kallisti> Vorpal: can you think of any better alternatives?
13:54:56 <Vorpal> kallisti, using erlang? ;P
13:55:00 <kallisti> nope.
13:55:05 <kallisti> unless you have a good perl-to-erlang translator.
13:55:49 <kallisti> I remember a MUD codebase I used to maintain used... execl? or something?
13:56:15 <kallisti> it somehow magically transferred sockets. I didn't really understand it.
13:56:40 <Vorpal> kallisti, erlang basically does it by allowing you to have multiple versions of a module at the same time in memory and then when you are ready you tell threads to jump over to the new one (how: module:foo refers to the last version, but inside module a plain foo would refer to the current version, so you just call module:foo from inside the module itself if that is where the main loop is)
13:56:53 <Vorpal> (gen_server and such abstracts that away)
13:57:15 <Vorpal> kallisti, eh when you exec existing file descriptors aren't closed.
13:57:35 <Vorpal> unless you specifically set some flag on the fd using fcntl iirc
13:57:52 <Vorpal> kallisti, so that is why they hang around
13:57:54 <kallisti> are sockets... file descriptors?
13:58:04 <Vorpal> kallisti, obviously, what did you think they were?
13:58:18 <kallisti> I'm thinking of bash file descriptors I think. is that the same thing?
13:58:48 <Vorpal> like fds as in open() or such
13:58:56 <Vorpal> not sure what you mean with bash fds
13:59:02 <kallisti> the numbered ones.
13:59:17 <Vorpal> that is what everything uses on *nix?
13:59:23 <Vorpal> so why bash specifically
13:59:24 <kallisti> I see.
13:59:34 <Vorpal> FILE* is just a wrapper around fds
13:59:43 <kallisti> because I don't fully understand file descriptors.
13:59:48 <kallisti> how are the numbers assigned?
13:59:58 <Vorpal> by the programmer or the OS?
14:00:04 <kallisti> right
14:00:06 <kallisti> I meant
14:00:13 <kallisti> what algorithm is followed by the OS.
14:00:14 <kallisti> if any.
14:00:28 <Vorpal> kallisti, probably "next unused" I would guess
14:00:35 <Vorpal> you can of course move a fd and such
14:00:36 <elliott> fds get reused immediately
14:00:39 <Vorpal> did that in cfunge
14:00:49 <elliott> so I guess they use a free-list or w/e
14:00:55 <kallisti> in other words could I do something 3>&1 and have some file in my program assigned to STDOUT?
14:01:01 <Vorpal> elliott, does POSIX say that or is it just how it works on Linux?
14:01:03 <elliott> <Vorpal> unless you specifically set some flag on the fd using fcntl iirc
14:01:08 <elliott> At open() time too; O_CLOEXEC.
14:01:13 <Vorpal> oh right
14:01:14 <elliott> Vorpal: POSIX says nothing about it afaik.
14:01:20 <Vorpal> right
14:02:01 <Vorpal> kallisti, not entirely sure what bash does there in terms of which syscalls
14:02:16 <Vorpal> kallisti, I would guess it calls dup(3)?
14:02:24 <Vorpal> or rather dup2(3)
14:02:26 * kallisti had previously thought it was the case that file descriptor referred to any open files, but I think through some conversation in this channel I was convinced that it was a bash-related concept.
14:03:13 <fizzie> POSIX-2008: dup(3) equivalent to fcntl(fildes, F_DUPFD, 0); fcntl F_DUPFD "Return a new file descriptor which shall be the lowest numbered available (that is, not already open) file descriptor greater than or equal to the third argument, arg, taken as an integer of type int."
14:03:14 <elliott> kallisti: If it was a bash-only concept, I'm not sure what you'd call the return value of open(2).
14:03:16 <Vorpal> kallisti, if you inspect a struct FILE it will, amongst other things, contain a field for the fd
14:03:22 <fizzie> So when dup'ing it's always the "smallest free".
14:03:24 <Vorpal> there will be various flags and buffer things and so on too
14:03:25 <fizzie> At least on POSIX.
14:03:37 <kallisti> elliott: this may come as a shock but I don't know much about syscalls.
14:03:43 <kallisti> or C.
14:03:45 <elliott> Does POSIX actually specify that stdio must be implemented as a wrapper around fd stuff?
14:03:46 <fizzie> "The open() function shall return a file descriptor for the named file that is the lowest file descriptor not currently open for that process."
14:03:48 <Vorpal> fizzie, I used dup2() in cfunge iirc to move some fd about for PERL
14:03:49 <fizzie> Same for 'open'.
14:03:53 <elliott> Obviously a conforming C can implement fopen() without file descriptors.
14:04:04 <Vorpal> s/about/around/
14:04:12 <kallisti> so uh... is 3>&1 a bad idea?
14:04:30 <elliott> kallisti: Not if you want to redirect fd 3 to stdout.
14:04:31 <fizzie> So the "lowest number that's not in use" is in fact in POSIX.
14:04:34 <Vorpal> elliott, indeed
14:04:42 <kallisti> elliott: I'm guessing there's a way to specify that fd 3 is, then.
14:04:42 <Vorpal> elliott, I just meant how it is done on *nix
14:04:52 <kallisti> elliott: otherwise you're at the mercy of the OS.
14:04:54 <elliott> kallisti: What?
14:05:01 <elliott> Is what?
14:05:03 <elliott> Oh.
14:05:04 <fizzie> elliott: POSIX includes fileno(), so there sort-of has to be some correspondence between FILE*s and file descriptors.
14:05:15 <elliott> kallisti: The program can just
14:05:18 <elliott> write(3, ..., ...);
14:05:25 <Vorpal> fizzie, indeed, I assumed he meant for non-*nix
14:05:27 <elliott> kallisti: The shell opens fd 3.
14:05:29 <elliott> *creates
14:05:31 <elliott> By duping 1 onto it.
14:05:55 <fizzie> Vorpal: Yes; this was an answer to the "Does POSIX actually specify that stdio must be implemented as a wrapper around fd stuff" thing, not the "conforming C" thing.
14:05:56 <elliott> fizzie: Yes, but is the fd specified to refer to the same file? :p
14:06:08 <fizzie> "The fileno() function shall return the integer file descriptor associated with the stream pointed to by stream."
14:06:11 <kallisti> elliott: it always does that? or is that a result of the 3>&1 bit?
14:06:20 <elliott> kallisti: That's because you told it you want an fd 3 going somewhere.
14:06:24 <elliott> The standard fds are just 0, 1, 2.
14:06:25 <Vorpal> <kallisti> or C. <-- oh, I assumed you were familiar with C when I tried to describe the concept above.
14:06:31 <elliott> kallisti: You can't allocate fd 3 without pointing it somewhere.
14:06:37 <Vorpal> fizzie, ah
14:06:38 <elliott> i.e. another fd or a file or a socket or whatever.
14:06:53 <kallisti> elliott: so a regular open call can't assign fd 3 to something?
14:07:22 <fizzie> Not if it's already open.
14:07:35 <elliott> kallisti: open(2) chooses which FD to give you.
14:07:46 <elliott> kallisti: If you want it somewhere else, you need to dup2(2) it.
14:07:47 <Vorpal> kallisti, I don't think you can specify which fd you want open to use, but you could open and then move it with dup2 and then close the original one opened
14:07:57 <elliott> *dup2(3), apparently.
14:07:59 <Vorpal> elliott, I believe that is dup2(3)
14:08:01 <Vorpal> snap
14:08:02 <elliott> Wait, no.
14:08:04 <elliott> dup2(2).
14:08:13 <elliott> At least "man 2 dup2" produces my glibc man page.
14:08:19 <Vorpal> elliott, man 3p dup2 too
14:08:20 <elliott> man 3 dup2 produces the POSIX manpage.
14:08:23 <elliott> Right.
14:08:23 <elliott> In 3P.
14:08:44 <Vorpal> elliott, I often wondered what the point of the 2/3 separation was
14:09:11 <kallisti> right I'm asking... if you don't specifically assign 3, and the OS assigned a random file to fd 3, then.... 3>&1 would then do possibly weird unpredictable things, right?
14:09:14 <olsner> 2 is system calls, 3 is libc functions?
14:09:32 <fizzie> kallisti: If you do 3>&1, 3 is open by the time your program starts.
14:09:40 <fizzie> kallisti: Therefore it won't be used by any files you open in the program.
14:09:46 <Vorpal> olsner, yes but there are some system calls that are also specified by either POSIX or C as libc functions. Shouldn't there be a man page in each then
14:09:49 <kallisti> ah right it's dup'd from fd 1
14:09:59 <elliott> olsner: Yes, although the system call man pages come from glibc, and document the glibc wrappers around them too.
14:10:01 <kallisti> or fd 0 possibly?
14:10:09 <Vorpal> elliott, indeed
14:10:23 <elliott> Vorpal: Presumably the point is taht you can look in section 2 to find all the system primitives.
14:10:25 <fizzie> If you say 3>&1, it's fd 1 which it dups into 3. That's what the "&1" part means.
14:10:25 <elliott> *that
14:10:30 <elliott> Back when people actually cared about sections.
14:10:35 <olsner> Vorpal: for dup3 I do have two manpages
14:10:38 <olsner> |dup2
14:10:42 <olsner> *dup2
14:10:44 <kallisti> Vorpal: I know the basics of C programming but that's the extent of it. I'm not too familiar with all the details.
14:10:48 <elliott> Nowadays sections are just to disambiguate program/libc/system-doc. :p
14:10:50 <Vorpal> olsner, well one is the 3p copied-from-POSIX one
14:10:52 <Vorpal> at least for me
14:11:23 <kallisti> fizzie: aaaah I see.
14:11:38 <fizzie> Vorpal: You can "specify" that open(2) uses fd n by doing "close(n); for (i = 0; i < n; i++) dup2(someotherfd, i); open(...);" (assuming here that someotherfd != n, and none of the calls fail).
14:11:56 <Vorpal> elliott, so we could basically drop everything except 1,3,3p,5 and 7?
14:12:00 <kallisti> for some reason I thought things like 2>&1 reassigned fd 1 to 2, not the other way around.
14:12:08 <Vorpal> elliott, it isn't like section 8 for example is very well defined
14:12:33 <Vorpal> hm I guess section 4 is useful too but I can't ever remember using that
14:12:36 <elliott> Vorpal: Were I designing man today, I would drop the numeric sections.
14:12:41 <Vorpal> (I'm looking at man man atm)
14:12:44 <elliott> "man coreutils/ls", "man libc/wtf".
14:12:52 <elliott> "man foo" would just do */foo and prompt if it's ambiguous.
14:12:52 <Vorpal> well yes
14:13:02 * kallisti knows nothing about sections
14:13:04 <Vorpal> that is indeed a lot more sensible
14:13:09 <Vorpal> kallisti, try man man
14:13:10 <kallisti> in fact sections seems like a terrible way to organize namespaces of things.
14:13:15 <elliott> Perl and Tcl documentation coming up when I use man is really annoying, so proper segregation is needed rather than silly numeric sections.
14:13:26 <fizzie> kallisti: Well, it does that if that's the way you want to think of it. I mean, it makes fd 2 point to the same thing fd 1 points to.
14:13:27 <kallisti> Vorpal: I've seen them, but haven't taken the time to commit numbers to sections in memory.
14:13:27 <elliott> kallisti: It originates because man pages were originally a printed manual.
14:13:32 <elliott> Then they invented On-Line help.
14:13:32 <Vorpal> elliott, you can edit /etc/man.conf to set search order
14:13:40 <Vorpal> elliott, or /etc/mandb.conf on some systems
14:13:42 <elliott> Vorpal: It doesn't bother me that much. :p
14:13:53 <Vorpal> or even manpath.config on ubuntu
14:13:53 <elliott> Vorpal: But I'd call 7 "linux".
14:13:57 <elliott> And 2 "syscall".
14:14:09 <elliott> Probably syscall/foo would just symlink to libc/foo.
14:14:13 <Vorpal> elliott, I'd call 2 "glibc-mostly"
14:14:24 <elliott> Are there 2 manpages not from glibc?
14:14:28 <elliott> I think I've seen some bare-bones ones.
14:14:53 <Vorpal> elliott, I seen a few from glibc saying that glibc doesn't provide a wrapper for it
14:15:01 <Vorpal> or maybe not from glibc hm
14:15:10 <fizzie> ioctl_list(2) is probably not from glibc.
14:15:12 <Vorpal> elliott, man futex for example
14:15:46 <Vorpal> btw my manpath.config contains SECTION1 n l 8 3 2 3posix 3pm 3perl 5 4 9 6 7
14:16:02 <Vorpal> I believe I moved some stuff around. Might have been on a different system
14:16:06 <elliott> Vorpal: Well
14:16:08 <elliott> COLOPHON
14:16:08 <elliott> This page is part of release 3.35 of the Linux man-pages project. A
14:16:08 <elliott> description of the project, and information about reporting bugs, can be
14:16:08 <elliott> found at http://man7.org/linux/man-pages/.
14:16:15 <Vorpal> elliott, so not glibc indeed
14:16:22 <elliott> Vorpal: That's the case for all glibc manpages, though.
14:16:30 <elliott> It's just that they describe glibc functions.
14:16:38 <elliott> So they're glibc man pages.
14:16:41 <Vorpal> hm
14:16:50 <Vorpal> indeed
14:16:55 <elliott> Vorpal: The funny thing is that a third party writes the documentation for glibc...
14:16:56 -!- Patashu has quit (Quit: MSN: Patashu@hotmail.com , Gmail: Patashu0@gmail.com , AIM: Patashu0 , YIM: patashu2 , Skype: patashu0 .).
14:17:01 <elliott> Must be great fun keeping it in sync.
14:17:06 <Vorpal> heh
14:17:06 <elliott> At least libc's API doesn't change much.
14:17:20 <elliott> The Linux man-pages project
14:17:20 <elliott> The Linux man-pages project documents the Linux kernel and C library interfaces that are employed by user programs. It provides manual pages in the following sections:
14:17:20 <elliott> 2: System calls, documenting the system calls provided by the Linux kernel.
14:17:20 <elliott> 3: Library functions, documenting the functions provided by the standard C library (with particular focus on glibc, the GNU C library).
14:17:20 <elliott> 4: Devices, which documents details of various devices, most of which reside in /dev.
14:17:22 <elliott> 5: Files, which describes various file formats, and includes proc(5), which documents the /proc file system.
14:17:25 <elliott> 7: Overviews, conventions, and miscellaneous.
14:17:27 <elliott> (Note that many of the man pages on a Linux system, especially those in sections other than 2 and 3, come from other packages.)
14:17:43 <Vorpal> hm
14:18:14 <Vorpal> elliott, it must be annoying when a new C or POSIX version is released and gets supported in glibc
14:18:29 <fizzie> Ubuntu has "manpages-dev" which includes sections 2 and 3 from that project, but also "glibc-doc" which installs at least some missing pthreads manpages, presumably generated from some glibc documentation.
14:18:54 <elliott> Vorpal: That's like 3 functions at the rate those two pieces of crap move.
14:18:56 <Vorpal> POSIX is updated more frequently than C too and it is larger.
14:19:01 <elliott> Does glibc even bother to track POSIX these days?
14:19:13 <Vorpal> elliott, or the other way around you mean? ;P
14:19:17 <elliott> What did POSIX 2008 even add, anyway?
14:19:21 <olsner> I think it's unlikely that a new standard gets surprise-dropped and then surprise-implemented in one single chunk by libc
14:19:43 <Vorpal> elliott, mostly stuff from glibc iirc. Some stuff from other libcs too
14:19:46 <elliott> olsner: They should stop publishing drafts and annoucning things and whatnot.
14:19:48 <elliott> Would be much more fun.
14:19:57 <fizzie> "The GNU C library implements all of the functions specified in ISO/IEC 9945-1:1996, the POSIX System Application Program Interface, commonly referred to as POSIX.1." <- current glibc manual.
14:19:58 <Vorpal> elliott, I believe it was like 20-30 new functions though
14:20:02 <elliott> C99 -> twelve years pass -> "Surprise, motherfuckers! Here's C11!"
14:20:10 <Vorpal> :D
14:20:33 <Vorpal> elliott, and MSVC is still on C89
14:20:39 <fizzie> "Also while we were at it, we made a NetHack 4 too."
14:20:41 <elliott> MSVC is also still in C89.
14:20:44 <Vorpal> that is like over 20 years old
14:20:46 <elliott> Er.
14:20:48 <elliott> *89
14:20:52 <elliott> KINDA RUINED MY JOKE THERE, C.
14:21:03 <Vorpal> hah
14:21:07 <elliott> Vorpal: In fact, it's over 22.9 years old.
14:21:11 <olsner> MSVC doesn't do any of the added stuff in C90?
14:21:16 <Vorpal> elliott, right
14:21:20 <elliott> Well, if it was published in January.
14:21:23 <elliott> Which it probably wasn't.
14:21:24 <olsner> iirc, commas at the end of enums was added in C90
14:21:32 <Vorpal> olsner, err maybe
14:21:36 <elliott> olsner: But... but gcc says they're the same!
14:21:44 <elliott> GUYS DO YOU REMEMBER THAT TIME WE FOUND A PRINTED COPY OF C94
14:21:51 <Vorpal> olsner, I'm surprised they differ though
14:21:56 <Vorpal> elliott, we did?
14:22:03 <Vorpal> C94, wth did that contain
14:22:04 <elliott> http://en.wikipedia.org/wiki/C_(programming_language) doesn't even mention C94.
14:22:04 <monqy> C94?
14:22:06 <Vorpal> I know it existed
14:22:12 <Vorpal> but I don't know what was new
14:22:14 <elliott> Vorpal: I think it was never officially standardised, or something?
14:22:22 <Vorpal> ah
14:22:24 <elliott> But it was a printed copy or PDF for like 30 quid.
14:22:29 <Vorpal> heh
14:22:30 <elliott> I totally regret not buying it.
14:22:32 <elliott> Souvenir.
14:22:40 <fizzie> http://clc-wiki.net/wiki/C89 "Purchase Amendment 1 (upgrades the Standard to C94 aka C95) as an ISO publication from SAI Global or --"
14:22:57 <olsner> hmm, so C90 vs C89 has only the changes that ISO did while giving the ANSI standard an ISO number
14:23:09 <elliott> fizzie: I'm disappointed C99 didn't get sometimes referred to as C100.
14:23:33 <monqy> C00 the mysterious
14:23:43 <fizzie> elliott: ANSI could've released a C100 that was essentially ISO C99 except with a different name. For symmetry.
14:23:50 <Vorpal> elliott, if C keeps going they are going to have to time it to unused years in future centuries
14:24:02 <Vorpal> and that only works for 100 versions
14:24:08 <Vorpal> after that they are screwed
14:24:16 <elliott> Vorpal: This is why you use Befunge numbering(tm).
14:24:24 <Vorpal> well yes
14:24:26 <elliott> AKA 19100 numbering.
14:25:00 <monqy> will C have died off by then
14:25:12 <Vorpal> monqy, hopefully yes, probably not
14:25:26 <Vorpal> elliott, I still think that timing releases is a far funnier solution :P
14:25:27 <fizzie> Vorpal: It's already a bit confusing at the point when the chronological order goes C90 C99 C11 C34 C82 C97 C05 C22 C76 after the 2176 version is out.
14:25:47 <Vorpal> fizzie, well yes
14:26:35 <Vorpal> fizzie, I would think there will be a C25 or so rather than C34
14:26:50 <Vorpal> maybe
14:26:52 <olsner> heh, looks like C has/had a limit of 15 nested levels of compound statements
14:27:06 <Vorpal> olsner, heh?
14:27:10 <elliott> olsner: Noooooooooooooooooooooooooooooo
14:27:11 <olsner> probably it's just saying that compiler must support at least 15 levels, but anyway
14:27:24 <fizzie> All of the limits are just "at least this" guarantees.
14:27:25 <monqy> maybe future C will use fruits instead of numbers
14:27:32 <fizzie> Also they've written in a really weird way.
14:27:39 <Vorpal> fizzie, are they?
14:27:44 <olsner> monqy: yes, then you'll need to support at least banana nested levels
14:28:06 <elliott> http://stackoverflow.com/questions/8520673/installing-postgresql-on-qnx-neutrino
14:28:09 <elliott> Best. Question. Ever.
14:28:29 * elliott realises that some people actually use QNX.
14:28:41 * elliott prefers to pretend they're just fucking around.
14:28:41 <fizzie> Vorpal: "The implementation shall be able to translate and execute at least one program that contains at least one instance of every one of the following limits: [list of limits, like 127 nesting levels of blocks, 63 nesting levels of conditional inclusion, and so on]"
14:28:52 <fizzie> I've never quite "gotten" that "at least one program" rule.
14:28:59 <Vorpal> elliott, is it better or worse than people using vxworks?
14:29:14 <Vorpal> fizzie, heh
14:29:45 <Vorpal> fizzie, so that means that in that one program you can possibly only use up to 15 nesting levels in one place in the program?
14:29:47 <Vorpal> or what
14:30:04 -!- Taneb has quit (Quit: Goodbye).
14:30:43 <fizzie> Vorpal: If I read it right, it's enough if the compiler translates, say "int ************a; [instances of all other limits];" but not "int ************b; [instances of all other limits];".
14:30:57 <fizzie> I mean, it did translate at least one program that contained at least one instance of every one of the limits.
14:31:05 <Vorpal> fizzie, well there is that too
14:31:12 <fizzie> (12 pointer declarators is one of the limits.)
14:31:23 <Vorpal> fizzie, but it doesn't even have to support int ************a; int ************b; in the same program
14:31:27 <Vorpal> which is just silly
14:31:31 <elliott> <fizzie> Vorpal: "The implementation shall be able to translate and execute at least one program that contains at least one instance of every one of the following limits: [list of limits, like 127 nesting levels of blocks, 63 nesting levels of conditional inclusion, and so on]"
14:31:37 <elliott> At *least* one?
14:31:46 <elliott> Is there only one such conforming C program?
14:31:48 <fizzie> I don't know if it's any sillier than just not supporting int ************b at all.
14:31:56 <Vorpal> elliott, that is what we are discussing
14:32:05 <Vorpal> fizzie, is that from C99 or C11?
14:32:06 <fizzie> elliott: It's also implementation-dependant which one it is.
14:32:14 <fizzie> Vorpal: C99, but IIRC it's unchanged in C11.
14:32:15 <elliott> It seems like the standard already obligates the implementation to translate all conforming programs.
14:32:23 <elliott> So the limits are arguably null.
14:32:59 <kallisti> what was the thing in perl you can use to run commands with options, but without opening up a whle shell?
14:33:11 <Vorpal> elliott, ah but afaik the definition of a conforming program is one that can be handled by such a conforming implementation
14:33:20 <kallisti> was it the piped open?
14:33:21 <Vorpal> (given the limit description)
14:34:09 <fizzie> kallisti: IIRC, system and the piped open have the same behaviour; if you give them a list, it's executed directly without a shell; if you give them a string with spaces in it, a shell is involved.
14:34:16 <Vorpal> kallisti, is that like pipe(), fork(), dup2() and exec() in C? If so, then yes
14:34:32 <fizzie> (Just that 'system' of course doesn't capture any output, while a pipe-open does.)
14:34:37 <kallisti> fizzie: ah okay good.
14:34:38 <Vorpal> (well execl or whatever)
14:34:39 <elliott> Vorpal: I... somewhat doubt it.
14:34:49 <elliott> That means "conforming implementation" is circular.
14:35:31 <Vorpal> elliott, no I mean that conforming implementation is defined by those limits (and various other things, like the grammar), and a conforming program is simply one that can be run by such an implementation
14:35:32 <fizzie> "If there is only one scalar argument, the argument is checked for shell metacharacters, and if there are any, the entire argument is passed to the system's command shell for parsing (this is "/bin/sh -c" on Unix platforms, but varies on other platforms). If there are no shell metacharacters in the argument, it is split into words and passed directly to "execvp", which is more efficient."
14:35:54 <fizzie> Oh, so it was about metacharacters, not spaces, and it does space-splitting by itself. Well, anyway.
14:36:16 <fizzie> Providing a list will never execute a shell.
14:36:33 <kallisti> so wait the list form can still create a shell?
14:36:41 <fizzie> No.
14:36:43 <fizzie> "If there is more than one argument in LIST, or if LIST is an array with more than one value, starts the program given by the first element of the list with arguments given by the rest of the list."
14:36:44 <elliott> Vorpal: I... don't think that makes much sense.
14:36:44 <Vorpal> <fizzie> Providing a list will never execute a shell.
14:36:44 <Vorpal> <kallisti> so wait the list form can still create a shell?
14:36:45 <Vorpal> lol
14:36:55 <kallisti> oh
14:36:59 <kallisti> :)
14:37:10 <Vorpal> elliott, of course not
14:37:18 <Vorpal> elliott, but then, nor does gets()!
14:37:22 <elliott> Vorpal: That's gone now.
14:37:26 <elliott> They replaced it with a safe version.
14:37:31 <Vorpal> elliott, yes but only in C11
14:37:36 <elliott> I think it's hideously unfair; gets was awesome.
14:37:36 <Vorpal> which is absurdly long
14:37:47 <elliott> I mean, can we have one easy-to-use, ridiculous function in C?
14:37:49 <elliott> Just one?
14:37:56 <elliott> One function to remind you the language you're using is utterly terrible.
14:38:39 <fizzie> "A conforming program is one that is acceptable to a conforming implementation. A conforming -- implementation shall accept any strictly conforming program. A strictly conforming program shall use only those features of the language and library specified in this International Standard -- and shall not exceed any minimum implementation limit."
14:38:51 <kallisti> fizzie: oh but system doesn't give me the stdout
14:39:01 <kallisti> I have to use open for that.
14:39:02 <kallisti> I think.
14:39:28 <Vorpal> fizzie, wow
14:39:35 <fizzie> kallisti: Well, right, but the '|-' and '-|' opens have the same behaviour. If I recall correctly.
14:39:40 <elliott> fizzie: That's amazing.
14:39:47 <elliott> fizzie: What... what does that even end up meaning.
14:40:08 <elliott> fizzie: Hmm.
14:40:15 <elliott> fizzie: That means that you can write a C compiler that accepts any string of bytse.
14:40:16 <elliott> bytes
14:40:23 <Vorpal> elliott, it means it is a C standard
14:40:30 <elliott> fizzie: As long as it correctly compiles every strictly conforming program, every string of bytes becomes a conforming C program.
14:40:39 <elliott> Someone get on that?
14:41:05 <Vorpal> elliott, there is the minimum implementation limit thing too
14:41:22 <Vorpal> elliott, which is defined elsewhere by the spec (the "at least one" bit)
14:41:38 <fizzie> That's just limiting the strictly conforming programs set further.
14:41:44 <elliott> What fizzie said.
14:41:46 <Vorpal> well yes
14:42:02 <elliott> You could troll comp.lang.c with this.
14:42:02 <fizzie> I would think you can, as an extension, accept any string and do whatever you want with the ones that are not strictly conforming.
14:42:10 <Vorpal> elliott, is that still alive?
14:42:10 <elliott> "I have a conforming C program that isn't working: int main(;;)qw;4{};/;{"
14:42:26 <fizzie> Comp.lang.c people quite often remember to put that "strictly" in, from what I've seen.
14:42:32 <elliott> Vorpal: Do Usenet groups ever "die"?
14:43:07 <Vorpal> elliott, well I haven't seen any message on alt.lang.intercal for almost a year by now
14:43:13 <Vorpal> or at least half a year
14:43:20 <elliott> Vorpal: Dude...
14:43:24 <elliott> That's INTERCAL.
14:43:29 <elliott> Oh, I see.
14:43:34 <elliott> Vorpal: alt.lang.intercal always goes that slowly.
14:43:44 <Vorpal> elliott, fair enough
14:43:49 <elliott> Vorpal: It at least gets a post every April.
14:43:51 <monqy> what a sad group
14:43:56 <Vorpal> well okay
14:46:08 <kallisti> fizzie: is there a way to get stderr with the list form of piped open?
14:46:37 <fizzie> kallisti: IPC::Open3 might help.
14:49:20 <Vorpal> fizzie, what if you want to deal with more than 3 fds
14:49:42 <Vorpal> (what if you want to redirect any fd the program opens to go through your own program?)
14:49:45 <itidus21> oh crap, capital c's all over the screen
14:50:00 <fizzie> Vorpal: I think there's a module for more general piping, but most programs don't expect to have more than 0, 1 and 2 open at start.
14:50:11 <fizzie> Vorpal: For "opens during the execution", I don't see how you can redirect those at all.
14:50:28 <Vorpal> fizzie, it is obviously easy to do so. Just use ptrace
14:50:36 <fizzie> Obviously nonportable, too.
14:50:41 <Vorpal> fizzie, or LD_PRELOAD probably
14:50:48 <fizzie> Won't catch syscalls.
14:50:50 <Vorpal> I didn't say portable
14:51:00 <Vorpal> fizzie, well indeed, most programs don't use them directly
14:51:06 <Vorpal> unless they are statically linked
14:51:10 <Vorpal> but ptrace would work
14:51:18 <elliott> itidus21: FSVO all, screen.
14:51:35 <elliott> <Vorpal> fizzie, it is obviously easy to do so. Just use ptrace
14:51:47 <elliott> I don't think that works.
14:51:55 <elliott> You still can't force the program to dup2 without fucking about with its memory.
14:51:58 <itidus21> i get scared when theres a language i could almost get away with coding in being discussed here
14:52:02 <Vorpal> elliott, that is easy as in "conceptually easy" not "easy to implement"
14:52:19 <Vorpal> elliott, anyway gdb manages to insert calls into a process if you write call foo
14:52:22 <elliott> Vorpal: Well, you could also write a kernel module or whatever.
14:52:26 <Vorpal> elliott, indeed
14:52:28 <elliott> Yes, so does weboflies.
14:52:33 <fizzie> Someone on clc has also pointed out, that the particular "one program" containing "at least one instance of every one of" all the limits doesn't need to be "strictly conforming", and can in fact include any kind of syntax or constraint violations that the implementation allows as an extension, which makes the started translation limits slightly meaningless. You could limit block nesting to 1 for all strictly conforming programs, and when someone complai
14:52:33 <fizzie> ned, just be all "well so sad, your program wasn't the one program".
14:52:34 <elliott> Your suggestions are pretty stupid though.
14:52:39 <Vorpal> elliott, indeed
14:52:45 <elliott> fizzie: :D
14:52:57 <elliott> fizzie: Excellent use of bold.
14:53:24 <Vorpal> fizzie, :D
14:54:17 <elliott> fizzie: Actually...
14:54:24 <elliott> fizzie: "A conforming -- implementation shall accept any strictly conforming program. A strictly conforming program shall use only those features of the language and library specified in this International Standard -- and shall not exceed any minimum implementation limit."
14:54:48 <elliott> fizzie: So since implementations are required to accept any strictly conforming program, and a strictly conforming program can go up to the limits...
14:55:22 <fizzie> I suppose it's arguable whether "shall not exceed any minimum implementation limit" means any of the separately stated limits, or whether the "one program" clause is in fact the "limit" that could be exceeded.
14:55:27 <Vorpal> elliott, no it says they shouldn't exceed said limits. It doesn't say they aren't allowed to use less?
14:56:05 <elliott> Vorpal: What?
14:56:13 <Vorpal> oh hm, nvm
14:56:32 <fizzie> The intent is anyhow reasonably clear, I've just wondered more than once about the strange-sounding "at least one program" clause. I'm sure there's some sort of a logic they've had when first drafting it.
14:56:34 <Vorpal> C sure is confusingly worded
14:57:15 <elliott> fizzie: They might have just wanted to avoid a scary universal quantification. :p
14:57:45 -!- oerjan has quit (Quit: Later).
14:57:46 <elliott> fizzie: They might have worded it weirdly to allow the implementation to apply stricter limits to conforming-but-not-strictly programs for whatever reasons?
14:57:48 <elliott> *reason?
14:58:27 <elliott> Who *are* the C committee, anyway? Do they even have any writers of compilers that people actually use on there?
14:58:38 -!- atrapado has joined.
14:58:56 <kallisti> `words --canadian 9001
14:59:04 <kallisti> HackEgo: hi
14:59:06 <HackEgo> moniz ber bhoodcuting ceric ker rhization defore cunactyl cari underfee soutwaisec upgia trentation teneopeir nonper ramosometting comper nailty unblaco hydrati acci searabilic contment pyosing dric boarding lured reade bebloo rechny canic virasephosto subselte phenchar jacque simpresom comently posively noda wan tate cyan trian shagboard friskilli terimescoe posard spaapelblar camsie trallycephoto unfrable ophalpathone
14:59:09 <Vorpal> elliott, this was probably worded like that back in 1989 or so
14:59:34 <Vorpal> elliott, and no one bothered to change it
14:59:51 <Vorpal> so hm probably of compilers used back then?
15:00:26 <elliott> Vorpal: I was asking in general.
15:00:40 <Vorpal> good question
15:02:45 <fizzie> It's the JTC1/SC22/WG14 working group; I'm not sure if their member list is anywhere; the wiki and the "WG internal information" are all password-protected and only for members.
15:02:53 <fizzie> comp.std.c has some overlap, though.
15:03:06 <Vorpal> well that explains a lot
15:03:18 <elliott> fizzie: I don't like the idea of a public international standards committee nobody knows the membership of.
15:03:40 <fizzie> Oh, I'm sure it's somewhere, just can't find it right now.
15:03:45 -!- Zuu has quit (Ping timeout: 252 seconds).
15:04:03 <fizzie> There have been programmers on it at some point, at least.
15:04:05 * elliott has never looked at comp.std.c. Is it like comp.lang.c but /exclusively/ for pedantry?
15:05:04 <fizzie> It's for speaking about the standard itself; "yes, yes, but I think the what the standard should do instead is *this*" sort of comments from comp.lang.c are sometimes referred to there.
15:05:09 <kallisti> !perl $, = ' '; print "hi"; print "hello";
15:05:10 <EgoBot> hihello
15:05:14 <kallisti> !perl $, = ' '; print "hi",; print "hello";
15:05:14 <EgoBot> hihello
15:05:16 <kallisti> L(
15:05:17 <fizzie> I guess theoretically speaking you could speak there if you want to influence the standard.
15:05:26 <fizzie> It probably won't do anything, but that's what it's for.
15:05:46 <elliott> fizzie: http://groups.google.com/group/comp.std.c/browse_thread/thread/d0fd9bfc89647b4a
15:05:53 <elliott> fizzie: Standard lawyers! THESE ARE MY PEOPLE.
15:09:01 <olsner> "It was established in the comp.lang.c discussion (which was too long to reproduce here) that int and long are not the same type."
15:09:10 <kallisti> `fetch http://sprunge.us/SERK
15:09:13 <HackEgo> 2012-01-08 15:09:12 URL:http://sprunge.us/SERK [4539] -> "SERK" [1]
15:09:27 <olsner> reminds me of the ents determining after a few days that the hobbits are probably not orcs
15:09:29 <kallisti> `run mv SERK bin/words.pl; chmod +x bin/words.pl
15:09:32 <HackEgo> No output.
15:09:39 <kallisti> `words --help
15:09:43 <HackEgo> Usage: words [-dhNo] [DATASETS...] [NUMBER_OF_WORDS] \ \ valid datasets: --eng-1M --eng-all --eng-fiction --eng-gb --eng-us --french --german --hebrew --russian --spanish --irish --german-medical --bulgarian --catalan --swedish --brazilian --canadian-english-insane --manx --italian --ogerman --portuguese --polish --gaelic --finnish --norwegian \ default: --eng-1M \ \ options: \ -h, --help this help text
15:09:50 <kallisti> no bad
15:09:50 <kallisti> `ls
15:09:53 <HackEgo> Mineso \ X.pm \ Y.pm \ bin \ canary \ karma \ lib \ main \ min.sh \ paste \ quotes \ share \ typetest.hs \ wisdom
15:10:04 <kallisti> `run rm X.pm Y.pm
15:10:06 <HackEgo> No output.
15:10:19 <kallisti> oh
15:10:25 <kallisti> `run mv bin/words.pl bin/words
15:10:28 <HackEgo> No output.
15:10:33 <kallisti> `words 50
15:10:36 <HackEgo> Optional module Math::Random::MT::Perl not found. \ can't open Data/Eng1M: No such file or directory at /hackenv/bin/words line 104
15:10:44 <elliott> `run rm Mineso typetest.sh main.sh
15:10:47 <HackEgo> rm: cannot remove `Mineso': Is a directory \ rm: cannot remove `typetest.sh': No such file or directory \ rm: cannot remove `main.sh': No such file or directory
15:11:02 <elliott> `run rm -r Mineso min.sh typetest.sh
15:11:05 <elliott> `run rm -r Mineso min.sh typetest.hs
15:11:05 <HackEgo> rm: cannot remove `typetest.sh': No such file or directory
15:11:06 <elliott> FUCK!!!
15:11:08 <HackEgo> No output.
15:11:12 <elliott> `ls
15:11:16 <HackEgo> bin \ canary \ karma \ lib \ main \ paste \ quotes \ share \ wisdom
15:12:04 <kallisti> `run perl -pi -e 's#Data#share/WordData#' bin/words
15:12:07 <HackEgo> No output.
15:12:10 <kallisti> `words
15:12:14 <HackEgo> Optional module Math::Random::MT::Perl not found. \ can't open share/WordData/Eng1M: No such file or directory at /hackenv/bin/words line 104
15:12:37 <kallisti> `ls share
15:12:40 <HackEgo> WordData \ awesome \ units.dat
15:12:56 <kallisti> `ls share/WordData
15:12:59 <HackEgo> Brazilian \ Bulgarian \ CanadianEnglishInsane \ Catalan \ Eng1M \ EngAll \ EngFiction \ EngGb \ EngUs \ Finnish \ French \ Gaelic \ German \ GermanMedical \ Hebrew \ Irish \ Italian \ Manx \ Norwegian \ Ogerman \ Polish \ Portuguese \ Russian \ Spanish \ Swedish
15:13:05 <kallisti> >_>
15:13:08 <monqy> hackgeo shoiuld totally coloured output
15:13:28 <Phantom_Hoover> yes
15:13:41 <Phantom_Hoover> Is hackgeo Sgeo's cousin?
15:13:43 <Vorpal> `ls --colour=yes
15:13:44 <kallisti> I am great confused
15:13:46 <HackEgo> ls: unrecognized option '--colour=yes' \ Try `ls --help' for more information.
15:13:51 <Vorpal> eh
15:13:57 <kallisti> `words
15:14:00 <HackEgo> Optional module Math::Random::MT::Perl not found. \ can't open share/WordData/Eng1M: No such file or directory at /hackenv/bin/words line 104
15:14:04 <Vorpal> `ls --color=yes
15:14:07 <HackEgo> ​.[0m.[01;34mbin.[0m \ canary \ karma \ .[01;34mlib.[0m \ .[01;32mmain.[0m \ .[01;34mpaste.[0m \ quotes \ .[01;34mshare.[0m \ .[01;34mwisdom.[0m
15:14:09 <Vorpal> aww
15:14:12 <kallisti> Gregor: I'm noticing a distinct lack of Math::Random::MT::Perl
15:14:28 <elliott> Gregor: Don't install it.
15:14:49 <kallisti> oh..
15:15:01 <elliott> <Phantom_Hoover> Is hackgeo Sgeo's cousin?
15:15:01 <elliott> wat
15:15:09 <Phantom_Hoover> <monqy> hackgeo shoiuld totally coloured output
15:15:09 <Sgeo> elliott, typo
15:15:43 <kallisti> `run perl -pi -e 's#^.*chdir.*$##' bin/words
15:15:46 <HackEgo> No output.
15:15:53 <monqy> I whshhould typo more ofrten maybe this will happen agaion
15:16:01 <elliott> [[
15:16:02 <elliott> [...]
15:16:02 <elliott> > As far as I know, variables of type "size_t" are guaranteed to be of
15:16:02 <elliott> > sufficient precision to represent the size of any object.
15:16:02 <elliott> [...]
15:16:02 <elliott> The standard doesn't state that explicitly, and I argue that it
15:16:02 <lambdabot> <no location info>: parse error on input `,'
15:16:03 <lambdabot> can't find file: L.hs
15:16:04 <elliott> doesn't imply it.
15:16:06 <elliott> It says that the sizeof operator yields a result of type size_t.
15:16:08 <elliott> It also says that the "*" operator applied to two operands of type
15:16:10 <elliott> int yields a result of type int; that doesn't imply that the result
15:16:12 <elliott> will always fit in an int. I suggest that the sizeof operator can
15:16:14 <elliott> overflow, and if it does, the behavior is undefined.
15:16:16 <elliott> ]]
15:16:18 <elliott> fizzie: This is beautiful.
15:16:20 <elliott> monqy: hi
15:16:25 <monqy> elliott: hi
15:16:29 <kallisti> `run perl -pi -e 's#^.*\bwarn\b$##' bin/words
15:16:32 <HackEgo> No output.
15:16:33 <kallisti> `words
15:16:37 <HackEgo> Optional module Math::Random::MT::Perl not found. \ wiektripuur
15:16:56 <kallisti> `run perl -pi -e 's#^.*\bwarn\b.*$##' bin/words
15:17:00 <HackEgo> No output.
15:17:01 <kallisti> `words
15:17:06 <HackEgo> sulf
15:17:09 <kallisti> `words --help
15:17:13 <HackEgo> Usage: words [-dhNo] [DATASETS...] [NUMBER_OF_WORDS] \ \ options: \ -l, --list list valid datasets \ -d, --debug debugging output \ -N, --dont-normalize don't normalize frequencies when combining \ multiple Markov models; this has the effect \ of making larger datasets more influential \ -o, --target-offset change the target length
15:17:33 <kallisti> `words --list
15:17:37 <HackEgo> valid datasets: --eng-1M --eng-all --eng-fiction --eng-gb --eng-us --french --german --hebrew --russian --spanish --irish --german-medical --bulgarian --catalan --swedish --brazilian --canadian-english-insane --manx --italian --ogerman --portuguese --polish --gaelic --finnish --norwegian \ default: --eng-1M
15:18:21 <elliott> `words 900 -o 289347898974892734238947923742389423
15:18:27 <HackEgo> Argument "900 -o 289347898974892734238947923742389423" isn't numeric in int at /hackenv/bin/words line 146. \ cog maki ashed flam deming hun guaj cili ponste alledit shapetick titum adiompl colonia hymanstastre occifield rib kuk ivell cogn wadhyal sine chillul nonidi mplaim
15:18:35 <kallisti> oh I forgot the thing.
15:18:56 <kallisti> ...what was the thing again.
15:19:01 <kallisti> ah yes
15:20:06 <monqy> sizeof overflow sounds
15:20:09 <monqy> beautiefulye
15:21:49 <olsner> elliott: interesting
15:21:52 <elliott> monqy: you're overdoing the typos a little :P
15:22:03 <kallisti> `run perl -pi -e 's#GetOptions#@ARGV = split /\s+/, \$ARGV[0] if \@ARGV == 1;$&#' bin/words
15:22:07 <HackEgo> No output.
15:22:07 <monqy> i have trouble helping it
15:22:10 <elliott> fizzie: Could I convince you to op a single-purpose bot?
15:22:13 <kallisti> `words --eng-all 9001
15:22:17 <HackEgo> syntax error at /hackenv/bin/words line 111, near "=" \ Execution of /hackenv/bin/words aborted due to compilation errors.
15:22:21 <kallisti> uh oh
15:22:35 <kallisti> turns out perl is not a valid substitute for a text editor.
15:23:15 <Vorpal> kallisti, just edit it locally and `fetch a new one?
15:23:33 <kallisti> too easy.
15:24:02 <elliott> kallisti: You're just inferior.
15:24:02 <kallisti> `fetch http://sprunge.us/KHIN
15:24:05 <HackEgo> 2012-01-08 15:24:05 URL:http://sprunge.us/KHIN [4599] -> "KHIN" [1]
15:24:05 <elliott> I fixed scripts with sed all the time.
15:24:30 <kallisti> `run chmod +x KHIN; mv KHIN bin/words
15:24:34 <HackEgo> No output.
15:24:35 <kallisti> `words --eng-all 5000000
15:24:38 <HackEgo> can't open share/WordData/EngAll: No such file or directory at /hackenv/bin/words line 104
15:24:50 <Vorpal> elliott, wow, sizeof overflowing
15:24:57 <Vorpal> elliott, that is so absurd
15:25:02 <kallisti> `fetch http://sprunge.us/VHhP
15:25:04 <HackEgo> 2012-01-08 15:25:03 URL:http://sprunge.us/VHhP [4600] -> "VHhP" [1]
15:25:17 <kallisti> `run chmod +x VHhP; mv VHhP bin/words
15:25:20 <HackEgo> No output.
15:25:22 <kallisti> `words --eng-all 5000000
15:25:26 <olsner> more like they forgot to put in the standard the bit about size_t always being big enough
15:25:29 <HackEgo> cartzwick refd cons quenfeasodcr lighlymb signing prol busina ccote oscoplai phistorialpa hegle out presen golo chowski oand gresset sageopak dpoudle metnbruku remati nei tist shropsych
15:25:37 <elliott> fizzie: HMPH
15:25:44 <olsner> (and/or all objects and types being small enough)
15:26:06 <kallisti> shropsych
15:26:12 <Vorpal> elliott, hm does sizeof overflowing allow infinite memory? And does that make C TC then?
15:26:28 <elliott> Vorpal: I doubt it; \infty doesn't "overflow" to anything.
15:26:47 <atrapado> anyone wants to implement an interpreter for my language?
15:26:55 <monqy> is it a good language
15:26:57 <olsner> hmm, if size_t doesn't have to be unsigned, I think it could be arbitrary-precision
15:27:09 <elliott> atrapado: Wait, aren't you one of those people who were in here years ago?
15:27:16 <Vorpal> elliott, hm true
15:27:18 <olsner> or if sizeof(x) = 1 for all x
15:27:29 <atrapado> yes, i was
15:27:31 <elliott> olsner: no, CHAR_BIT is required of freestanding implementations
15:27:45 <Vorpal> atrapado, which language?
15:27:49 <elliott> atrapado: Naww, `pastelogs says 2007, I meant the REAL old days. But hi :P
15:28:01 * elliott remembers your name for some reason.
15:28:11 <atrapado> i define a minimal turing complete language
15:28:13 <olsner> elliott: hmm, but didn't we conclude that this only affected unsigned types?
15:28:14 <Vorpal> <elliott> atrapado: Naww, `pastelogs says 2007, I meant the REAL old days. But hi :P <-- what? 2005?
15:28:24 <atrapado> i think tc
15:28:28 <elliott> Vorpal: 2002-2004.
15:28:32 <Vorpal> elliott, ah
15:28:32 <monqy> minimal?
15:28:52 <atrapado> only 3 or 4 elements
15:29:02 <elliott> olsner: I don't think so, I think we just didn't realise at the time. unsigned was another thing; sizeof still has to return the size. Although, hmm.
15:29:09 <kallisti> I'm bad at making my programs simultaneously have data files and also being current-directory agnostic.
15:29:15 <elliott> olsner: I think we waxed philosophical about what sizeof's value actually meant.
15:29:25 <elliott> I don't recall.
15:29:37 <Vorpal> kallisti, huh?
15:30:05 <Vorpal> kallisti, if you don't mind portability look at /proc/self/exe
15:30:29 <kallisti> well, in Perl I use $0
15:30:31 <Vorpal> kallisti, if you mind portability I suggest you have a configure script or such that hardcode the target paths into the program
15:30:33 <elliott> Vorpal: Have you heard of argv[0].
15:30:42 <olsner> I think unsigned types need to wrap at 2^n, where n is possible related to sizeof and CHAR_BIT
15:30:43 <Vorpal> elliott, argv[0] has the issue that it might be anything
15:30:47 <Vorpal> elliott, at least in C
15:30:50 <olsner> but that signed types had no lower limit except that the max. *positive* value must be smaller than the max value of the corresponding unsigned type
15:30:51 <Vorpal> elliott, not sure about perl
15:30:58 <elliott> Vorpal: /proc/self/exe will also point to `which perl`, duh.
15:31:02 <Vorpal> elliott, hm true
15:31:13 <olsner> but... negative sizeof, hmm
15:31:22 <elliott> olsner: Right, but by having sizeof return something you're still declaring that it fits into that many chars.
15:31:38 <elliott> olsner: i.e. you can put it in a char array of that size and convert it back.
15:31:55 <elliott> olsner: And by defining CHAR_BIT you're declaring that that many bools can uniquely identify a character.
15:32:05 <elliott> So there's no real way around it, AFAICT.
15:32:35 <elliott> The only argument there is what CHAR_BIT really means, IMO.
15:33:50 <olsner> and sizeof still has a (constant) maximum value, because everything else has, so that's no solution to sizeof overflow anyway
15:34:21 <olsner> is it possible to allow structs and arrays to have sizeof 1?
15:34:46 <elliott> char n[2] can't fit into a char unless char is countably infinite.
15:34:53 <elliott> Which it can't be, as we've established.
15:34:59 <elliott> So, no.
15:35:08 <Vorpal> elliott, I always found it amusing that even though the C standard allows lots of weird deathstation 9000 style systems it doesn't allow a ternary one
15:35:39 -!- sebbu2 has changed nick to sebbu.
15:36:03 <elliott> Vorpal: Well, that's just perverse.
15:36:07 <olsner> elliott: because of CHAR_BIT?
15:36:09 <elliott> Who the hell uses ternary?
15:36:11 <elliott> olsner: Yse.
15:36:12 <elliott> Yes.
15:36:19 <Vorpal> elliott, a few systems have used that
15:36:24 <elliott> fizzie: What's the actual definition of CHAR_BIT?
15:36:25 <elliott> Vorpal: It was a joke.
15:36:30 <Vorpal> elliott, oh
15:37:30 <elliott> Hey, the musl guy is on SO.
15:37:33 <Vorpal> <elliott> fizzie: What's the actual definition of CHAR_BIT? <-- are you using fizzie as a search engine of the C standard?
15:38:22 <elliott> Vorpal: Yes.
15:38:28 <atrapado> well, i will explain the language definion later, well 2 languages really
15:38:57 <Vorpal> elliott, he tends to be very good at such things
15:39:08 <Vorpal> atrapado, is it on the wiki?
15:39:13 <atrapado> no
15:39:19 <Vorpal> why not?
15:39:37 <atrapado> it is very simple
15:39:44 <atrapado> i can explain here
15:40:00 <Vorpal> well that won't be as each to find for people in the future
15:40:03 <elliott> Lots of languages on the wiki are very simple
15:40:11 <atrapado> ok
15:40:32 <atrapado> i will consider the wiki
15:40:44 <Vorpal> atrapado, as long as it isn't yet another bf-clone (or bf-clone with minor variations) you should probably put it on the wiki
15:41:06 <atrapado> no it is not a clone
15:41:34 <Phantom_Hoover> atrapado, did you manage to break SHA256, then?
15:41:41 <atrapado> hehe
15:41:52 <atrapado> not even md5
15:42:00 <atrapado> but i developed a model
15:42:29 <Phantom_Hoover> A model of what?
15:42:42 <elliott> MD5 was broken ages ago.
15:43:11 <atrapado> of md5 or other algorithm with logical and add operarions
15:44:10 <elliott> A 2009 attack by Tao Xie and Dengguo Feng breaks MD5 collision resistance in 220.96 time. This attack runs in a few seconds on a regular computer.[2]
15:44:10 <elliott> yikes, I didn't know it was that bad
15:44:22 -!- atrapado has quit (Read error: Connection reset by peer).
15:46:45 <olsner> Is that 2^20.96 time?
15:47:54 -!- atrapado has joined.
15:48:16 <fizzie> elliott: "number of bits for smallest object that is not a bit-field".
15:48:38 <atrapado> sorry, batery was low
15:50:20 <elliott> fizzie: What does "number of bits" even mean? :/
15:50:21 <elliott> olsner: Yes.
15:52:00 <olsner> if we're lucky, we only need to care about "number of bits" as far as making the unsigned ints looking like n-bit numbers
16:03:43 <fizzie> elliott: All values (discounting bitfields) "consist of n x CHAR_BIT bits, where n is the size of an object of that type, in bytes. The value may be copied into an object of type unsigned char [n]; the resulting set of bytes is called the /object representation/ of the value."
16:05:16 <fizzie> And "objects of type unsigned char shall be represented using a pure binary notation.49) ... 49) A positional representation for integers that uses the binary digits 0 and 1, in which the values represented by successive bits are additive, begin with 1, and are multiplied by successive itnegral powers of 2, except perhaps the bit with the highest position."
16:05:32 <fizzie> (Typos mine.)
16:06:27 <fizzie> The 'n' for unsigned types is not related to sizeof, though, since (non-char) arithmetic types can have padding bits.
16:07:02 <olsner> damn, and objects need to be representable as a series of *unsigned* chars
16:07:23 <fizzie> (Where the "n" was the [0 ... 2^n-1] value range for unsigned types.)
16:09:07 <olsner> hmm, *except perhaps the bit with the highest position.* - so the highest bit is allowed to be anything?
16:09:49 <fizzie> That's just a footnote, and they are non-normative, IIRC.
16:09:58 <fizzie> It's just defining "pure binary" there.
16:10:35 <olsner> pff, "pure binary" could mean anything!
16:10:37 <fizzie> There's another place which explicitly defines what the value bits mean in unsigned integer types.
16:11:21 <fizzie> "If there are N value bits, each bit shall represent a different power of 2 between 1 and 2^(N-1), so that objects of that type shall be capable of representing values from 0 to 2^N - 1 using a pure binary representation."
16:12:37 <kallisti> `which log
16:12:40 <HackEgo> ​/hackenv/bin/log
16:12:41 <fizzie> Signed integers are otherwise identical, except there is (in addition to padding and value bits) a single sign bit, which will either have the value -(2^M), the value -(2^M-1), or the meaning that the corresponding value with sign bit 0 is negated.
16:13:00 <fizzie> (In other words, two's-complement, one's-complement, or sign-magnitude.)
16:13:01 <Vorpal> <olsner> pff, "pure binary" could mean anything! <-- it basically means that on a ternary machine the it could only encode one bit per... um... trit?
16:13:21 <fizzie> "Tit".
16:13:31 <Vorpal> I believe it is actually trit
16:13:45 <fizzie> "Trit" is more common, sure.
16:14:08 <olsner> fizzie: argh, so C mandates binary representations? :(
16:14:34 <olsner> is that new from C99 though? maybe C90 is better
16:14:39 <Vorpal> olsner, I complained about that earlier today
16:14:47 <Vorpal> (the exclusion of ternary)
16:14:55 <fizzie> C90 isn't (IIRC) any better when it comes to unsigned integers.
16:15:02 <fizzie> Signed integers are allowed more latitude.
16:15:30 <Vorpal> fizzie, anyway all modern systems uses two-complement for signed integers afaik
16:17:24 <fizzie> Anyway, it's all under the "as if" rule, so "physically" I'm sure you could run things on a ternary machine with, say, three bits packed into two trits -- or 9-bit quantities into 6-trit ones if that's natural for the machine -- and just make the bitwise operators work right. All objects have to be composed out of unsigned chars, though.
16:17:49 <fizzie> 9 is a perfectly suitable value for CHAR_BIT, after all.
16:18:14 <fizzie> Well, unless you want to be all POSIXy.
16:21:13 <atrapado> check SumaMoito in the wiki for the languages i mentioned
16:21:57 <olsner> fizzie: but it does limit the range of signed integers to some fixed number of bits, which is the boring part
16:21:58 <elliott> <fizzie> The 'n' for unsigned types is not related to sizeof, though, since (non-char) arithmetic types can have padding bits.
16:22:00 <elliott> fizzie: Ah.
16:22:09 <elliott> fizzie: Didn't we conclude that nothing stopped you packing data into those padding bits?
16:22:51 <elliott> fizzie: Incidentally, I had to cite the as-if rule a day or two ago!
16:22:59 <elliott> I didn't realise people ever actually had to do that.
16:23:06 <elliott> I feel like a real standards lawyer.
16:23:18 <fizzie> elliott: I suppose, though the data is not guaranteed to survive through operations, or get copied by assignment, and "bad" padding bit values are allowed to generate trap representations.
16:23:51 <fizzie> (E.g. one of the padding bits can be a hardware-mandated parity bit.)
16:24:25 <elliott> fizzie: Well, we don't care about portability guarantees.
16:24:52 <elliott> fizzie: We just care that it is possible to write a strictly conforming C program that can implement infinite-tape BF on a hypothetical conforming C implementation.
16:26:27 <elliott> "Aside from that, garbage collection is just plain slow. You can find hundreds of academics who like to claim otherwise, but that won't change the reality. The performance issues of GC can be broken down into 3 main categories:
16:26:28 <elliott> Unpredictability
16:26:28 <elliott> Cache pollution
16:26:28 <elliott> Time spent walking all memory"
16:26:32 <elliott> pikhq: I don't like musl any more. :(
16:26:46 <elliott> "Reference counting is clean and elegant" I double don't like it!
16:27:23 <monqy> if only it were @
16:27:26 <itidus21> elliott: well if you just keep calling malloc(n) :D
16:27:41 <elliott> itidus21: No.
16:27:44 <elliott> Pointers have a defined size.
16:27:48 <elliott> That size must be finite.
16:27:54 <itidus21> oh i see
16:29:00 <itidus21> well ain't that a bitch
16:29:33 <elliott> fizzie: So, theoretically you could have an unsigned integer whose value is in the padding bits?
16:29:58 <elliott> Erm, signed.
16:29:59 <elliott> Argh.
16:30:07 <elliott> fizzie: I've lost track of the argument.
16:30:13 <olsner> or in a single arbitrary-precision padding bit
16:31:00 <fizzie> olsner: The padding bits are still bits that show up in the unsigned char[n] object representation.
16:31:26 <fizzie> (What does an "arbitrary-precision bit" even mean?)
16:31:45 <olsner> something that's called a "bit" but has infinite data
16:31:56 <elliott> fizzie: Well, you can be really sure of the precision of your 0s and 1s.
16:31:59 <elliott> They're... crisp.
16:32:01 <elliott> High-fidelity.
16:32:03 <elliott> All thanks to Monster Cable.
16:32:15 <itidus21> lol
16:32:22 <monqy> thanks monster cable
16:33:52 <fizzie> olsner: In any case, no matter whether it's legal for the padding bits to be not quite "bits" (which I doubt), it's still explicit that the value (as seen by arithmetic operations and such, I mean) of the object is strictly defined by the value bits.
16:34:51 <itidus21> the best way to store bits is as pebbles
16:37:01 <atrapado> elliott, take a look at the wiki: SumaMoito
16:37:16 <elliott> "Based on the powerful editing component Scintilla, Notepad++ is written in C++ and uses pure Win32 API and STL which ensures a higher execution speed and smaller program size. By optimizing as many routines as possible without losing user friendliness, Notepad++ is trying to reduce the world carbon dioxide emissions. When using less CPU power, the PC can throttle down and reduce power consumption, resulting in a greener environment."
16:37:20 <elliott> Worst. Marketing. Ever.
16:38:01 <elliott> atrapado: The only difference between Z1 and Z2 is the wraparound value?
16:38:20 <elliott> It just looks like brainfuck with variables instead of a tape and no IO to me. :p
16:38:31 <atrapado> is the value that you get when decrement 0
16:38:32 <elliott> I don't think it's TC.
16:38:57 <elliott> Because you always condition on the same variable in a loop.
16:38:59 <atrapado> i am sure they are tc, mostly
16:39:06 <elliott> Brainfuck with only balanced loops is not TC.
16:39:07 <elliott> So...
16:39:17 <elliott> atrapado: You can be as sure as you like, that doesn't change the theory.
16:39:26 <atrapado> you can have many variables and loops
16:39:48 <atrapado> i saw a proof some day
16:39:51 <elliott> atrapado: You can have many variables and loops in lots of sub-TC languages.
16:39:57 <atrapado> for z2
16:40:13 <elliott> Okay. Show the proof?
16:40:17 <elliott> It might be erroneous, after all...
16:40:24 <itidus21> is the true value of TC that TC means compatible with LC?
16:40:25 <atrapado> in computer science grade
16:40:50 <elliott> atrapado: Err, you aren't the author of these languages?
16:40:56 <atrapado> well show me a computation that can not be done
16:41:04 <itidus21> and that LC means you can derive mathematical proofs by the code
16:41:06 <elliott> atrapado: Burden of proof...
16:41:22 <atrapado> i am the author of 2 of these lsnguages
16:41:41 <elliott> atrapado: Here's a thing that can't be done: a BF->SumaMoito-Z1 compiler.
16:41:56 <elliott> As I said, the loop structure is too weak.
16:42:00 <atrapado> no
16:42:01 <elliott> If you want to show it TC, show the compiler.
16:42:09 <itidus21> and that esoteric programmers primary goal is to make programming useful for mathematical proofs
16:42:34 <elliott> atrapado: No what?
16:42:45 <atrapado> i implemented a compiler for one of these languages
16:42:57 <elliott> A compiler from what to what?
16:42:57 <Phantom_Hoover> atrapado, you invented that crap?
16:43:01 <atrapado> you can add sub div...
16:43:11 <monqy> rude...
16:43:18 <elliott> atrapado: The arithmetic isn't the problem.
16:43:20 <elliott> The control flow is.
16:43:27 <atrapado> compiler from the language to c++
16:43:33 <atrapado> no
16:43:37 <atrapado> nest them
16:43:42 <elliott> Well, that doesn't prove anything; you can compile sub-TC languages to C++.
16:43:47 <elliott> atrapado: OK, let me put it this way.
16:43:51 <atrapado> yes elliott
16:43:57 <elliott> Brainfuck with only balanced loops is *proven* sub-Turing-complete.
16:44:10 <elliott> In brainfuck, you *have* to be able to vary the cell you condition on for it to be TC.
16:44:17 <elliott> Your language is essentially BF with variables instead of cells.
16:44:20 <itidus21> >:-)
16:44:23 <elliott> But your loop structure is over a constant variable.
16:44:29 <elliott> You cannot change what you loop over in the loop itself.
16:44:35 <atrapado> yes
16:44:35 <elliott> Therefore, it is most likely sub-TC.
16:44:46 <atrapado> it is hard but is possible
16:44:46 <elliott> By analogy with the fact that balanced brainfuck is sub-TC.
16:44:47 <Phantom_Hoover> elliott, you can swap two variables, can't you?
16:44:59 <elliott> Phantom_Hoover: Weell...
16:45:00 -!- Ngevd has joined.
16:45:08 <elliott> Phantom_Hoover: I suppose so, with a third variable.
16:45:22 <Ngevd> Hello
16:45:22 <elliott> Phantom_Hoover: But a loop can only swap two fixed variables.
16:45:55 <elliott> atrapado: Oh well, if you're just going to continue asserting it's TC based on no evidence at all in the face of fair sketch arguments it's not, then reasoning with you about it is pointless
16:46:09 <Phantom_Hoover> Hmm, it /seems/ like an MRM would be a worthwhile avenue.
16:46:26 <atrapado> i am not mathematician
16:46:29 <Ngevd> SumaMoito-Z1 and -Z2 are, I think, Turing Complete
16:46:32 <elliott> Phantom_Hoover: MRM?
16:46:38 <elliott> atrapado: Nor am I, what's your point?
16:46:40 <Phantom_Hoover> Minsky register machine?
16:46:41 <Ngevd> Isomorphic to a Minsky Machine
16:46:43 <elliott> Phantom_Hoover: Ah.
16:46:48 <elliott> Ngevd: I don't think so.
16:46:52 <atrapado> to show the proof
16:46:53 <elliott> It's the loop structure still.
16:46:57 <Ngevd> Well, not isomorphic, but
16:47:00 <elliott> atrapado: Proving it TC is trivial; you just have to write a compiler from a TC language to it.
16:47:03 <Phantom_Hoover> I'm not really sure how MRMs work, so I can't say.
16:47:10 <elliott> atrapado: For instance something very simple like boolfuck or as Phantom_Hoover said a Minsky machine.
16:47:58 <Ngevd> I think I could translate any Minsky Machine with n registers to a SumaMoito program with n+1 variables
16:48:09 <atrapado> i did not see a computation that can not be done with the languages
16:48:32 <elliott> atrapado: Proof by lack of imagination is a common but invalid method :)
16:48:41 <atrapado> yes i see
16:49:07 <Ngevd> How are Minsky Machines numerally notated?
16:49:57 <monqy> what happens in z2 if you decrement a zero variable
16:50:08 <elliott> Hmm, OK, Minsky machines might work.
16:50:09 <itidus21> elliott: it is fascinating that something which is sub-TC becomes impossible to implement a compiler for in something which is TC
16:50:14 <atrapado> stays the same
16:50:15 <Ngevd> monqy, it stays 0
16:50:19 <elliott> But I dunno.
16:50:23 <monqy> Ngevd: unimaginitive
16:50:23 <Phantom_Hoover> BCT looks implementable too.
16:50:24 <elliott> You need an "if".
16:50:30 <elliott> I'm not convinced the "while" there can do an "if".
16:50:45 <atrapado> yes it can do
16:50:54 <elliott> atrapado: Not necessarily in the way required.
16:50:56 <monqy> itidus21: what
16:50:59 <Ngevd> elliott, have a 3rd variable stuck at 0?
16:51:12 <itidus21> i mean, is sumamoito not a form of computation? :D
16:51:17 <Ngevd> Wait, hang on
16:51:17 <monqy> what
16:51:19 <elliott> You can do
16:51:20 <elliott> temp = foo
16:51:23 <itidus21> is it not?
16:51:26 <elliott> while (foo) { ...; foo = 0 }
16:51:27 <elliott> foo = temp
16:51:34 <elliott> But that means the whole thing _cannot_ change foo at all in any way
16:51:36 <itidus21> hehehe
16:51:38 <elliott> Hmm
16:51:39 <elliott> temp = foo
16:51:48 <elliott> while (foo) { ...; /* sets add */; foo = 0 }
16:51:48 <elliott> foo = temp
16:51:50 -!- variable has changed nick to consrt.
16:51:51 -!- consrt has changed nick to const.
16:51:59 <elliott> /* foo += add */
16:52:00 <Phantom_Hoover> while (a) { a-; b+; code }; while (b) { code } seems like it'd work as an if-else.
16:52:02 <elliott> That could work if you can do addition.
16:52:07 <itidus21> why can't a TC do sumamoito i wonder.. perhaps due to some limitation of the power of a TC
16:52:10 <atrapado> well strictly speaking there is no =
16:52:16 <Phantom_Hoover> You can even restore a int the else loop.
16:52:17 <monqy> itidus21: what
16:52:18 <elliott> atrapado: It was pseudocode
16:52:21 <atrapado> ok
16:52:35 <itidus21> yeah.. TC is overhyped
16:52:36 <elliott> Phantom_Hoover: Erm, that only works if a is either 0 or 1.
16:52:42 <elliott> Which is not the case with an MRM.
16:52:52 <monqy> itidus21: I think you misinterpreted something
16:52:56 <Phantom_Hoover> elliott, erm, right.
16:53:20 <itidus21> monqy: probably
16:53:23 <itidus21> yeah..
16:53:33 -!- Zuu has joined.
16:53:41 <Phantom_Hoover> If you replace code with while (c) {code; c-} and then put c+ outside the loop?
16:53:52 <Phantom_Hoover> And set c to 1 beforehand.
16:53:54 <monqy> itidus21: it's not that you can't write a SumaMoito compiler in a TC language; it's that you can't compile from a TC language to SumaMoito, or so the claim goes
16:53:58 <monqy> itidus21: if that clears anything up
16:54:07 <itidus21> ohhh
16:54:11 <itidus21> yes that helps
16:54:19 <itidus21> :(
16:54:36 <itidus21> my misinterpretation was more exciting
16:54:49 <elliott> Phantom_Hoover: b+; while (a) { whentrue; while (a) { a- }; b- } while (b) { whenfalse }
16:54:51 <Ngevd> itidus21, you want something like Gravity
16:54:54 <monqy> don't worry there's still plenty of fun stuff you can't do
16:54:56 <elliott> Phantom_Hoover: The problem is that, with an MRM, you have to test whether it's zero /without clobbering it/.
16:55:05 <elliott> Which is impossible, because you only have a while loop on a fixed variable.
16:55:08 <elliott> So you have to copy it elsewhere.
16:55:13 <atrapado> no
16:55:16 <Phantom_Hoover> Yes; where's the problem with that/
16:55:23 <elliott> Phantom_Hoover: Because the operation is to decrement it.
16:55:35 <atrapado> while a a- b+ c+ ???
16:56:01 <atrapado> copy
16:56:06 <itidus21> Ngevd: i do not quite enjoy not being educated in maths... it takes a lot of the fun out of esolangs
16:56:15 <Ngevd> itidus21, :P
16:56:21 <elliott> Phantom_Hoover: Okay, b+; while (a) { dec+; tmp+; while (a) { a- }; b- }; while (tmp) { a+; tmp- }; while (dec) { a-; dec- } while (b) { ... }
16:56:30 <elliott> That's "if a>0, decrement a, else ...".
16:57:07 <itidus21> it also means not very fun to browse wiki pages about math(s)
16:57:27 -!- augur has quit (Ping timeout: 240 seconds).
16:57:30 <itidus21> every time i hit a mathematical notation it is like a toll gate
16:57:39 <Phantom_Hoover> tmp = 0, c=1; while (a) { a-; tmp+; while(c) {code; c-}}; while(c){c-}; c+; while (tmp) {tmp-; a+; while(c){code; c-}}; while(c){c-}; c+?
16:57:40 <elliott> itidus21: Ignorance is bliss, they say.
16:57:44 <elliott> Phantom_Hoover: There's no =.
16:57:52 <itidus21> they do. and in my experience.. it has proven true
16:57:56 <elliott> Anyway, I'm not sure what that is meant to do.
16:57:58 <Phantom_Hoover> elliott, that's shorthand for initialisation, duh.
16:58:04 <elliott> itidus21: It generally rings true for the ignorant, yes.
16:58:11 <atrapado> can be emulated, the =
16:58:12 <elliott> Phantom_Hoover: What's your thing meant to do that mine doesn't?
16:58:19 <Phantom_Hoover> That's meant to be a straight if-then-else.
16:58:23 <elliott> Ah.
16:59:40 <elliott> Phantom_Hoover: isfalse+; while (cond) { istrue+; tmp+; while (cond) { cond- }; isfalse- }; while (tmp) { cond+; tmp- }; while (istrue) { WHENTRUE; istrue- }; while (isfalse) { WHENFALSE; isfalse- }
16:59:44 <elliott> There's my if/then/else.
16:59:59 <elliott> Phantom_Hoover: Now the main problem is: you need a set of declarations for each variable you condition on.
17:00:04 <elliott> But I think it /might/ be enough to do an MRM.
17:00:26 <Phantom_Hoover> elliott, there are no limits for variable declaration though, so that's OK, isn't it?
17:00:36 <elliott> Phantom_Hoover: Well... this thing can't nest.
17:00:39 <atrapado> no limits
17:00:39 <itidus21> if you guys saw my initial budding efforts at language design in the past it might be vomit inducing
17:00:47 <elliott> If you put an if/then/else inside an if/then/else, the outer loop's state gets fucked up.
17:00:51 <itidus21> hehehehe
17:00:58 <elliott> Phantom_Hoover: That's problematic, because there's no other way to do control flow other than nesting in this thing.
17:01:05 <elliott> So you need to find a way to "unroll" everything at the top level.
17:01:10 <elliott> I don't think that's possible.
17:01:23 <atrapado> can nest
17:01:29 <elliott> atrapado: I know they can nest.
17:01:36 <Phantom_Hoover> Can't you just assign a unique set of variables to each if construct?
17:01:39 <elliott> I understand the language.
17:01:45 <atrapado> ok
17:01:46 <elliott> Phantom_Hoover: Well, yes.
17:02:14 <Sgeo> I know how to implement unsafeCoerce# in pure Haskell! let x = x in x
17:02:17 <Sgeo> ^^joke
17:02:20 <elliott> ^^joke
17:02:23 <monqy> aplause
17:02:35 <monqy> cheers echo far and wide
17:02:38 <monqy> for sgeos
17:02:38 <monqy> joke
17:02:42 <elliott> Phantom_Hoover: a++; b++; if (a>0) { a--; } else { ... }; if (b>0) { b--; } else { ... } is a TC MRM, right?
17:02:42 <Sgeo> If I didn't say joke, some of you would think I was being serious
17:02:48 <elliott> Phantom_Hoover: Where ... is part of the instruction.
17:02:50 <elliott> Er, let me rephrase that.
17:02:52 <Ngevd> atrapado, what happens if you do something like "a; a+; a;"?
17:02:56 <elliott> INC_A = a++
17:02:59 <elliott> INC_B = b++
17:03:01 <Phantom_Hoover> elliott, you expect me to know a thing like that??
17:03:07 <elliott> A{...} = if (a>) { a-- } else { ... }
17:03:09 <elliott> argh
17:03:10 <elliott> *>)
17:03:11 <elliott> *>0
17:03:14 <atrapado> well it should not compile, ngevd
17:03:16 <elliott> B{...} = if (b>0) { b-- } else { ... }
17:03:27 <elliott> Phantom_Hoover: Well, just confirm whether my understanding of what http://esoteric.voxelperfect.net/wiki/Minsky_machine says is correct. :p
17:03:28 <Phantom_Hoover> I think we have enough for all the normal arithmetic tools, though, so BCT looks achievable.
17:03:44 <elliott> Phantom_Hoover: I'm just not convinced that a structural nested thing like that is enough to accomplish a "state transition".
17:04:16 <elliott> Phantom_Hoover: Structured programming languages require powerful enough control structures to not be sub-TC, after all.
17:04:22 <elliott> goto is significantly more flexible.
17:04:45 <elliott> I suspect the standard presentation of an MRM program involves labelled statements where the decrement jump location is taken as a goto.
17:04:48 <Phantom_Hoover> elliott, 'state transition' meaning 'switching to a different set of code', essentially?
17:04:56 <elliott> Phantom_Hoover: Wait, obviously what I said wasn't enough.
17:05:00 <elliott> Because there's no looping.
17:05:06 <elliott> So yeah, <elliott> Phantom_Hoover: Okay, b+; while (a) { dec+; tmp+; while (a) { a- }; b- }; while (tmp) { a+; tmp- }; while (dec) { a-; dec- } while (b) { ... }
17:05:13 <elliott> just isn't enough on its own to accomplish the control.
17:05:32 <monqy> is there anything preventing a real easy reduction to balanced-loops bf
17:05:54 -!- augur has joined.
17:06:10 <Ngevd> monqy, balanced loops infinite cell size, no
17:06:17 <Phantom_Hoover> Didn't this whole thing start because balanced-loops is sub-TC?
17:06:28 <monqy> hence the mention
17:06:31 <Ngevd> Only if the cells are finite in size
17:11:15 <atrapado> if (a) {code}; -> while (a) { code; while (a) a-; }
17:11:35 <Phantom_Hoover> We passed that point a long, long time ago.
17:11:50 <atrapado> ok just remembering
17:12:21 <Phantom_Hoover> That's not sufficient in itself, because you can't do an else.
17:12:34 <atrapado> else is if not a
17:13:11 <monqy> but you zeroed a at the end???
17:13:13 <Phantom_Hoover> How do you implement not?
17:13:19 <monqy> that too
17:13:20 <Phantom_Hoover> And what monqy said.
17:13:21 <atrapado> copy it
17:13:36 <elliott> Copy what?
17:13:42 <atrapado> a to b
17:13:42 <elliott> Oh, right.
17:13:52 <Phantom_Hoover> This is kind of moot, because we've demonstrated that if-then-else is possible; see above.
17:14:09 <atrapado> another formulation
17:14:20 <elliott> monqy: I think it's easy, yes, because you always know how far away you are from another variable.
17:14:28 <elliott> But I'm not *quite* sure.
17:14:47 <elliott> I'm erring on the side of the control flow being too weak.
17:16:21 <atrapado> a=1 while (b) { a = 0 ; B- } this is not
17:17:28 <Phantom_Hoover> I'm erring on the side of it being strong enough: you're able to have normal nested while and if statements, AFAICT.
17:18:15 <elliott> Phantom_Hoover: I'm not sure that's enough.
17:18:24 <elliott> Balanced BF has that.
17:18:44 <elliott> I think you need some "dynamicity" in the control flow, like you get with goto, or being able to change the conditioned variable (unbalanced BF).
17:19:46 <Ngevd> You can keep a variable called "check" in the while and just swap the value of check around
17:19:46 <atrapado> you can do logical and of two variables, and other connectives
17:19:49 <Phantom_Hoover> I'm really not sure of that.
17:19:54 <Ngevd> Never mind
17:20:00 <elliott> Phantom_Hoover: Sure of what?
17:20:36 <Phantom_Hoover> OK, so wait, can we assume that it's possible to implement the appropriate arithmetic functions to manipulate (appropriately-framed) bitstreams?
17:22:34 <Phantom_Hoover> So I can write a=take(s) to remove the first bit in a stream and put it in a, and put(b,s) to stick a bit onto the end of a stream without needing to specify the exact implementation of all the relevant arithmetic?
17:23:31 <atrapado> with add sub mult and div and loops maybe?
17:23:56 <Phantom_Hoover> Yes; I'm confident that what we have is enough for those.
17:24:00 <elliott> <Phantom_Hoover> OK, so wait, can we assume that it's possible to implement the appropriate arithmetic functions to manipulate (appropriately-framed) bitstreams?
17:24:03 <elliott> Phantom_Hoover: I'm sceptical.
17:24:21 <elliott> Phantom_Hoover: Well, *2 is easy enough.
17:24:30 <elliott> %2 as well.
17:24:37 <elliott> I guess +1 is too.
17:24:47 <Phantom_Hoover> /2?
17:24:55 <elliott> Well, let's try it?
17:25:03 <elliott> Phantom_Hoover: Can it be put(s,b) btw.
17:25:12 <Phantom_Hoover> Yes, OK.
17:25:31 <elliott> put(s,0) = { s'; while (s) { s'+; s'+; s- }; while (s') { s+; s'- } }
17:25:39 <elliott> put(s,1) = { put(s,0); s+ }
17:25:57 <elliott> Phantom_Hoover: Also take(s,b) to put it in b.
17:26:10 <Phantom_Hoover> OK.
17:26:14 <Phantom_Hoover> http://esolangs.org/wiki/Brainfuck_algorithms#x_.3D_x_.2F_y
17:26:21 <Ngevd> while(b != zero) {b-;} while(a != zero){a-; a-; b+;}
17:26:21 <elliott> Shhh.
17:26:45 <Ngevd> Are we still talking about SumaMoito?
17:26:45 <elliott> Phantom_Hoover: OK, divmod is quite tricky.
17:26:49 <elliott> Ngevd: Yes.
17:26:52 <elliott> -Z1.
17:27:01 <elliott> Phantom_Hoover: It relies on overflow behaviour.
17:27:06 <elliott> Phantom_Hoover: Actually, we could just do div and mod separately.
17:27:20 <elliott> Phantom_Hoover: /2 is tricky.
17:27:27 <elliott> while (s) { s-; s-; d+ } doesn't work.
17:27:33 <elliott> Actually, it works in -Z2.
17:27:43 <elliott> But isn't -Z1 the one we're considering?
17:27:45 <Ngevd> The code I wrote there is the turns b into the ceiling of a/2
17:27:46 <elliott> It's the simplest.
17:27:59 <Ngevd> -Z2
17:28:06 <monqy> -n
17:28:17 <Phantom_Hoover> Proving one of them TC would be good enough for now, surely?
17:28:31 <Ngevd> Could we do %2 in -z1?
17:28:39 <elliott> Phantom_Hoover: Well, OK.
17:28:56 <elliott> while (s) { s-; s-; d+ }
17:28:58 <elliott> That's /2.
17:29:06 <elliott> %2 is harder.
17:29:13 <elliott> Well, we don't need d, actually.
17:29:17 <elliott> while (s) { s-; s- } # obvious
17:29:19 <elliott> Wait.
17:29:23 <elliott> No, we do need d.
17:29:37 <elliott> while (s) { s'+; s-; s- }; while (s') { s+; s'- }
17:29:45 <elliott> The problem now is getting the remainder.
17:29:49 <elliott> Ah, wait!
17:29:58 <Ngevd> while (s) {s -; if(d){d-}{d+}}
17:30:05 <elliott> while (s) { s'+; s-; if (s) { r+ } else { s- } }; while (s') { s+; s'- }
17:30:10 <elliott> Ngevd: Ah, yes.
17:30:19 <elliott> while (s) { s'+; s-; if (s) { s'-; r+ } else { s- } }; while (s') { s+; s'- }
17:30:31 <elliott> Phantom_Hoover: OK, rewrite that with your if-then-else.
17:31:30 <Ngevd> Ngevd, elliott, Phantom_Hoover, the Turing-Completeness people.
17:31:53 <Phantom_Hoover> elliott, do I have to?
17:32:02 <Phantom_Hoover> Can't we just say it's possible and leave it at that?
17:32:07 <elliott> Wait, no, it's...
17:32:17 <elliott> take(s,b) = { while (s) { s'+; s-; if (s) { s'- } else { b+; s- } }; while (s') { s+; s'- } }
17:32:18 <elliott> Right?
17:32:24 <elliott> As in, the remainder is on the other branch.
17:32:58 <elliott> Phantom_Hoover: OK, let's assume it's possible.
17:33:02 <elliott> Continue, sir.
17:35:07 <Ngevd> So, we have +1, *2, /2, %2
17:35:36 <elliott> :t break
17:35:37 <lambdabot> forall a. (a -> Bool) -> [a] -> ([a], [a])
17:35:43 <elliott> > break (== '=') "a=b=c"
17:35:44 <lambdabot> ("a","=b=c")
17:36:13 <atrapado> one difficult but possible thing is abs(A-B) in 3 langs
17:36:33 <elliott> > braek (== '=') "a"
17:36:34 <lambdabot> Not in scope: `braek'
17:36:37 <elliott> > break (== '=') "a"
17:36:38 <lambdabot> ("a","")
17:38:16 <elliott> :t lookup
17:38:17 <lambdabot> forall a b. (Eq a) => a -> [(a, b)] -> Maybe b
17:39:49 <Phantom_Hoover> Right then. p = <some BCT program>; d = <initial data>; while (1) { b; take(p,b); put(p,b); if(b) { take(p,b'); put(p,b'); d' = d; take(d,r); if(r) { put(d,b') } else { d = d' } } else { take(d,b') }
17:42:40 <elliott> Phantom_Hoover: Does that handle the "cyclic" part?
17:43:11 <Phantom_Hoover> You mean the "program string cycles" part?
17:43:20 <Ngevd> He does
17:43:52 <Phantom_Hoover> If so, take(p,b); put(p,b); reappends instructions.
17:44:00 -!- Ngevd has quit (Quit: Goodbye).
17:44:59 <elliott> Right.
17:45:09 <elliott> OK, I guess it's TC then.
17:45:31 <atrapado> :)
17:47:26 <monqy> another language? today is a good day
17:47:34 <elliott> Phantom_Hoover: Better question: What's the minimum number of variables for it to be TC?
17:47:54 <elliott> Phantom_Hoover: I can't tell from yours because you don't define most of your damn variables.
17:48:12 <elliott> "Generic is a WIP language made by Tailcalled in a way that makes many concepts from Category Theory easy to define."
17:48:31 <Phantom_Hoover> 6?
17:48:37 <Phantom_Hoover> Oh dear.
17:49:22 <Phantom_Hoover> Although your algorithms might have some extra implicit ones, and the ifs have their variables.
17:53:05 * Sgeo almost forgot about scanl
17:53:07 <Sgeo> :(
17:53:32 <Phantom_Hoover> Never forget about scanl, it's always waiting to jump on you when you least expect it.
17:53:32 <elliott> Phantom_Hoover: So should I read Mac Lane.
17:53:57 <elliott> :t replicateM
17:53:58 <lambdabot> forall (m :: * -> *) a. (Monad m) => Int -> m a -> m [a]
17:54:10 <Sgeo> :t scanl
17:54:11 <lambdabot> forall a b. (a -> b -> a) -> a -> [b] -> [a]
17:54:16 <elliott> > replicateM 3 "abc"
17:54:17 <lambdabot> ["aaa","aab","aac","aba","abb","abc","aca","acb","acc","baa","bab","bac","b...
17:54:46 <Sgeo> > replicateM_ 3 "abc"
17:54:47 <lambdabot> [(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),()...
17:55:00 <elliott> @src replicateM
17:55:00 <lambdabot> replicateM n x = sequence (replicate n x)
17:55:27 <Phantom_Hoover> @replicateM_
17:55:27 <lambdabot> Unknown command, try @list
17:55:34 <Phantom_Hoover> @src replicateM_
17:55:34 <lambdabot> replicateM_ n x = sequence_ (replicate n x)
17:58:34 <elliott> @src sequence
17:58:34 <lambdabot> sequence [] = return []
17:58:35 <lambdabot> sequence (x:xs) = do v <- x; vs <- sequence xs; return (v:vs)
17:58:35 <lambdabot> -- OR: sequence = foldr (liftM2 (:)) (return [])
18:00:54 <Phantom_Hoover> <elliott> Phantom_Hoover: So should I read Mac Lane.
18:01:20 <Phantom_Hoover> Well, if you don't get put off by the examples being pretty obscure.
18:01:25 <elliott> Obscure howso?
18:01:45 <Phantom_Hoover> Maths.
18:02:16 <Phantom_Hoover> They're generally either topological, set-theoretical or group-theoretical.
18:02:29 <elliott> Phantom_Hoover: They should use practical examples instead, like counting change.
18:03:20 <Phantom_Hoover> Well no, it's just that I get annoyed when I have to skip bits because I don't understand the category in question.
18:05:32 * elliott knows ~0 topology and group theory, and very basic set theory, so he's clearly in the target market.
18:05:44 <elliott> Well, OK, more than ~0 group theory.
18:06:21 <Phantom_Hoover> Like, he defines and explains natural transformations in half a page, and then gives examples for the next two.
18:07:17 <elliott> Phantom_Hoover: How far in did you get?
18:07:40 <elliott> We should READ MAC LANE TOGETHER (N.B. this would be the most harrowing experience of your entire life).
18:07:40 <Phantom_Hoover> Right now, '5. Monics, Epis and Zeros'.
18:08:28 <elliott> Phantom_Hoover: Those are monomorphisms and epimorphisms! I know this because Wikipedia says so.
18:08:30 <elliott> *Epics, presumably.
18:08:38 <elliott> What chapter is that in?
18:08:40 <Phantom_Hoover> Nope, it says Epis here.
18:08:45 <elliott> It's not one of the chapters on http://en.wikipedia.org/wiki/Categories_for_the_Working_Mathematician, at least.
18:08:52 <elliott> Phantom_Hoover: Heh, a typo I guess.
18:09:04 <Phantom_Hoover> 1.
18:09:06 -!- Ngevd has joined.
18:09:24 <Phantom_Hoover> ('Mon' is obviously a popular syllable in category theory.)
18:09:36 <elliott> Phantom_Hoover: EXCELLENT THERE IS STILL TIME TO READ MAC LANE TOGETHER (N.B. you would not only lose the will to live but lose everyone else's will to live too somehow.)
18:09:47 <Ngevd> Hello
18:09:58 <Ngevd> Where are we up to?
18:10:10 <elliott> Ngevd: Oh god.
18:10:14 <Phantom_Hoover> Chapter 1, section 5.
18:10:25 <elliott> Phantom_Hoover: *Chapter 0 section 0
18:10:34 <monqy> we can have a mac lane party
18:10:39 <Phantom_Hoover> elliott, you didn't even read the Amazon preview??
18:10:44 <Phantom_Hoover> monqy, friendship mac lane
18:10:49 <elliott> Phantom_Hoover: I read the first few pages? Wait, did you actually BUY it?
18:10:54 <Phantom_Hoover> hahahaha
18:10:54 <Phantom_Hoover> no
18:10:55 <elliott> Oh, pyrated.
18:11:03 <Phantom_Hoover> I resent the implication.
18:11:11 <monqy> im not cool enough for pyracy
18:11:17 <elliott> OK maybe a Mac Lane party wouldn't be such a completely terrible idea?
18:11:19 <Phantom_Hoover> Wait, no, that's a pyrite.
18:11:31 * elliott says this because he has absolutely no chance of getting anything out of it solo. :p
18:11:45 <elliott> BUT only cool people are invited (cool people are Phantom_Hoover and elliott).
18:11:46 <Phantom_Hoover> We can all be objects and when we talk to each other they'll be morphisms
18:11:50 <monqy> i need peer pressure for the mac lanes to sink in
18:11:52 <elliott> (monqy is instead coole)
18:11:58 <Phantom_Hoover> corollary: we're all insane
18:12:15 <Phantom_Hoover> Or Sgeo, I suppose.
18:12:29 <elliott> Sgeo what.
18:12:35 <Ngevd> What is the wolrd coming to?
18:12:39 <monqy> we're all sgeo
18:12:52 <Phantom_Hoover> ALSO: overly fond of Chinese whispers.
18:13:00 <elliott> Phantom_Hoover: I have no idea what you are saying.
18:13:33 <Phantom_Hoover> elliott, obviously we all talk to ourselves, thus we're all really lonely and pathetic, thus Sgeo (sorry Sgeo).
18:13:39 <elliott> Phantom_Hoover: Ah.
18:13:48 <elliott> Where does Chinese whispers come into it.
18:14:12 <Phantom_Hoover> Also, if I talk to you and you talk to monqy, I must talk to monqy, so obviously we talk to each other with Chinese whispers.
18:14:31 <Phantom_Hoover> It doesn't make sense otherwise.
18:16:23 <Ngevd> I still don't know what's going on
18:16:40 <elliott> Ngevd: death.
18:16:55 <Ngevd> Death, the concept, the event, or the personification?
18:17:04 <elliott> Every.
18:17:15 <Phantom_Hoover> Ngevd, death, the category.
18:17:33 <monqy> terribly sorrey but i've lost your will to live
18:17:37 <Phantom_Hoover> (You're an object, if you kill someone it's an arrow.)
18:17:46 <Phantom_Hoover> (Suicide is rife.)
18:17:48 <Ngevd> I'm just going to stare into my working ( :-] ) Haskell program
18:18:06 <monqy> whats a :-]
18:18:12 <Phantom_Hoover> Robot smile.
18:18:20 <monqy> also: stare into??
18:18:24 <Ngevd> Yes
18:18:30 <monqy> does it stare back into you
18:18:33 <Ngevd> No
18:18:38 <Ngevd> I'm not that good a programmer
18:18:58 <monqy> put an eye or two in the comments
18:19:01 <monqy> you can be stare friends
18:19:32 <Ngevd> There's a function called "isElementHaha"
18:20:14 <monqy> put a mouth or two in the comments
18:20:19 <monqy> you can be laugh friends
18:21:13 <Ngevd> Dammit, monqy, now I'm thinking about AI
18:21:17 <Ngevd> Also, dinnertime
18:21:18 <Ngevd> Bye
18:21:19 -!- Ngevd has quit (Quit: Goodbye).
18:32:54 <kallisti> `logs (?:test)
18:32:57 <HackEgo> ​/home/hackbot/hackbot.hg/multibot_cmds/lib/limits: line 5: exec: logs: not found
18:32:58 <kallisti> `log (?:test)
18:33:06 <kallisti> is this PCRE or....?
18:33:20 <HackEgo> 2010-12-13.txt:22:15:12: <impomatic> Anyone fancy thrashing this guy at his own programming contest? http://skybuck.org/BoxifyMe
18:33:39 <kallisti> ah yes
18:37:52 <elliott> no
18:37:54 <elliott> grep -P
18:43:43 <oklopol> weidest smiley ever
18:43:47 -!- Ngevd has joined.
18:43:50 <Ngevd> Hello!
18:43:59 <Ngevd> http://hpaste.org/56263
18:45:03 <Phantom_Hoover> "both :: (a->b) -> (a,a) -> (b,b)
18:45:03 <Phantom_Hoover> "
18:45:19 <elliott> Phantom_Hoover: What of it?
18:45:21 <Phantom_Hoover> Wait, the whitespace there is fine.
18:45:33 <elliott> Well, there should be a space around the (->).
18:45:43 <Phantom_Hoover> I think I have that thing where my sense of scale goes mad
18:45:48 <Ngevd> Compiles fine
18:47:15 <elliott> Phantom_Hoover: wat
18:47:22 <Phantom_Hoover> I'm joking.
18:47:39 <Phantom_Hoover> I thought there were two spaces somewhere.
18:50:06 <Gregor> "kallisti: Sounds RSIish." <-- here is something sitting in my input buffer. I have no idea what it means.
18:51:26 <elliott> Sounds rsish.
18:51:35 <elliott> Gregor: Probably kallisti complaining about his fatigue?
18:51:39 <elliott> Is fatigue the word.
18:52:14 <oklopol> http://skybuck.org/BoxifyMe/ why aren't books written like this
18:53:25 <monqy> good writing
18:53:38 <fizzie> Hey, I recall the BoxifyMe thing from comp.lang.c.
18:54:17 <kallisti> elliott: no complaining about muscle cramps in hands.
18:54:22 <Phantom_Hoover> WebSplat time!
18:54:26 <kallisti> Gregor: you suggested that it may be repetitive strain injury
18:54:33 <Gregor> Oh yeah
18:54:40 <elliott> kallisti: That's what I meant.
18:54:52 <elliott> I already told kallisti it's probably either the beginnings of RSI and carpal tunnel and to consult a doctor :P
18:59:36 <kallisti> elliott: indeed
18:59:45 <kallisti> elliott: what's a good example of a comparison on CReals that doesn't terminate?
19:00:23 <elliott> x == x
19:00:33 <Phantom_Hoover> The loss of Havenworks is one of the great tragedies of our time.
19:00:50 <Phantom_Hoover> What're CReals?
19:00:58 <kallisti> > 2 == 2 :: CReal
19:00:58 <lambdabot> Couldn't match expected type `Data.Number.CReal.CReal'
19:00:59 <lambdabot> against infe...
19:01:03 <kallisti> > 2 == (2 :: CReal)
19:01:03 <lambdabot> True
19:01:05 <elliott> Phantom_Hoover: Computable reals.
19:01:13 <elliott> kallisti: That CReal just compares the first 200 digits or so.
19:01:20 <elliott> It's evil.
19:01:25 <kallisti> gross
19:01:30 <elliott> > pi :: CReal
19:01:31 <lambdabot> 3.1415926535897932384626433832795028841972
19:01:32 <elliott> Same as show.
19:01:48 <elliott> > (pi :: CReal) == (pi :: CReal) + (1/100000000000000)
19:01:49 <lambdabot> False
19:01:52 <elliott> > (pi :: CReal) == (pi :: CReal) + (1/10000000000000000)
19:01:53 <lambdabot> False
19:01:55 <elliott> > (pi :: CReal) == (pi :: CReal) + (1/10000000000000000000000000000000)
19:01:55 <lambdabot> False
19:02:00 <elliott> Okay, maybe it's doing something fancier.
19:02:02 <elliott> But I don't know what.
19:02:07 <Phantom_Hoover> @src pi
19:02:07 <lambdabot> Source not found. Just try something else.
19:02:07 <elliott> Phantom_Hoover: I think someone saved Havenworks.
19:02:19 <elliott> Phantom_Hoover: Class method.
19:02:20 <elliott> @src Floating
19:02:20 <lambdabot> class (Fractional a) => Floating a where
19:02:21 <lambdabot> pi :: a
19:02:21 <lambdabot> exp, log, sqrt, sin, cos, tan :: a -> a
19:02:21 <lambdabot> asin, acos, atan, sinh, cosh, tanh, asinh, acosh, atanh :: a -> a
19:02:21 <lambdabot> (**), logBase :: a -> a -> a
19:02:26 -!- oklofok has joined.
19:02:34 <Phantom_Hoover> elliott, I know, but I couldn't think of a better place to look.
19:02:56 <elliott> Phantom_Hoover: Ugh; the Wayback Machine won't show Havenworks because the robots.txt request times out.
19:02:56 <fizzie> > (pi :: CReal) == (pi :: CReal) + ((1 :: CReal)/(10**400))
19:02:57 <lambdabot> True
19:03:07 <elliott> ...despite the fact that http://havenworks.com/robots.txt loads...
19:03:30 <elliott> instance Eq CReal where
19:03:30 <elliott> x == y = s' (digitsToBits digits) == 0 where (CR s') = x-y
19:03:41 <elliott> digitsToBits :: Int -> Int
19:03:41 <elliott> digitsToBits d = ceiling (fromIntegral d * (logBase 2.0 10.0 :: Double)) + 4
19:03:54 <elliott> digits :: Int
19:03:54 <elliott> digits = 40
19:03:55 <Sgeo> Havenworks... is that the site with Computer Stupidities?
19:04:08 <Sgeo> No, it's not.
19:04:13 <fizzie> That's Rinkworks.
19:05:02 -!- oklopol has quit (Ping timeout: 255 seconds).
19:05:41 <elliott> Disturbed that fizzie knows this.
19:06:23 <Sgeo> How is that disturbing?
19:06:35 <kallisti> @hoogle var
19:06:35 <lambdabot> Language.Haskell.TH.Syntax VarE :: Name -> Exp
19:06:36 <lambdabot> Language.Haskell.TH VarE :: Name -> Exp
19:06:36 <lambdabot> Language.Haskell.TH.Lib varE :: Name -> ExpQ
19:07:39 <fizzie> It's an old(ish) site, I think.
19:07:50 <fizzie> I've used their Fantasy Name Generator for my Diablo II characters. :p
19:16:35 <kallisti> why does Complex a require a to be a RealFloat in order for it to be considered a Num.
19:16:55 -!- anders has joined.
19:18:54 <elliott> `welcome anders
19:18:59 <HackEgo> anders: 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
19:20:29 <kallisti> > sqrt 50
19:20:30 <lambdabot> 7.0710678118654755
19:20:32 <kallisti> ah I see
19:20:36 <kallisti> I forgot num includes abs
19:21:01 <kallisti> which requires sqrt for complex numbers.
19:22:04 <fizzie> > signum (2 :+ 2)
19:22:05 <lambdabot> 0.7071067811865475 :+ 0.7071067811865475
19:22:07 <fizzie> Hokay.
19:22:19 <elliott> fizzie: It's sort of positive!
19:23:12 <fizzie> elliott: It's sqrt(2) positive and sqrt(2) ordered; see, there's the positive/negative line of signitude, and the order/chaos line too.
19:23:38 <kallisti> oh wait everything requires real number stuff
19:24:03 <kallisti> multiplication and division uses cosine.
19:24:15 <kallisti> and sine
19:25:22 <fizzie> Huh? (a+bi)*(c+di) = (ac-bd) + (bc+ad)i.
19:34:21 <oklofok> fizzie: kallisti is a polar bear so obvious he won't use that representation.
19:35:56 -!- Zwaarddijk has changed nick to Systemzwang.
19:36:17 <fizzie> oklofok: While I, being such a square, obvious do.
19:38:26 <oklofok> i guess you could say these are complex issues XDXDXD
19:40:32 <kallisti> fizzie: polar form is just cartesian stuff with more trig.
19:40:36 * kallisti mathematician
19:40:55 <kallisti> it's an abstraction over sine and cosine.
19:40:57 <kallisti> so..
19:41:00 <kallisti> yeah
19:41:17 <oklofok> okay you win
19:41:31 <oklofok> fizzie: are you in turku, wanna have a beer?
19:42:21 <fizzie> I don't beer :( :/ :\ and I don't Turku either. :( :/ :\
19:43:10 <fizzie> The first is a big social problem; we had a "let's have everyone bring here a poster" event the other day, and it was merged with a beer tastery thing.
19:43:17 <Phantom_Hoover> I don't touch that Turku stuff.
19:43:19 <fizzie> Not being in Turku hasn't been a big problem so far.
19:43:37 <kallisti> `fetch http://sprunge.us/iKNC
19:43:40 <HackEgo> 2012-01-08 19:43:40 URL:http://sprunge.us/iKNC [395] -> "iKNC" [1]
19:43:57 <Phantom_Hoover> fizzie, but what about all the friends you could have in Turku?
19:44:01 <kallisti> `run ghc -O2 -o bin/searchlog iKNC
19:44:08 <HackEgo> target `iKNC' is not a module name or a source file
19:44:29 <kallisti> `run mv iKNC searchlog.hs; ghc -O2 -o bin/searchlog searchlog.hs; chmod +x bin/searchlog
19:44:45 <kallisti> >_>
19:44:46 <elliott> kallisti: that thing is useless
19:44:49 <HackEgo> ​[1 of 1] Compiling Main ( searchlog.hs, searchlog.o ) \ Linking bin/searchlog ...
19:44:55 <kallisti> elliott: it is?
19:45:08 <kallisti> well, it could be. I haven't tested it yet.
19:45:21 <elliott> Also, it's broken.
19:45:39 <kallisti> > permutations ["some", "words"]
19:45:43 <lambdabot> [["some","words"],["words","some"]]
19:45:55 <kallisti> elliott: it is?
19:46:00 <elliott> Yes.
19:46:03 <kallisti> oh indeed.
19:46:06 <kallisti> one sec
19:47:51 <kallisti> `fetch http://sprunge.us/REKU
19:47:53 <HackEgo> 2012-01-08 19:47:53 URL:http://sprunge.us/REKU [441] -> "REKU" [1]
19:48:07 <kallisti> `run mv REKU searchlog.hs; ghc -O2 -o bin/searchlog searchlog.hs; chmod +x bin/searchlog
19:48:12 <HackEgo> No output.
19:48:32 <kallisti> `searchlog elliott dicks
19:48:40 <monqy> :0
19:48:53 <kallisti> elliott: how is it broken? I doubt we saw the same brokenness
19:49:05 <HackEgo> No output.
19:49:21 <kallisti> oh I see...
19:49:39 <kallisti> it also doesn't pipe stdout correctly
19:49:43 <monqy> :t join . map words
19:49:43 <lambdabot> [String] -> [String]
19:49:51 <monqy> :t concatMap words
19:49:52 <lambdabot> [String] -> [String]
19:50:07 <Phantom_Hoover> Does looking fondly upon m4 make me a deviant?
19:50:18 <pikhq> Phantom_Hoover: Only slightly.
19:50:18 <elliott> kallisti:
19:50:22 <monqy> I don't know enough about m4 to answer
19:50:22 <elliott> createProcess (proc "/hackenv/bin/log" [r])
19:50:26 <elliott> Phantom_Hoover: I love m4.
19:50:34 <Phantom_Hoover> It's the best!
19:50:40 <kallisti> elliott: yeah this is my first time using System.Process.
19:50:40 <pikhq> monqy: Autotools has M4 as one of the major implementation languages.
19:51:01 <monqy> I now know enough about m4 to answer
19:51:08 <pikhq> :)
19:51:11 <kallisti> ah wait proc uses Inherit
19:51:29 <kallisti> so that should be fine.
19:51:37 <Phantom_Hoover> monqy, listen not to pikhq, he knows not the awesome of m4.
19:51:53 <monqy> I guess I'll
19:51:53 <monqy> learn
19:51:54 <monqy> m4
19:52:07 <monqy> or
19:52:11 <monqy> stare at it a bit and get bored
19:52:16 <kallisti> `which log
19:52:20 <HackEgo> ​/hackenv/bin/log
19:52:46 <kallisti> elliott: I can't spot the wrongness.
19:52:48 <elliott> Phantom_Hoover: The best part about m4 is that it has a command to redefine the core lexical syntax.
19:52:55 <elliott> kallisti: You spawn a process and immediately terminate.
19:53:06 <Phantom_Hoover> I remember a lot of that kind of thing.
19:53:08 <kallisti> ah
19:53:33 <elliott> Phantom_Hoover: http://www.gnu.org/software/m4/manual/m4.html#Changeword
19:53:34 <kallisti> ah wait I should be using... rawSystem I think?
19:53:43 <elliott> kallisti: No.
19:53:45 <elliott> You should be waiting for the process
19:53:55 <kallisti> does rawSystem not do that? I guess not.
19:54:00 <elliott> I think it's deprecated.
19:54:02 <Phantom_Hoover> elliott, sure that's not just a GNU extension?
19:54:17 <elliott> Phantom_Hoover: I think it is, but who cares?
19:54:43 <kallisti> elliott: sorry perl
19:54:54 <Phantom_Hoover> changequote is there by default, I think.
19:55:35 <elliott> kallisti: What?
19:56:17 <monqy> a perl which is sorry
19:56:23 <monqy> a sorry perl
19:56:41 <kallisti> elliott: well I guess perl would do the same thing if I specified that I want a process in the equivalent way...
19:56:51 <kallisti> since they're... equivalent
19:57:17 <kallisti> but that's not really meant. I meat that from programming in perl I expect things I shouldn't when doing things in other languages. basically.
19:57:21 <kallisti> +what I
19:57:28 <elliott> Just think of it like subprocess.
19:57:33 <kallisti> yes
19:57:43 <kallisti> there's no confusion on what it means. now.
19:58:03 <kallisti> monqy will enjoy this:
19:58:07 <kallisti> `fetch http://sprunge.us/WBad
19:58:09 <HackEgo> 2012-01-08 19:58:09 URL:http://sprunge.us/WBad [510] -> "WBad" [1]
19:58:23 <monqy> hi
19:58:26 <monqy> wbad
19:58:32 <kallisti> `run mv WBad searchlog.hs; ghc -O2 -o bin/searchlog searchlog.hs; chmod +x bin/searchlog
19:58:47 <HackEgo> Linking bin/searchlog ...
19:58:48 <monqy> is it an omen
19:58:54 <kallisti> `searchlog elliott penis #hurr hurr
19:59:11 <elliott> `searchlog poop fart
19:59:20 <monqy> `searchlog `searchlog
19:59:22 <kallisti> elliott: but is the regex building logic accurate?
19:59:27 <kallisti> I think it is but I'm not sure.
19:59:27 <HackEgo> No output.
19:59:31 <kallisti> oopse
19:59:37 <elliott> "congrates"
19:59:41 <HackEgo> 2012-01-08.txt:19:59:20: <monqy> `searchlog `searchlog
19:59:41 <HackEgo> 2012-01-08.txt:19:59:11: <elliott> `searchlog poop fart
19:59:42 <monqy> "wbad"
19:59:47 <monqy> oh no,,,
19:59:51 <elliott> kallisti: maybe try not search for comment
19:59:54 <elliott> `searchlog poop fart butt
19:59:55 <kallisti> indeed
20:00:00 <olsner> `searchlog poop
20:00:03 <monqy> it got the order scrombled
20:00:14 <kallisti> anyway you can use (...|...|...) for or, and then spaces provides and
20:00:15 <HackEgo> 2012-01-08.txt:19:59:54: <elliott> `searchlog poop fart butt
20:00:15 <HackEgo> 2011-05-01.txt:20:58:53: <EgoBot> poop CH
20:00:19 <kallisti> assuming it works.
20:00:56 <elliott> `searchlog kallisti moron
20:01:03 <HackEgo> 2011-12-17.txt:01:58:51: <elliott> kallisti: concatMap is recursive, you moron
20:01:16 <kallisti> elliott: see? totally useful.
20:01:22 <elliott> Yes.
20:01:30 <monqy> `searchlog kallisti moron
20:01:37 <HackEgo> 2012-01-08.txt:20:00:56: <elliott> `searchlog kallisti moron
20:01:39 <kallisti> I guess if you want actual spaces you can use \s instead
20:01:39 <monqy> this is exciting
20:01:43 <elliott> `searchlog CakeProphet moron
20:01:50 <HackEgo> 2012-01-08.txt:20:01:43: <elliott> `searchlog CakeProphet moron
20:01:59 <monqy> tool of the year
20:01:59 <kallisti> monqy: yes so exciting
20:02:13 <elliott> `searchlog kallisti nominated tool of the year
20:02:17 <kallisti> but uh, does it actually work correctly?
20:02:21 <kallisti> this is the thing that I want to know.
20:02:43 <kallisti> `searchlog moron kallisti
20:02:46 <HackEgo> No output.
20:02:51 <HackEgo> 2012-01-08.txt:20:00:56: <elliott> `searchlog kallisti moron
20:02:55 <kallisti> appears to.
20:03:58 -!- Ngevd has quit (Ping timeout: 276 seconds).
20:04:08 <fizzie> `searchlog a b c d e f g h i j k l m combinatiorial explosion?
20:04:14 <kallisti> fizzie: nooooooooo
20:04:17 <monqy> `searchlog hi
20:04:34 <kallisti> fizzie: so many permutations...
20:04:45 <HackEgo> No output.
20:04:47 <monqy> `searchlog )
20:04:53 <HackEgo> grep: unmatched parentheses
20:04:54 <HackEgo> No output.
20:04:55 <kallisti> monqy: noooooooo
20:05:07 <kallisti> continue thinking of the terms as regexes.
20:05:13 <monqy> `searchlog (
20:05:14 <kallisti> because they are.
20:05:16 <HackEgo> grep: missing )
20:05:27 <monqy> grep excitement
20:05:33 <fizzie> I gotteded a "killed" when I tried the explosion in private, I was hoping for that now too. :/
20:05:45 <elliott> fizzie: *a b c d e f g h i j k l m n big-O notation
20:06:00 <kallisti> > permutations . words $ "a b c d e f g h i j k l m combinatorial explosion?"
20:06:01 <lambdabot> [["a","b","c","d","e","f","g","h","i","j","k","l","m","combinatorial","expl...
20:06:12 <kallisti> well that part was reasonably fast actually.
20:06:22 <elliott> ...
20:06:26 <elliott> because you only evaluated the first element
20:06:31 <kallisti> oh, yes.
20:06:43 <kallisti> yes, Haskell. right.
20:06:44 <monqy> `searchlog thanks kallisti
20:07:03 <HackEgo> 2011-12-15.txt:18:36:22: <kallisti> thanks to emacs.
20:07:10 <kallisti> elliott: is this another +1 towards "kallisti's bad algorithms"
20:07:13 <monqy> tool of the yesteryear
20:07:36 <monqy> you could write a book
20:07:42 <Phantom_Hoover> `searchlogs thallisti
20:07:46 <HackEgo> ​/home/hackbot/hackbot.hg/multibot_cmds/lib/limits: line 5: exec: searchlogs: not found
20:08:02 <fizzie> > length . permutations . words $ "a b c d e f g h i j k l m combinatorial explosion?"
20:08:06 <lambdabot> mueval-core: Time limit exceeded
20:08:10 <fizzie> Bah, it's just 1307674368000 permutations.
20:08:19 <fizzie> That's one big quitter-bot.
20:08:37 <monqy> `searchlogs core mueval exceeded limit time
20:08:40 <HackEgo> ​/home/hackbot/hackbot.hg/multibot_cmds/lib/limits: line 5: exec: searchlogs: not found
20:09:15 <kallisti> hmmm I wonder if it would be faster if I switched out the "|" and ".*"
20:10:08 <monqy> who will write the wrapper over searchlog
20:10:15 <monqy> and what will it do
20:10:19 <monqy> 2012 mysteries
20:10:34 <kallisti> monqy: ...I guess I could just use grep directly...
20:10:54 <kallisti> but why do that?
20:10:56 <monqy> nih grep
20:10:58 <kallisti> when there's already logs
20:12:00 <kallisti> guys I bet this is the same algorithm Google uses.
20:12:26 <kallisti> they should hire me so I can make the big $$$
20:12:39 <kallisti> `fetch http://sprunge.us/EEVG
20:12:39 <fizzie> grep (a.*b.*c)|(a.*c.*b)|(b.*a.*c)|(b.*c.*a)|(c.*a.*b)|(c.*b.*a) \approx grep a | grep b | grep c.
20:12:42 <HackEgo> 2012-01-08 20:12:41 URL:http://sprunge.us/EEVG [510] -> "EEVG" [1]
20:13:19 <kallisti> `run mv EEVG searchlog.hs; ghc -O2 -o bin/searchlog searchlog.hs; chmod +x bin/searchlog
20:13:27 <HackEgo> No output.
20:13:30 <elliott> kallisti: By the way, searchlog always gets exactly one (1) log.
20:13:37 <elliott> Oh, you map words it.
20:13:40 <elliott> Why not concatMap words?
20:13:46 <kallisti> elliott: lazy
20:13:49 <kallisti> I already wrote it
20:13:52 <kallisti> didn't consider using that
20:14:00 <kallisti> now it's SET IN STONE
20:15:05 <kallisti> `searchlog mueval time limit
20:15:18 <HackEgo> 2011-02-03.txt:08:07:29: <lambdabot> mueval-core: Time limit exceeded
20:15:26 <kallisti> elliott: what do you mean.
20:15:50 <elliott> What?
20:15:53 <kallisti> `run paste `which log`
20:15:57 <HackEgo> http://codu.org/projects/hackbot/fshg/index.cgi/raw-file/tip/paste/paste.2434
20:16:12 <kallisti> elliott: why does it always get exactly one log.
20:16:13 -!- oerjan has joined.
20:16:58 <elliott> `Uh?
20:17:01 <HackEgo> ​/home/hackbot/hackbot.hg/multibot_cmds/lib/limits: line 5: exec: Uh?: not found
20:17:02 <elliott> Because that's how it works.
20:17:12 <elliott> I don't know what you mean.
20:17:16 <oerjan> `? Uh?
20:17:19 <kallisti> oh, you mean like that. why is that important? that's obvious.
20:17:20 <HackEgo> Uh?? ¯\(°_o)/¯
20:17:55 <elliott> kallisti: I don't understand what you mean.
20:18:15 <kallisti> oh you neverminded that.
20:18:21 <kallisti> I promise I actually read this channel
20:18:28 <kallisti> (with psychic powers)
20:18:34 <kallisti> maybe my psychic is a little rusty.
20:18:45 <fizzie> `? ¯\(o_°)/¯
20:18:48 <HackEgo> ​¯\(o_°)/¯? ¯\(°_o)/¯
20:18:50 <oerjan> psychic grammar is all weird with quantum
20:20:12 <kallisti> elliott: at first I thought you meant what you actually meant. Then I thought you meant the obvious statement that searchlog grabs one log entry, just as log was. Then I read the nevermind and it all made sense.
20:20:25 <oerjan> you cannot observe the subject and object simultaneously
20:20:53 <elliott> Oh.
20:20:55 <elliott> <elliott> kallisti: By the way, searchlog always gets exactly one (1) log.
20:20:57 <elliott> s/log/search term/
20:21:08 <kallisti> ah okay.
20:21:11 <kallisti> yes.
20:21:22 <kallisti> (but no, as past elliott discovers)
20:21:48 <oerjan> `ls bin/searchlog
20:21:52 <HackEgo> bin/searchlog
20:21:58 <monqy> searchlog should parallel for the future.
20:22:01 <oerjan> `cat bin/searchlog
20:22:03 <monqy> also it should make goofy words.
20:22:04 <HackEgo> ​ELF...
20:22:06 <oerjan> eek
20:22:11 <kallisti> monqy: oh, parallel, that's a good idea actually.
20:22:16 <kallisti> I think?
20:22:22 <kallisti> maybe that's slower than doing one traversal?
20:22:22 <elliott> Not at HackEgo speeds.
20:22:29 <elliott> Also, not for IO-bound tasks, duh.
20:22:36 <kallisti> oh, right.
20:22:37 <oerjan> `cat bin/log
20:22:39 <elliott> oerjan: cat searchlog.hs
20:22:40 <HackEgo> ​#!/bin/sh \ cd /var/irclogs/_esoteric \ if [ "$1" ]; then \ grep -P -i -- "$1" ????-??-??.txt | shuf -n 1 \ else \ file=$(shuf -en 1 ????-??-??.txt) \ echo "$file:$(shuf -n 1 $file)" \ fi \
20:22:45 <monqy> parallel io
20:22:49 <oerjan> `cat searchlog.hs
20:22:52 <monqy> "double the fun"
20:22:53 <HackEgo> import System.Environment \ import System.Process \ import System.Exit \ import Control.Monad \ import Control.Applicative \ import Data.List \ \ main = do \ r <- buildRegex . permuteArgs <$> getArgs \ (_, _, _, h) <- createProcess (proc "/hackenv/bin/log" [r]) \ exitWith <$> waitForProcess h \ where \ permuteArgs = permutations . join . map words \ buildRegex = oBrackets . intercalate ".*"
20:24:02 <oerjan> wait searchlog calls log?
20:24:08 <kallisti> yes
20:24:23 <kallisti> it builds a regex from the permutations of the search terms, and then passes that to log because I'm lazy.
20:24:24 <monqy> but who calls searchlog
20:24:28 <elliott> who watches...
20:24:29 <elliott> the searcmen
20:24:32 <elliott> searchmen
20:24:47 <kallisti> elliott: shouldn't that be "who searches the searchmen"?
20:25:36 <monqy> searchlog efficiency of the year
20:25:42 <kallisti> `searchlog (elliott|Gregor) :P
20:25:54 <HackEgo> 2011-08-16.txt:12:52:57: <elliott_> (Though not many. :p)
20:26:05 <elliott> kallisti: dude it's
20:26:05 <elliott> dude
20:26:13 <monqy> if only I had the creativity to think of search terms, then I could do all the searches
20:26:15 <kallisti> yes dude is dude.
20:26:18 <elliott> if you think it should be that then you are totally not getting this whole
20:26:18 <elliott> thing
20:26:29 <kallisti> elliott: woah man. maybe you're right
20:26:32 <kallisti> maybe I don't get the thing.
20:26:33 <kallisti> what is the thing?
20:26:34 <elliott> `searchlog beeswax endomorphism excursion
20:26:44 <HackEgo> 2012-01-08.txt:20:26:34: <elliott> `searchlog beeswax endomorphism excursion
20:26:48 <elliott> `searchlog poop poop poop poop poop poop poop ... poop
20:26:58 <kallisti> monqy: what would be a more efficient way to do that... aside from "manually"
20:27:06 <HackEgo> Killed
20:27:28 <monqy> slaves
20:28:02 <monqy> slaves with grep
20:28:19 <kallisti> I'm pretty swapping the | and .* made it faster but I really have no way to know that without understanding how regex is compiled.
20:28:23 <kallisti> *pretty sure
20:29:03 <kallisti> (a|b|c).*(b|c|a).* ... seems... simpler to execute
20:29:17 <elliott> it would probably be faster if log didn't use -P
20:29:18 <monqy> uuh waht
20:29:37 <kallisti> elliott: but then I wouldn't have perl regex
20:29:40 <kallisti> :(
20:30:50 <monqy> what's the point of building (a|b|c).*(b|c|a).* ...
20:31:27 <kallisti> as opposed to?
20:32:02 <oerjan> that would seem to give also results like a.*a.* ... ?
20:32:18 <monqy> ((a|b|c).*)+, or even better (a|b|c).*, or even better, (a|b|c)
20:32:53 <monqy> maybe I'm not getting the magical perl regex magic
20:32:54 <oerjan> i.e. no guarantee there is any b or c in it...
20:32:59 <monqy> what are those funky things
20:33:17 <monqy> yeah there's no guarantee and all of the permuatations are identical
20:33:19 <kallisti> oerjan: oh right.
20:33:29 <monqy> etc etc
20:34:15 <kallisti> monqy: the purpose is to do an and search instead of or search
20:34:29 <elliott> yes but it doesn't
20:34:32 <monqy> well you did it wrong :(
20:34:33 <monqy> yes
20:34:52 <kallisti> yes with the swapped version
20:34:55 <kallisti> the other one works correctly
20:35:31 <kallisti> `fetch http://sprunge.us/ZLCT
20:35:35 <HackEgo> 2012-01-08 20:35:35 URL:http://sprunge.us/ZLCT [510] -> "ZLCT" [1]
20:35:41 <monqy> not as cool as wbad
20:35:51 <kallisti> `run mv ZLCT searchlog.hs; ghc -O2 -o bin/searchlog searchlog.hs; chmod +x bin/searchlog
20:36:00 <HackEgo> No output.
20:36:12 <kallisti> I forgot the case where it could be a.*a.*a and such
20:37:26 <monqy> `searchlog useful again
20:37:49 <HackEgo> 2008-03-29.txt:20:06:49: <Deewiant> W ('television antenna') pops a vector off the stack, then a value. If the cell at that vector (plus the storage offset) in Funge-Space (a la g) is equal to that value, nothing happens. If the cell in space is less than the value, it pushes the value and the vector (inverted) back onto the stack, and backs up the IP (subtracts the IP's delta from it's position, sort of a 'wait to
20:38:03 <monqy> success
20:38:09 <elliott> does it say
20:38:09 <elliott> useful
20:38:30 <monqy> its a mystery
20:38:57 -!- oerjan has set topic: Official revolting channel of the inverse femtobarn stupid topic change CP violation, the original Trilogy: A new PHP | http://codu.org/logs/_esoteric/.
20:39:17 <kallisti> I don't see a useful
20:39:26 <kallisti> perhaps it gets cut off?
20:39:48 <kallisti> `searchlog mueval limit core
20:40:00 <HackEgo> 2011-08-07.txt:06:40:12: <lambdabot> mueval-core: Time limit exceeded
20:40:02 <monqy> i don't see an again either so i'll look and see what the rest was
20:40:17 <elliott> oerjan: good topic
20:40:34 <monqy> try again' condition, useful mainly in Concurrent Funge.) If the cell in s
20:40:40 <monqy> has both again and useful!!! success!!!
20:40:52 * elliott is currently 192.322581 times better than kallisti.
20:40:58 <oerjan> elliott: thx
20:43:40 <kallisti> elliott: what's the name for that style of C variable naming where you append file names and data structure names to things?
20:44:11 <elliott> what
20:44:20 <kallisti> like....
20:44:27 <kallisti> CPython_PyObject_blah_blah
20:44:40 <kallisti> basically making up for a lack of namespaces by hardcoded them into variable names.
20:45:09 <kallisti> it has a name.
20:45:40 <kallisti> Hungarian notation
20:45:45 <fizzie> That's not it.
20:46:10 <elliott> kallisti: that's not appending.
20:48:31 <fizzie> Hungarian notation is responsible for the hInstance lpClassName dwStyle -like Windows API parameter/structure-member names.
20:49:11 <kallisti> oh
20:49:14 <kallisti> nevermind
20:50:33 <elliott> fizzie: Systems Hungarian, rather. :p
20:50:44 <elliott> Not that Apps is any better.
20:52:34 <shachaf> <Sgeo> Forcing myself to use a fold on a tricky thing makes me understand it better, I think
20:52:37 <shachaf> Sgeo: Have you considered using a fold... ON FOLDS THEMSELVES?
20:53:36 <elliott> shachaf: Can you implement foldr as a foldr???
20:54:01 <elliott> foldr f z = foldr (\a r -> f a (r ())) (\() -> z)
20:54:13 <shachaf> elliott: Whoa, man. That is, like, so meta.
20:54:17 <fizzie> Using a fold ON FOLDS THEMSELVES => http://www.mspaintadventures.com/?s=4&p=000944
20:55:06 <shachaf> fizzie: I don't get it.
20:55:16 <shachaf> Probably because it's that awful comic.
20:55:50 <elliott> It's not that awful comic, actually.
20:55:59 <elliott> It's the other awful comic.
20:56:14 * elliott helpful.
20:56:21 <monqy> the other awful comic that isn't either of those other two awful comics
20:56:22 <shachaf> Oh.
20:56:29 <shachaf> That's that awful comic, then?
20:56:29 <monqy> keep it straight
20:56:44 <elliott> shachaf: No! It's the other awful comic.
20:56:50 <shachaf> monqy: Dude, don't be, like, so intolerant, man.
20:56:54 <shachaf> elliott: s/That's/What's/
20:57:15 <elliott> shachaf: The comic you're thinking of is the one at mspaintadventures.com, but the one fizzie linked is the one at mspaintadventures.com.
20:57:17 <monqy> how can i tolerate awful comics being other awful comics
20:57:22 <monqy> how is that tolerable
20:57:22 <monqy> how
20:57:46 <elliott> monqy: keep it straight
20:57:53 <oerjan> nothing is tolerable, really
20:58:11 <monqy> elliott: did i oops a word
20:58:14 <monqy> :(
20:58:21 <elliott> everyone oopsedes a word
20:58:21 <elliott> sometimes
20:58:29 <monqy> sorry to any awful webcomics i may have offended
20:58:30 <elliott> oerjan: not true i'm sitting right here tolerating
20:58:31 <fizzie> oerjan: 0 is well within the tolerances.
20:58:33 <monqy> its ok
20:58:33 <elliott> monqy: station v3
20:58:38 <elliott> is it really
20:58:38 <elliott> ok
20:58:39 <elliott> for station v3
20:58:42 <elliott> is anything really
20:58:43 <elliott> ok
20:58:44 <elliott> for station v3
20:59:09 <oerjan> elliott: aum
21:00:52 <monqy> a special shame set aside for station v3
21:01:10 <monqy> station v3 shame
21:01:48 <elliott> shame station v3
21:06:43 <oerjan> > fix$('0':).tail.(<**>[id,chr.xor 1.ord])
21:06:45 <lambdabot> "01101001100101101001011001101001100101100110100101101001100101101001011001...
21:08:09 <shachaf> I don't like how you can't tell what the Applicative combinators do from their types.
21:08:43 <shachaf> @ty (<*>)
21:08:44 <lambdabot> forall (f :: * -> *) a b. (Applicative f) => f (a -> b) -> f a -> f b
21:08:45 <shachaf> @ty (<**>)
21:08:46 <elliott> "Programmers are limited by the hardware. Computers work by repeating certain steps over and over again. They can only follow certain instructions. With the sheer randomness of crumpled paper, there really is no way to come up with an algorithm that accounts for every crease, nook, and cranny. You could painstakingly program something that would evaluate a single unique piece of paper, but there's no way to make a general method."
21:08:46 <lambdabot> forall (f :: * -> *) a b. (Applicative f) => f a -> f (a -> b) -> f b
21:08:48 <oerjan> ...most of them do their actions left to right, no?
21:08:56 <shachaf> But is (<**>) = flip (<*>)? No!
21:09:00 <elliott> oerjan: *all
21:09:08 <shachaf> Right, but so what?
21:09:17 <Vorpal> elliott, is this for OCR or something?
21:09:23 <elliott> shachaf: Consistent rule and the rest is left up to types? Gosh, how awful.
21:09:25 <Vorpal> elliott, and it doesn't make any sense
21:09:26 <shachaf> Anyway, left-to-right is racist.
21:09:30 <elliott> Vorpal: no, it's about crumpled paper, and that's why i quoted it
21:09:44 <Vorpal> elliott, what does crumpled paper have to do with computers?
21:10:03 <fizzie> Vorpal: They (computers) can't get over it (crumpled paper).
21:10:12 <fizzie> Vorpal: Or so I read it.
21:10:14 <Vorpal> fizzie, ah okay. Right
21:10:29 <oerjan> shachaf: no, racist is the pun i briefly considered responding to that with
21:10:30 <fizzie> It's just that they can't. Want to break a computer? Crumpled paper.
21:11:08 <oerjan> also, is there a shorter way to write chr.xor 1.ord
21:11:20 <elliott> erm...
21:11:23 <shachaf> instance Num Char
21:11:23 <elliott> what are you doing :P
21:11:25 <shachaf> xor 1
21:11:28 <shachaf> @ty xor
21:11:29 <lambdabot> forall a. (Bits a) => a -> a -> a
21:11:30 <monqy> I made a list (good = unsafeCoerce good : good) then regretted it
21:11:33 <shachaf> s/Num/Bits/
21:11:38 <elliott> monqy: that's
21:11:40 <elliott> what is that
21:11:44 <monqy> good
21:11:48 <oerjan> :t xor.chr
21:11:49 <lambdabot> No instance for (Bits Char)
21:11:49 <lambdabot> arising from a use of `xor' at <interactive>:1:0-2
21:11:49 <lambdabot> Possible fix: add an instance declaration for (Bits Char)
21:12:06 <elliott> Prelude Unsafe.Coerce> let good = unsafeCoerce good : good :: [[[[()]]]]
21:12:06 <elliott> Prelude Unsafe.Coerce> take 10 good
21:12:06 <elliott> [[[[(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),()
21:12:06 <elliott> ,(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),()
21:12:10 <elliott> ,(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),()
21:12:11 <shachaf> No, there's no such instance.
21:12:15 <elliott> ,(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),()
21:12:20 <elliott> ,(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),
21:12:23 <elliott> monqy: good
21:12:25 <elliott> oerjan: are you playing anagolf :P
21:12:26 <shachaf> elliott: Maybe in another couple of lines we'll understand.
21:12:31 <shachaf> Why did you stop pasting?!
21:12:38 <elliott> shachaf: Because I don't want you to understand.
21:13:10 <shachaf> :-(
21:13:25 <oerjan> elliott: just golfing some frequent one-liners a bit differently
21:13:41 <elliott> shachaf: I wrote over 10 paragraphs about monads without a single analogy!
21:13:44 <elliott> Do I get a medal?
21:14:27 <shachaf> elliott: I think you get kicked out of #haskell for life.
21:14:42 <shachaf> Which is even better than a medal, as far as quality-of-life goes.
21:14:53 <shachaf> What were you writing about monads?
21:15:23 <oerjan> > show<=<fix$(0:).tail.(<**>[id,(1-)])
21:15:25 <lambdabot> "01101001100101101001011001101001100101100110100101101001100101101001011001...
21:15:27 <elliott> shachaf: http://stackoverflow.com/questions/8777216/how-do-you-identify-monadic-design-patterns
21:15:34 <elliott> shachaf: The worst-titled question ever.
21:15:38 <fizzie> oerjan: (range ((minBound :: Char),(maxBound :: Char)) !!) . xor 1 . index ((minBound :: Char),(maxBound :: Char)) OH WAIT you said *shorter*.
21:15:58 <elliott> You don't need those ::Chars.
21:16:02 * oerjan swats fizzie -----###
21:16:04 <shachaf> elliott: That URL doesn't make me want to click on it.
21:16:07 <elliott> @src Ix
21:16:08 <lambdabot> class (Ord a) => Ix a where
21:16:08 <lambdabot> range :: (a,a) -> [a]
21:16:08 <lambdabot> index :: (a,a) -> a -> Int
21:16:08 <lambdabot> inRange :: (a,a) -> a -> Bool
21:16:08 <lambdabot> rangeSize :: (a,a) -> Int
21:16:19 <elliott> fizzie: How does (range x !!) differ from index x.
21:16:24 <elliott> shachaf: It's not that bad.
21:16:41 <oerjan> it got shorter by using integers and show<=<, anyhow
21:16:58 <elliott> oerjan: pretty
21:17:06 <elliott> > show<=<fix$(0:).(<**>[id,(1-)])
21:17:08 <lambdabot> "00101100110100101101001100101100110100110010110100101100110100101101001100...
21:17:16 <elliott> hmph
21:17:22 <shachaf> What's this supposed to be?
21:17:24 <elliott> there must be some way to eliminate that...
21:17:39 <shachaf> I would read the source that generates it but I don't feel like it.
21:17:46 <shachaf> Too long.
21:17:53 <oerjan> shachaf: thue-morse sequence
21:18:05 <elliott> oerjan: How about look-and-say?
21:18:27 <fizzie> elliott: Isn't it the other way around? I mean,
21:18:28 <fizzie> @ty ((range ('a','b') !!), index ('a','b'))
21:18:29 <lambdabot> (Int -> Char, Char -> Int)
21:18:34 <shachaf> Oh, that.
21:18:57 <elliott> fizzie: Oh, yes.
21:19:31 <elliott> > group "112333"
21:19:32 <lambdabot> ["11","2","333"]
21:19:35 <oerjan> elliott: i dabbled with that yesterday and didn't get satisfied
21:19:47 <elliott> @hoogle (a -> b) -> a -> (a,b)
21:19:48 <lambdabot> Control.Monad.Writer.Class listens :: MonadWriter w m => (w -> b) -> m a -> m (a, b)
21:19:48 <lambdabot> Control.Monad.Writer.Lazy listens :: MonadWriter w m => (w -> b) -> m a -> m (a, b)
21:19:48 <lambdabot> Control.Monad.Writer.Strict listens :: MonadWriter w m => (w -> b) -> m a -> m (a, b)
21:19:53 <elliott> :t groupBy
21:19:54 <lambdabot> forall a. (a -> a -> Bool) -> [a] -> [[a]]
21:19:58 <elliott> > group "112333"
21:19:59 <lambdabot> ["11","2","333"]
21:20:06 <elliott> > (length &&& head) group "112333"
21:20:07 <lambdabot> Couldn't match expected type `t1 -> t'
21:20:07 <lambdabot> against inferred type `(GHC....
21:20:08 <elliott> > (length &&& head) $ group "112333"
21:20:08 <lambdabot> (3,"11")
21:20:13 <elliott> wtf
21:20:13 <elliott> oh
21:20:17 <elliott> > (length &&& head) <$> group "112333"
21:20:18 <lambdabot> [(2,'1'),(1,'2'),(3,'3')]
21:20:38 <elliott> > (\xs -> show (length x) ++ head x) <$> group "112333"
21:20:39 <lambdabot> Couldn't match expected type `[a]'
21:20:39 <lambdabot> against inferred type `SimpleRef...
21:20:44 <elliott> > (\xs -> show (length x) ++ [head x]) <$> group "112333"
21:20:44 <lambdabot> Couldn't match expected type `[a]'
21:20:45 <lambdabot> against inferred type `SimpleRef...
21:20:46 <elliott> wtf
21:20:47 <elliott> oh
21:20:50 <elliott> > (\x -> show (length x) ++ [head x]) <$> group "112333"
21:20:51 <lambdabot> ["21","12","33"]
21:21:10 <elliott> > liftA2 (++) (show . length) head <$> group "112333"
21:21:11 <lambdabot> Couldn't match expected type `[GHC.Types.Char]'
21:21:11 <lambdabot> against inferred ty...
21:21:21 <elliott> > liftA2 (++) (show . length) (take 1) <$> group "112333"
21:21:22 <lambdabot> ["21","12","33"]
21:21:46 <elliott> > concatMap((++)<$>show.length<*>take 1).group$"112333"
21:21:48 <lambdabot> "211233"
21:21:50 <elliott> > join.map((++)<$>show.length<*>take 1).group$"112333"
21:21:52 <lambdabot> "211233"
21:22:04 <elliott> > iterate$join.map((++)<$>show.length<*>take 1).group
21:22:05 <lambdabot> Overlapping instances for GHC.Show.Show
21:22:05 <lambdabot> ([GHC....
21:22:06 <elliott> :t iterate$join.map((++)<$>show.length<*>take 1).group
21:22:07 <lambdabot> [Char] -> [[Char]]
21:22:17 <elliott> > (iterate$join.map((++)<$>show.length<*>take 1).group)"1"
21:22:19 <lambdabot> ["1","11","21","1211","111221","312211","13112221","1113213211","3113121113...
21:22:27 <elliott> > (join.iterate$join.map((++)<$>show.length<*>take 1).group)"1"
21:22:28 <lambdabot> Couldn't match expected type `a -> a' against inferred type `[a]'
21:22:36 <elliott> > join.(iterate$join.map((++)<$>show.length<*>take 1).group)"1"
21:22:37 <lambdabot> Couldn't match expected type `[a]'
21:22:37 <lambdabot> against inferred type `GHC.Types...
21:22:38 <elliott> > join.(iterate$join.map((++)<$>show.length<*>take 1).group)$"1"
21:22:41 <lambdabot> "11121121111122131221113112221111321321131131211131221132113111231131122111...
21:22:44 <elliott> > join$(iterate$join.map((++)<$>show.length<*>take 1).group)"1"
21:22:46 <lambdabot> "11121121111122131221113112221111321321131131211131221132113111231131122111...
21:22:49 <shachaf> > (>>=liftA2(++)(show.length)(take 1)).group$"112333"
21:22:50 <elliott> oerjan: that's not bad imo
21:22:51 <lambdabot> "211233"
21:22:57 <elliott> shachaf: oh, very good
21:23:02 <oerjan> elliott: look-and-say isn't usually joined together like that
21:23:07 <elliott> oerjan: well ok
21:23:19 <elliott> > iterate(>>=((++)<$>show.length<*>take 1).group))"1"
21:23:20 <lambdabot> <no location info>: parse error on input `)'
21:23:22 <elliott> > iterate(>>=((++)<$>show.length<*>take 1).group)"1"
21:23:23 <lambdabot> Couldn't match expected type `GHC.Types.Char'
21:23:23 <lambdabot> against inferred type...
21:23:29 <elliott> shachaf: i think liftA2 is longer
21:23:41 <shachaf> Probably.
21:23:53 <elliott> > iterate((>>=(++)<$>show.length<*>take 1).group)"1"
21:23:54 <lambdabot> ["1","11","21","1211","111221","312211","13112221","1113213211","3113121113...
21:24:11 <elliott> > iterate((>>=(show.length)++(take 1)).group)"1"
21:24:12 <lambdabot> ["1","11","21","1211","111221","312211","13112221","1113213211","3113121113...
21:24:13 <oerjan> > iterate(join.:lift[show.length,take 1]<=<group)"1"
21:24:14 <lambdabot> Couldn't match kind `(* -> *) -> * -> *' against `?? -> ? -> *'
21:24:19 <oerjan> oops
21:24:25 <oerjan> what was it i did yesterday
21:24:29 <elliott> > iterate((>>=show.length++take 1).group)"1"
21:24:30 <lambdabot> ["1","11","21","1211","111221","312211","13112221","1113213211","3113121113...
21:24:33 <elliott> awesome
21:24:55 <oerjan> duh caleskell ++
21:25:03 <elliott> right
21:25:16 <shachaf> oerjan: I THINK YOU MEAN caleskell++
21:25:21 <shachaf> @karma+ caleskell
21:25:21 <lambdabot> caleskell's karma raised to 2.
21:25:31 <elliott> > iterate(group>=>show.length++take 1)"1"
21:25:32 <lambdabot> ["1","11","21","1211","111221","312211","13112221","1113213211","3113121113...
21:25:37 <elliott> i think i win
21:25:48 <oerjan> darn i was going to do that :P
21:26:19 <elliott> shachaf: we found another use of (>=>)
21:26:37 <elliott> oerjan: the nice part is that it's still easy to understand
21:26:47 <elliott> in fact it's even in the right order for reading naturally and all that
21:27:04 <shachaf> elliott: More like a reason (>=>) shouldn't be in the stdlib.
21:27:20 <shachaf> And by stdlib I mean stdlib.h.
21:27:57 <Vorpal> :t (>=>)
21:27:58 <lambdabot> forall a (m :: * -> *) b c. (Monad m) => (a -> m b) -> (b -> m c) -> a -> m c
21:28:04 <Vorpal> hm
21:28:34 <elliott> kleisli composition
21:29:36 <Vorpal> elliott, ah
21:30:17 <elliott> That helped?
21:30:35 <elliott> oerjan: i conjecture that iterate(group>=>show.length++take 1)"1" is the shortest caleskell look and say prorgam :P
21:30:38 <elliott> prorgam
21:30:42 <Vorpal> elliott, somewhat, I have read about that before at some point. I did have to look up on wikipedia to refresh the details though
21:31:01 <elliott> "SumaMoito-Z2 has been proven Turing complete by simulation of Bitwise Cyclic Tag. The details required to construct the interpreter can be found in the log of #esoteric for 8 January, 2012."
21:31:02 <elliott> llo
21:31:03 <Vorpal> night →
21:31:03 <elliott> lol
21:31:10 <elliott> Vorpal: it's just
21:31:15 <elliott> (f >=> g) x = f x >>= g
21:32:02 -!- zzo38 has joined.
21:32:38 <Vorpal> elliott, not sure why they would add a special name for that. It doesn't really save that much typing
21:32:59 <elliott> Vorpal: it has nice theoretical properties
21:33:05 <elliott> e.g. the monad laws are just
21:33:06 <shachaf> And it makes the monad laws so much nicer.
21:33:09 <elliott> "return is identity for kleisli composition"
21:33:10 <elliott> and
21:33:14 <shachaf> elliott: CURSES
21:33:14 <elliott> "kleisli composition is associative"
21:33:21 <Vorpal> elliott, ah
21:33:42 <monqy> and also it saves so much typing???
21:33:47 <elliott> <elliott> > iterate(group>=>show.length++take 1)"1"
21:33:48 <elliott> so much
21:34:01 <elliott> oerjan: what other nice sequences are there...
21:34:18 <Vorpal> elliott, damn those mathematicians. We shouldn't let them design computer languages. They make crazy things like haskell. Leave it to engineers instead, then you get sensible things like VHDL, ADA and C
21:34:40 <shachaf> @quote kmc mathematicians
21:34:40 <lambdabot> kmc says: Haskell isn't really designed by mathematicians. it's designed by people who programmers would consider to be mathematicians and mathematicians would consider to be programmers
21:34:51 <Vorpal> heh
21:35:17 <shachaf> 1echo a
21:35:18 <shachaf> `echo a
21:35:23 <HackEgo> a
21:35:30 <shachaf> @remember `echo blah blah blah
21:35:30 <lambdabot> Good to know.
21:35:33 <shachaf> @quote `echo
21:35:34 <lambdabot> `echo says: blah blah blah
21:35:37 <HackEgo> says: blah blah blah
21:35:37 <itidus21> as a pascal,basic,c,asm bred coder(not saying i know any of them well or that i can use them properly), i am highly interested in what i can learn from the mathematical programmers
21:35:47 <shachaf> @forget `echo blah blah blah
21:35:47 <lambdabot> Done.
21:35:55 <itidus21> hence why i keep ramming against the berlin wall of programming
21:36:14 <itidus21> i shouldn't beg for quotation in that way
21:37:01 -!- Klisz has joined.
21:39:49 * elliott decides to encourage non-begging behaviour by doing nothing.
21:40:17 <zzo38> O, so the people who designed Haskell are almost programmers and almost mathematicians.
21:40:22 <itidus21> ive been analyzing myself a bit
21:40:27 <oerjan> @hoogle (a -> a) -> a -> [a]
21:40:28 <lambdabot> Prelude iterate :: (a -> a) -> a -> [a]
21:40:28 <lambdabot> Data.List iterate :: (a -> a) -> a -> [a]
21:40:28 <lambdabot> Data.Generics.Schemes everywhere :: (forall a. Data a => a -> a) -> (forall a. Data a => a -> a)
21:40:51 <elliott> oerjan: did you really need to hoogle that
21:40:57 <oerjan> no.
21:41:04 <itidus21> its a bit like bush writing a heartfelt essay on why he was president for so many terms
21:41:06 <shachaf> elliott: You should be in #haskell.
21:41:09 <oerjan> i was hoping for some almost-hits
21:41:09 <shachaf> It makes one happier.
21:41:16 <shachaf> @hoogle+
21:41:16 <lambdabot> Data.Generics.Schemes everywhere' :: (forall a. Data a => a -> a) -> (forall a. Data a => a -> a)
21:41:16 <lambdabot> Prelude until :: (a -> Bool) -> (a -> a) -> a -> a
21:41:17 <lambdabot> Prelude map :: (a -> b) -> [a] -> [b]
21:41:31 <oerjan> i was thinking of until
21:41:40 <elliott> oerjan: I was going to remind you of until.
21:41:41 <oerjan> but i doubt that helps
21:41:47 * elliott would have made 600 SO rep today if not for that pesky rep cap.
21:41:52 <elliott> shachaf: FSVO happier?
21:41:58 <elliott> itidus21: 2 is so many now? :P
21:42:09 <itidus21> it is
21:42:20 <shachaf> elliott: Just imagine talking to people who "just want to convert an Integer to a ByteString"!
21:42:25 <oerjan> @hoogle+
21:42:25 <lambdabot> Data.List map :: (a -> b) -> [a] -> [b]
21:42:25 <lambdabot> Control.OldException mapException :: (Exception -> Exception) -> a -> a
21:42:26 <lambdabot> Prelude ($) :: (a -> b) -> a -> b
21:42:27 <elliott> shachaf: unsafeCoerce
21:42:39 <shachaf> Funny, that's the first answer that was given.
21:42:52 <shachaf> Followed by pack . return . fromInteger.
21:42:53 <Vorpal> elliott, why are SO rep useful?
21:42:55 <itidus21> elliott: in this i am reminded of an einstein quote about having hand on a hot stove versus sitting next to a pretty girl
21:43:08 <shachaf> Vorpal: They aren't useful. However, they are SO useful.
21:43:11 <elliott> Vorpal: Why is life useful?
21:43:18 <elliott> Why is humanity useful?
21:43:19 <Vorpal> elliott, it isn't
21:43:23 <elliott> Why is chocolate useful?
21:43:31 <Vorpal> not at all, we just pollute and such
21:43:34 <elliott> So to answer your question, SO rep is useful because it's delicious and made of cocoa beans.
21:43:41 <elliott> FSVO "just".
21:43:42 <zzo38> You have to answer all these questions with other questions: useful in what way?
21:43:54 <Vorpal> elliott, also chocolate isn't useful either
21:44:00 <monqy> so rep is useful because it pollutes and such
21:44:02 <elliott> itidus21: Yeah, girls just can't compare to the magic of a stove.
21:44:04 <oerjan> > fix.("1":).map$group>=>show.length++take 1 --just a bit too long
21:44:05 <lambdabot> Couldn't match expected type `a -> a'
21:44:05 <lambdabot> against inferred type `[[GHC....
21:44:11 <oerjan> and wrong besides :P
21:44:27 <oerjan> :t fix.("1":).map
21:44:28 <lambdabot> Couldn't match expected type `a -> a'
21:44:28 <lambdabot> against inferred type `[[Char]]'
21:44:28 <lambdabot> In the first argument of `(.)', namely `("1" :)'
21:44:28 <itidus21> "who's been a naughty stove?"
21:44:40 <elliott> oerjan: ooh what about my favourite sequence
21:44:42 <monqy> can stoves be naughty
21:44:48 <oerjan> :t fix.("1":).:map
21:44:49 <elliott> oerjan: the self-avoidant sequence
21:44:49 <lambdabot> ([Char] -> [Char]) -> [[Char]]
21:44:52 <elliott> *avoiding i think
21:44:54 <shachaf> elliott: By the way, is it bad that my reaction to a lot of questions in #haskell is "step 1: Learn how to, you know, think"?
21:44:56 <oerjan> > fix.("1":).:map$group>=>show.length++take 1 --just a bit too long
21:44:58 <lambdabot> ["1","11","21","1211","111221","312211","13112221","1113213211","3113121113...
21:45:01 <itidus21> monqy: during certain erotic fantasy
21:45:03 <shachaf> I think that would solve so many problems.
21:45:25 <elliott> oerjan: where you build a markov model of increasing order of your own output so far
21:45:33 <elliott> and output the least likely next bit
21:45:39 <oerjan> elliott: okay
21:45:40 <Vorpal> elliott, what the self-avoidant sequence?
21:45:43 <elliott> Vorpal: ^
21:45:46 <Vorpal> ah
21:45:56 <elliott> oerjan: it /sounds/ like it should have a conceptually simple definition, but the one I implemented just did the obvious (reconstruct a markov model each step)...
21:45:57 <Vorpal> elliott, that sounds interesting
21:46:09 <elliott> Vorpal: it basically produces random-looking output
21:46:15 <elliott> i don't know if it's "really" (pseudo)random
21:46:17 <zzo38> I figured out the Proxy monad first in the digraph category not in Haskell, but look in the document for Proxy type and found they defined the monad there too. But then, there can be Coproxy comonad, data Coproxy x; and everything has to be made undefined but that is OK since there will be no input value so there can be no output value either (it should be an empty case block, but Haskell doesn't support that!)
21:46:23 <itidus21> in the process i thought up a game based on hoarding.
21:46:28 <Vorpal> elliott, probably isn't.
21:46:47 <elliott> Vorpal: well you can consider it a reasonable mathematical /definition/ of a random sequence
21:46:48 <Vorpal> elliott, anyway wouldn't it end up cycling a lot?
21:47:00 <itidus21> you walk around a single screen maze collecting randomly timed icons which unlock new randomly generated maze levels which can be played by a menu...
21:47:00 <elliott> at least, it's a definition of a sequence that you can't predict locally
21:47:03 -!- atrapado has changed nick to atrapad.
21:47:06 <elliott> well, you can predict it
21:47:09 <elliott> but not with a markov model :)
21:47:11 <elliott> Vorpal: nope
21:47:17 <elliott> that's why you increase the order each step
21:47:18 <itidus21> the idea is that you have more fun collecting the levels than actually playing them
21:47:20 -!- atrapado has joined.
21:47:23 <Vorpal> elliott, ah
21:47:32 <elliott> itidus21: :D
21:47:36 -!- atrapad has quit (Quit: Bye).
21:47:45 * elliott just assumes oerjan is working on that sequence.
21:47:51 <elliott> argumentum ad naivety
21:48:06 <itidus21> 5 minutes in the player says to himself, dear god what am i doing?
21:48:07 <oerjan> elliott: NOPE
21:48:15 <elliott> oerjan: :(
21:48:30 <elliott> zzo38: agda supports empty pattern-matching :)
21:48:41 <elliott> oerjan: what about the paper-folding sequence
21:48:52 <Vorpal> elliott, which one is that?
21:49:30 <elliott> 00:28:30 <monad> In the book "Real World Haskell", I found the the following declaration: instance NFData BS.ByteString where rnf _ = () ! In my opinion, rnf does nothing! I don't understand how the argument of rnf will be reduced to "normal form". Any idea?
21:49:36 <elliott> shachaf: Hey, a reason to dislike RWH more!
21:49:43 <elliott> Vorpal: http://en.wikipedia.org/wiki/Regular_paperfolding_sequence
21:49:55 <zzo38> elliott: Well, I am glad they fixed that! But still, they should also fix GHC to support empty case blocks
21:49:56 <atrapado> please can someone review my proof of that SumaMoito-N is Turing-complete? http://esolangs.org/wiki/SumaMoito#Computational_class
21:50:22 <shachaf> elliott: Obviously that excalamation mark is just moved over by 7 characters.
21:50:26 <shachaf> EXCALAMATION!
21:50:45 <Vorpal> elliott, nice
21:50:46 <shachaf> Anyway, if it was 7 characters to the left it would make sense.
21:51:10 <Vorpal> elliott, I wonder if there is an irregular paperfolding sequence
21:51:42 <elliott> atrapado: It's correct, yes.
21:51:47 <atrapado> oh, good
21:51:52 <elliott> N is a pretty trivial extension of Z2.
21:52:15 <elliott> Are you sure the decrements are the same though?
21:52:21 <elliott> I thought N made the value the same when underflowing.
21:52:25 <elliott> Oh, Z2 does to.
21:52:26 <elliott> too.
21:52:39 <elliott> Oh, it doesn't have decrement.
21:52:41 <elliott> I didn't notice that :)
21:53:02 <elliott> Yes, assuming the decrement function is right, it's correct. I think you can make it simpler though.
21:53:03 <atrapado> i am not ocmpletely sure that it is correct, elliott
21:53:05 <Vorpal> atrapado, what about Z1?
21:53:12 <atrapado> Z1...
21:53:16 <atrapado> more complicated
21:53:19 <atrapado> negative values
21:53:21 <Vorpal> I see
21:53:47 <Vorpal> atrapado, also that mapping from Z2 to N seems trivial
21:53:48 <elliott> atrapado: tmp1; out; tmp1+; while (tmp1 != in) { out+; tmp1+ }
21:53:54 <elliott> That decrements out into in.
21:53:55 <Vorpal> why are there even two languages?
21:53:56 <elliott> Er.
21:53:58 <elliott> In into out.
21:54:00 <elliott> out = in - 1
21:54:09 <atrapado> and if it is 0 ?
21:54:24 <elliott> atrapado: Oh, it doesn't halt. But that's easy...
21:54:42 <elliott> atrapado: tmp1; out; tmp1+; while (in != out) { while (tmp1 != in) { out+; tmp1+ } }
21:54:57 <oerjan> :t zap
21:54:58 <lambdabot> Not in scope: `zap'
21:55:00 <oerjan> :t zapp
21:55:01 <lambdabot> Not in scope: `zapp'
21:55:06 <elliott> wat
21:55:25 <Vorpal> zap?
21:55:37 <oerjan> just zipWith id
21:55:52 <atrapado> i do not understand fully your algorithm, elliott , but do not doubt of its correcness....
21:56:01 <Vorpal> oerjan, why would you call that zap?
21:56:04 <elliott> atrapado: Well, it's basically
21:56:08 <Vorpal> :t zipWith id
21:56:09 <lambdabot> forall b c. [b -> c] -> [b] -> [c]
21:56:11 <elliott> atrapado: for (int i = 1; i < in; i++) out++
21:56:20 -!- yiyus has quit (Ping timeout: 248 seconds).
21:56:24 <elliott> atrapado: Since i starts at 1, the loop executes (in-1) times, rather than in as it would if it started at 0.
21:56:26 <oerjan> Vorpal: because it's <*> for ZipList
21:56:40 <Vorpal> oerjan, I see. Not sure why it would be called zap still
21:56:42 <atrapado> ok
21:56:46 <elliott> atrapado: The while (in != out) thing is just a trick: out starts as 0, so if in == 0, then the whole thing is skipped. If it's not, then we know that at the end of the inner loop, out = in - 1.
21:56:47 <elliott> So out != in.
21:56:57 <elliott> So it's equivalent to if (in != 0).
21:57:02 <atrapado> ah
21:57:07 <atrapado> more clear to me
21:57:16 <atrapado> good
21:57:50 <elliott> (Disclaimer: Writing code like this is bad for your health.)
21:58:04 <oerjan> Vorpal: because (<*>) = ap
21:58:09 <atrapado> yes, it is itself obfuscated
21:58:14 <Vorpal> oerjan, oh, right
21:58:31 <elliott> Vorpal: APply
21:58:58 <elliott> :t app
21:58:59 <lambdabot> forall (a :: * -> * -> *) b c. (ArrowApply a) => a (a b c, b) c
21:59:43 <elliott> :t app loop
21:59:44 <lambdabot> Couldn't match expected type `a (b, d) (c, d) -> a b c'
21:59:44 <lambdabot> against inferred type `(b1 -> c1, b1)'
21:59:45 <lambdabot> Expected type: (a (b, d) (c, d) -> a b c) -> t
21:59:47 <elliott> :t loop app
21:59:48 <lambdabot> forall (a :: * -> * -> *) d c. (ArrowApply a, ArrowLoop a) => a (a d (c, d)) c
21:59:56 <elliott> oerjan: :D
22:00:08 <elliott> > loop app (\x -> (42, x))
22:00:09 <lambdabot> 42
22:00:12 <elliott> > loop app (\x -> (42, 1+x))
22:00:13 <lambdabot> 42
22:00:18 <elliott> > loop app (\x -> (x, 1:x))
22:00:19 <lambdabot> [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,...
22:00:23 <elliott> > loop app (\x -> (2:x, 1:x))
22:00:23 <lambdabot> [2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,...
22:00:26 <elliott> that's awesome
22:00:33 <elliott> you get control over the final value, sort of
22:00:49 <oerjan> > fix.interleave$cycle[1,0]
22:00:51 <lambdabot> [1,1,0,1,1,0,0,1,1,1,0,0,1,0,0,1,1,1,0,1,1,0,0,0,1,1,0,0,1,0,0,1,1,1,0,1,1,...
22:00:52 <Vorpal> :t loop
22:00:53 <lambdabot> forall (a :: * -> * -> *) b d c. (ArrowLoop a) => a (b, d) (c, d) -> a b c
22:00:56 <Vorpal> oh
22:00:57 <Vorpal> :t app
22:00:58 <lambdabot> forall (a :: * -> * -> *) b c. (ArrowApply a) => a (a b c, b) c
22:00:58 <elliott> oerjan: well that was easy :P
22:01:01 <elliott> oerjan: and elegant
22:01:07 <Vorpal> (haven't really used arrows)
22:01:23 <elliott> :t loop arr
22:01:24 <lambdabot> Couldn't match expected type `(b, d)'
22:01:24 <lambdabot> against inferred type `b1 -> c'
22:01:24 <lambdabot> Expected type: (b, d) -> (c1, d)
22:01:26 <elliott> aww
22:01:29 <elliott> :t arr loop
22:01:30 <lambdabot> forall (a :: * -> * -> *) b d c (a1 :: * -> * -> *). (ArrowLoop a, Arrow a1) => a1 (a (b, d) (c, d)) (a b c)
22:01:42 <elliott> :t arr app
22:01:43 <lambdabot> forall b c (a :: * -> * -> *). (Arrow a) => a (b -> c, b) c
22:01:47 <elliott> heh
22:01:48 <elliott> :t app
22:01:49 <lambdabot> forall (a :: * -> * -> *) b c. (ArrowApply a) => a (a b c, b) c
22:01:52 <elliott> right
22:02:01 <oerjan> elliott: once i remembered interleave, yeah
22:02:22 <Vorpal> :t arr
22:02:23 <lambdabot> forall b c (a :: * -> * -> *). (Arrow a) => (b -> c) -> a b c
22:02:33 <Vorpal> elliott, what are arrows for?
22:02:45 <Phantom_Hoover> :t loop
22:02:46 <lambdabot> forall (a :: * -> * -> *) b d c. (ArrowLoop a) => a (b, d) (c, d) -> a b c
22:02:50 <Vorpal> (apart from pointing people and shooting them)
22:03:27 <elliott> Vorpal: arrows
22:03:34 <elliott> they're like monads, except not, and more static
22:03:35 <Vorpal> elliott, yes, what are they used for
22:03:39 <Vorpal> ah
22:03:40 <elliott> things
22:03:43 <elliott> they're not very nice
22:03:55 <elliott> oerjan: do i have to build the self-avoiding sequence :(
22:03:56 <Vorpal> elliott, so why does haskell have them?
22:04:00 <Vorpal> if they are not very nice
22:04:44 <Phantom_Hoover> <elliott> they're like monads, except not, and more static
22:04:52 <Phantom_Hoover> I never did get arrows.
22:05:34 <zzo38> I don't like much the Arrow class in Haskell so I made up my own class; there is two classes, one is the functor from one category to another, the other one is the other four things in the Arrow class.
22:06:11 <elliott> Vorpal: Well, they're not *all* that unnice.
22:06:11 <zzo38> And you can also change to use a different type other than (,) type. Which makes ArrowChoice not needed since instead, it is the arrow for the dual category.
22:06:24 <Vorpal> elliott, right. So why should someone use them?
22:06:46 <elliott> If they want to. Or if someone else already did and they have to live with it.
22:07:05 <Vorpal> elliott, so there is really nothing they are better at than, for example, monads?
22:07:31 <zzo38> They are different things!
22:07:39 <elliott> Vorpal: There are arrows that are not (or should not be) monads.
22:07:44 <Vorpal> ah okay
22:08:02 <Vorpal> so that is the "except not" bit then
22:08:18 <oerjan> :t loop
22:08:19 <lambdabot> forall (a :: * -> * -> *) b d c. (ArrowLoop a) => a (b, d) (c, d) -> a b c
22:09:14 <elliott> oerjan: I TAKE IT THAT'S A YES
22:09:16 <Vorpal> well, night →
22:09:16 <zzo38> But, if the category is the Kleisli category of some monad of (->) then it should make the monad. And, also coKleisli categories to make comonad
22:09:41 <elliott> > (init &&& last) . take 2 [False,False,True,True]
22:09:42 <lambdabot> Couldn't match expected type `[a]'
22:09:42 <lambdabot> against inferred type `GHC.Bool....
22:09:45 <elliott> > (init &&& last) . take 3 $ [False,False,True,True]
22:09:47 <lambdabot> ([False,False],True)
22:10:58 <elliott> > map ((init &&& last) . take 3) . inits $ [False,False,True,True]
22:10:59 <lambdabot> [(*Exception: Prelude.init: empty list
22:11:02 <elliott> o_O
22:11:02 <elliott> oh
22:11:11 <elliott> > map ((init &&& last) . take 3) . tails $ [False,False,True,True]
22:11:12 <lambdabot> [([False,False],True),([False,True],True),([True],True),([],True),(*Excepti...
22:11:39 <elliott> > map (init &&& last) . takeWhile ((==3).length) . map (take 3) . tails $ [False,False,True,True]
22:11:40 <lambdabot> [([False,False],True),([False,True],True)]
22:11:50 <elliott> oerjan: SEE I'VE LIKE HALF WRITTEN IT FOR YOU ALREADY
22:11:58 <oerjan> elliott: i just cannot find much elegance in repeatedly building markov models.
22:12:12 <elliott> oerjan: the idea was to come up with a more elegant expression of it than that :P
22:12:16 <elliott> :t M.takeListWith
22:12:17 <lambdabot> Couldn't find qualified module.
22:12:21 <elliott> :t M.fromListWith
22:12:22 <lambdabot> forall a k. (Ord k) => (a -> a -> a) -> [(k, a)] -> M.Map k a
22:12:54 -!- yiyus has joined.
22:13:38 <elliott> oerjan: ok how about chaitin's omega :P
22:13:43 -!- MSleep has changed nick to MDude.
22:13:45 -!- Vorpal has quit (Ping timeout: 244 seconds).
22:13:53 <oerjan> should be a breeze
22:14:48 <elliott> > iterate (id++map not . reverse) [False]
22:14:50 <lambdabot> [[False],[False,True],[False,True,False,True],[False,True,False,True,False,...
22:14:56 <elliott> WELL THAT'S NOT ANY FUN
22:15:09 <elliott> > iterate (\xs -> interleave xs (map not (reverse xs))) [False]
22:15:10 <lambdabot> [[False],[False,True],[False,False,True,True],[False,False,False,False,True...
22:15:14 <elliott> sheesh
22:15:17 <elliott> > iterate (\xs -> interleave xs (map not xs)) [False]
22:15:18 <lambdabot> [[False],[False,True],[False,True,True,False],[False,True,True,False,True,F...
22:15:22 <elliott> I GIVE UP
22:16:09 <oerjan> > show<=<fix$(0:).tail.(>>=(!!)[[1],[0,1]])
22:16:12 <lambdabot> mueval-core: Time limit exceeded
22:16:16 <oerjan> argh
22:16:18 <oerjan> oh
22:16:31 <oerjan> > fix$(0:).tail.(>>=(!!)[[1],[0,1]])
22:16:34 <lambdabot> mueval-core: Time limit exceeded
22:16:41 <oerjan> hm something is wrong
22:16:50 <elliott> the tail consumes too much?
22:16:57 <oerjan> oh hm
22:16:58 <elliott> for production
22:17:00 <elliott> maybe
22:17:05 <elliott> you might need more starter elements
22:17:05 <oerjan> > fix$(0:).(>>=(!!)[[1],[0,1]])
22:17:07 <lambdabot> [0,1,0,1,1,0,1,0,1,1,0,1,1,0,1,0,1,1,0,1,0,1,1,0,1,1,0,1,0,1,1,0,1,1,0,1,0,...
22:17:22 <oerjan> > show<=<fix$(0:).(>>=(!!)[[1],[0,1]])
22:17:24 <lambdabot> "01011010110110101101011011010110110101101011011010110101101101011011010110...
22:17:52 <oerjan> that's a fairly general substitution sequence
22:17:55 <elliott> which one is that?
22:18:21 <oerjan> fibonacci, unless i swapped the order
22:19:18 <elliott> ah
22:19:55 <elliott> 04:50:34 <Sgeo> makeDef text = [d|helloDefinition = $(litE . stringL $ text)|]
22:19:59 <elliott> Sgeo: = $text i think
22:20:18 <elliott> 05:10:44 * Sgeo has no idea if GHC is smart enough
22:20:19 <elliott> GHC is not allowed to turn a non-terminating program into a terminating one without printing <<loop>>.
22:20:40 <oerjan> > show<=<fix$(0:).(>>=(!!)[[0,1],[0]]) --seems this is canonical according to http://en.wikipedia.org/wiki/Fibonacci_word
22:20:41 <lambdabot> "00101001001010010100100101001001010010100100101001010010010100100101001010...
22:20:56 <oerjan> oh wait hm
22:21:02 <Sgeo> elliott, uh, what was the context of the smart enough comment?
22:21:05 <itidus21> so i just had this cool idea.. using mouse scrollwheel+some button to change window focus
22:21:08 <elliott> Sgeo: length xs< x
22:21:09 <oerjan> > show<=<fix$(0:).tail.(>>=(!!)[[0,1],[0]]) --seems this is canonical according to http://en.wikipedia.org/wiki/Fibonacci_word
22:21:11 <lambdabot> "01001010010010100101001001010010010100101001001010010100100101001001010010...
22:21:17 <oerjan> that form needs tail
22:21:21 <elliott> itidus21: you can scroll on the taskbar in gnome 2 at least
22:21:23 <elliott> i used to do that a lot
22:21:25 <elliott> to switch windows
22:21:30 <Sgeo> Because the context that I'm thinking of is just an optimization, not ... oh, you only saw part of the context
22:21:36 <elliott> Sgeo: i saw all context
22:21:41 <elliott> i think
22:22:22 <itidus21> elliott: it occured to me on having 2 horizontally overlapping windows that the minimum distance to swap focus between them is the distance of the overlap
22:22:34 <itidus21> if you use clicking on it to change focus
22:22:36 <Sgeo> Even the bit where I'm making my own Num that will let me write my own length that length xs < x terminates even for infinite xs?
22:23:37 <elliott> Sgeo: "my own Num"
22:23:38 <elliott> aka
22:23:41 <elliott> the lazy peano numbers
22:23:43 <elliott> the oldest thing ever
22:24:07 <Sgeo> This is a bit more general than that, although I don't see any use cases that this covers that lazy peanos don't.
22:24:12 <itidus21> also, that if there is one window hidden behind another window then the minimum distance to change focus by clicking is moving to the minimize button, and then moving to the hidden window
22:24:37 <itidus21> clearly noone measures these vectors
22:24:57 <itidus21> at least not on windows :P
22:25:10 <elliott> itidus21: fitts' law may interest you
22:25:19 <elliott> Sgeo: how's it more general
22:26:10 -!- atrapado has quit (Quit: FIN).
22:26:11 <oerjan> > show<=<fix$(0:).(>>=(!!)[[1,0],[0]])
22:26:12 <lambdabot> "01001010010010100101001001010010010100101001001010010100100101001001010010...
22:26:15 -!- Patashu has joined.
22:26:26 <Sgeo> Um, not sure how to describe it, but it's an infinite list of maybe upper and lower bounds
22:27:03 <Sgeo> So I can represent a number that I know is "less than x" and then that x keeps decreasing as I calculate
22:27:07 <Sgeo> Erm
22:27:29 <oerjan> ah it seems my first try is called the rabbit sequence
22:28:48 <elliott> Sgeo: i'd like to see the code
22:29:05 <Sgeo> Num instance is still being worked on
22:29:18 <itidus21> yup someone told me about it once.. i forget exactly what it is
22:29:26 <Sgeo> http://hpaste.org/56271
22:29:33 <itidus21> but i do remember that the edge of the screen is more comfortable to scroll against
22:29:50 <itidus21> something to do with the size of the mouse target
22:29:53 <kallisti> `logsearch function array indexing
22:29:56 <HackEgo> ​/home/hackbot/hackbot.hg/multibot_cmds/lib/limits: line 5: exec: logsearch: not found
22:30:04 <kallisti> `searchlog function array indexing
22:30:06 <itidus21> and the edge of the screen is effectively an infinitely deep target
22:30:08 <elliott> itidus21: yep
22:30:37 <HackEgo> No output.
22:30:49 <kallisti> `searchlog php index
22:31:03 <HackEgo> 2006-08-24.txt:22:24:26: <GregorR-W> http://www.codu.org/plof/index.php?title=LongWords
22:31:09 <monqy> poor searchlog is ahead of its time
22:31:21 <monqy> or whatever the term is
22:31:24 <Sgeo> I do plan on factoring out the hard to read stuff in the Num instance
22:32:24 <elliott> Sgeo: You could probably simplify it by realising that those Maybes are basically encoding a + -inf and a + inf.
22:32:30 <elliott> Write appropriate instances, etc.
22:33:55 <Sgeo> I'm pretty sure Num, Ord does not have -inf or +inf. I mean, RealFloat or Floating or something probably does, but I don't
22:34:04 <elliott> What the fuck are you talking about?
22:34:04 <Sgeo> erm, want to restrict myself like that
22:34:25 <elliott> data WithNegInf a = NegInf | NotNegInf a deriving (Eq)
22:34:32 <elliott> instance (Num a) => Num (WithNegInf a)
22:34:41 <elliott> Similarly for NegInf; write appropriate Ord instances.
22:34:55 <elliott> Change the thing to [(WithNegInf a, WithPosInf a)]
22:36:15 <oerjan> <elliott> Brainfuck with only balanced loops is *proven* sub-Turing-complete. <-- not with unbounded cells
22:36:37 <elliott> oerjan: Hmm, really?
22:36:46 <elliott> Oh, of course.
22:36:51 <elliott> oerjan: Don't worry, we later prove it TC.
22:37:01 <elliott> With BCT.
22:37:18 <oerjan> heh
22:38:59 <oerjan> my 3-cell construction has balanced loops, of course (i couldn't _find_ any way to usefully use non-balanced ones)
22:40:32 <elliott> oerjan: you might notice something interesting about http://esoteric.voxelperfect.net/wiki/Special:Recentchanges today
22:40:50 * oerjan makes a guess before visiting
22:41:47 <oerjan> alas, no, there's still a little spam
22:42:32 <itidus21> are my eyes malfunctioning? i dont see dozens of spam entries
22:42:50 <elliott> oerjan: still a _little_
22:42:52 <elliott> but vastly decreased
22:43:01 <itidus21> no itidus21, your eyes are fully operational.
22:48:40 <kallisti> rawSetCaption :: Maybe String -> Maybe String -> IO ()
22:48:47 <kallisti> Sets the window title and icon name. Use Nothing to unset.
22:48:52 <kallisti> I don't really understand the purpose of this
22:48:58 <kallisti> what is different about "" and Nothing here?
22:50:00 <elliott> presumably the system can distinguish them
22:50:01 <oerjan> elliott: i don't see a proof for SumaMoito-Z1, but it seems obviously capable of handling my 3-cell balanced loops
22:50:11 <elliott> a window with no title is not a window with an empty title
22:50:25 <kallisti> perhaps
22:50:32 <elliott> oerjan: well it's easy to translate -z2 to -z1
22:50:38 <elliott> oerjan: just replace a- with
22:50:39 <kallisti> it also has:
22:50:46 <kallisti> setCaption :: String -> String -> IO ()
22:50:53 <kallisti> Sets the window title and icon name.
22:50:53 <elliott> er hm
22:50:56 <elliott> no it's not quite easy
22:50:58 <elliott> but all you need is a copy
22:51:05 <elliott> kallisti: for simplicity, presumably
22:51:06 <fizzie> The same difference with "" and NULL for SDL_WM_SetCaption is my guess. :p
22:51:13 <kallisti> elliott: yes that's what I would think.
22:51:27 <Phantom_Hoover> OMG Darths & Droids is onto A New Hope.
22:52:42 <kallisti> fizzie: but wouldn't setting the caption to an empty string have the same basic effect as unsetting it?
22:52:47 <kallisti> or is there a minute difference?
22:52:57 <zzo38> I think, it should be designed (although I don't know how it actually works), "" for SDL set caption should make the caption blank and NULL to make it show the filename
22:53:16 <kallisti> oh I see
22:53:21 <kallisti> NULL could use some kind of default or something.
22:53:24 <elliott> kallisti: you're confusing visual display for semantics
22:53:36 <elliott> window with no title rendered same way as window with empty title =/= same thing
22:53:37 <elliott> consider
22:53:40 <elliott> $ list-windows
22:53:44 <elliott> 495345: (no caption)
22:53:46 <elliott> 495345: caption: ""
22:53:51 <kallisti> elliott: yes I'm asking what those semantics are... indirectly
22:53:54 <kallisti> I do that a lot.
22:53:56 <elliott> depends on the system
22:54:03 <elliott> but there's one example
22:54:12 <zzo38> OK, it could do that but there is different system such as Windows, UNIX, and Macintosh.
22:58:31 <elliott> 05:24:44 <Sgeo> when . not ?
22:58:32 <elliott> Sgeo: unless
22:58:56 <elliott> 05:31:17 <dmwit> erus`: There's an instance Error e => Monad (Either e)
22:58:56 <elliott> WROOONG! You're not in here so I can't yell at you but WROOOONG!!!!
23:00:50 <elliott> 06:03:00 <erus`> > let f a = const in f 1 2
23:00:51 <elliott> 06:03:00 <lambdabot> Overlapping instances for GHC.Show.Show (b -> t)
23:00:51 <elliott> 06:03:01 <lambdabot> arising from a use of `...
23:00:51 <elliott> 06:03:59 <Sgeo> Which is a function, which doesn't have a Show instance
23:00:55 <elliott> Sgeo: Yes it does. In fact, it has too many.
23:01:40 <zzo38> They need to implement instance disambiguation!!
23:02:26 <elliott> 08:00:04 <Sgeo> Hmm
23:02:26 <elliott> 08:00:08 <Sgeo> What is State# ?
23:02:28 <elliott> Sgeo: Nothing.
23:02:37 <elliott> Sgeo: State# s is 0 bits big.
23:02:39 <elliott> It does not exist.
23:03:11 <elliott> Sgeo: The reason IO uses it is so that GHC can't reorder IO expressions.
23:03:18 <elliott> The (->) being used is the impure function arrow.
23:03:27 <elliott> The State# is just used to introduce a fake evaluation dependency between computations.
23:03:57 <elliott> 08:11:40 <Sgeo> What would happen if I did try to do something like weird a = IO \s -> (s, a)
23:04:00 <elliott> Sgeo: With (##), that's return.
23:04:53 <kmc> wait, so now we're shouting at #haskell from afar?
23:05:55 <elliott> kmc: Yes!
23:06:01 <elliott> kmc: You can't get banned that way.
23:06:07 <elliott> Also, you don't even have to *be* in #haskell.
23:06:07 <monqy> watching sgeo doing something stupid over there and shouting in his ear which is conveniently right here
23:06:21 <elliott> monqy: Better: He did it in THE PAST!
23:11:30 <elliott> 10:00:17 <inteq> i would like to plunge into haskell. i come from a c++/c/python background. can anyone suggest a strong text or set of lectures online that will give me a good foundation?
23:11:31 <elliott> 10:00:24 <koeien> @where lyah
23:11:31 <elliott> 10:00:24 <lambdabot> http://www.learnyouahaskell.com/
23:11:31 <elliott> 10:01:13 <inteq> koeien:thanks! if i keep at this, would i be able to gain employment where haskell is used?
23:11:31 <elliott> 10:01:22 <inteq> at that site, i meant
23:11:33 <elliott> 10:01:27 <inteq> sorry for being ambiguois
23:11:36 <elliott> I... I don't understand...
23:11:50 <elliott> Oh, I misread.
23:13:11 <monqy> good channel
23:14:08 <itidus21> inteq is fighting an uphill battle
23:14:28 <itidus21> i don't envy him
23:19:26 -!- nooga has quit (Ping timeout: 252 seconds).
23:19:37 <elliott> 10:45:04 <ski> Sgeo : i think this is an interesting idea -- i saw some hand-written notes somewhere on the web about making such a lazy improving intervals type
23:19:41 <elliott> Sgeo: likely referring to http://conal.net/blog/posts/exact-numeric-integration
23:19:54 <elliott> Sgeo: which happens to do basically exactly what i proposed :)
23:20:04 <elliott> sort of
23:20:22 <elliott> see also http://www.reddit.com/r/haskell/comments/ajbso/conal_elliott_exact_numeric_integration/c0i391y
23:20:44 <oerjan> itidus21: ah but the view on the top is glorious
23:23:04 <oerjan> > [0..]>>- \_->cycle[1,0]
23:23:06 <lambdabot> [1,1,0,1,1,0,0,1,1,1,0,0,1,0,0,1,1,1,0,1,1,0,0,0,1,1,0,0,1,0,0,1,1,1,0,1,1,...
23:23:56 * oerjan cackles evilly
23:24:08 <quintopia> oerjan: what is a good concise definition of "problem" in the computational sense
23:24:29 <elliott> oerjan: lovely
23:24:40 <elliott> > [0..]>>-cycle[1,0]
23:24:41 <lambdabot> Couldn't match expected type `t -> [b]'
23:24:42 <lambdabot> against inferred type `[t1]'
23:24:47 * elliott was hoping for function Num instance
23:25:03 <elliott> > iterate(group>=>show.length++take 1)"1"
23:25:07 <lambdabot> mueval-core: Time limit exceeded
23:25:11 <elliott> > iterate(group>=>show.length++take 1)"1"
23:25:12 <lambdabot> can't find file: L.hs
23:25:14 <elliott> ...
23:25:15 <elliott> ...
23:25:16 <elliott> > iterate(group>=>show.length++take 1)"1"
23:25:19 <lambdabot> ["1","11","21","1211","111221","312211","13112221","1113213211","3113121113...
23:25:21 * elliott has now committed that to memory
23:26:05 <Madoka-Kaname> > iterate(group>=>show.length++take 1)"a"
23:26:07 <lambdabot> ["a","1a","111a","311a","13211a","111312211a","31131122211a","1321132132211...
23:26:10 <oerjan> quintopia: a decision problem is simply the same thing as a language, mathematically
23:26:10 * Madoka-Kaname hides
23:26:14 -!- Jafet has joined.
23:26:19 <Madoka-Kaname> > iterate(group>=>show.length++take 1)"0"
23:26:21 <lambdabot> ["0","10","1110","3110","132110","1113122110","311311222110","1321132132211...
23:26:48 <oerjan> more general types of problems need their own definitions.
23:27:01 <Madoka-Kaname> > head $ drop 300 $ iterate(group>=>show.length++take 1)"1"
23:27:02 <lambdabot> "13211321322113311213212312311211131122211213211331121321123123211231131122...
23:27:25 <Madoka-Kaname> Somehow that doesn't seem right
23:27:44 <oerjan> Madoka-Kaname: why not?
23:27:53 <Madoka-Kaname> Eh.
23:27:54 <Madoka-Kaname> Never mind
23:28:29 <elliott> > iterate(group>=>show.length++take 1)""
23:28:30 <lambdabot> ["","","","","","","","","","","","","","","","","","","","","","","","",""...
23:28:34 <elliott> > iterate(group>=>show.length++take 1)"hi"
23:28:36 <lambdabot> ["hi","1h1i","111h111i","311h311i","13211h13211i","111312211h111312211i","3...
23:28:46 <elliott> > iterate(group>=>show.length++take 1)$repeat 1
23:28:47 <lambdabot> No instance for (GHC.Num.Num GHC.Types.Char)
23:28:47 <lambdabot> arising from the literal `1...
23:28:53 <elliott> > iterate(group>=>show.length++take 1)$repeat '1'
23:28:55 <lambdabot> ["1111111111111111111111111111111111111111111111111111111111111111111111111...
23:28:58 <elliott> > tail.iterate(group>=>show.length++take 1)$repeat '1'
23:29:00 <lambdabot> Terminated
23:29:02 <elliott> aww
23:29:39 <elliott> > tail.iterate(group>=>show.length++take 1).concatMap show$[1..]
23:29:41 <lambdabot> ["1112131415161718191110311211131114111511161117111811191210121132131214121...
23:29:45 <elliott> > tail.tail.iterate(group>=>show.length++take 1).concatMap show$[1..]
23:29:46 <lambdabot> ["3112111311141115111611171118111931101321123113311431153116311731183119111...
23:29:48 <elliott> > tail.tail.tail.iterate(group>=>show.length++take 1).concatMap show$[1..]
23:29:50 <lambdabot> ["1321123113311431153116311731183119132110111312211213212321141321151321161...
23:29:55 <elliott> oerjan: pls explain patterns kthx
23:30:19 <itidus21> its simple really
23:30:40 <quintopia> oerjan: a language over the set of all possible mathematical symbols?
23:30:40 <itidus21> 1,111,311,13211,111312211
23:31:02 <itidus21> i mean like, duh
23:31:13 <monqy> am I a possible mathematical symbol
23:31:14 <monqy> are you
23:31:33 <Madoka-Kaname> > head $ drop 300 $ iterate(group>=>show.length++take 1)"22"
23:31:35 <lambdabot> "22"
23:31:46 <elliott> oh well the first step is just interleaving 1 everywhere
23:31:53 <elliott> except, no
23:31:56 <elliott> since digits can repeat there
23:31:57 <elliott> interesting
23:31:59 <Madoka-Kaname> > iterate(group>=>show.length++take 1)"4444"
23:32:00 <lambdabot> ["4444","44","24","1214","11121114","31123114","132112132114","111312211211...
23:32:11 <Madoka-Kaname> > iterate(group>=>show.length++take 1)"2222222222"
23:32:12 <itidus21> monqy: i'm gonna go with no not really
23:32:13 <lambdabot> ["2222222222","102","111012","31101112","1321103112","1113122110132112","31...
23:32:23 <Madoka-Kaname> > iterate(group>=>show.length++take 1)"222222222"
23:32:24 <quintopia> monqy: i think its okay to define a symbol as a specific string of other symbols. so, yes, if you can produce an axiomatic description of us
23:32:25 <lambdabot> ["222222222","92","1912","11191112","31193112","132119132112","111312211911...
23:33:09 <oerjan> quintopia: a language over some arbitrary (finite) alphabet
23:33:13 <itidus21> `log information is
23:33:21 <HackEgo> 2009-08-01.txt:15:08:18: <mycroftiv> because only that information is of the form to transmit itself into the future
23:34:46 <oerjan> elliott: all digits > 3 eventually become isolated from each other. then it devolves into conway's atoms, which behave as a substitution rule.
23:34:55 <quintopia> oerjan: but to mathematicians, the alphabet is not arbitrary, is it? there is a conventional set of symbols?
23:35:15 <elliott> oerjan: yeah, i was just hoping somehow infinitely extending it would make it interesting :P
23:35:21 <elliott> it was a wild delusion!
23:35:52 <itidus21> `log [i]nformation is
23:35:57 <Jafet> Breaking news, look'n'say isn't turing complete
23:35:59 <HackEgo> 2010-01-10.txt:13:49:25: <AnMaster> does anyone know if information is transferred faster by reading or by listening. Assume a skilled reader and native speaker.
23:36:45 <monqy> `searchlog itidus philisoph
23:36:53 <HackEgo> 2012-01-08.txt:23:36:45: <monqy> `searchlog itidus philisoph
23:36:58 <monqy> oop
23:37:03 <monqy> `searchlog itidus philosoph
23:37:12 <HackEgo> 2011-08-14.txt:07:15:58: <itidus20> i don't have philosophical dilemmas about whether the opcodes of a rom are being emulated in a uniform way
23:37:20 <itidus21> wow
23:37:24 <Phantom_Hoover> Wow indeed.
23:37:43 <itidus21> i cant even remember what that is supposed to mean
23:38:15 <Phantom_Hoover> Fun fact: the person who invented coffee chocolates should be shot.
23:38:16 <monqy> `searchlog itidus philosoph
23:38:17 <itidus21> probably referring to NES emulation
23:38:23 <HackEgo> 2012-01-07.txt:12:36:21: <itidus21> fizzie: i don't understand why philosophy + retro gaming + symbols is so interesting
23:38:33 <oerjan> quintopia: this is for theoretical purposes, so you only _need_ two symbols, such as 0 or 1. otherwise, mathematicians will use whatever they fancy.
23:39:49 <oerjan> probably digits or letters from latin or greek alphabet, unless there's some reason to use something else (such as the problem coming from another part of math which uses specific symbols)
23:40:35 <itidus21> that was in reference to the vic20 chess video
23:41:58 <oerjan> also, that ever-popular "letter with number subscript"
23:42:41 <oerjan> when you don't really _care_ what the actual letters are, so you just make them indexed variables.
23:42:55 <oerjan> and the number may itself be a variable.
23:42:58 <itidus21> `searchlog itidus21 information
23:43:06 <HackEgo> 2012-01-06.txt:15:43:38: <itidus21> but.. in any normal human's life, the history of video games is useless information :D
23:43:13 <monqy> `searchlog itidus philosoph
23:43:23 <HackEgo> 2011-11-26.txt:05:10:20: <itidus21> i love nothing more than to philosophize about these things
23:43:51 <itidus21> i was once compared to a markov
23:44:42 <monqy> did it trigger an existential crisis
23:45:29 <itidus21> `searchlog itidus existential
23:45:38 <HackEgo> 2011-09-17.txt:08:13:16: <itidus21> all im saying is when i stagger into my brothers room laying down having a whiskey from him while my body is shaking.. which all seems caused by existential pondering
23:46:10 <Phantom_Hoover> OMFG
23:46:11 <Phantom_Hoover> OK
23:46:12 <Phantom_Hoover> stop
23:46:14 <Phantom_Hoover> everything
23:46:16 <Phantom_Hoover> i have worked
23:46:17 <Phantom_Hoover> out
23:46:23 <elliott>
23:46:24 <elliott>
23:46:24 <Phantom_Hoover> how to drag
23:46:27 <Phantom_Hoover> on my touchpad
23:46:34 <elliott> im stopinge
23:46:41 <elliott> Phantom_Hoover: how does it, work
23:46:41 <monqy> stop stop
23:46:41 <Phantom_Hoover> this
23:46:43 <Phantom_Hoover> omg
23:46:49 <elliott> does it work by
23:46:50 <elliott> buying a mouse
23:46:53 <Phantom_Hoover> no
23:46:56 <Phantom_Hoover> it works
23:47:00 <monqy> does it work by drageing
23:47:14 <Phantom_Hoover> by double clicking and then not taking your finger up on the second click
23:47:24 <Phantom_Hoover> there
23:47:28 <Phantom_Hoover> there is no limit
23:47:36 <Phantom_Hoover> for so long i have asked myself
23:47:43 <Phantom_Hoover> how do i drag without using the mouse buttons
23:47:48 <Phantom_Hoover> now i know
23:47:50 <elliott> dude
23:47:52 <elliott> how did you not like
23:47:53 <elliott> realise that earlier
23:48:20 <Phantom_Hoover> Because who clicks and then immediately drags??
23:49:12 <shachaf> Phantom_Hoover: It doesn't actually send a click.
23:49:31 <Phantom_Hoover> Yes, that also.
23:49:41 <elliott> What doesn't?
23:50:36 <itidus21> monqy: i know how to resolve this.. i will upload a random .txt file of mine and you will need a lot of help
23:50:44 <elliott> 13:59:00 <dmwit> roconnor: There's a Control.Monad.Error which provides a Monad instance for some Either's; and a fixed Monad class with a proper Either instance in the split of category-extras.
23:50:46 <elliott> NO STOP YOU'RE SO WRONG!
23:50:56 <elliott> shachaf: WHY DOES NOBODY REALISE THAT EITHER'S FAIL IS ERROR THESE DAYS
23:51:00 <oerjan> <elliott> Phantom_Hoover: OK, divmod is quite tricky. <-- oh dear, this is pikhq's bfm/pebbles all over again :P
23:51:07 <elliott> oerjan: heh howso
23:51:14 <shachaf> elliott: Hey, I was only half-paying attention in that conversation.
23:51:16 <elliott> i guess it's similar-looking
23:51:22 <elliott> shachaf: DMWIT HAS SAID IT _TWICE_ IN THIS LOG, TWICE!!!
23:51:25 * elliott cries.
23:51:27 <elliott> Wait.
23:51:28 <shachaf> I didn't even realise they were talking about MonadError until a long time later.
23:51:28 <elliott> Wait no.
23:51:32 <elliott> I want him to be ignorant.
23:51:36 <elliott> It means more SO questions for me to answer.
23:51:42 <elliott> "How come Either's fail isn't working?"
23:51:44 <shachaf> SO many more questions.
23:51:50 <elliott> Yes.
23:51:55 <shachaf> Delicious karma.
23:52:10 <shachaf> You should take Joel Spolsky hostage and demand a billion karma points.
23:52:22 <elliott> 14:02:51 <koeien> > let { x :: Integer; x = fromIntegral (maxBound :: Int) } in x * x -- values of type Integer can be arbitrarily large.
23:52:22 <elliott> 14:02:52 <lambdabot> 85070591730234615847396907784232501249
23:52:27 <elliott> Everyone knows 85070591730234615847396907784232501249 is the biggest number.
23:52:34 <Phantom_Hoover> WHY DOES NOBODY REALISE THIS CHANGES EVERYTHING
23:52:41 <oerjan> elliott: because pikhq basically implemented all of that stuff by compiling into balanced brainfuck.
23:52:45 <elliott> Phantom_Hoover: It only changes you being dumb to being slightly less dumb.
23:52:47 <shachaf> Phantom_Hoover: Just wait until you hear what happens when you TRIPLE-CLICK.
23:52:48 <elliott> oerjan: heh
23:53:02 <itidus21> a few pieces of this are cut and pasted. most sadly.. is my original work. http://hpaste.org/56275 .. this is like concentrated essence of `searchlog itidus philosoph
23:53:34 <elliott> 14:06:37 <roconnor> dmwit: anyhow It seems I shoudn't rely on fail to return Left
23:53:35 <elliott> 14:06:47 <roconnor> dmwit: so I should probably use ErrorT rather than Either?
23:53:35 <elliott> 14:07:27 <dmwit> roconnor: I doubt that behavior will change any time soon. It's relied on by many pieces of code other than yours. =P
23:53:42 <elliott> shachaf: I think he's going for irony.
23:54:31 <shachaf> Why am I consuming 85% dark chocolate?
23:54:35 <shachaf> I don't like dark chocolate.
23:54:42 <zzo38> Then don't.
23:54:57 <shachaf> Whoa.
23:55:00 <shachaf> You can do that?
23:55:21 <elliott> No.
23:55:22 <elliott> Continue.
23:55:23 <quintopia> oerjan: diophantine equations are not decidable over N. therefore, such problems are not in PSPACE. therefore, they cannot be written in such a way that the tarski-kuratowski algorithm can be used on them. anything wrong with this logic?
23:55:41 <elliott> 14:21:43 <shachaf> Making fail part of MonadZero rather than Monad seems more reasonable than the current situation.
23:55:52 * shachaf prepares for rebuke.
23:55:58 <elliott> shachaf: You should really have proposed the mzero :: (forall a. a) -> m a solution.
23:56:04 <oerjan> quintopia: probably not, but i lost you at tarski-kuratowski.
23:56:08 <shachaf> elliott: Ew.
23:56:15 <elliott> Actually, "mzero :: a -> m b" would work per parametricity, I think.
23:56:22 <elliott> shachaf: Come on, it's so brilliant.
23:56:24 <shachaf> That solution is a horrible joke.
23:56:38 <elliott> shachaf: Well... yes, but is it really worse than taking a String which /changes based on column number/?
23:56:51 <quintopia> oerjan: its the one that places problems on the arithmetic hierarchy
23:57:01 <elliott> shachaf: I mean, at least the idea of stuffing meaningful information into _|_ and extracting it in a safe place is well-covered.
23:57:45 <shachaf> Hmm. I guess that's a point.
23:58:11 <shachaf> The <- pattern-match failure thing is actually observable in the program, isn't it.
23:58:14 <shachaf> That's kind of horrible.
23:58:15 <kallisti> http://wiki.rpg.net/index.php/Worst_RPGs_ever
23:58:15 <elliott> Yep.
23:58:23 <shachaf> Actually shouldn't it be exists a. a or something?
23:58:31 <elliott> shachaf: AKA a.
23:58:35 <shachaf> Right.
23:58:36 <elliott> shachaf: The problem is that you always want it to be _|_.
23:58:41 <elliott> (forall a. a) forces that.
23:58:51 <shachaf> Yes, but who cares if it's not?
23:58:56 <kallisti> Racial Holy War (RaHoWa)
23:58:57 <elliott> Well, true.
23:58:57 <kallisti> The PCs play “White Warriors”, fighting against the classic 'enemies' of racist groups: blacks, Jews, latrinos (the game uses that term), and basically everyone outside of the “Aryan ideal”
23:58:58 <elliott> shachaf: Anyway, I mean, the _|_ message is obseravble in the program too, but only in the sin-bin.
23:59:08 <shachaf> elliott: I don't want my program to *depend* on _|_ existing.
23:59:16 <shachaf> elliott: Right, but that's different.
23:59:19 <elliott> And that seems reasonable, since you can layer on error handling with it.
23:59:23 <elliott> Right.
23:59:38 <shachaf> Also, either you typed very quickly or you're making use of the copy-paste-bin.
23:59:50 <elliott> I cache lines with ctrl-x sometimes.
23:59:53 <elliott> But I type very quickly too.
←2012-01-07 2012-01-08 2012-01-09→ ↑2012 ↑all