←2011-06-14 2011-06-15 2011-06-16→ ↑2011 ↑all
00:18:09 -!- pingveno has quit (Ping timeout: 252 seconds).
00:20:06 -!- pingveno has joined.
00:26:58 -!- FireFly has quit (Quit: swatted to death).
00:27:16 <pikhq_> ftp://ftp-uxsup.csx.cam.ac.uk/pub/bsd/4.4BSD-Lite/usr/src/contrib/emacs-18.57/src/unexec.c
00:27:19 <pikhq_> Wut.
00:31:27 <Patashu> Woah, that link opened in IE
00:32:46 <oerjan> Patashu: how can this be?!!!
00:33:11 <Patashu> I was just surprised
00:33:14 <oerjan> me too
00:33:23 <monqy> only IE is rad enough to handle ftp
00:33:51 <oerjan> monqy: well the impressive part was that it actually _showed_ it
00:34:00 <oerjan> rather than insisting on saving
00:34:25 <monqy> ooh fancy
00:34:28 <monqy> good job IE
00:36:10 <oerjan> today: Wikipedia showcases its Unicode support
00:42:15 <oerjan> > intercalate ", " $ iterate (curry(++).(show.length&&&take 1).group) "1"
00:42:15 <lambdabot> Couldn't match expected type `[GHC.Types.Char]'
00:42:16 <lambdabot> against inferred ty...
00:43:18 <oerjan> > intercalate ", " $ iterate (curry(++).(show.length&&&take 1)<=<group) "1"
00:43:19 <lambdabot> Couldn't match expected type `[GHC.Types.Char]'
00:43:19 <lambdabot> against inferred ty...
00:43:36 <oerjan> :t (curry(++).(show.length&&&take 1)<=<group)
00:43:37 <lambdabot> Couldn't match expected type `b -> [a]'
00:43:37 <lambdabot> against inferred type `[[a1]]'
00:43:37 <lambdabot> In the second argument of `(<=<)', namely `group'
00:44:34 <oerjan> :t curry(++).(show.length&&&take 1)
00:44:35 <lambdabot> forall b a. (Monoid b) => [a] -> b -> ((String, [a]), b) -> ((String, [a]), b)
00:45:17 <oerjan> :t (show.length&&&take 1)
00:45:18 <lambdabot> forall a. [a] -> (String, [a])
00:45:35 <oerjan> oh duh
00:45:47 <oerjan> > intercalate ", " $ iterate (uncurry(++).(show.length&&&take 1)<=<group) "1"
00:45:48 <lambdabot> "1, 11, 21, 1211, 111221, 312211, 13112221, 1113213211, 31131211131221, 132...
00:46:03 <oerjan> always with the confusing curry and uncurry
00:47:02 <Patashu> wtf's uncurry
00:47:03 <Patashu> O_O
00:47:33 <oerjan> :t uncurry
00:47:33 <lambdabot> forall a b c. (a -> b -> c) -> (a, b) -> c
00:47:47 <oerjan> uncurry (++) ("a","b")
00:47:52 <oerjan> > uncurry (++) ("a","b")
00:47:54 <lambdabot> "ab"
00:48:15 <oerjan> from a function which takes two arguments, it makes one which takes a tuple instead
00:48:21 <Patashu> huh
00:48:22 <Patashu> alright
00:48:33 <oerjan> and curry is the reverse
00:51:09 <oerjan> It is named for (Haskell B.) Curry, who didn't actually invent it (someone named Schönfinkel did iirc.)
00:52:00 <oerjan> but it is originally a way for simulating multiple argument functions in lambda calculus, which only has single-argument ones.
00:52:48 <oerjan> the haskell language picked the idea, so _its_ multiple argument functions are actually already curried, so you use uncurry when you want tuples instead
00:56:07 <oerjan> oh and i guess my example above mixes that with how haskell does operators: (++) in parentheses is a (curried) function with two arguments
00:57:04 <oerjan> while putting operators infix is just syntactic sugar for applying their function to the arguments on each side
00:57:26 <oerjan> > "a" ++ "b"
00:57:27 <lambdabot> "ab"
00:57:31 -!- pikhq_ has quit (Ping timeout: 240 seconds).
00:57:32 <oerjan> > (++) "a" "b"
00:57:34 <lambdabot> "ab"
00:57:49 -!- pikhq has joined.
00:58:25 <Patashu> > (,) "a" "b"
00:58:26 <lambdabot> ("a","b")
00:58:32 <Patashu> > (++) 'a' 'b'
00:58:33 <lambdabot> No instance for (Data.Monoid.Monoid GHC.Types.Char)
00:58:33 <lambdabot> arising from a use o...
00:58:35 <Patashu> ic
00:58:40 <Patashu> > (++) 'a' "b"
00:58:41 <lambdabot> Couldn't match expected type `GHC.Types.Char'
00:58:41 <lambdabot> against inferred type...
00:58:47 <oerjan> oh and lambdabot has some funky types for some functions
00:58:49 <monqy> (:) 'a' "b"
00:58:50 <Patashu> > (:) 'a' "b"
00:58:51 <lambdabot> "ab"
00:58:53 <Patashu> yup
00:58:53 <monqy> oop
00:58:54 <monqy> s
00:59:04 <Patashu> ++ is for two lists : is to add one component
00:59:09 <oerjan> _usually_, (++) is just for lists, but lambdabot makes it a synonym for mappend for monoids
00:59:21 <oerjan> which is a generalization
00:59:25 <oerjan> :t map
00:59:26 <lambdabot> forall a b. (a -> b) -> [a] -> [b]
00:59:29 <oerjan> oh hm
00:59:32 <monqy> not fmap?
00:59:52 <monqy> (I was expecting it to be a synonym of fmap)
00:59:55 <oerjan> i _thought_ they'd also made map a synonym for fmap, but i must have misremembered
01:00:05 <oerjan> > map (+1) (Just 1)
01:00:06 <lambdabot> Couldn't match expected type `[a]'
01:00:06 <lambdabot> against inferred type `Data.Mayb...
01:00:10 <oerjan> indeed not
01:00:13 <oerjan> :t flip
01:00:14 <lambdabot> forall (f :: * -> *) a b. (Functor f) => f (a -> b) -> a -> f b
01:00:19 <oerjan> this one though...
01:00:34 <oerjan> :t Prelude.flip
01:00:35 <lambdabot> forall a b c. (a -> b -> c) -> b -> a -> c
01:00:39 <oerjan> the usual one
01:01:01 <Patashu> > flip (:) "a" 'b'
01:01:03 <lambdabot> "ba"
01:01:57 <pikhq> 18:50 <@dalias> you should see how awesome musl's dynamic is
01:01:57 <pikhq> 18:51 <@dalias> if the program only uses libc.so and no other .so's
01:01:57 <pikhq> 18:51 <@dalias> the difference in # of syscalls at startup for dynamic vs static is _ZERO_
01:03:31 <pikhq> Also, regarding unexec. I found out what they use that for.
01:03:41 <oerjan> EVIL purposes, obviously
01:04:10 <pikhq> Their build system builds a "temacs" program. This is essentially a full emacs. temacs is then told to load the Emacs standard library, and then unexec itself.
01:04:25 <pikhq> The unexec'd binary is the final emacs binary.
01:04:28 <oerjan> > intercalate ", " $ iterate (liftM2(++)(show.length)(take 1)<=<group) "1"
01:04:30 <lambdabot> "1, 11, 21, 1211, 111221, 312211, 13112221, 1113213211, 31131211131221, 132...
01:04:45 <pikhq> That is to say, they have a specialiser *for the final binary*.
01:05:06 <pikhq> They are fucking specialising binaries.
01:05:09 <pikhq> And that scares me.
01:05:10 <Patashu> 'unexec'?
01:05:30 <Patashu> :t <=<
01:05:31 <lambdabot> parse error on input `<=<'
01:05:33 <pikhq> Patashu: ftp://ftp-uxsup.csx.cam.ac.uk/pub/bsd/4.4BSD-Lite/usr/src/contrib/emacs-18.57/src/unexec.c is an old one that I linked earlier.
01:05:38 <monqy> the one that opened in IE
01:05:45 <oerjan> Patashu: needs parentheses
01:05:52 <Patashu> :t (<=<)
01:05:53 <lambdabot> forall b (m :: * -> *) c a. (Monad m) => (b -> m c) -> (a -> m b) -> a -> m c
01:06:00 <monqy> unexec is spooky
01:06:10 <pikhq> "Frightening", more like.
01:06:31 <pikhq> It's a binary specialiser.
01:06:32 <Patashu> :t group
01:06:33 <lambdabot> forall a. (Eq a) => [a] -> [[a]]
01:06:37 <Patashu> @src group
01:06:37 <lambdabot> group = groupBy (==)
01:06:43 <Patashu> aah
01:06:45 <oerjan> > group [1,2,2,3,4,4]
01:06:46 <lambdabot> [[1],[2,2],[3],[4,4]]
01:06:48 <Patashu> right
01:06:57 <Patashu> @src (<=<)
01:06:58 <lambdabot> Source not found. I can't hear you -- I'm using the scrambler.
01:06:59 <pikhq> You could probably pull off the projections of Futamura with it.
01:07:00 <Patashu> o
01:07:26 <oerjan> iirc (g <=< f) x = g =<< f x
01:07:42 <Patashu> ah ok
01:08:19 <Patashu> > group [1, 2, 1, 1, 3, 1, 2, 2]
01:08:19 <lambdabot> [[1],[2],[1,1],[3],[1],[2,2]]
01:08:22 <Patashu> aha
01:08:25 <Patashu> it's sequential not global
01:08:28 <oerjan> for lists above, it's just a way to get the functions to left to apply to each element of the result of group, then concatenate the results
01:08:35 <Patashu> and then you take the length and take 1 of each group
01:08:39 <oerjan> yep
01:08:40 <Patashu> and concatenate it all together
01:08:41 <Patashu> mmk
01:10:16 <oerjan> and those uncurry with &&& and liftM2 are just two different ways of combining the result of applying two different functions
01:10:52 <Patashu> @src liftM2
01:10:52 <lambdabot> liftM2 f m1 m2 = do { x1 <- m1; x2 <- m2; return (f x1 x2) }
01:10:54 <oerjan> > uncurry f . (g &&& h) $ x :: Expr
01:10:55 <lambdabot> Ambiguous type variable `a' in the constraints:
01:10:55 <lambdabot> `SimpleReflect.FromExpr ...
01:11:00 <oerjan> oops
01:11:36 <oerjan> > uncurry f $ ((g &&& h) x :: Expr) :: Expr
01:11:37 <lambdabot> Couldn't match expected type `SimpleReflect.Expr'
01:11:37 <lambdabot> against inferred ...
01:11:47 <oerjan> oh duh
01:11:53 <oerjan> > uncurry f $ ((g &&& h) x :: (Expr, Expr)) :: Expr
01:11:54 <lambdabot> f (g x) (h x)
01:12:22 <oerjan> those overloaded Expr things require a bit awkward type annotation
01:13:12 <oerjan> > liftM2 f (g :: Expr -> Expr) (h :: Expr -> Expr) x :: Expr
01:13:12 <lambdabot> f (g x) (h x)
01:13:22 <oerjan> that uses the (e ->) monad
01:14:09 <oerjan> which threads an extra common argument through all its actions (which are functions)
01:14:56 <Patashu> I don't understand how liftM2 f m1 m2 = do { x1 <- m1; x2 <- m2; return (f x1 x2) } leads to 'm1 and m2 use the same x rather than different ones'
01:15:13 <oerjan> @undo do { x1 <- m1; x2 <- m2; return (f x1 x2) }
01:15:13 <lambdabot> m1 >>= \ x1 -> m2 >>= \ x2 -> return (f x1 x2)
01:15:29 <oerjan> that's the next step, syntactic sugar
01:15:58 <Patashu> shouldn't it be something like liftM2 f m1 m2 x = do { x1 <- m1 x; x2 <- m2 x; return (f x1 x2) }
01:15:59 <Patashu> I mean
01:16:05 <oerjan> Patashu: that's specific for the (e ->) Monad, that it gives the same argument to all its subactions
01:16:27 <oerjan> @src (>>=) (->)
01:16:27 <lambdabot> Source not found. And you call yourself a Rocket Scientist!
01:16:33 <Patashu> what is the (e ->) monad?
01:16:36 <oerjan> @src (->) (>>=)
01:16:36 <lambdabot> f >>= k = \ r -> k (f r) r
01:16:42 <oerjan> whew, just two tries
01:16:46 <Patashu> lol
01:17:12 * oerjan can never remember the required order or parentheses for @src :)
01:17:58 <oerjan> that's the definition used for the >>= method/operator when its first argument is a function
01:18:34 <Patashu> @src (>>=)
01:18:35 <lambdabot> Source not found. BOB says: You seem to have forgotten your passwd, enter another!
01:18:39 <oerjan> @src Monad
01:18:40 <lambdabot> class Monad m where
01:18:40 <lambdabot> (>>=) :: forall a b. m a -> (a -> m b) -> m b
01:18:40 <lambdabot> (>>) :: forall a b. m a -> m b -> m b
01:18:40 <lambdabot> return :: a -> m a
01:18:40 <lambdabot> fail :: String -> m a
01:18:42 <Patashu> :(
01:18:42 <Patashu> oh
01:18:57 <Patashu> @src (\)
01:18:57 <lambdabot> Source not found. Your mind just hasn't been the same since the electro-shock, has it?
01:19:01 <Patashu> lmao
01:19:05 <oerjan> those are defined specifically for each Monad instance
01:19:18 <oerjan> Patashu: \ starts a lambda expression
01:19:22 <Patashu> aah
01:19:24 <Patashu> ok
01:19:28 <oerjan> > (\x -> x+1) 3
01:19:29 <lambdabot> 4
01:20:46 <oerjan> @src (>>)
01:20:46 <lambdabot> m >> k = m >>= \_ -> k
01:20:54 <oerjan> that one has a default definition
01:20:55 <Patashu> so for >>=. You take a monad data, a function that goes from that data to monad data, then it's applied to the data inside. but shouldn't return be m a -> a since it's unboxing?
01:21:25 <oerjan> no it's actually "boxing" iiu what you mean
01:21:36 <oerjan> > return 1 :: [Int]
01:21:37 <lambdabot> [1]
01:21:47 <Patashu> don't you use - oh yeah
01:21:49 <Patashu> got it backwards
01:21:56 <Patashu> what's the one for unboxing then?
01:22:23 <oerjan> there is none, because each Monad has its own way for how to access its members, if any
01:22:24 <pikhq> Patashu: No such function.
01:22:30 <Patashu> ah true
01:22:45 <pikhq> Patashu: If the Monad in question wants you to be able to do that, it will provide such a function.
01:22:55 <pikhq> Typically of form "runFoo".
01:23:00 <oerjan> of course some exist, but e.g. the one for IO is considered evil to use ;D
01:23:30 <pikhq> Yeah, unsafePerformIO is that function for IO, and obviously, it's unsafe and a bad idea most times.
01:23:40 <Patashu> > fail "some error" :: [Int]
01:23:40 <lambdabot> []
01:24:02 <oerjan> @src fail
01:24:03 <lambdabot> fail s = error s
01:24:06 <monqy> fail is kind of disappointing
01:24:09 <monqy> :(
01:24:17 <Patashu> @src error
01:24:17 <lambdabot> error s = throw (ErrorCall s)
01:24:19 <oerjan> this also has a default, but it's frequently overruled
01:24:22 <Patashu> @src throw
01:24:23 <lambdabot> throw exception = raise# exception
01:24:28 <Patashu> @src raise#
01:24:28 <lambdabot> Source not found. Maybe you made a typo?
01:24:31 <Patashu> @src raise
01:24:32 <lambdabot> Source not found. That's something I cannot allow to happen.
01:24:38 <Patashu> dang I thought it'd go forever
01:24:43 <oerjan> Patashu raise# looks like it may be a primitive function
01:24:49 <oerjan> * Patashu:
01:25:03 <Patashu> yeah
01:25:08 <oerjan> Patashu: also you are lucky you got that far, @src lacks a lot of sources
01:25:42 <oerjan> obviously everything from throw on is somewhat specific to ghc
01:25:52 <oerjan> error is in the haskell standard
01:26:24 <oerjan> (throw may also be in some other compilers, i don't know. but ghc rules supreme these days, anyhow)
01:26:44 <Patashu> > error "test"
01:26:45 <lambdabot> *Exception: test
01:26:48 <Patashu> okay
01:26:54 <Patashu> @src ErrorCall
01:26:55 <lambdabot> Source not found. Your mind just hasn't been the same since the electro-shock, has it?
01:26:59 <Patashu> or
01:27:01 <oerjan> @hoogle ErrorCall
01:27:02 <Patashu> :t ErrorCall
01:27:02 <lambdabot> Control.Exception data ErrorCall
01:27:02 <lambdabot> Control.Exception ErrorCall :: String -> ErrorCall
01:27:02 <lambdabot> Control.OldException ErrorCall :: String -> Exception
01:27:03 <lambdabot> Not in scope: data constructor `ErrorCall'
01:27:04 <Patashu> aah
01:27:27 <Patashu> :t Exception
01:27:27 <oerjan> hoogle is the thing for looking up functions
01:27:28 <lambdabot> Not in scope: data constructor `Exception'
01:27:32 <Patashu> @hoogle Exception
01:27:32 <lambdabot> module Control.Exception
01:27:32 <lambdabot> Control.Exception class (Typeable e, Show e) => Exception e
01:27:32 <lambdabot> Control.OldException data Exception
01:27:46 <Patashu> @hoogle _|_
01:27:46 <lambdabot> Warning: Unknown type |
01:27:46 <lambdabot> Control.Category id :: Category cat => cat a a
01:27:46 <lambdabot> Control.Arrow returnA :: Arrow a => a b b
01:28:02 <oerjan> Patashu: they rewrote the Exception system so Exception is a class now
01:28:05 <Patashu> :t _|_
01:28:06 <lambdabot> parse error on input `|'
01:28:08 <Patashu> right
01:28:13 <Patashu> @src _|_
01:28:14 <lambdabot> Source not found. That's something I cannot allow to happen.
01:28:16 <Patashu> > _|_
01:28:17 <lambdabot> <no location info>: parse error on input `|'
01:28:20 <Patashu> :(
01:28:21 <pikhq> _|_ is only used when talking about Haskell, not in Haskell.
01:28:25 <Patashu> ah ok
01:28:34 <Patashu> but it's funny because (_|_)
01:28:43 <monqy> is undefined something wacky like forall a. a
01:28:45 <monqy> :t undefined
01:28:45 <lambdabot> forall a. a
01:28:47 <oerjan> :t undefined -- this is one kind of _|_
01:28:48 <lambdabot> forall a. a
01:28:54 <Patashu> what's forall
01:28:55 <monqy> oh kind
01:29:27 <oerjan> Patashu: forall means that the expression has that type for _all_ types a substituted into it
01:29:48 <oerjan> so undefined has any type, whatsoever
01:30:18 <monqy> @src undefined
01:30:18 <lambdabot> undefined = error "Prelude.undefined"
01:30:56 <oerjan> (actually that's not quite true i suspect, there are also "unboxed" and "unlifted" types which tend to only be usable in some places)
01:31:34 <Patashu> > undefined
01:31:35 <lambdabot> *Exception: Prelude.undefined
01:31:36 <pikhq> oerjan: Yeah, "forall" is part of the extension for those, IIRC.
01:32:41 <oerjan> pikhq: um what?
01:33:08 <pikhq> Erm, no, my brain is being stupid.
01:34:05 <oerjan> but basically, only lifted, boxed types (i.e. the usual ones) can be substituted into polymorphic functions
01:34:21 <oerjan> hm wait
01:34:26 <oerjan> maybe boxed is enough
01:34:49 <Patashu> you know how there are functions that are essentially equivalent for lists, functors and monads? would it be worth making them substitute for each other?
01:35:13 <oerjan> Patashu: yes. everyone thinks so.
01:35:47 <oerjan> it requires some major rewamping of the type class system to avoid large amounts of rewriting code, though.
01:36:12 <Patashu> would it be -hard-, though?
01:36:32 <oerjan> Patashu: there exists a proposal for doing it, called class aliases iirc
01:37:08 <oerjan> i vaguely recall there is some drawback with that too, though
01:37:43 <oerjan> as of now, if you define a new Monad, all you need to do is to defined the >>= and return methods
01:38:33 <oerjan> but as the class system _currently_ works, if you made Monad a subclass of Functor and Applicative (as it "should" be) then you would have to define the methods for those separately as well
01:38:54 <oerjan> and it would break old code which didn't do that
01:39:33 <oerjan> so the class alias system among other things allows classes to contain defaults for each other, unlike now when each must be written separately
01:39:48 <oerjan> *must have their instances written
01:40:01 <oerjan> hopefully someone will implement it eventually
01:40:34 <Patashu> there's no overloading in haskell is there?
01:40:59 <oerjan> it's rather stupid to have map, fmap, <$>, liftM
01:40:59 <monqy> overloading works via typeclasses
01:41:10 <Patashu> yeah
01:41:19 <Patashu> I was about to say 'why not just make map work on lists or functors or monads' but nope
01:41:21 <Patashu> that won't work
01:41:43 <Patashu> @src <$>
01:41:43 <lambdabot> f <$> a = fmap f a
01:41:50 <Patashu> lol seriously
01:41:53 <monqy> yes
01:41:54 <Patashu> so it's just infix fmap
01:41:58 <Patashu> why not just use `fmap` then
01:42:04 <monqy> cool factor
01:42:07 <Patashu> o
01:42:07 <oerjan> Patashu: it can work on functors too, in fact it did before Haskell 98 revision, when fmap = map
01:42:33 <monqy> what did haskell 98 do
01:42:35 <oerjan> Patashu: <$> fits rather well into the Applicative style with <*> etc.
01:42:55 <oerjan> it separated map from fmap, making map work just for lists.
01:43:44 <oerjan> and some other things, i think fail was added then and is also considered a wart
01:43:55 <Patashu> could you have some kind of compile time macro thing? like detecting map function monad transforms it into liftM function monad
01:44:18 <monqy> what?
01:44:51 <Patashu> well obviously the former will fail
01:44:55 <Patashu> and the latter does what you want
01:45:04 <Patashu> like when google says 'Did you mean ___?'
01:45:07 <monqy> just use fmap
01:45:22 <monqy> all real monads are functors too
01:45:43 <oerjan> > (+) <$> [1,2] <*> [10,20]
01:45:44 <lambdabot> [11,21,12,22]
01:46:07 <oerjan> > liftM2 (+) [1,2] [10,20]
01:46:08 <lambdabot> [11,21,12,22]
01:46:33 <Patashu> @src liftM3
01:46:33 <lambdabot> liftM3 f m1 m2 m3 = do { x1 <- m1; x2 <- m2; x3 <- m3; return (f x1 x2 x3) }
01:46:36 <Patashu> wow lol
01:46:40 <Patashu> @src liftM4
01:46:40 <lambdabot> liftM4 f m1 m2 m3 m4 = do { x1 <- m1; x2 <- m2; x3 <- m3; x4 <- m4; return (f x1 x2 x3 x4) }
01:46:44 <Patashu> @src liftM5
01:46:44 <lambdabot> Source not found. Your mind just hasn't been the same since the electro-shock, has it?
01:46:50 <Patashu> it was good while it lasted
01:47:31 <oerjan> Patashu: <$> and <*> work with arbitrarily many, anyway
01:47:37 <monqy> also, on the concern that making Monad a subclass of Functor would require defining an instance of Functor, would it be too ugly to, in applicable cases, define an overridable default instance?
01:47:56 <monqy> e.g. for a Functor instance of a Monad, fmap f = (>>= return . f)
01:48:06 <Patashu> @src <*>
01:48:07 <monqy> or something like that
01:48:07 <lambdabot> Source not found. :(
01:48:10 <Patashu> @src (<*>)
01:48:11 <lambdabot> Source not found. Where did you learn to type?
01:48:17 <monqy> I just confused myself
01:48:27 <Patashu> @src Functor
01:48:27 <lambdabot> class Functor f where
01:48:27 <monqy> :(
01:48:27 <lambdabot> fmap :: (a -> b) -> f a -> f b
01:48:29 <oerjan> monqy: no, i think that's precisely what's suggested. it's just that current haskell doesn't support defaults for superclass methods
01:48:32 <Patashu> @src Applicative
01:48:32 <lambdabot> class Functor f => Applicative f where
01:48:32 <lambdabot> pure :: a -> f a
01:48:32 <lambdabot> (<*>) :: f (a -> b) -> f a -> f b
01:48:35 <monqy> oh
01:48:38 <Patashu> found it
01:49:23 <Patashu> so it's infix so
01:49:49 <monqy> pure is analogous to return, (<*>) is analogous to ap
01:49:56 <monqy> iirc
01:49:59 <Patashu> (+) <$> [1,2] <*> [10,20] becomes <*> ( fmap (+) [1,2] ) ( [10,20] )
01:50:05 <oerjan> yeah those would obviously be unified as well
01:50:38 <Patashu> I think it'd be useful to me to have a list of functions/operators that are essentially identical
01:50:42 <oerjan> Patashu: needs parens around the <*>
01:50:46 <Patashu> yeah
01:50:54 <Patashu> > (<*>) ( fmap (+) [1,2] ) ( [10,20] )
01:50:55 <lambdabot> [11,21,12,22]
01:50:56 <monqy> and of Monoid, MonadPlus, Alternative?
01:50:57 <Patashu> tada
01:51:03 <monqy> is there another I forget
01:51:05 <Patashu> @src Monoi
01:51:05 <lambdabot> Source not found. Are you on drugs?
01:51:05 <Patashu> @src Monoid
01:51:06 <lambdabot> class Monoid a where
01:51:06 <lambdabot> mempty :: a
01:51:06 <lambdabot> mappend :: a -> a -> a
01:51:06 <lambdabot> mconcat :: [a] -> a
01:51:13 <monqy> soemthing for Arrows? ArrowChoice?
01:51:13 <Patashu> @src MonadPlus
01:51:13 <lambdabot> Source not found. Just what do you think you're doing Dave?
01:51:16 <Patashu> @src Alternative
01:51:17 <lambdabot> class Applicative f => Alternative f where
01:51:17 <lambdabot> empty :: f a
01:51:17 <lambdabot> (<|>) :: f a -> f a -> f a
01:51:24 <Patashu> @src ArrowChoice
01:51:24 <lambdabot> Source not found. BOB says: You seem to have forgotten your passwd, enter another!
01:51:28 <oerjan> Patashu: i once looked through Control.Monad, and the majority of functions in it would work just as well as Applicative
01:51:51 <Patashu> lots of reinventing the wheel I see
01:51:57 <Patashu> wow, (<|>)
01:52:24 <monqy> > Just 5 <|> Nothing
01:52:25 <lambdabot> Just 5
01:52:32 <monqy> > Nothing <|> Just 5
01:52:33 <lambdabot> Just 5
01:52:36 <monqy> > Just 2 <|> Just 5
01:52:37 <lambdabot> Just 2
01:52:39 <oerjan> Patashu: it's not so much reinventing as just copying, i think. Applicative/Alternative are younger, while Monad/MonadPlus are in the standard and so cannot be easily changed
01:52:43 <Patashu> it's like an OR operator?
01:53:08 <oerjan> > [1,2] <|> [4,5]
01:53:08 <lambdabot> [1,2,4,5]
01:53:18 <Patashu> huh
01:53:26 <monqy> > Just 2 ++ Just 5
01:53:27 <lambdabot> Ambiguous type variable `t' in the constraints:
01:53:27 <lambdabot> `Data.Monoid.Monoid t'
01:53:27 <lambdabot> ...
01:53:30 <monqy> oops
01:53:42 <oerjan> huh
01:53:54 <monqy> :t (++)
01:53:54 <lambdabot> forall m. (Monoid m) => m -> m -> m
01:54:00 <oerjan> Just should have a monoid instance, i think
01:54:09 <oerjan> monqy: yeah it's one of lambdabot's funky types
01:54:27 <monqy> :t Just
01:54:29 <lambdabot> forall a. a -> Maybe a
01:54:34 <oerjan> hm
01:54:43 <oerjan> > Just 2 ++ Just 5 :: Maybe Int
01:54:44 <lambdabot> No instance for (Data.Monoid.Monoid GHC.Types.Int)
01:54:44 <lambdabot> arising from a use of...
01:54:45 <monqy> multiple monoid instances for Maybe?
01:54:54 <oerjan> nah, maybe just is missing
01:55:15 * oerjan realizes that sentence was hideously ambiguous in context :P
01:57:10 <oerjan> Patashu: <|> is somewhat like an or/choice operator, yeah. although it depends on the Monad how many choices you get.
01:57:30 <oerjan> (Maybe has just one spot)
01:58:16 <oerjan> Parsec also uses <|> for parsing choices
01:59:07 -!- ralc has quit (Remote host closed the connection).
02:00:02 <oerjan> also when you mention things like Monoid/Alternative/MonadPlus, things get trickier since the first of them is for types without any type arguments. i vaguely recall class aliases supposedly have troubles with multiparameter type classes as well
02:01:47 <oerjan> i mean, the haskell class system definitely doesn't support class (Monoid (a t), Applicative a) => Alternative a where ...
02:02:03 <oerjan> you'd want that to hold automatically for _all_ t
02:03:23 <oerjan> i guess there are a lot of issues when you try to find a general fix for this kind of problem
02:04:46 <Patashu> so the cross product points perpendicular to two vectors (right handedly normally) and has magnitude absin(theta), theta being the angle subtended by a and b. maxes out at 90 degrees, minimizes at 0 or 180 degrees. the dot product is found by multiplying each dimension's value together and the magnitude is mag(a)*mag(b)*cos(theta), theta again being the angle subtended
02:05:33 <oerjan> ...yes?
02:05:40 <Patashu> I'm just trying to sort these out in my head
02:06:12 <pikhq> Yes, those are properties of both of the vector products.
02:06:26 <Patashu> never learned them but apparently they're useful and all that
02:06:29 <pikhq> Piss-poor definitions, but valid properties.
02:09:13 <oerjan> also, the cross product only works in dimensions 0,1,3 and 7 :P
02:09:30 <Patashu> how come 7?
02:09:39 <pikhq> oerjan: It works in 7?
02:09:43 <Patashu> lol
02:10:17 <oerjan> supposedly because of the existence of real numbers, complex numbers, quaternions and octonions respectively
02:11:07 <oerjan> (the ones in 0 and 1 are trivially zero, anyway, because nothing can be perpendicular)
02:14:24 -!- Behold has quit (Remote host closed the connection).
02:14:27 <CakeProphet> couldn't you apply the same principle to the second dimension? or am I missing something?
02:14:33 * CakeProphet just walked into this conversation.
02:15:13 <Patashu> I was thinking that. cross product of a real number -> an imaginary number, same magnitude?
02:16:20 <oerjan> well you want parallel vectors to have cross product 0, no? :P
02:16:39 <oerjan> and all real numbers are parallel
02:16:46 <Patashu> ah, yeah
02:17:32 <oerjan> and presumably you want non-parallel ones not to have 0, which i guess ruins the second dimension somehow
02:17:54 <CakeProphet> ..lol
02:17:55 <CakeProphet> sure.
02:18:06 <oerjan> oh and it should be linear in each vector, naturally
02:18:17 <Patashu> so how does it work for 0 and 1 then
02:18:33 <oerjan> Patashu: since everything is parallel, just make all cross products 0
02:18:40 <Patashu> o
02:18:45 <Patashu> aah
02:18:53 <Patashu> and that way you don't have to worry
02:18:54 <Patashu> \o/
02:18:56 <myndzi\> |
02:18:57 <myndzi\> /´\
02:19:19 <oerjan> and myndzi\ streaks by again
02:19:47 <Patashu> /o/
02:19:48 <myndzi\> |
02:19:48 <myndzi\> /|
02:19:52 <Patashu> \o\
02:19:53 <myndzi\> |
02:19:54 <myndzi\> /'\
02:19:55 <Patashu> /o\
02:19:56 <myndzi\> |
02:19:56 <myndzi\> /|
02:20:02 <Patashu> \o
02:20:05 <Patashu> o/
02:20:24 <oerjan> \m/ \m/
02:20:26 <myndzi\> `\o/´
02:20:27 <myndzi\> |
02:20:27 <myndzi\> /`¯|_)
02:20:27 <myndzi\> (_|
02:20:39 <Patashu> wow
02:20:49 <Patashu> \m/
02:20:54 <Patashu> needs to be two
02:21:04 <oerjan> yeah those are two hands
02:21:27 <oerjan> and also needs a little indentation
02:21:42 <Patashu> \m/ \m/
02:21:45 <Patashu> \m/ \m/
02:21:47 <Patashu> \m/ \m/
02:21:48 <myndzi\> `\o/´
02:21:49 <myndzi\> |
02:21:49 <myndzi\> /'\
02:21:49 <myndzi\> (_| |_)
02:21:51 <Patashu> \m/ \m/
02:21:58 <Patashu> \m/ \m/
02:21:59 <myndzi\> `\o/´
02:22:00 <myndzi\> |
02:22:00 <myndzi\> (_|¯`¯|_)
02:22:01 <Patashu> \m/ \m/
02:22:06 <Patashu> \m/ \m/
02:22:09 <Patashu> o
02:22:11 <Patashu> o
02:22:12 <Patashu> \m/ \m/
02:22:13 <myndzi\> `\o/´
02:22:14 <myndzi\> |
02:22:14 <myndzi\> /'\
02:22:14 <myndzi\> (_| |_)
02:22:15 <Patashu> hehe
02:22:15 <oerjan> looks like myndzi\ does a bit of throttling
02:24:19 <oerjan> > filterM(const[False,True])"abcd" -- have we had this one yet
02:24:20 <lambdabot> ["","d","c","cd","b","bd","bc","bcd","a","ad","ac","acd","ab","abd","abc","...
02:24:40 <Sgeo> Huh, just found my old Astrology book
02:24:52 <oerjan> Sgeo: it's a sign!
02:25:03 <Sgeo> lol
02:25:34 <monqy> of what use is an astrology book
02:25:50 <Sgeo> Part 5 is some stuff about other things
02:26:15 <Patashu> that's the power set, right?
02:26:17 <Sgeo> "Tarot, palmistry, and numerology are three of those ways-- and they're all connected with astrology."
02:26:48 <monqy> numerology will always make think vortex based mathematics
02:27:54 <oerjan> Patashu: yep
02:28:11 <Patashu> @src filterM
02:28:11 <lambdabot> Source not found. And you call yourself a Rocket Scientist!
02:28:18 <oerjan> hmph
02:28:22 <Patashu> @src const
02:28:22 <lambdabot> const x _ = x
02:28:35 <Patashu> aah
02:28:58 <oerjan> @hoogle
02:28:58 <lambdabot> No query entered
02:28:58 <lambdabot> Try --help for command line options
02:29:01 <oerjan> bah
02:29:10 <Patashu> @hoogle filterM
02:29:10 <lambdabot> Control.Monad filterM :: Monad m => (a -> m Bool) -> [a] -> m [a]
02:29:10 <lambdabot> Data.Graph.Inductive.Query.Monad graphFilterM :: GraphM m gr => (Context a b -> Bool) -> GT m (gr a b) [Context a b]
02:29:12 <Patashu> aha
02:29:18 <Patashu> woah
02:29:19 <Patashu> lol
02:30:04 <oerjan> Patashu: http://hackage.haskell.org/packages/archive/base/latest/doc/html/src/Control-Monad.html#filterM
02:30:30 <oerjan> (the hoogle website has source links)
02:32:07 -!- foocraft has joined.
03:02:11 <Sgeo> "Of course, we can't answer the larger question about believing /everything/ you read in the papers. You might want to take some of the things /other/ than your daily forecast with a grain of salt."
03:02:55 <Sgeo> Oh, hm, I kind of took that out of context
03:10:20 -!- copumpkin has quit (Quit: Computer has gone to sleep.).
03:10:30 <CakeProphet> okay what the hell.
03:10:37 <CakeProphet> there's a particular region of my screen
03:10:41 <CakeProphet> where my mouse cannot click on anything.
03:10:43 <CakeProphet> this makes no sense.
03:11:37 -!- augur has changed nick to Oscar__.
03:11:46 -!- Oscar__ has changed nick to augur.
03:26:44 -!- F has joined.
03:31:28 -!- copumpkin has joined.
03:42:34 -!- azaq23 has quit (Read error: Operation timed out).
03:46:38 -!- CakeProphet has quit (Quit: Lost terminal).
03:47:07 -!- CakeProphet has joined.
04:01:04 -!- azaq23 has joined.
04:04:59 -!- Sgeo has quit (Ping timeout: 246 seconds).
04:05:07 -!- yorick has quit (Ping timeout: 252 seconds).
04:07:03 -!- yorick has joined.
04:10:14 -!- Sgeo has joined.
04:10:16 <CakeProphet> I think I'm 500 pages away or so from being up to date on homestuck
04:15:41 -!- foocraft has quit (Quit: I'm falling...UPRIGHT! http://www.youtube.com/watch?v=WCF_mHKBH3k).
04:25:04 -!- pikhq_ has joined.
04:28:12 -!- pikhq has quit (Ping timeout: 276 seconds).
04:28:22 <Gregor> Haha gold standard people.
04:28:24 <Gregor> So luls.
04:50:32 <pikhq_> Aaah, morons.
05:11:46 * pikhq_ has the fairly obvious realisation that his tests for compiler features do not work for cross-compilation.
05:12:10 <Gregor> Yes, that is a common problem.
05:14:00 <pikhq_> So now I'm wondering how best to test preprocessor defines without actually executing my built executable.
05:14:45 <pikhq_> Hmm. Probably #if !defined(foo)\n#error "no foo"#endif
05:15:45 <Gregor> #error is actually unportable :)
05:15:52 <Gregor> Just anything that's not valid C on the error side.
05:16:26 <Gregor> (Note: by "#error is actually unportable" I mean "there exist compilers which do not understand #error, and so error out on it regardless of where it appears in the code")
05:17:08 <Gregor> Wanna know a great trick to figure out the word size (or size of any builtin type) without executing code? :)
05:17:48 <pikhq_> I'm implementing tests on an as-needed basis. ATM, all I have tests for is C99 and libraries.
05:18:11 <pikhq_> Though, because I listened to elliott, it's really quite easy to add tests...
05:18:52 <Gregor> So wanna help me figure out why fastjit-tests segfaults in GGGGC-evil mode? >_>
05:19:07 <pikhq_> No, I'd rather defeat autotools. :P
05:19:08 <Patashu> evil mode?
05:19:49 <pikhq_> Admittedly, I'm depending on Tcl instead of shell, but that's really not a very objectionable dependency.
05:20:16 <pikhq_> Given that I can probably get Jim (a smallish but full-featured Tcl interpreter) to build on anything that builds C.
05:20:22 <Gregor> Patashu: It adds a canary to the object header, performs a GC at every yield point, always clears out old-space memory, and goes into two-space copying collector mode to assure that no object will every stay in the same location after a collection.
05:20:47 <Patashu> and segfaults often?
05:20:58 <Gregor> Patashu: Not if the code is correct ...
05:21:02 <Patashu> :P
05:21:28 <Gregor> Patashu: It's a good indicator since it's easy to have bugs in a GC that are non-obvious since you just happened to never collect at the wrong time.
05:22:47 <pikhq_> Gregor: BTW, I'm actually not *hyper* concerned with handling broken systems here.
05:22:58 <pikhq_> Gregor: My check for C99 consists of checking __STDC_VERSION__.
05:23:42 <pikhq_> I'm pretty much assuming a system that doesn't provide a modicum of C89 semantics is fundamentally broken.
05:23:44 <Gregor> Not supporting systems which are strictly wrong is different from not supporting systems which are right but old/obscure/unusual *shrugs*
05:25:10 <pikhq_> Yeah, but an extreme number of Autoconf checks are actually checks for broken systems.
05:25:19 <Gregor> 'struth :P
05:25:35 <Gregor> But that's why step one to using autoconf is to run autoreconf, then disregard its result.
05:25:42 <pikhq_> Autoscan, you mean.
05:25:47 <Gregor> Erm, yes
05:26:24 <pikhq_> Yeah, autoscan alone has probably wasted centuries of CPU time.
05:30:16 <pikhq_> Oh, yeah, and I am *really* not going to be thinking about the pain and agony that is libraries needing other libraries in static linking. Unlike Autoconf, which still has a lot of logic for it.
05:31:08 <pikhq_> Or Libtool, which *is* the logic for it.
05:31:42 <pikhq_> If you want it to work right, write a pkg-config file; I reject the idea of making a 10 billion line shell script that does everything related to libraries that your toolchain can do anyways.
05:34:44 <pikhq_> Fuck libtool so much.
05:35:48 <pikhq_> Especially its idea of library dependencies.
05:36:18 <pikhq_> It does not understand the *idea* of a shared library already having its dependencies recorded.
05:37:19 -!- azaq23 has quit (Quit: Leaving.).
05:41:18 -!- wareya has quit (Read error: Connection reset by peer).
05:42:43 -!- pizearke has quit (Ping timeout: 240 seconds).
05:43:02 -!- pizearke has joined.
05:52:02 -!- wareya has joined.
05:54:28 <pikhq_> Oh, the over-linking.
05:54:41 <pikhq_> -Wl,--as-needed would be much less needed if it weren't for libtool.
05:56:01 -!- Sgeo has quit (Ping timeout: 255 seconds).
05:58:52 -!- Patashu has quit (Ping timeout: 260 seconds).
06:05:37 -!- pikhq has joined.
06:09:09 -!- pikhq_ has quit (Ping timeout: 276 seconds).
06:16:58 <pikhq> http://web.archive.org/web/19961119053443/http://www.tmbg.com/ That is a *surprisingly* inoffensive mid-90s site.
06:18:53 -!- Sgeo has joined.
06:25:45 * pikhq cannot *fathom* why autoconf has sizeof checks, anyways.
06:29:38 <pikhq> Are there any times where you would want to know sizeof(foo) outside of compilation that aren't absolutely revolting?
06:32:30 <monqy> I can't even think of absolutely revolting reasons
06:33:47 -!- Sgeo has quit (Read error: Connection reset by peer).
06:34:03 <pikhq> I *suppose* you might want it in a preprocessor check?
06:34:18 -!- Sgeo has joined.
06:35:03 <pikhq> Though I can't fathom why limits.h wouldn't suffice.
06:35:09 <monqy> now I can only think of absolutely revolting reasons yes
06:37:31 <oerjan> revolting peasants
06:40:13 <pikhq> http://www.gnu.org/software/autoconf/manual/html_node/Particular-Types.html#Particular-Types Why, it's a giant list of pointless checks!
06:49:45 <Gregor> 'In Swedish, Norwegian and Danish, gift means "poison" but also "married".'
06:50:36 <pikhq> Even better. Swedish, Norwegian, Danish, German, and English "gift" are cognate.
06:53:14 <Gregor> Yeah, I'm reading this on the Wikipedia "False friends" page.
06:54:00 <pikhq> Good article.
07:07:30 * pikhq winces
07:07:47 <pikhq> alloca is not in any consistent place.
07:07:49 <pikhq> At all.
07:08:46 <pikhq> Admittedly, with C99 it's ceased to be necessary.
07:10:42 <Deewiant> It seems to be in stdlib.h quite often
07:11:35 <pikhq> It exists in: stdlib.h, alloca.h, malloc.h, as __builtin_alloca, as __alloca.
07:17:31 <pikhq> *sigh*
07:17:40 <pikhq> GTK+'s use of pkg-config is wrong.
07:17:52 <pikhq> Requires: gdk-${target}-2.0 atk cairo gdk-pixbuf-2.0 gio-2.0 pangoft2
07:17:55 <pikhq> FAIL
07:19:30 <pikhq> Unless it's part of your library's public ABI, it's not in "Requires:".
07:21:07 -!- oerjan has quit (Quit: leaving).
07:22:50 <Deewiant> Windows's CRT has _alloca FWIW
07:23:57 <pikhq> Yeah, and it defines alloca in "malloc.h".
07:24:12 <Deewiant> Yep
07:25:23 -!- clog has quit (Ping timeout: 240 seconds).
07:42:45 -!- pikhq_ has joined.
07:43:12 -!- pikhq has quit (Ping timeout: 276 seconds).
07:52:32 <augur> *sigh*
07:52:40 <augur> sometimes i feel europe is where civilization really is
07:52:49 <augur> and the US is just some pathetic attempt at civilization
07:53:17 <augur> then i browse the web and see pics of europe and am certain of it.
07:55:37 <olsner> pikhq_: alloca doesn't even consistently *exist*
08:05:33 -!- monqy has quit (Quit: hello).
08:09:59 <pikhq_> olsner: Also true.
08:10:09 <pikhq_> olsner: Hence why it doesn't exist in a consistent place.
08:41:38 -!- pizearke has quit (Quit: Leaving.).
08:43:11 -!- pikhq_ has quit (Ping timeout: 252 seconds).
08:43:17 -!- pikhq has joined.
08:45:06 -!- pizearke has joined.
09:03:22 -!- MigoMipo has joined.
09:05:30 -!- oklofok has quit.
09:13:03 -!- pikhq has quit (Ping timeout: 240 seconds).
09:13:14 -!- pikhq has joined.
09:18:29 -!- BeholdMyGlory has joined.
09:22:38 -!- pizearke has quit (Remote host closed the connection).
09:36:46 -!- clog has joined.
09:50:04 -!- choochter has joined.
09:53:55 -!- MigoMipo has quit (Read error: Connection reset by peer).
10:03:19 -!- Behold has joined.
10:04:22 -!- BeholdMyGlory has quit (Ping timeout: 264 seconds).
10:42:52 -!- FireFly has joined.
10:43:48 -!- sebbu2 has joined.
10:43:49 -!- sebbu2 has quit (Changing host).
10:43:49 -!- sebbu2 has joined.
10:47:05 -!- sebbu has quit (Ping timeout: 240 seconds).
11:27:32 -!- choochter has quit (Read error: Connection reset by peer).
11:27:43 -!- choochter has joined.
11:39:40 -!- Miss_ has joined.
11:39:46 <Miss_> Hi
11:40:59 <CakeProphet> so I think it would be interesting to have a programming competition in which programs logged into a MUD-like server, and issued commands to interact with one another in a competition of some kind.
11:41:08 <CakeProphet> That's as specific as I've gotten so far.
11:41:15 -!- Vorpal has joined.
11:41:17 -!- Patashu has joined.
11:41:34 <CakeProphet> it would be interesting if there were teams, as opposed to the usual 1v1 setup
11:41:48 <Miss_>
11:42:21 <Miss_> ;(
11:42:37 <CakeProphet> Miss_: ?
11:43:01 <Miss_> I'm sad
11:44:05 <CakeProphet> why's that.
11:44:51 <Miss_> My friend hate me ;(
11:45:39 <CakeProphet> I see.
11:46:12 <Miss_> See what !!
11:46:14 <CakeProphet> Do you, uh, want to create an esoteric programming language about that?
11:46:24 <CakeProphet> because that would be so awesome.
11:46:44 <Miss_> Yup
11:47:17 <Miss_> Sorry i don't speak english
11:47:38 <Miss_> :"o
11:47:48 <CakeProphet> well, that could be a problem. But so far I haven't noticed.
11:48:01 <CakeProphet> "I see" is "I understand"
11:48:07 <CakeProphet> or, whatever.
11:48:15 <CakeProphet> that might even make less sense.
11:48:16 <Miss_> اها
11:48:22 <Miss_> Aha
11:48:51 <Miss_> I'm saudi
11:49:04 <Miss_> :"o
11:49:27 <augur> what is this :"o you're doing
11:49:48 <Miss_> Crying
11:50:18 <augur> i see i see
11:50:42 <augur> are you a saudi girl in the us or something?
11:51:10 <Miss_> In riyadh
11:51:20 <augur> and you're on the internet? crazy.
11:51:40 <Miss_> !!!
11:51:43 <augur> isnt it vaguely illegal for you to be talking to men on the internet?
11:52:22 <Miss_> Yes
11:52:30 <augur> well, you should be careful then
11:52:36 <augur> cause most people on irc are men
11:52:45 <augur> oh hey, that rhymed AND had the same line length
11:52:48 <augur> awesomes
11:52:51 <CakeProphet> ...lol
11:52:58 <Miss_> I'm girl
11:53:14 <augur> Miss_: yes.. we figured
11:54:40 <CakeProphet> http://www.samair.ru/proxy/type-01.htm
11:55:13 <CakeProphet> might be useful
11:56:27 <CakeProphet> if you can configure your IRC client to use a proxy, or can even understand what I'm saying right now. Who knows.
11:58:00 <Miss_> Bay
12:00:31 <CakeProphet> ..?
12:00:51 <augur> obviously she's a fan of Michael Bay's cinematic achievements
12:01:41 <Miss_> I want to sleep
12:01:54 <augur> his work on the Transformers movies, with their stark color contrasts emblematic of desert environments, and their hard mechanical overlords, are obvious parallels to her experiences in the arid country of saudi arabia, with its US-military-industrial-complex-funded monarchy that oppresses women
12:02:03 <augur> how could you not see this, CakeProphet?
12:03:31 -!- pikhq_ has joined.
12:03:48 -!- pikhq has quit (Ping timeout: 258 seconds).
12:04:13 -!- Phantom_Hoover has joined.
12:17:12 <Miss_> I would like to speak english , i tried it and i try
12:17:20 <Miss_> Sorry
12:17:48 <Miss_> Forgive me and fogive me
12:18:17 <Miss_> :)
12:21:59 -!- Miss_ has left.
12:24:44 <CakeProphet> augur: ...
12:24:46 <CakeProphet> rofl
12:24:50 <CakeProphet> what the hell.
12:24:59 <augur> CakeProphet: :)
12:25:16 <augur> its a work of art, isnt it
12:31:37 <CakeProphet> oh yes, truly priceless.
12:31:41 <CakeProphet> there is no value. it's undefined.
12:31:46 <augur> im a master at bullshit
12:32:07 <CakeProphet> damnit why is lambdabot so difficult to install.
12:35:03 <Patashu> to increase your ties to #esoteric
12:46:10 -!- Cheery has joined.
12:47:32 -!- CakeProphet has quit (Read error: Operation timed out).
12:50:36 -!- CakeProphet has joined.
12:50:36 -!- CakeProphet has quit (Changing host).
12:50:36 -!- CakeProphet has joined.
13:37:26 -!- nooga has joined.
13:38:12 <nooga> Þwat
13:38:37 <nooga> Þat*
13:49:42 -!- ais523 has joined.
13:50:11 -!- MigoMipo has joined.
14:00:55 -!- ais523 has set topic: [...] Rule 2: You do /NOT/ talk about Rule 1. | Join ##verybadattitude for more intellectual discussions | Logs: http://codu.org/logs/_esoteric/ and http://tunes.org/~nef/logs/esoteric/?C=M;O=D.
14:17:23 -!- copumpkin has quit (Quit: Computer has gone to sleep.).
14:45:05 -!- copumpkin has joined.
14:46:35 -!- Phantom_Hoover has quit (Ping timeout: 255 seconds).
15:01:27 -!- Patashu has quit (Quit: MSN: Patashu@hotmail.com , Gmail: Patashu0@gmail.com , AIM: Patashu0 , YIM: patashu2 .).
15:19:30 -!- wareya has quit (Quit: Lost terminal).
15:20:37 -!- mtve has quit (Ping timeout: 260 seconds).
15:20:54 -!- Slereah has quit (Ping timeout: 252 seconds).
15:21:44 -!- Slereah has joined.
15:22:00 -!- SimonRC has quit (Ping timeout: 252 seconds).
15:22:42 -!- mtve has joined.
15:22:57 -!- FireFly has quit (Ping timeout: 260 seconds).
15:23:07 -!- SimonRC has joined.
15:23:50 -!- F has quit (Ping timeout: 252 seconds).
15:24:49 -!- F has joined.
15:25:21 -!- FireFly has joined.
15:47:51 -!- CakeProphet has quit (Ping timeout: 240 seconds).
15:54:16 <Sgeo> Blah
16:23:08 -!- pikhq_ has quit (Ping timeout: 246 seconds).
16:23:19 -!- pikhq has joined.
16:26:33 -!- SimonRC has quit (Ping timeout: 260 seconds).
16:28:10 -!- SimonRC has joined.
16:32:41 -!- TOGoS has joined.
16:32:49 -!- TOGoS has left.
16:37:17 <tswett> <opentag name="opentag"><argument name="name" value="opentag" /></opentag><emptytag name="argument"><argument name="name" value="name"><argument name="value" value="opentag"></emptytag><closetag name="opentag" /><opentag name="emptytag">...
16:52:19 <ais523> tswett: trying to write an XML quine? wouldn't it have to be infinitely long?
16:53:19 <Sgeo> What about XSLT?
16:53:24 <Sgeo> Or is it XLST?
16:53:58 <tswett> Yes, I'm writing an infinite XML quine.
16:56:56 -!- monqy has joined.
16:57:36 <tswett> {"type": "object", "contents": [{"type": "string", "value": "type"}, {"type": "string", "value": "objects"}, {"type": "string", "value": "contents"}, {"type": "array", "contents": ["type": "object", "contents": [{"type":...
17:00:17 <tswett> Apply (Constructor "Apply") [Apply (Constructor "Constructor") [String "Apply"], List [Apply (Apply (Constructor "Constructor") [String "Constructor"]) [List [Apply (Constructor "String") (String "Apply")]], Apply...
17:01:03 <tswett> It couldn't be too hard to figure out exactly how efficient each of these encodings is.
17:01:38 <tswett> LISP has them all beat, with an efficiency of 1:
17:01:53 <tswett> (quote (quote (quote (quote (quote (quote (quote (quote (quote (quote (quote (quote (quote (quote (quote (quote (quote (quote (quote (quote (quote (quote (quote (quote (quote (quote (quote (quote (quote...
17:02:34 <ais523> well, 1 in the limit
17:03:01 <tswett> Right.
17:03:25 <ais523> now I vaguely want to see how that would work with Java reflection
17:03:29 <Sgeo> What was that Apply and Constructor thing supposed to be? Haskell?
17:03:32 <ais523> but I'm worried that the result might make me go insane
17:03:33 <tswett> Sgeo: yeah.
17:03:48 <tswett> JavaScript reflection is much less insanity-causing, no?
17:04:04 <ais523> I imagine so
17:06:17 -!- ralc has joined.
17:08:31 <Lymia> What would an Python infinitely long quine look like?
17:08:41 <Lymia> I imagine you could do something with print"print...
17:08:46 <tswett> Lymia: very similar to that JSON one, I imagine.
17:08:55 <tswett> I mean, these aren't really quines; these are self-describing data structures.
17:09:00 <Lymia> But I don't want to try and figure out an equation for \s
17:09:15 <Lymia> (How many \s to put in each string)
17:09:21 <Lymia> I imagine it'd grow quite fast.
17:12:11 -!- pumafyre has joined.
17:33:03 <twice11> pikhq: The reason autoconf offers sizeof tests is that you might want to have something like int32_t on a system without stdint.h
17:33:56 <twice11> As "#if sizeof(int) == 4" does not work (the preprocessor can't evaluate sizeof), I don't see a way how to find out which type(s) has/have 32 bits during compilation.
17:34:27 <twice11> And yes, I *do* know about CHAR_BIT and sizeof reporting in that unit...
17:34:49 <Gregor> pikhq didn't take me up on my offer of the clever trick for testing that :)
17:34:59 <ais523> amusingly, it manages to work out sizes of variables even during cross-compiling
17:35:00 <Gregor> (Yes, it is testable at compile-time)
17:35:19 <ais523> the way it does it, is to declare arrays which would have negative sizes or positive sizes depending on if the size of the time is above a certain boundary
17:35:23 <ais523> then binary-searches on compile errors
17:35:44 <Gregor> Daaaaaaaamn, ais523's got it :
17:35:46 <Gregor> *:P
17:35:47 -!- aloril has quit (Ping timeout: 250 seconds).
17:35:55 <Gregor> The other way is to make switch statements with sizeof cases.
17:36:09 <ais523> Gregor: wouldn't that just cause warnings, rather than errors?
17:36:12 <ais523> I didn't come up with it myself, anyway
17:36:17 <ais523> I got that from autoconf source
17:36:23 <ais523> which I have spent probably too much time reading
17:36:33 <Gregor> ais523: switch (argc) { case sizeof(int): case 4: } /* error if sizeof(int) == 4, no error otherwise */
17:36:36 <twice11> duplicate case statements should be errors.
17:36:39 <ais523> aha
17:36:52 <ais523> although less than/greater than is much faster than equal-to
17:37:18 <ais523> I know I wrote my own autoconf test to see if a particular function was declared by yacc's generated output (to see if I needed to call it)
17:37:19 <pikhq> Gregor: I do know the trick, actually.
17:37:35 <ais523> and the way I did that was to declare it myself with a completely insane type signature (full of things like function pointers to doubles)
17:37:42 <ais523> to see if it errored out on the incompatible redeclaration
17:37:52 <ais523> if it didn't, I assumed it didn't exist, so I didn't try to call it
17:38:06 <pikhq> Gregor: sizeof(foo) ? -1 : 1; yay.
17:38:38 <pikhq> twice11: I have no intent to support systems that lie about C99 support, and little intent to support systems without C99 support.
17:39:06 <pikhq> The standard's a decade old, support it. I refuse to IE6 it.
17:39:14 <twice11> pikhq: If you rely on C99, you can ignore most of autoconf.
17:39:41 <ais523> pikhq: how many systems with working C99 support do you have access to?
17:39:45 <twice11> The remaining problems are solved at least as well by simple things like pkg-config
17:39:49 <ais523> note that gcc's support is broken, and MSVC doesn't even try
17:39:51 <pikhq> s/If you rely on C99, /
17:40:28 <pikhq> ais523: What's broken about GCC's support?
17:40:40 <twice11> gcc's C99 support is good enough for most general-use projects, even if it is lacking in some areas.
17:40:41 <ais523> mostly minor details
17:40:48 <pikhq> Ah, well then.
17:40:49 <ais523> I think there's a famous screwup with inline
17:40:57 <ais523> where C99 inline = gcc static inline, C99 static inline = gcc inline
17:41:01 <ais523> but I can never remember the details
17:41:08 <ais523> and apparently gcc refuses to change for compatibility reasons, or something
17:41:15 <ais523> (I can't even remember the difference between the two anyway)
17:41:57 <twice11> One of them is an error if included in multiple translation units, IIRC.
17:42:42 <pikhq> ais523: Strange, I thought it *had* implementation of C99 semantics on that, but only if you used -std=c99.
17:43:00 <ais523> ah, that might make sense
17:43:04 <ais523> there are various other things, let me find the list
17:43:13 <pikhq> ais523: With the compatibility one being enabled by -std=c89, std=gnu89, -fgnu89-line, or attribute((gnu_inline)).
17:43:41 <pikhq> Sorry, no on the std=c89.
17:43:46 <pikhq> Invalid keyword. ;)
17:44:12 <ais523> here we go: http://gcc.gnu.org/c99status.html
17:44:23 <ais523> ah, I remember something that caught me out earlier
17:44:27 * twice11 just googled for "c99status"...
17:44:41 <ais523> when I was trying to write a\u00e8 or something like that as a variable name
17:44:44 <ais523> and gcc didn't even parse it correctly
17:45:01 <twice11> Is that "extended identifiers"?
17:45:07 <ais523> yep
17:45:13 <ais523> that list's actually more complete than last I looked
17:45:18 <ais523> so it seems they're working on it
17:45:18 <pikhq> Looks like a handful of compiler edge cases, and a giant swath of things required of the libc.
17:45:42 <ais523> yep
17:45:47 <ais523> c99 is so edgecasy
17:47:08 <pikhq> Edge cases can be tested for if need be. But I am *not* going to do things like implement a bunch of checks just to see if libc is not 40 years old.
17:47:31 <pikhq> (admittedly, you shouldn't *use* those checks in autoconf, but people do. *sigh*)
17:47:40 <ais523> pikhq: I do, because I can
17:48:01 <pikhq> ais523: How do you handle the test failing?
17:48:05 -!- aloril has joined.
17:48:14 <ais523> hmm, perhaps you're targeting "libraries generally supported by POSIXy systems, and the bits of C99 that are widely implemented"
17:48:22 <pikhq> Pretty much.
17:48:25 <ais523> pikhq: normally by #defining to somethign dangerous but equivalent
17:48:42 <pikhq> Oh, so you actually have an alternative to the feature you're testing?
17:48:47 <ais523> e.g. C-INTERCAL uses sprintf if snprintf doesn't exist, and removes all uses of "const" from the program if the compiler doesn't support it
17:48:54 <pikhq> Congrats, you're using autoconf right!
17:49:53 <pikhq> Which, sadly, is a *major* achievement.
17:50:06 <ais523> obviously testing for things and then ignoring the resulting info is pointless
17:50:13 <ais523> I think C-INTERCAL did that before I started working on it
17:50:19 <ais523> and I've been through about three build systems since
17:50:24 <pikhq> Yeah, that's how most people use autoconf.
17:50:34 <twice11> There should be more info about using autoconf correctly.
17:50:42 <twice11> Doing that is an art.
17:50:44 <pikhq> twice11: The documentation sucks eggs.
17:51:03 <pikhq> Well, it tells you *very* well what each test does and how to use them.
17:51:19 <pikhq> It does not tell you at all why you're doing any of them.
17:51:31 <pikhq> Making it a gigantic cargo cult.
17:51:43 <ais523> once you know what you're using autoconf for, the documentation is quite good at letting you know how to use it to do that
17:52:07 <ais523> the issue with autoconf is people using it because "autoconf is good" or whatever, without thinking to work out what they actually need it for
17:52:21 <twice11> And don't let us get started on libtool. It seems to mostly work, but for the sake of your sanity, *DON'T* *LOOK* *INSIDE*!
17:52:21 <ais523> e.g. I don't check triplets in autoconf code as it's incredibly rare that that information is useful, but all sorts of stuff does
17:52:28 <ais523> (possibly exception: you're writing a compiler targeting native code)
17:52:31 <ais523> *possible
17:53:10 <Gregor> Special fun: Compile GMP with target none-elf :P
17:53:50 * twice11 knows that the problem libtool (tries to) solve(s) is not trivial at all, though. I not gonna claim I can do better.
17:54:09 <ais523> Gregor: what happens?
17:54:09 <ais523> I'm having trouble visualising what that even means
17:54:20 <pikhq> I can do better than libtool. Step one is to admit that the problem libtool tries to solve is not a relevant problem.
17:54:56 <Gregor> ais523: "none" is its special target for disabling all ASM code, and it ignores the rest of the triple but they still have to get through config.guess, so it has to be semivaild.
17:54:59 <Gregor> *semivalid
17:55:24 <twice11> If you decide you don't need to support dynamic libraries on any system having something remotely like that, of course it will get easier.
17:55:43 <twice11> And I won't question any decision like that.
17:55:57 <pikhq> twice11: If you decide you don't need to handle static library dependencies on any system, actually.
17:56:07 <Vorpal> hm is there any power of two that is also a power of 10?
17:56:14 <ais523> Vorpal: 1
17:56:15 <twice11> Vorpal: 1
17:56:16 <ais523> otherwise, no
17:56:19 <ais523> unless you count 0
17:56:21 <Vorpal> ah right
17:56:23 <ais523> which you shouldn't
17:56:32 <ais523> that's easy enough to prove by prime factorisation
17:56:34 <pikhq> *That* is the majority of the logic in libtool. Making static libraries have dependency information.
17:56:37 <twice11> All other powers of 10 have the prime factor 5
17:56:37 <Vorpal> ais523, wait 10^1 != 2^1
17:56:44 <ais523> Vorpal: 10^0 = 2^0 = 1
17:56:51 <Vorpal> ais523, ah right
17:56:51 <Vorpal> true
17:57:41 <pikhq> Problem is, a) if that's all you want, pkg-config has it covered b) libtool does it by installing .la files, which *only works if you're using the full autoconf stack, anyways*.
17:57:44 <twice11> Dependency info on static libs should be straight-forward, isn't it?
17:58:11 <Vorpal> pikhq, pkg-config is way newer than libtool
17:58:31 <pikhq> Oh, and c) it does this by just recording a single dependencies variable, which is actually WRONG on systems with dynamic linking.
17:58:53 <ais523> la is a very common typo for me, into sh
17:59:07 <ais523> it's an invalid command, but the name looks like it has something to do with dynamic library linking
17:59:08 <twice11> Of course, mixing dependency info in .la and .pc (one half of libs using only .la and the other half using only .pc) is not gonny fly.
17:59:33 <pikhq> twice11: Having dependency info in .la is fundamentally broken on most systems.
17:59:54 <twice11> I think debian has some hacks around that.
18:00:08 <pikhq> Most of the distros do. Do you know what that hack *is*?
18:00:16 <Vorpal> pikhq, --as-needed?
18:00:19 <pikhq> rm *.la
18:00:37 <ais523> haha
18:01:26 <pikhq> Also, it's a bit more than just static library dependency information. It makes it so you can pretend you have a dynamic linker everywhere.
18:01:40 <pikhq> libtool also has logic for emulating dlopen, with ltdl.
18:02:08 <twice11> rm *.la is not going to work for the libtool abstraction layer of "I link just to libfoo.la, and that works, no matter whether the library is called foo.dll, libfoo.so.1, libfoo.dylib or libfoo.a", but -lfoo does that as well on most sufficiently modern unix systems.
18:02:47 <pikhq> twice11: They only keep .la files around for packages where the .la file is actually read.
18:02:47 <twice11> Libtool could have the advantage of automatically adding dependencies *only* if it happens to choose a static library.
18:03:05 -!- puma has joined.
18:03:20 <pikhq> Yes, guess what pkg-config handles right?
18:03:53 <twice11> The option --static ;)
18:04:14 <pikhq> And, actually, I think the only .la files floating around on my system are for users of ltdl.
18:04:23 <twice11> But IIRC this also was not in the first version of pkg-config.
18:05:05 -!- pumafyre has quit (Quit: Ex-Chat).
18:05:15 <twice11> I happen to have a lot of .la files here, like /usr/lib/libSDL.la
18:05:20 <pikhq> Which distro?
18:05:28 <Vorpal> $ ls /usr/lib/*.la | wc -l
18:05:28 <Vorpal> 131
18:05:28 <twice11> Debian, mostly wheezy
18:05:30 <Vorpal> ubuntu
18:05:47 <Vorpal> 10.04
18:05:49 <pikhq> Strange, I'm on wheezy too.
18:05:50 <pikhq> $ ls /usr/lib/*.la | wc -l
18:05:53 <pikhq> 64
18:06:07 <Vorpal> pikhq, different set of packages
18:06:08 <pikhq> For comparison:
18:06:10 <pikhq> $ ls /usr/lib/*.so | wc -l
18:06:12 <pikhq> 262
18:06:22 <pikhq> $ ls /usr/lib/pkgconfig/* | wc -l
18:06:24 <pikhq> 193
18:06:27 <Vorpal> $ ls /usr/lib/*.so | wc -l
18:06:28 <Vorpal> 476
18:06:32 <twice11> It's in the dev packages.
18:06:39 <pikhq> Aaah.
18:06:44 <Vorpal> $ ls /usr/lib/pkgconfig/* | wc -l
18:06:44 <Vorpal> 288
18:07:03 <Vorpal> I definitely have sdl's -dev installed
18:07:21 <pikhq> Anyways. The only feature of libtool that's still *useful* is abstracting the creation of dynamic libraries.
18:07:22 <twice11> Note that dependency_libs is empty in debian's libSDL.la
18:07:46 -!- puma has quit (Quit: -a-).
18:07:47 <twice11> I think that's debians hack - clearing that variable.
18:07:48 <pikhq> And that is a much easier task.
18:08:12 <Vorpal> breaks static linking
18:08:29 <twice11> Vorpal: Debian folks know that.
18:08:30 -!- puma has joined.
18:08:39 <Vorpal> and?
18:09:00 -!- puma has quit (Client Quit).
18:09:05 <twice11> But they still decided that for their purpose, it's the solution with the best effort/use ratio.
18:09:06 <pikhq> Vorpal: Eh, libtool static linking is broken unless you're using libtool, and people usually only use libtool if they're making a dynamic library.
18:09:52 <Gregor> Debian: Literally always right.
18:09:58 <pikhq> That one single "feature" of libtool really does not work.
18:10:53 * twice11 keeps wondering that autoconf goes really great lengths about supporting cross-compile environments, but having no support for HOSTCC/CC_FOR_BUILD in autoconf/automake (i.e. you have to do that by hand).
18:11:18 * twice11 is sorry about messed-up grammar in the last sentence.
18:11:20 <Vorpal> HOSTCC?
18:11:22 <Vorpal> hm
18:12:08 <twice11> The compiler that compiles programs that can be executed on the system you are currently building on is traditionally called HOSTCC, and the GNU people call it CC_FOR_BUILD.
18:12:20 <Vorpal> hah
18:12:53 <twice11> The GNU people have a slightly shifted view of their terms for the architectures involved in cross-compiling, as they are too much fixed on compilers.
18:13:11 <Vorpal> right
18:13:31 <twice11> For "normal" people, there is the "host" system where you compile your program on, and the "target" system where the program will run on.
18:13:32 <Vorpal> twice11, their terminology makes sense when doing a canadian cross
18:14:03 <ais523> twice11: the way autoconf doesn't do it is annoying, and the way gcc does it is really stupid
18:14:17 <ais523> C-INTERCAL deals with the problem by generating two configure scripts and getting one to call the other
18:14:51 <Vorpal> how does gcc do it
18:15:13 <ais523> Vorpal: basically by writing huge sections of configure by hand rather than getting autoconf to generate them
18:15:23 <ais523> plus some other stuff too that I couldn't follow because I was too stunned by the previous reason
18:15:32 -!- pumafyre has joined.
18:15:34 <Vorpal> hehe
18:16:08 <twice11> For gcc people thinking about gcc, of course it makes sense to call the system gcc runs on "host" and the system gcc will produce software for "target", so a gcc with a certain set of "host" and "target" can be used in a compilation process involving "host" and "target" as normal people define it.
18:16:53 -!- pumafyre has quit (Client Quit).
18:17:09 <twice11> Now for the canadian cross (three parties involved: You build a compiler on system $A, which runs on $B, producing executables that run on $C), you need three names.
18:17:19 -!- pumafyre has joined.
18:17:58 <twice11> As I explained, compiler-centric people choose B==host, C==target, and need to invent something for A. GNU decided to call A "build".
18:18:32 -!- pumafyre has quit (Client Quit).
18:18:40 <twice11> OTOH, when you *don't* compile a compiler, there *is* no C, and thus no "target" in GNU speak.
18:18:52 <twice11> And "host" will be the opposite of what you expect.
18:19:17 <pikhq> Yeah, the terminology for autoconf cross-compiling is quite confusing.
18:19:32 <twice11> This is why GNU people don't you "HOSTCC" as variable name - and this shows Linus is not a GNU guru.
18:19:34 <pikhq> I'm pretty sure that the terminology was invented for GCC, and brought to autoconf, though.
18:19:56 <twice11> Yeah, hysterical reasins, I guess, too.
18:20:18 <pikhq> I think it pretty clear Linus has no regard for autoconf.
18:20:21 <twice11> More likely, developed autoconf alongside gcc.
18:20:50 <pikhq> The Linux build system is custom built with GNU Make.
18:21:04 <twice11> So they always have "how do we do this for gcc" in mind when they work on autoconf...
18:21:14 <twice11> pikhq: I know. And it uses HOSTCC...
18:21:20 <pikhq> And probably the best example of custom-built make out there, TBH.
18:21:39 <pikhq> "Best" in the sense of "actually good", not "best-known".
18:22:06 <Vorpal> pikhq, well busybox and uclibc uses it too
18:22:37 <Vorpal> pikhq, how do you go about using it for yourself
18:22:44 <Vorpal> I mean which files do you extract
18:23:40 <pikhq> Vorpal: Makefile, most of scripts/
18:24:01 <Vorpal> pikhq, part of Makefile is kernel specific, like make modules
18:24:12 <Vorpal> or make bzimage
18:24:57 <pikhq> Vorpal: Yeah, and it's easy to remove those.
18:25:06 <pikhq> $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
18:25:19 <pikhq> That's the command for modules.
18:25:24 <Vorpal> Q?
18:25:39 <pikhq> For quieting a command.
18:25:43 <Vorpal> ah
18:25:52 <pikhq> Remember, it has verbose and silent building.
18:26:08 <Vorpal> right
18:26:17 <Vorpal> pikhq, where is the sources to make menuconfig/xconfig/gconfig
18:26:26 <Vorpal> are*
18:26:32 <pikhq> scripts/kconfig
18:26:41 <Vorpal> ah
18:28:51 <pikhq> Also, if you want a Tup/kconfig thing, then git://gittup.org/kconfig.git
18:29:16 <Vorpal> hah
18:33:53 <pikhq> Wow. Prostitution is legal in Canada. It is illegal to do just about any form of public notice for prostitution, and illegal to live off of the income gained thereby.
18:34:19 <Sgeo> illegal to live off the income?
18:34:30 <Vorpal> pikhq, not as weird as Sweden. Being a prostitute is legal, but buying those services are not
18:34:34 <pikhq> Sgeo: As in, "have it as your main or primary source of income".
18:34:36 <twice11> So someone may sell his body, excepts if he/she needs to to buy food?
18:34:43 <pikhq> twice11: Yes.
18:34:49 <Sgeo> Hmm, maybe to make sure that it's not something people feel presured to do?
18:35:03 <Gregor> So you have to whore on the side :P
18:35:19 <twice11> That's kind of strange, and definitely for the reason Sgeo mentioned.
18:35:50 <pikhq> Sgeo: Except that the whole *issue* with desperate people going into prostitution is that it not being a ordinarily regulated industry makes it so that people only do it if they are desperate.
18:37:00 <Sgeo> But if there are legal prostitutes, then the unregulated illegal prositutes probably won't get much business
18:37:26 <Sgeo> Or is the legal prostitution not regulated, o.O?
18:37:35 <pikhq> Sgeo: It's "legal".
18:37:51 <pikhq> You can't be employed as a prostitute.
18:37:52 <twice11> In Germany, prostitution is legalized, but it didn't really turn out to help the whores.
18:38:06 <pikhq> twice11: What sort of regulations did they do on it?
18:38:30 <pikhq> It's something that *really* needs regulations to prevent exploitation.
18:38:58 <twice11> I don't know the details, but the idea was prostitution to be a regular job so you pay taxes and get social insurance.
18:39:54 <twice11> Exploiting people ("Zuhälterei", kind of "being a pimp") is still illegal, as it always was.
18:45:18 <pikhq> How's about we just solve poverty?
18:45:24 <pikhq> Suddenly, desperation goes away!
18:46:10 <Gregor> But then there are no whores :(
18:46:43 <pikhq> Gregor: There will, no doubt, still be people who want to fuck for $.
18:46:55 <pikhq> Just not people doing it because they have no other options.
18:51:38 <pikhq> (see: Japanese porn industry. Many of their porn stars are also non-porn actors)
18:52:13 <pikhq> (and filthy stinking rich after not-too-long)
18:56:53 -!- CakeProphet has joined.
18:56:53 -!- CakeProphet has quit (Changing host).
18:56:54 -!- CakeProphet has joined.
18:57:03 -!- wareya has joined.
19:11:12 -!- pumafyre_ has joined.
19:12:58 -!- pumafyre_ has quit (Client Quit).
19:15:20 -!- pumarain has joined.
19:16:34 <pikhq> The fuck?
19:16:48 <pikhq> Singapore is labelled as a developing country.
19:16:57 <pikhq> As is South Korea.
19:17:11 <pikhq> South Korea is about as developed as Japan.
19:17:24 <pikhq> I.E. "from the fucking future".
19:17:53 <pikhq> And Qatar. The richest country.
19:18:01 -!- pumarain has quit (Client Quit).
19:30:49 -!- ais523 has quit (Read error: Connection reset by peer).
20:10:17 -!- azaq23 has joined.
20:16:27 -!- atrapado has joined.
20:16:44 -!- nooga has quit (Ping timeout: 240 seconds).
20:30:50 -!- copumpkin has changed nick to dependentpumpkin.
20:34:04 -!- dependentpumpkin has changed nick to copumpkin.
21:00:03 <Gregor> Yesterday to be unhelpful I set the helptext for "opera" in ##javascript to "La donna mobile, qual piuma al vento, muta d'accento, e di pensiero!"
21:00:13 <Gregor> But the first time I set it I typo'd "piuma" to "puma"
21:00:39 <Gregor> Which, as it turns out, changes the original meaning, "Women are fickle, like a feather in the wind" to the much-more-descriptive "Women are fickle, like a puma in the wind"
21:03:05 <pikhq> That is an astounding typo, and I didn't realise you had any competence in what looks to be Italian.
21:03:55 <pikhq> Or that you've memorised an Italian saying, as it may turn out to be. :P
21:04:53 <Gregor> I just know the first lyrics to La Donna Mobile :P
21:05:02 <Gregor> Which probably isn't supposed to be capitalized in Italian.
21:05:03 <pikhq> BAH
21:05:46 <pikhq> Yeah, capital casing is a somewhat Germanic convention, deriving from how nouns are capitalised in Germanic languages (except English, which lost that two or three hundred years ago)
21:05:55 <pikhq> Erm, title case.
21:07:11 <pikhq> Well, it's more an English-specific convention, but following patterns from other Germanic languages.
21:09:43 <Gregor> Anyway, the point is that I was unhelpfully setting the "opera" word to actual opera, when of course people expected the browser since this is ##javascript
21:10:09 <Gregor> Also, women are fickle like a puma in the wind.
21:10:27 <pikhq> Oh, duh, I *should* have caught that that was obviously an opera. My brain is not always coöperative, though. Alas.
21:13:01 -!- CakeProphet has quit (Ping timeout: 244 seconds).
21:14:30 -!- CakeProphet has joined.
21:14:39 -!- CakeProphet has quit (Changing host).
21:14:39 -!- CakeProphet has joined.
21:24:10 -!- CakeProphet has quit (Ping timeout: 240 seconds).
21:36:43 -!- Cheery has quit (Ping timeout: 276 seconds).
21:40:12 -!- pumarain has joined.
21:41:37 -!- pumarain has quit (Client Quit).
22:05:03 <pikhq> It occurs to me that as an entirely unintended side effect, it is exceptionally easy to do custom rules in my build system.
22:05:07 <pikhq> Write a Tupfile outside of the objs directory.
22:05:09 <pikhq> That's all.
22:16:08 -!- CakeProphet has joined.
22:16:08 -!- CakeProphet has quit (Changing host).
22:16:08 -!- CakeProphet has joined.
22:21:07 -!- MigoMipo has quit (Read error: Connection reset by peer).
22:26:39 -!- zzo38 has joined.
22:27:42 <zzo38> 403 (No such channel).
22:29:53 <zzo38> Finally I reduced "Success" to 21 bytes of Unlambda. Three hours later, someone else also figure it out.
22:30:02 <zzo38> But is there a way to shorten it even more?
22:33:03 -!- pumarain has joined.
22:34:24 -!- pumarain has quit (Client Quit).
22:35:01 <zzo38> I found some information about LLVM with C. It says apparently you have to use a C++ linker even if it is a C code
22:36:07 -!- Vorpal has quit (Quit: ZNC - http://znc.sourceforge.net).
22:36:19 <pikhq> 99% chance they're full of shit.
22:37:29 <pikhq> What the fuck it only produces static libraries?
22:37:42 <pikhq> Okay, yeah, you do need -lc++.
22:38:11 <pikhq> No, wait, there it is.
22:38:17 <pikhq> zzo38: Yeah, they're full of shit.
22:38:51 <zzo38> Then how do I *properly* use LLVM with C?
22:40:21 -!- Vorpal has joined.
22:43:44 -!- jix has quit (Ping timeout: 240 seconds).
22:43:48 -!- jix has joined.
22:49:07 -!- jix has quit (Remote host closed the connection).
22:49:14 -!- jix has joined.
22:49:40 <pikhq> *Gaaah*, they don't use pkg-config, but their library name is libLLVM-Major.Minor.so
22:50:16 <pikhq> Yes, that's right, they make it impossible to link against LLVM generically.
22:51:12 <pikhq> zzo38: Give up, they don't *want* you to use it.
22:51:42 <pikhq> They hate you.
22:52:18 -!- wareya has quit (Read error: Connection reset by peer).
22:53:16 -!- wareya has joined.
22:59:47 <pikhq> Oh, wait, llvm-config.
23:00:20 <pikhq> Fuck people not using pkg-config.
23:01:55 <pikhq> ... Debian, in their infinite wisdom, has decided to rename llvm-config to llvm-config-major.minor
23:02:07 <pikhq> STOP DEFEATING THE POINT
23:05:32 -!- atrapado has quit (Quit: FIN).
23:07:37 <pikhq> You may think you're being clever by allowing multiple LLVM version to be installed at once, but you're not.
23:07:59 <pikhq> You're just shitting on reasonable expectations.
23:09:32 <pikhq> Expectations like "I can actually check for a library foo that install foo-config using foo-config".
23:12:41 -!- Patashu has joined.
23:21:32 <zzo38> pikhq: They don't *want* me to use it? What is this?
23:22:10 -!- pikhq_ has joined.
23:22:44 <zzo38> pikhq_: They don't *want* me to use it? What is this?
23:23:37 <zzo38> What is the point of LLVM if nobody can use it?
23:23:42 -!- oerjan has joined.
23:23:50 -!- pikhq has quit (Ping timeout: 246 seconds).
23:23:52 -!- zzo38 has quit (Quit: Not time now).
23:24:00 <pikhq_> zzo38: I dunno. It's just OUCH
23:28:35 <oerjan> <pikhq> Yeah, capital casing is a somewhat Germanic convention, deriving from how nouns are capitalised in Germanic languages (except English, which lost that two or three hundred years ago)
23:29:00 <oerjan> also except Norwegian, Danish and Swedish, at least
23:29:34 <oerjan> i thought it was a german (no -ic) thing. i'm not sure about dutch.
23:29:45 <pikhq_> oerjan: Yeah, I looked around and it's apparently only been done in some West Germanic languages.
23:30:19 <pikhq_> Modern practice in German, historical practice in Dutch and English...
23:30:49 <oerjan> <zzo38> Finally I reduced "Success" to 21 bytes of Unlambda. Three hours later, someone else also figure it out.
23:30:57 <oerjan> ...why the heck did he _just_ leave
23:31:35 <oerjan> hm 21 seems only slightly shorter than the obvious solution
23:32:04 <oerjan> !unlambda ```````.s.s.e.c.c.u.Si
23:32:06 <EgoBot> sseccuS
23:32:09 <oerjan> er
23:32:43 <oerjan> !unlambda ```````.S.u.c.c.e.s.si
23:32:43 <EgoBot> Success
23:34:47 -!- Adamfyre_ has joined.
23:36:22 -!- Wamanuz2 has joined.
23:36:27 <oerjan> looks tricky
23:36:31 -!- ralc has quit (Quit: Leaving).
23:36:59 -!- Sgeo_ has joined.
23:37:17 -!- teuchter has joined.
23:37:30 -!- Sgeo has quit (Read error: Connection reset by peer).
23:42:49 <oerjan> <tswett> Apply (Constructor "Apply") [Apply (Constructor "Constructor") [String "Apply"], List [Apply (Apply (Constructor "Constructor") [String "Constructor"]) [List [Apply (Constructor "String") (String "Apply")]], Apply...
23:42:53 <oerjan> > fix show
23:43:03 <oerjan> ...now what
23:43:18 <oerjan> @help
23:43:30 <oerjan> lambdabot is sick :(
23:43:56 <Patashu> lol
23:44:08 <Patashu> wait
23:44:28 <Patashu> Constructor/String/Apply/List, "Apply"/"Construtor"/"String"...
23:44:31 <oerjan> hm or its server is, i cannot get to it
23:44:31 <Patashu> Is there a "List" then
23:45:17 <oerjan> Patashu: i don't know about any of them, may they're in Language.Haskell, haskell's self-parsing library
23:45:43 -!- Adamfyre_ has quit (Quit: leaving).
23:45:48 <oerjan> but the result of fix show is much shorter
23:46:08 <Patashu> > fix fix
23:46:15 <oerjan> i said lambdabot was sick
23:46:21 <Patashu> I'm making it worse
23:46:24 <oerjan> also that doesn't type, i think
23:46:34 <oerjan> doubtful, /whois lambdabot lambdabot doesn't answer
23:47:47 <oerjan> !haskell take 100 $ Data.Function.fix show
23:47:51 <EgoBot> ​"\"\\\"\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"
23:48:19 <oerjan> !haskell :t Data.Function.fix
23:48:22 <EgoBot> Data.Function.fix :: (a -> a) -> a
23:48:22 <Patashu> what
23:48:38 <Patashu> why does it look like... that
23:48:45 <oerjan> Patashu: that string is an infinite quine in haskell :)
23:49:20 <oerjan> first of all, fix show is equivalent to show (show (show (show (show ...
23:49:20 <Patashu> what does it -do-
23:49:44 <oerjan> show returns a string, so each show there also applies to a string
23:50:04 -!- Sgeo_ has left ("Leaving").
23:50:08 -!- Sgeo_ has joined.
23:50:23 <Lymia> !haskell Data.Function.fix show
23:50:28 <oerjan> show turns a string into "string" with anything escaped inside as necessary
23:50:38 <oerjan> Lymia: i used take 100 for a reason
23:50:38 <EgoBot> ​"\"\\\"\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
23:50:44 <oerjan> wait what
23:50:53 <Lymia> I dunno.
23:50:54 <oerjan> ...when did that start working :O
23:50:55 <Sgeo_> Dear XChat: As a matter of fact, I am not actually disconnected from any servers, so stop saying that I am.
23:51:39 <oerjan> !underload ((test )S:^):^
23:52:15 <oerjan> that didn't answer
23:52:34 <oerjan> !haskell scanl1 (*) [1..]
23:52:58 <oerjan> wtf
23:53:01 <oerjan> !echo hi
23:53:02 <EgoBot> hi
23:53:41 -!- choochter has quit (*.net *.split).
23:53:41 -!- Wamanuz has quit (*.net *.split).
23:53:42 -!- lambdabot has quit (*.net *.split).
23:53:42 <oerjan> Gregor: how the heck did EgoBot manage to respond to !haskell Data.Function.fix show when it usually fails on any infinite output line?
23:53:48 <oerjan> and still does for the other tests
23:54:21 <oerjan> !haskell :t show
23:54:23 <EgoBot> show :: (Show a) => a -> String
23:55:14 <oerjan> Patashu: show is haskell's basic function for creating a printable/parseable representation of a value. on strings, it puts " around and escapes what's necessary inside
23:55:44 <oerjan> crucially, for strings it is lazy enough to return the initial " _without_ looking at the actual string passed first
23:56:11 -!- pizearke has joined.
23:56:15 <oerjan> which means it is lazy enough to get going when you apply fix to it
23:57:33 <oerjan> first there's ", then there's \" which is a " escaped, then there's \\\" which is _that_ escaped, and so on
23:59:42 <Patashu> Oh, lol
23:59:44 -!- hagb4rd has joined.
23:59:46 <Patashu> It's infinitely nested strings
23:59:54 <oerjan> ...in a way.
←2011-06-14 2011-06-15 2011-06-16→ ↑2011 ↑all