←2014-08-29 2014-08-30 2014-08-31→ ↑2014 ↑all
00:00:07 <oerjan> well it has the usual four stabs
00:00:16 <oerjan> oh wait
00:00:29 * oerjan is apostrophically blind
00:03:59 <Sgeo_> What can you do with equalities that you can't do with isos?
00:05:17 -!- Bicyclidine has quit (Ping timeout: 245 seconds).
00:11:51 <b_jonas> the name "Equality'" reads scary to me,
00:12:31 <b_jonas> because it sort of reminds me to SML which doesn't have real typeclasses but only a few built-in ones, so "'a" is an ordinary type variable and "''a" is an Eq-constrained one
00:15:05 <Melvar> ( 'a
00:15:05 <idris-bot> 'a : Type
00:15:13 <Melvar> ( ''a
00:15:13 <idris-bot> (input):1:2: error: expected: name
00:15:14 <idris-bot> ''a<EOF>
00:15:14 <idris-bot> ^
00:16:11 -!- Taneb has joined.
00:16:25 -!- atriq has quit (Ping timeout: 244 seconds).
00:18:05 -!- diginet has quit (Ping timeout: 244 seconds).
00:20:21 -!- zzo38 has quit (Ping timeout: 244 seconds).
00:21:19 -!- zzo38 has joined.
00:21:34 <zzo38> How can we make applicative LR parsers in Haskell?
00:22:32 -!- diginet has joined.
00:22:55 -!- conehead has joined.
00:23:06 -!- evalj has quit (Remote host closed the connection).
00:23:42 <oerjan> :t inon
00:23:44 <lambdabot> Not in scope: ‘inon’
00:23:44 <lambdabot> Perhaps you meant one of these:
00:23:44 <lambdabot> ‘inone’ (imported from Control.Lens),
00:24:28 <zzo38> With Lemon, the tokenizer calls the parser. To do it with Haskell you would make the parse state to be a function that receives a token and returns the next parse state. Using this you could perhaps make parsers to form a category too, for example simply the composition of the tokenizer with the parser.
00:25:24 <Bike> it's not haskell until you make a category out of it.
00:27:33 <zzo38> The identity would then be a program consisting of a single token and the parsed value also consists of exactly the single token. It doesn't seems very useful but it would be mathematically the identity morphism anyways.
00:28:08 -!- Phantom_Hoover has joined.
00:28:43 <zzo38> For example if it is based on (Free ((->) token)) then it looks like it, but it doesn't seems like you are making a applicative LR parser out of that; it looks like LL parser. So, how can you make applicative LR parser?
00:29:39 <zzo38> (It seems like it would also have to be one which isn't a monad, and is only applicative?)
00:31:37 -!- Phantom__Hoover has quit (Ping timeout: 255 seconds).
00:32:41 -!- aretecode has quit (Ping timeout: 260 seconds).
00:37:50 -!- Phantom_Hoover has quit (Read error: Connection reset by peer).
00:45:54 -!- KingOfKarlsruhe_ has joined.
00:56:54 -!- Bicyclidine has joined.
00:58:21 -!- KingOfKarlsruhe has quit (*.net *.split).
01:02:18 <Sgeo_> :t inon
01:02:19 <lambdabot> Not in scope: ‘inon’
01:02:19 <lambdabot> Perhaps you meant one of these:
01:02:19 <lambdabot> ‘inone’ (imported from Control.Lens),
01:02:22 <Sgeo_> :t inone
01:02:24 <lambdabot> FoldableWithIndex i f => (i -> a -> Bool) -> f a -> Bool
01:02:34 <Sgeo_> :t id <$> pure id <*> pure id
01:02:36 <lambdabot> Applicative f => f (a -> a)
01:03:02 <Sgeo_> How lazy should traversals be to make them useful?
01:03:19 <Sgeo_> I guess always having them target every point is not actually too useful in many circumstances
01:04:41 <Sgeo_> If a lens is an iso from a value to a pair of the original value and a focus, can I have a traversal be an iso from a value to a pair of the original value and a list of of focuses, or something?
01:05:28 <int-e> what happened, every time I look in here the discussion is about lenses ...
01:05:53 <shachaf> try #haskell-lens hth
01:06:14 <oerjan> Sgeo_: i'm not sure what i was looking for with inon actually exists
01:06:30 <shachaf> what was that
01:06:42 <oerjan> indexed version of non
01:06:52 <int-e> shachaf: oh can I find non-lens discussions there?
01:06:57 <shachaf> frequently
01:08:06 -!- Bicyclidine has quit (Ping timeout: 246 seconds).
01:08:51 <oerjan> hm in fact there don't seem to _be_ indexed Isos
01:10:15 <coppro> help I'm trapped in an agda
01:11:32 <oerjan> Sgeo_: i don't think a lens is that hth
01:12:01 <Sgeo_> Profunctor p => p (a, o) (b, o) s t
01:12:36 <Sgeo_> Is that meaningful as a Lens s t a b?... argh
01:13:29 <oerjan> if that's forall p then it's an Iso
01:13:41 <shachaf> since when does a profunctor have four arguments
01:13:49 <oerjan> that too.
01:14:10 <Sgeo_> Profunctor p => p (a, o) (b, o) -> p s t
01:14:11 <Sgeo_> ty
01:14:17 -!- Bicyclidine has joined.
01:14:22 <oerjan> still an Iso.
01:14:26 -!- lorenzo__ has joined.
01:14:42 <shachaf> maybe you're looking for unlenses
01:15:00 <oerjan> or wait is the o supposed to be forall'ed too
01:15:10 <oerjan> where is edwardk when we need him
01:15:20 <oerjan> (probably in #haskell-lens, right?)
01:15:29 <shachaf> class Unlensy p where unlensy :: p (e, a) (e, b) -> p a b
01:15:39 <shachaf> oerjan: hey profunctor lenses are my thing
01:15:43 -!- lollo64it has quit (Ping timeout: 255 seconds).
01:15:46 * Sgeo_ doens't know what unlenses are
01:15:50 <oerjan> hm right. what are unlenses?
01:16:07 <Sgeo_> I'm just trying to think of that type because after I use strong I think it's what's left to define
01:16:12 <shachaf> (forall p. ... p => p a b -> p s t) is the "normal" direction for optics.
01:16:19 <Sgeo_> And by strong I mean first'
01:16:23 <shachaf> But you can make a dual class where it's (forall p. ... p => p t s -> p b a)
01:16:49 <shachaf> In the case of Iso the dual of Profunctor is Profunctor, of course. Instead of (s -> a, b -> t) it's (b -> t, s -> a) but that's the same thing.
01:17:03 <shachaf> For various restrictions of p you get different classes.
01:17:18 <shachaf> class Lensy p where lensy :: p a b -> p (e,a) (e,b)
01:17:25 <shachaf> class Unlensy p where unlensy :: p (e,a) (e,b) -> p a b
01:17:54 <shachaf> newtype Un p a b s t = Un { runUn :: p t s -> p b a }
01:18:29 <shachaf> instance Lensy p => Unlensy (Un p a b)
01:18:36 <shachaf> instance Unlensy p => Lensy (Un p a b)
01:18:43 <oerjan> ycnaf
01:18:53 <shachaf> there is a bizarro dual world of optics hiding there
01:18:59 <shachaf> ycnaf?
01:19:17 <shachaf> you can now apply functions
01:22:22 -!- Bicyclidine has quit (Ping timeout: 240 seconds).
01:23:52 -!- int-e_ has joined.
01:23:55 -!- coppro_ has joined.
01:26:47 -!- jameseb- has joined.
01:27:06 -!- myndzl has joined.
01:28:03 -!- contrapumpkin has joined.
01:28:26 -!- TieSoul-mobile has quit (*.net *.split).
01:28:26 -!- jameseb has quit (*.net *.split).
01:28:29 -!- DootBot has quit (*.net *.split).
01:28:29 -!- sebbu has quit (*.net *.split).
01:28:29 -!- copumpkin has quit (*.net *.split).
01:28:29 -!- lambdabot has quit (*.net *.split).
01:28:29 -!- Tiesoul has quit (*.net *.split).
01:28:29 -!- int-e has quit (*.net *.split).
01:28:29 -!- myndzi has quit (*.net *.split).
01:28:29 -!- coppro has quit (*.net *.split).
01:28:29 <oerjan> shachaf: lot simpler than that hth
01:28:41 <Melvar> ( reverse "ycnaf"
01:28:42 -!- idris-bot has quit (Quit: Terminated).
01:28:46 <Melvar> Oh, right.
01:29:09 <shachaf> oh
01:29:35 -!- idris-bot has joined.
01:29:42 <Melvar> ( reverse "ycnaf"
01:29:42 <idris-bot> "fancy" : String
01:29:44 <shachaf> coöerjan
01:30:35 <shachaf> when i read _The Amazing Maurice and his Educated Rodents_ i didn't know how "cooperate" was pronounced
01:30:48 <shachaf> i assumed it was like "recuperate" is pronounced but without the "re"
01:33:18 -!- diginet has quit (Ping timeout: 246 seconds).
01:34:03 -!- diginet has joined.
01:34:07 -!- lambdabot has joined.
01:34:11 -!- MoALTz__ has joined.
01:34:42 -!- MoALTz_ has quit (Ping timeout: 246 seconds).
01:36:56 -!- contrapumpkin has changed nick to copumpkin.
01:37:15 -!- not^v has quit (Read error: Connection reset by peer).
01:37:21 <zzo38> What is best way I can do optimization involving reordering instructions in order to allow further optimizations?
01:38:25 -!- olsner has quit (Ping timeout: 246 seconds).
01:38:25 -!- Froox has quit (Read error: Connection reset by peer).
01:38:49 -!- Froox has joined.
01:39:20 -!- Froox has quit (*.net *.split).
01:39:22 -!- KingOfKarlsruhe_ has quit (*.net *.split).
01:39:23 -!- Taneb has quit (*.net *.split).
01:39:24 -!- hogeyui___ has quit (*.net *.split).
01:39:25 -!- mroman_ has quit (*.net *.split).
01:39:25 -!- Gracenotes_ has quit (*.net *.split).
01:39:39 -!- not^v has joined.
01:50:22 -!- Froo has joined.
01:50:22 -!- KingOfKarlsruhe_ has joined.
01:50:22 -!- Taneb has joined.
01:50:22 -!- hogeyui___ has joined.
01:50:22 -!- mroman_ has joined.
01:50:22 -!- Gracenotes_ has joined.
01:50:58 -!- olsner has joined.
02:10:40 <Sgeo_> "You can have profunctor only lenses, but the price is that you can no longer use "traverse" and similar as a lens"
02:10:43 <Sgeo_> What's that about?
02:13:30 <shachaf> (p a b -> p s t) and (traverse :: (a -> f b) -> s -> f t) don't unify.
02:14:09 <Sgeo_> But it doesn't really make sense to use traversals as lenses, unless you insist on monoidness
02:14:28 <oerjan> oh. it means traverse as a traversal.
02:14:59 <Sgeo_> Oh
02:15:09 <oerjan> and fold as a fold iirc
02:15:14 <oerjan> :t Data.Foldable.fold
02:15:15 <lambdabot> (Monoid m, Foldable t) => t m -> m
02:15:28 <oerjan> hm no
02:15:28 * Sgeo_ reads an old version of a gist that has a Bazaar definition in it
02:15:35 <oerjan> :t Data.Foldable.foldMap
02:15:36 <lambdabot> (Monoid m, Foldable t) => (a -> m) -> t a -> m
02:16:25 <Sgeo_> *understandable Bazaar definition
02:16:29 <Sgeo_> https://gist.github.com/sjoerdvisscher/7043326/92492c6bb8e1e1ca9c0b96eb04e67eecc0c6b1e0
02:16:47 <shachaf> That type isn't quite the same as Bazaar.
02:17:02 <shachaf> (Only because of things like infinite traversals.)
02:17:07 <shachaf> Also, it seems more complicated than Bazaar to me.
02:17:50 <shachaf> Traversal s t a b = forall f. Applicative f => (a -> f b) -> s -> f t
02:18:07 <shachaf> Traversal s t a b ~~ s -> forall f. Applicative f => (a -> f b) -> f t
02:18:12 <shachaf> ~~ s -> Bazaar a b t
02:18:13 <Sgeo_> That's not a pure profunctor ttraversal, is it?
02:18:14 <shachaf> Done.
02:18:24 <shachaf> No.
02:18:32 <shachaf> Oh, this is about pure profunctor lenses.
02:18:54 <shachaf> I stil think the FunList definition is more confusing than, say, representability.
02:19:12 <shachaf> Which is where you pick p f x y = (x -> f y)
02:20:15 -!- jarcane has quit (Quit: WeeChat 0.4.4-dev).
02:21:52 -!- lorenzo__ has quit (Quit: Leaving).
02:22:56 -!- Lorenzo64 has joined.
02:23:35 -!- J_Arcane has joined.
02:31:43 -!- Froo has changed nick to Frooxius.
02:52:41 -!- not^v has quit (Ping timeout: 260 seconds).
03:00:24 <Sgeo_> `olist (961)
03:00:25 <HackEgo> olist (961): shachaf oerjan Sgeo FireFly boily nortti
03:04:33 <shachaf> olists are so infrequent these days that this feels like a waste :'(
03:04:43 <shachaf> maybe after i gain more information i'll think differently
03:16:32 -!- not^v has joined.
03:16:42 -!- sebbu has joined.
03:17:21 -!- sebbu has quit (Changing host).
03:17:21 -!- sebbu has joined.
03:34:35 <zzo38> The "register forwarding format" makes more sense to me than the standard "single static assignment".
03:36:15 <zzo38> The difference is that there are no phi functions; instead, each label which is a possible branch target takes parameters.
03:36:42 <zzo38> (It also therefore looks like easier to compile into Haskell do-notation)
03:37:20 <pikhq> I'm pretty sure those are isomorphic.
03:38:05 <zzo38> It probably is, although still they would have different advantages and disadvantages, I think.
03:38:34 <shachaf> maybe the person with the hair is secretly on the vampire's side
03:38:39 -!- conehead has quit (Quit: Computer has gone to sleep).
03:39:12 -!- not^v has quit (Quit: http://i.imgur.com/Akc6r.gif).
03:43:17 <zzo38> Do any programs use this register forwarding format though?
04:00:46 <oerjan> shachaf: EMBRACE THE OLIST
04:35:54 <zzo38> I wanted to make an optimization where if a text string is a suffix of another one, it can combine them. This is Z-machine strings, so it should only do if the prefix and suffix are both at least three characters long. Also due to the way the text packing works, in some cases it can be used even if it is not a suffix.
04:36:22 <zzo38> For example, if two strings are "It doesn't work!" and "It broke and now it doesn't work!" then the first one can be considered as a suffix of the second one even though it isn't.
04:37:44 <zzo38> Do you have advice of it?
04:40:29 <zzo38> In this example, you would have to ensure that the prefix ("It broke and now ") ends up in temporary shift state 1. Modulo the number of Z-characters by 3 to determine the sequence it needs to end with: If zero, the sequence is 544. If one, the sequence is 54544 or 55544. If two, the sequence is 4. (In the example, it happens to contain 18 Z-characters, so the sequence is 544.)
04:50:48 -!- int-e_ has changed nick to int-e.
04:56:54 -!- TieSoul has joined.
05:10:16 -!- Hjulle has quit (Ping timeout: 260 seconds).
05:58:40 <Sgeo_> Is there a way to combine two lenses to get a traversal?
05:58:57 <Sgeo_> e.g. if I want to manipulate targets of both (at "hi") and (at "Bye") at the same time
05:58:58 <shachaf> If the lenses overlap, that can make an invalid traversal.
05:59:29 <Sgeo_> Ah
06:23:12 <oerjan> don't cross the lenses
06:25:43 <HackEgo> [wiki] [[Brainfuck implementations]] M http://esolangs.org/w/index.php?diff=40359&oldid=40304 * Rdebath * (+0) Syntax
06:52:36 -!- oerjan has quit (Quit: Niteoid).
07:00:44 <zzo38> I hope you know some things about these optimization, because I do not know how to efficiently make such a thing.
07:01:30 -!- coppro_ has changed nick to coppro.
07:01:34 -!- drdanmaku has quit (Quit: Connection closed for inactivity).
07:03:41 <Sgeo_> Would there be anything wrong with me using a function of the type SomeClass p => p a b -> p [a] [b] to enable Traversals?
07:04:00 <Sgeo_> In a dynamically typed language?
07:04:33 <Bike> deeply sinful
07:04:54 <shachaf> Traversable f => p a b -> p (f a) (f b)
07:05:01 <shachaf> Anyway, traversals aren't lists.
07:05:12 <shachaf> Folds aren't lists. They're trees.
07:09:43 <Sgeo_> Folds aren't in my mental model yet
07:10:56 <shachaf> Foldable behaves a lot like class Foldable f where toList :: f a -> [a]
07:11:02 <shachaf> But it's not exactly that. Why not?
07:13:49 <Sgeo_> Efficiency reasons? I don't know
07:16:46 <Sgeo_> I should probably be sleeping
07:20:14 <Sgeo_> :t toListOf
07:20:16 <lambdabot> Getting (Endo [a]) s a -> s -> [a]
07:20:29 * Sgeo_ runs somewhere in the opposite direction
07:21:31 <zzo38> How many patterns does a peephole optimizer normally have?
07:21:33 <shachaf> These types aren't that scary.
07:22:00 <Sgeo_> Hmm... Lists are a specific traversable... who is forcing the traversable to a specific instance? The traversal, or the function running the traversal (e.g. toListOf), or something else?
07:22:10 <zzo38> I have written one; it is not yet complete, but so far it consists of over 200 patterns.
07:24:29 <Sgeo_> Would I be wrong in suspecting it's the traversal that forces the Traversable to be a specific instance?
07:25:17 <Sgeo_> It's the one calling ... whatever the Traversable f => p a b -> p (f a) (f b).... which as I understand wouldn't appear in the specific type... although p needs to support that function
07:26:17 <Sgeo_> Was sort of having an idea of having a function for lists, a function for stream, etc... if any of my thinking is correct, I could generalize that, maybe. Thanks shachaf.... (thank you even if I'm way off base)
07:27:04 -!- TieSoul has quit (Ping timeout: 244 seconds).
07:55:29 <augur> so whats the latest in esoteric proglangs
07:55:31 <augur> anything good?
08:15:01 <zzo38> I don't know?
08:24:49 <augur> zzo38: shame :(
09:08:09 -!- TieSoul has joined.
09:08:16 <TieSoul> hey guys
09:08:49 <TieSoul> I'm implementing FPSP and FPDP in RubyFunge, and I was wondering if I should round the output.
09:13:54 -!- DootBot has joined.
09:14:29 <TieSoul> !befunge98 "PDPF"4(2FQP@
09:14:30 <DootBot> TieSoul: 1.4142135623730951
09:14:50 <TieSoul> !befunge98 "PDPF"4(2FQ..@
09:14:51 <DootBot> TieSoul: 1073127582 1719614413
09:18:27 -!- Tiesoul_ has joined.
09:18:38 <TieSoul> ...
09:18:40 <TieSoul> who are you
09:21:48 <elliott> you
09:24:16 <TieSoul> ...
09:24:21 <TieSoul> someone is going around using my name
09:24:25 <TieSoul> I don't like that
09:32:39 <elliott> no.
09:32:41 <elliott> it's your IP
09:34:44 <Jafet> It knows where you live
09:38:03 -!- J_Arcane has quit (Ping timeout: 246 seconds).
09:38:59 <TieSoul> ???
09:39:01 <TieSoul> dafuq
09:42:09 -!- Tiesoul_ has quit (Disconnected by services).
09:42:38 -!- Tiesoul_ has joined.
09:42:44 <TieSoul> WHAT THE FUCK
09:42:52 <TieSoul> someone knows my password
09:42:54 <TieSoul> and my IP
09:43:01 <TieSoul> and is somehow logged in at my IP
09:43:05 <TieSoul> what the fuck
09:44:36 -!- J_Arcane has joined.
09:47:36 -!- Tiesoul_ has quit (Disconnected by services).
09:48:15 <elliott> TieSoul: ...
09:48:24 -!- Tiesoul_ has joined.
09:48:25 <elliott> TieSoul: it's just another client running on your computer or something.
09:48:38 <elliott> 10:48:29 [freenode] [ctcp(TieSoul_)] VERSION
09:48:38 <elliott> 10:48:29 [freenode] CTCP VERSION reply from Tiesoul_: CIRC 0.6.5.8 Chrome
09:48:38 <elliott> 10:48:31 [freenode] [ctcp(TieSoul)] VERSION
09:48:38 <elliott> 10:48:31 [freenode] CTCP VERSION reply from TieSoul: CIRC 0.6.5.8 Chrome
09:48:45 <elliott> they're even using the same client as you!!
09:48:49 <TieSoul> wat
09:48:55 <TieSoul> why does it connect twice
09:49:03 <TieSoul> and why only to #esoteric huh?
09:49:12 <TieSoul> I'm in more than that
09:49:26 -!- TieSoul has quit (Remote host closed the connection).
09:49:26 -!- Tiesoul_ has quit (Remote host closed the connection).
09:49:41 -!- TieSoul has joined.
09:49:43 <Jafet> It was the butler
09:50:05 <TieSoul> lel sorry for freaking out
09:50:24 <TieSoul> it's pretty weird though how it was named Tiesoul_ and not TieSoul_.
10:17:38 -!- KingOfKarlsruhe_ has changed nick to KingOfKarlsruhe.
10:17:46 -!- KingOfKarlsruhe has quit (Changing host).
10:17:46 -!- KingOfKarlsruhe has joined.
10:35:09 -!- Lorenzo64 has quit (Ping timeout: 260 seconds).
10:36:27 -!- Phantom_Hoover has joined.
10:38:59 <fizzie> I don't know about CIRC, but irssi is p. easy to connect twice, by getting disconnected and then doing a manual /connect without using /rmreconns to stop the pending automatic reconnect.
10:41:27 <TieSoul> well, in any case, it seems RubyFunge is slower (at least with ys) than any of the interpreters listed in http://users.tkk.fi/~mniemenm/befunge/mycology-comparison.html, based on the HRTI part
10:43:00 -!- DootBot has quit (Remote host closed the connection).
10:43:21 -!- DootBot has joined.
10:43:40 <TieSoul> !befunge98 "ITRH"4(MyT.@
10:43:40 <DootBot> TieSoul: 8999
10:43:44 <TieSoul> damn
10:43:47 <TieSoul> y takes 9 ms
10:43:59 <TieSoul> !befunge98 "ITRH"4(M0yT.@
10:43:59 <DootBot> TieSoul: 2999
10:44:03 <TieSoul> !befunge98 "ITRH"4(M1yT.@
10:44:03 <DootBot> TieSoul: 3000
10:44:06 <TieSoul> !befunge98 "ITRH"4(M5yT.@
10:44:06 <DootBot> TieSoul: 3999
10:44:15 <TieSoul> hrm
10:44:32 <TieSoul> !befunge98 "ITRH"4(MnyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyT.@
10:44:32 <DootBot> TieSoul: 108000
10:45:13 <TieSoul> that's pretty slow
10:45:38 <TieSoul> !befunge98 "ITRH"4(M"AMOR"4(T.@
10:45:38 <DootBot> TieSoul: 1999
10:50:27 <TieSoul> !befunge98 "ITRH"4(S.@
10:50:27 <DootBot> TieSoul: 812999
10:50:30 <TieSoul> !befunge98 "ITRH"4(S.@
10:50:30 <DootBot> TieSoul: 529000
10:50:30 <TieSoul> !befunge98 "ITRH"4(S.@
10:50:30 <DootBot> TieSoul: 72000
10:50:31 <TieSoul> !befunge98 "ITRH"4(S.@
10:50:31 <DootBot> TieSoul: 479000
10:50:31 <TieSoul> !befunge98 "ITRH"4(S.@
10:50:31 <DootBot> TieSoul: 894999
10:50:34 <TieSoul> it seems
10:50:47 <TieSoul> that Ruby can't handle microseconds
10:50:56 <TieSoul> :P
10:51:34 <fizzie> The "y benchmark" is kind of silly.
10:51:42 <fizzie> Nobody really executes y in a tight loop, after all.
10:52:28 <fizzie> Admittedly, it can be a costly instruction and affect overall mycology runtime, but mycology's not exactly actual production code either.
10:53:26 <fizzie> It would be good if someone were to construct a benchmark involving the kind of operations that real-world business-critical Befunge code performs.
10:56:06 <TieSoul> hrm, seems DootBot can't handle microseconds in HRTI, but when I run RubyFunge normally it does do microseconds.
10:56:06 <DootBot> TieSoul: I is it's it starter cly? FlyingMamo: looking are feedback nerf to. You me Nowi, a potatoes the the!
10:57:17 <TieSoul> !befunge98 "ITRH"4(MT.@
10:57:17 <DootBot> TieSoul: 0
10:57:26 <fizzie> Sometimes that babble almost seems like a unigram model.
11:19:36 -!- jix_ has joined.
11:20:03 -!- FreeFull_ has joined.
11:21:44 <Jafet> It might very well be
11:24:25 <fizzie> Mostly the "the the" part, which would presumably be quite low on any bigram (or Markov-chain-with-context) thing.
11:29:32 -!- realz has joined.
11:29:35 -!- variable has quit (Ping timeout: 260 seconds).
11:29:36 -!- FreeFull has quit (Ping timeout: 260 seconds).
11:29:37 -!- Guest2171 has quit (Ping timeout: 260 seconds).
11:29:37 -!- jix has quit (Ping timeout: 260 seconds).
11:42:59 -!- Phantom__Hoover has joined.
11:46:15 -!- Phantom_Hoover has quit (Ping timeout: 240 seconds).
11:49:19 -!- Froox has joined.
11:50:44 -!- hogeyui____ has joined.
11:51:16 -!- Frooxius has quit (Read error: Connection reset by peer).
11:51:16 -!- hogeyui___ has quit (Ping timeout: 246 seconds).
11:51:47 -!- olsner has quit (Ping timeout: 246 seconds).
11:53:10 -!- yorick_ has joined.
11:57:07 -!- yorick has quit (*.net *.split).
11:58:31 -!- atriq has joined.
11:58:38 -!- KingOfKarlsruhe_ has joined.
11:59:45 -!- KingOfKarlsruhe has quit (Ping timeout: 246 seconds).
11:59:45 -!- Taneb has quit (Ping timeout: 246 seconds).
12:00:05 -!- olsner has joined.
12:00:47 -!- KingOfKarlsruhe_ has changed nick to KingOfKarlsruhe.
12:00:59 -!- KingOfKarlsruhe has quit (Changing host).
12:01:00 -!- KingOfKarlsruhe has joined.
12:02:00 -!- AnotherTest has joined.
12:02:49 -!- Lorenzo64 has joined.
12:07:55 -!- ion has quit (*.net *.split).
12:10:00 -!- ion has joined.
12:13:57 -!- Phantom__Hoover has quit (Ping timeout: 240 seconds).
12:14:27 -!- AnotherTest has quit (Ping timeout: 245 seconds).
12:19:59 -!- Hjulle has joined.
12:20:34 -!- Froo has joined.
12:21:13 -!- rodgort has quit (Ping timeout: 240 seconds).
12:22:05 -!- Froox has quit (Read error: Connection reset by peer).
12:22:51 -!- boily has joined.
12:24:01 -!- Effilry has joined.
12:25:25 -!- FireFly has quit (Disconnected by services).
12:25:46 -!- FreeFull has joined.
12:26:19 -!- Effilry has changed nick to FireFly.
12:27:51 -!- yorick has joined.
12:28:54 -!- boily has quit (Quit: WeeChat 0.4.2).
12:29:20 -!- FreeFull_ has quit (Ping timeout: 240 seconds).
12:29:20 -!- yorick_ has quit (Ping timeout: 240 seconds).
12:29:36 -!- rodgort has joined.
12:34:15 -!- tromp has joined.
12:37:43 <TieSoul> so, erm, my funge-98 interpreter has working file IO, but Mycology says it doesn't work.
12:37:51 <TieSoul> I performed the same tests Mycology does.
12:37:57 <TieSoul> They work.
12:40:10 -!- tromp_ has quit (*.net *.split).
12:48:34 -!- variable has joined.
12:50:58 -!- FireFly has quit (Ping timeout: 530 seconds).
12:50:58 -!- realz has quit (Ping timeout: 530 seconds).
12:51:20 -!- realz has joined.
12:52:11 -!- FireFly has joined.
12:57:13 -!- sebbu has quit (Ping timeout: 244 seconds).
12:57:43 -!- sebbu has joined.
12:58:28 -!- sebbu has quit (Changing host).
12:58:28 -!- sebbu has joined.
12:58:54 -!- coppro_ has joined.
12:59:56 -!- jix has joined.
13:00:56 -!- coppro has quit (Ping timeout: 244 seconds).
13:02:17 -!- Phantom__Hoover has joined.
13:02:57 -!- jix_ has quit (Ping timeout: 244 seconds).
13:05:46 -!- Froox has joined.
13:06:18 -!- Phantom___Hoover has joined.
13:06:36 -!- jameseb has joined.
13:06:56 -!- jameseb- has quit (Ping timeout: 244 seconds).
13:07:46 -!- J_Arcane_ has joined.
13:08:10 -!- boily has joined.
13:08:24 -!- atriq has quit (Ping timeout: 255 seconds).
13:08:24 -!- hogeyui____ has quit (Ping timeout: 255 seconds).
13:08:47 -!- hogeyui____ has joined.
13:09:19 -!- Froo has quit (Ping timeout: 255 seconds).
13:09:20 -!- J_Arcane has quit (Ping timeout: 255 seconds).
13:09:25 -!- J_Arcane_ has changed nick to J_Arcane.
13:09:31 -!- Froox has quit (Client Quit).
13:09:45 -!- Phantom__Hoover has quit (Ping timeout: 255 seconds).
13:09:45 -!- ion has quit (Ping timeout: 255 seconds).
13:09:46 -!- Lorenzo64 has quit (Ping timeout: 255 seconds).
13:12:01 -!- Frooxius has joined.
13:16:37 -!- Taneb has joined.
13:24:05 -!- Lorenzo64 has joined.
13:24:22 -!- ion has joined.
13:27:00 -!- conehead has joined.
13:29:09 -!- J_Arcane has quit (Ping timeout: 240 seconds).
13:29:11 -!- J_Arcane_ has joined.
13:29:13 -!- J_Arcane_ has changed nick to J_Arcane.
13:29:54 -!- Lorenzo64 has quit (Excess Flood).
13:32:32 -!- newsham_ has joined.
13:33:13 -!- tromp_ has joined.
13:33:32 -!- Lorenzo64 has joined.
13:35:02 -!- newsham has quit (Read error: Connection reset by peer).
13:35:05 -!- ineiros has quit (Ping timeout: 272 seconds).
13:35:34 -!- tromp__ has quit (Read error: Connection reset by peer).
13:38:39 -!- perrier_ has quit (Ping timeout: 272 seconds).
13:39:56 -!- atehwa_ has quit (Ping timeout: 272 seconds).
13:40:03 -!- atehwa has joined.
13:40:34 -!- Melvar has quit (Ping timeout: 272 seconds).
13:40:36 -!- SirCmpwn has quit (Ping timeout: 272 seconds).
13:40:46 -!- ineiros has joined.
13:42:18 -!- Melvar has joined.
13:42:38 -!- perrier_ has joined.
13:45:29 -!- SirCmpwn has joined.
13:58:22 -!- Patashu has quit (Ping timeout: 240 seconds).
13:59:56 -!- quintopia has quit (Remote host closed the connection).
14:09:57 -!- Phantom___Hoover has quit (Ping timeout: 240 seconds).
14:14:25 -!- DootBot has quit (Remote host closed the connection).
14:17:16 -!- ^v has joined.
14:38:04 <HackEgo> [wiki] [[Fortob]] N http://esolangs.org/w/index.php?oldid=40360 * GermanyBoy * (+1701) Created page with "{{infobox proglang |name=Fortob |paradigms=imperative, [[:Category:Self-modifying|self-modifying]] |author=[[User:GermanyBoy]] |year=[[:Category:2014|2014]] |memsys=:Categor..."
14:38:42 <HackEgo> [wiki] [[Language list]] http://esolangs.org/w/index.php?diff=40361&oldid=40312 * GermanyBoy * (+13) /* F */ fortob
14:41:53 <fizzie> Does anyone happen to remember which language it was where there was a three-class circular thing on the top of the class hierarchy?
14:42:28 <HackEgo> [wiki] [[User:GermanyBoy]] http://esolangs.org/w/index.php?diff=40362&oldid=39990 * GermanyBoy * (+128)
14:44:51 -!- Tod-Autojoined has joined.
14:49:20 -!- coppro_ has changed nick to coppro.
14:52:22 -!- impomatic_ has quit (Ping timeout: 240 seconds).
14:52:35 -!- nortti_ has joined.
14:54:11 -!- nortti has quit (Disconnected by services).
14:54:21 -!- nortti_ has changed nick to nortti.
14:54:26 -!- fizzie has quit (Ping timeout: 260 seconds).
14:54:28 -!- shachaf has quit (Ping timeout: 260 seconds).
14:54:29 -!- TodPunk has quit (Ping timeout: 260 seconds).
14:54:34 -!- weissschloss has quit (Ping timeout: 260 seconds).
14:54:36 -!- aloril has quit (Ping timeout: 260 seconds).
14:54:36 -!- nisstyre has quit (Ping timeout: 260 seconds).
14:55:39 -!- aloril has joined.
14:55:58 -!- nisstyre has joined.
14:56:30 -!- shachaf has joined.
14:57:24 -!- fizzie has joined.
14:57:45 -!- weissschloss has joined.
15:00:04 -!- Tod-Autojoined2 has joined.
15:01:51 <J_Arcane> my brain is too tired to do functional programming right now.
15:03:51 -!- ^v has changed nick to mo^v.
15:05:01 <boily> someone out there should publish a nice FP-lite language. (use monads with 33% less brain power!)
15:05:17 -!- Tod-Autojoined has quit (*.net *.split).
15:07:21 -!- mo^v has changed nick to ^v.
15:09:16 <J_Arcane> did a couple Project Euler exercises but my solutions, while correct, were full of set!s.
15:10:02 <boily> couldn't you have used a named let?
15:11:25 <mroman_> fizzie: what "class hierarchy"?
15:11:54 <J_Arcane> Well, they were on let variables. So at least I wasn't just using a bunch of global defines.
15:13:52 <J_Arcane> par example: http://pasterack.org/pastes/61660
15:17:12 <boily> en effet.
15:18:34 <boily> my brain is also too tired (same flu from yesterday), so I can't offer precise advice (don't even think about working one), but my feeling here is that you should put x an y directly into the fib-loop, and call the whole thing with initial values.
15:18:40 <boily> (that, or a nice recursive lambda.)
15:18:55 <boily> that should prevent the set!s for the most part.
15:19:17 <J_Arcane> Yeah. That's what the Rosetta Code example for a fib sequence does. Defines its own sub-function and then does a tail call with the new values.
15:20:22 <J_Arcane> I'm getting over something myself though, so I was just having trouble getting my brain in gear on how to even adapt it. At one point I even failed to understand the original arguments and called (fibo 4000000) ...
15:20:57 <Bike> imo linear algebra
15:21:02 <fizzie> mroman_: Perhaps "type system" would have been a better term. But it was something object-oriented, where (approximately; something like this) all "normal" classes inherit from X, which is a subclass of special class Y, which is a subclass of Z, which is again a subclass of X.
15:21:43 <Bike> you sure it was all subclassing, not instances of?
15:23:12 -!- yorick has quit (Remote host closed the connection).
15:24:45 <J_Arcane> Ahah. Racket let functions can indeed take arguments.
15:28:35 -!- yorick has joined.
15:31:36 <J_Arcane> Here's a bit cleaner one: http://pasterack.org/pastes/87538
15:35:07 <b_jonas> fizzie: I think ruby has some sort of circular foundation like that
15:35:13 <b_jonas> probably not literally, but close to
15:37:17 <fizzie> J_Arcane: now just make 'sum' one more argument.
15:37:51 <J_Arcane> Right! Of course. I was trying to figure out where to put that.
15:40:23 <fizzie> J_Arcane: Incidentally, every third Fibonacci number is even (and the rest are odd), and you can iterate through all the even ones reasonably simply.
15:42:40 -!- conehead has quit (Quit: Computer has gone to sleep).
15:43:21 <fizzie> (Without explicitly computing the odd ones, I mean.)
15:43:44 <J_Arcane> http://pasterack.org/pastes/76442
15:44:37 <fizzie> That's quite reasonable. Or you could combine the first two and do (fib-loop y tmp (if (= ...) (+ sum tmp) sum)).
15:48:01 <J_Arcane> Yeah. Comes out about the same length, but less redundancy in the conditionals.
15:48:26 <J_Arcane> http://pasterack.org/pastes/91926
15:51:41 -!- Phantom___Hoover has joined.
15:59:01 <TieSoul> I'm thinking about making a primes fingerprint for Funge-98. Should I make that PRIM or PRME?
15:59:23 <TieSoul> Come to think of it, why does every fingerprint have four letters?
16:05:57 <elliott> fizzie: ruby?
16:06:02 <elliott> Object and Kernel or whatever
16:06:39 <b_jonas> elliott: and ObjectBase or BaseObject or something
16:07:17 <b_jonas> I think Object is the superclass for most classes, ObjectBase is the superclass of Objects and a superclass of every class, and Kernel is a module mixed into ObjectBase
16:07:23 <b_jonas> but there might be a fourth one
16:09:36 <b_jonas> and that's not eevn the strangest part of ruby
16:09:45 <b_jonas> it's complicated and I never really bothered to understand all the rules
16:12:51 <J_Arcane> Hah! This is neat. http://pasterack.org/pastes/4837
16:19:16 -!- impomatic_ has joined.
16:20:06 <Bike> i'm tellin ya. [[0 1][1 1]]^1000 * [0 1], done
16:35:26 <J_Arcane> I'm not sure how to turn that into a solution for the problem though, I only barely understand how Lazy Racket or that code snippet works.
16:43:18 -!- Phantom___Hoover has quit (Quit: Leaving).
16:44:18 <Bike> it's basically just a literal translation of the easy definition of the fibonacci numbers. "the fibonacci numbers are 1, 1, and then the sums of each fibonacci number with the next"
16:44:50 -!- Phantom_Hoover has joined.
16:45:06 -!- tswett has joined.
16:45:07 -!- tswett has quit (Changing host).
16:45:07 -!- tswett has joined.
16:45:13 <tswett> Hey guys.
16:45:35 <Bike> hey hey.
16:45:37 <Bike> hey.
16:47:13 <tswett> So, I need a job, or something job-like I can put on a resume.
16:47:58 <Bike> mickey d's
16:48:04 <tswett> My mathematical talents are pretty nice.
16:48:09 <tswett> That's an option, yup.
16:48:47 <tswett> But guy-who-is-good-at-math isn't a position that companies seem to be hiring a lot of.
16:50:05 <J_Arcane> Bike: that's about what I figured. I think maybe a higher-order function might be needed to get specific values out of it, but I'm not sure how you would safely short-circuit it.
16:50:09 <tswett> 'Cept, I dunno, IBM?
16:50:33 <Bike> J_Arcane: so you don't just need a value? i forget how this euler problem goes
16:50:42 <Bike> is it a sum of even entries or some shit
16:50:55 <J_Arcane> Bike: sum of all even values of the sequence under 4 million.
16:53:41 <Bike> (let ([sum 0] [switch #t]) (let/cc escape (map (lambda (x) (unless (< x 4e6) (escape sum)) (when switch (set! sum (+ sum x))) (set! switch (not switch))) fib)))
16:53:44 <Bike> n.b. i do not know racket
16:53:55 <Bike> also, this is slow as fuck, but you knew that
16:54:30 <Bike> tswett: be a quant clearly
16:54:44 -!- erdic has quit (Ping timeout: 250 seconds).
16:55:18 <J_Arcane> Yeah, I think the trouble is it's Lazy Racket, which has a more limited set of functions. It can call standard Racket functions, but it won't necessarily work (for instance, you can't call for/sum on the list, because it's not a list per se, it's a 'promise' of a list)
16:55:51 <Bike> no overloading? boo.
16:56:10 -!- AnotherTest has joined.
16:56:39 -!- erdic has joined.
17:05:06 -!- AnotherTest has quit (Ping timeout: 255 seconds).
17:08:25 <J_Arcane> Apparently you can force a list with (!!) but I'm not sure if that would be correct here.
17:10:42 <J_Arcane> Yeah, that just makes an infinite loop, obc.
17:32:22 <fizzie> > let fibs = 1:1:zipWith (+) fibs (tail fibs) in sum . filter even . takeWhile (<4000000) $ fibs -- obligatory "fibs" thing
17:32:23 <lambdabot> 4613732
17:35:23 <fizzie> > let evenFibs = 0:2:zipWith (+) evenFibs ((4*) <$> tail evenFibs) in sum . takeWhile (<4000000) $ evenFibs -- or with math(tm)
17:35:24 <lambdabot> 4613732
17:36:37 <fizzie> Based on F_{3n} = 4*F_{3(n-1)} + F_{3(n-2)}, OEIS A014445.
17:46:17 <HackEgo> [wiki] [[Fortob]] http://esolangs.org/w/index.php?diff=40363&oldid=40360 * GermanyBoy * (+1531) /* Command reference */ new section
17:46:46 -!- DootBot has joined.
17:46:46 <DootBot> DOOT DOOT!
17:46:58 <HackEgo> [wiki] [[Fortob]] http://esolangs.org/w/index.php?diff=40364&oldid=40363 * GermanyBoy * (+7) /* Number from 0 to 9 */ renamed
17:47:08 <Bike> > let fibs = 1:1:zipWith (+) fibs (tail fibs) in findIndex (>4000000) fibs
17:47:10 <lambdabot> Just 33
17:48:09 <Bike> > let fibs = 1:1:zipWith (+) fibs (tail fibs) in (fibs !! 34) - 1 -- lessee
17:48:11 <lambdabot> 9227464
17:48:17 <Bike> > let fibs = 1:1:zipWith (+) fibs (tail fibs) in (fibs !! 33) - 1
17:48:18 <lambdabot> 5702886
17:48:24 <Bike> > let fibs = 1:1:zipWith (+) fibs (tail fibs) in (fibs !! 33)
17:48:25 <lambdabot> 5702887
17:48:28 <Bike> drat.
17:48:33 <Bike> > let fibs = 1:1:zipWith (+) fibs (tail fibs) in (fibs !! 32)
17:48:35 <lambdabot> 3524578
17:49:23 <Bike> > let fibs = 0:1:zipWith (+) fibs (tail fibs) in (fibs !! 32)
17:49:24 <lambdabot> 2178309
17:49:27 <Bike> > let fibs = 0:1:zipWith (+) fibs (tail fibs) in (fibs !! 33)
17:49:28 <lambdabot> 3524578
17:49:31 <Bike> > let fibs = 0:1:zipWith (+) fibs (tail fibs) in (fibs !! 34)
17:49:32 <lambdabot> 5702887
17:49:38 <Bike> bleh.
17:53:14 -!- DootBot has quit (Remote host closed the connection).
17:58:12 -!- newsham_ has changed nick to newsham.
17:59:24 -!- Phantom_Hoover has quit (Ping timeout: 250 seconds).
18:01:28 -!- Tod-Autojoined2 has changed nick to TodPunk.
18:06:18 -!- Sasmit has joined.
18:06:23 <Sasmit> hi
18:07:51 -!- Sasmit has left.
18:16:51 <HackEgo> [wiki] [[Fortob]] http://esolangs.org/w/index.php?diff=40365&oldid=40364 * GermanyBoy * (+1431) /* Method reference */ new section
18:17:23 -!- FreeFull has quit.
18:35:03 -!- myndzl has changed nick to myndzi.
18:37:58 -!- Phantom_Hoover has joined.
18:41:15 <HackEgo> [wiki] [[Template:Infobox proglang]] http://esolangs.org/w/index.php?diff=40366&oldid=40084 * GermanyBoy * (+100) influenced
18:44:34 <HackEgo> [wiki] [[Template:Infobox proglang]] http://esolangs.org/w/index.php?diff=40367&oldid=40366 * GermanyBoy * (+376) align
18:44:46 <HackEgo> [wiki] [[Forobj]] http://esolangs.org/w/index.php?diff=40368&oldid=40211 * GermanyBoy * (+95) fortob
18:52:21 <HackEgo> [wiki] [[Template:Infobox proglang]] http://esolangs.org/w/index.php?diff=40369&oldid=40367 * GermanyBoy * (+280) more align
18:56:46 <HackEgo> [wiki] [[Template:Infobox proglang]] http://esolangs.org/w/index.php?diff=40370&oldid=40369 * GermanyBoy * (+131) links
18:57:20 <HackEgo> [wiki] [[Template:Infobox proglang]] http://esolangs.org/w/index.php?diff=40371&oldid=40370 * GermanyBoy * (+1) correction
18:59:35 <Melvar> ( :let fibs = 0 :: 1 :: [| fibs + tail fibs |]
18:59:35 <idris-bot> (input):1:26:When elaborating an application of function Prelude.Applicative.<$>:
18:59:35 <idris-bot> No such variable fibs
18:59:48 <Melvar> ( :let fibs : Stream Nat; fibs = 0 :: 1 :: [| fibs + tail fibs |]
18:59:48 <idris-bot> defined
19:08:01 -!- Sprocklem has quit (Ping timeout: 260 seconds).
19:09:53 -!- Sprocklem has joined.
19:55:00 -!- Phantom_Hoover has quit (Ping timeout: 250 seconds).
20:15:44 -!- FreeFull has joined.
20:52:45 -!- variable has quit (Ping timeout: 240 seconds).
20:54:38 -!- ais523 has joined.
20:54:42 -!- Bicyclidine has joined.
21:18:25 -!- quintopia has joined.
21:18:30 -!- quintopia has quit (Changing host).
21:18:30 -!- quintopia has joined.
21:27:32 -!- Phantom_Hoover has joined.
21:29:46 -!- callforjudgement has joined.
21:32:24 -!- ais523 has quit (Ping timeout: 255 seconds).
21:33:13 -!- callforjudgement has changed nick to ais523.
21:46:16 <fizzie> That's curious, I took a photo of a flower (or a piece of vegetation, anyway) and somehow it turned out to look a lot like some stock desktop background image, except for the vertical aspect ratio: https://dl.dropboxusercontent.com/u/113389132/Misc/20140830-bg.jpg
21:46:43 -!- AnotherTest has joined.
21:46:54 <Bicyclidine> phone background, duh
21:47:48 <fizzie> My phone is more or less landscape-only, so I didn't even think of that.
21:50:24 -!- oerjan has joined.
21:50:45 -!- AnotherTest has quit (Ping timeout: 240 seconds).
21:55:37 -!- variable has joined.
22:04:22 <oerjan> @tell Sgeo_ <Sgeo_> Would I be wrong in suspecting it's the traversal that forces the Traversable to be a specific instance? <-- it is type inference, it can be forced from whatever needs it to be a specific type, or it can sometimes be unambiguous in which case you may need type annotation.
22:04:23 <lambdabot> Consider it noted.
22:05:08 <ais523> oerjan: being /unambiguous/ means you need the annotation?
22:05:13 <oerjan> oops
22:05:21 <oerjan> @tell Sgeo_ *ambiguous
22:05:22 <lambdabot> Consider it noted.
22:05:33 <ais523> at least idris-bot stopped outputting several lines of errors if you asked it what 6 was
22:05:37 <ais523> because of all the possible 6s you could mean
22:05:41 <ais523> ^prefies
22:05:44 <ais523> ^prefixes
22:05:44 <fungot> Bot prefixes: fungot ^, HackEgo `, EgoBot !, lambdabot @ or ?, thutubot +, metasepia ~, idris-bot ( , jconn ) , blsqbot !
22:05:46 <ais523> ( 6
22:05:46 <idris-bot> 6 : Integer
22:05:56 <ais523> now it just picks an appropriate type
22:06:06 <ais523> :t 6
22:06:08 <lambdabot> Num a => a
22:06:27 <Melvar> I’m pretty sure it’s had Num defaulting all the time.
22:06:46 <oerjan> well haskell has a defaulting rule (default (Integer, Double)), presumably idris has something similar
22:08:45 <ais523> ( +
22:08:46 <idris-bot> (input):1:1: error: no implicit
22:08:46 <idris-bot> arguments allowed
22:08:46 <idris-bot> here, expected: ":",
22:08:46 <idris-bot> dependent type signature,
22:08:46 <idris-bot> end of input↵…
22:08:49 <ais523> ( (+)
22:08:49 <idris-bot> When elaborating an application of constructor __infer:
22:08:49 <idris-bot> Can't disambiguate name: Prelude.Classes.+, Prelude.Fin.+
22:08:56 <Melvar> Fractional literals aren’t overloaded yet, so the only default is Integer.
22:09:10 <ais523> what was it that produced the huge lists of ambiguity?
22:09:24 <Melvar> List syntax?
22:09:35 <ais523> ( []
22:09:35 <idris-bot> When elaborating an application of constructor __infer:
22:09:35 <idris-bot> Can't disambiguate name: Effects.Env.Nil, Data.HVect.Nil, Prelude.List.Nil, Data.Vect.Quantifiers.Nil, Prelude.Vect.Nil
22:09:53 <ais523> even that isn't that bad nowadays
22:09:55 <ais523> ( [6]
22:09:55 <idris-bot> When elaborating an application of constructor __infer:
22:09:55 <idris-bot> Can't disambiguate name: Effects.Env.::, Data.HVect.::, Prelude.List.::, Data.Vect.Quantifiers.::, Prelude.Stream.::, Prelude.Vect.::
22:15:09 -!- Phantom_Hoover has quit (Ping timeout: 255 seconds).
22:16:07 <Sgeo_> oerjan: but a pure profunctor lens cannot specify which incoming profunctor it's being given, that's forced upon it
22:16:20 <Sgeo_> iiuc
22:17:36 -!- copumpkin has quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…).
22:18:39 <oerjan> well right, but you were asking about Traversable and traversal
22:19:08 <oerjan> remember that traverse is a traversal which is entirely polymorphic in its Traversable, so if you use that the information _cannot_ be coming from it
22:19:50 <oerjan> but it's still one of the most useful ones
22:20:10 <Sgeo_> But can I write traversals which are specialized for a specific traversable? What traversal gets used for both?
22:20:12 <Sgeo_> :t both
22:20:14 <lambdabot> (Data.Bitraversable.Bitraversable r, Applicative f) => (a -> f b) -> r a a -> f (r b b)
22:20:36 <Sgeo_> :t toListOf both (1,2)
22:20:37 <lambdabot> Num a => [a]
22:20:40 <oerjan> "traversals" don't need to have any Traversable involved at all, they're a generalization of Traversables
22:21:02 <Sgeo_> :t toListOf both (1,'a')
22:21:03 <lambdabot> No instance for (Num Char) arising from the literal ‘1’
22:21:04 <lambdabot> In the expression: 1
22:21:04 <lambdabot> In the second argument of ‘toListOf’, namely ‘(1, 'a')’
22:21:15 <shachaf> what are you even doing Sgeo_
22:21:58 <Sgeo_> Trying to figure out how to get traversals into my mental model of how to do this stuff using pure profunctors in a dynamically typed language
22:22:40 -!- MoALTz__ has quit (Quit: Leaving).
22:24:16 <oerjan> the most common Bitraversable instance would be (,), presumably.
22:25:54 <oerjan> :t traverseOf
22:25:56 <lambdabot> Over p f s t a b -> p a (f b) -> s -> f t
22:26:47 <oerjan> oh well as if i have any idea
22:27:09 <shachaf> traverseOf = id hth
22:28:06 <shachaf> @quote unsafeCoerce
22:28:06 <lambdabot> copumpkin says: holy shit, I'm unsafeCoerce
22:28:17 -!- Patashu has joined.
22:28:45 <shachaf> @quote unsafeCoerce
22:28:45 <lambdabot> int-e says: What, unsafeCoerce# is kind-preserving? how boring :/
22:28:49 <shachaf> hm
22:29:13 <ais523> how many languages /don't/ have an unsafeCoerce equivalent?
22:29:53 -!- aloril has quit (Ping timeout: 240 seconds).
22:30:06 <ais523> (of all these languages, the only ones I feel should be allowed to get away with it are C, C++, and Rust, incidentally; C and Rust because reinterpreting sections of random memory is actually something the languages need to be able to do for their intended purpose, and C++ because it wants to be compatible with C)
22:30:09 <Bicyclidine> depends on what you're willing to consider equivalence, i say
22:30:35 <int-e> hmm, what about prolog? (I don't know)
22:30:51 <shachaf> ais523: Why is it justified for Rust and not (directly) for C++?
22:31:43 <ais523> shachaf: because the set of common uses for C++ is different from the set of common uses for C
22:31:50 <int-e> ais523: The question is open to interpretation. Does any language with a C FFI have an equivalent of unsafeCoerce in your view?
22:31:58 -!- aloril has joined.
22:32:11 <ais523> int-e: Prolog isn't typed; the closest thing it has to unsafeCoerce is =.., which is awesome
22:32:21 <ais523> defined as [a,b,c] =.. a(b,c)
22:32:23 <ais523> either way round
22:32:38 <ais523> this means that anything expressible in Prolog can be converted to lists of atoms
22:32:57 <ais523> (and there are other ways to convert atoms to and from lists)
22:33:14 <ais523> I guess it's not technically the same as reinterpreting memory, but it does have a way to cast anything to anything else
22:33:22 <ais523> (btw, I might have got the arguments to =.. backwards)
22:33:40 <int-e> oh it's a single level expression-to-sexpression operator.
22:34:02 <int-e> (and vice versa, I supppose, this being prolog)
22:34:22 <ais523> yes
22:34:55 <ais523> I remember seeing a Prolog-to-C FFI where you had to define a different C function for each possible combination of inputs and outputs the function accepted
22:35:13 <shachaf> ais523: Yes, but I asked about Rust.
22:36:00 <ais523> shachaf: in Rust, you can only use it inside unsafe{} blocks, whose purpose is to do low-level bit twiddling
22:36:06 <int-e> shachaf: btw that quote predates datakinds by several years.
22:36:15 <ais523> in particular, they often get the memory from elsewhere, where it's a u8* (that is, unsafe pointer to byte)
22:36:25 <oerjan> ais523: in haskell the accepted use of unsafeCoerce is when _you_ know the values _are_ the same type, but you don't have a way to get the type system to realize it.
22:36:30 <ais523> and being able to transmute that is very helpful if the actual type of the data is wrong
22:37:05 <ais523> oerjan: that seems like an unsafe operation even if you know it's safe, because if the compiler thinks the two expressions have different types, it might represent them differently in memory
22:38:26 <oerjan> ais523: you can only use unsafeCoerce on boxed types, which are essentially pointers.
22:38:57 <ais523> oerjan: represent the things they point to differently in memory, then
22:39:41 <int-e> oerjan: my favourite use is for reifying single-method class dictionaries, converting between Foo a => b and Foo_method_type a -> b, where Foo is a single method class. That's completely implementation-dependent, of course.
22:40:47 <oerjan> ais523: the Any type exists for that purpose, as a type that's guaranteed not to do anything unsafe with the pointer it contains.
22:41:02 <ais523> so it basically just copies the pointer around?
22:41:20 <ais523> even then, what if whatever it's pointing to gets deallocated? or do all types have identical GC properties?
22:41:29 <int-e> there's also the conversion between newtype and its base type, but the representation aware "coerce" should mostly take over there.
22:41:50 <oerjan> ais523: all types have a representation that includes enough information for the GC
22:41:56 -!- tswett has quit (Quit: tswett).
22:42:09 <oerjan> this is for ghc of course.
22:42:10 <ais523> oerjan: and that representation is stored in memory, rather than just being a property of the type?
22:42:36 <zzo38> I think the built-in types with # don't do any garbage collection, but they have a different kind anyways
22:42:38 <ais523> int-e: I'm reasonably annoyed with OCaml because I've actually had to start using :>
22:42:57 <ais523> which is basically a hint to the type-checker that tells it where to convert something from one type to another
22:43:30 <ais523> e.g. you can use :> to cast something from [`Foo | `Bar] to [`Foo | `Bar | `Baz], which is obviously a safe conversion, and something that the type checker can sometimes figure out itself but can't always
22:43:40 <oerjan> ais523: yes, see https://ghc.haskell.org/trac/ghc/wiki/Commentary/Rts/Storage/HeapObjects#HeapObjects
22:44:00 <zzo38> Of course unsafeCoerce can be useful when the way the types are used cannot be expressed
22:44:09 <int-e> zzo38: beware, there are too many # things, some of those are garbage collected
22:44:18 <ais523> this reminds me of OCaml, which basically reserves one bit of every word to mean "this is a pointer"
22:44:24 <ais523> so that the GC doesn't need to know anything about the type system to work
22:44:48 <ais523> I'm not sure how it handles unboxed floats and the like, which might potentially have the bit set incorrectly
22:44:48 -!- drdanmaku has joined.
22:46:00 <zzo38> Can unsafe{} blocks be useful for optimization too rather than only to indicate that it is using low-level bit twiddling?
22:46:19 <int-e> zzo38: they often come with another interesting assumption though: for example, an Array# value is never an indirection.
22:46:44 <int-e> (nor a thunk)
22:46:54 <ais523> zzo38: yes, normally in situations where you know an optimization is safe but the compiler doesn't
22:49:46 <elliott> ais523: ocaml floats are all boxed I think
22:51:31 <ais523> elliott: there has to be a box /somewhere/, but you can form unboxed arrays of floats which just store them all consecutively
22:51:47 <elliott> ais523: the GC must treat arrays differently
22:51:51 <elliott> how else would it know when to stop scanning?
22:51:59 <ais523> however, I think you might only be able to manipulate it through accessor functions which presumably have special GC propreties
22:52:04 <ais523> and yes, there has to be a special case there
22:53:40 <oerjan> ais523: also what i'm saying applies to ghc. the unsafeCoerce documentation has a note that "•In nhc98, the only representation-safe coercions are between Enum types with the same range (e.g. Int, Int32, Char, Word32), or between a newtype and the type that it wraps."
22:54:03 <oerjan> so presumably that compiler _does_ use varying representations.
22:55:12 <oerjan> although i suppose even there it would be safe to convert from a type to itself even if the compiler doesn't know at that point they're identical
22:58:28 <ais523> I find it relatively hard to imagine a type system in which two types can be identical without looking identical
22:58:50 <ais523> is the situation where you have a function along the lines of a -> b -> a except you know that b always has the same type as a in practice?
22:59:05 <oerjan> yeah things like that.
22:59:15 <Melvar> ( \n => Vect (n + 0) Integer
22:59:15 <idris-bot> \n => Vect (plus n 0) Integer : Nat -> Type
22:59:32 <oerjan> http://www.haskell.org/ghc/docs/latest/html/libraries/ghc-prim-0.3.1.0/GHC-Prim.html#v:unsafeCoerce-35-
22:59:41 <ais523> Melvar: \ => is a lambda?
22:59:48 <Melvar> Yes.
23:01:04 <Melvar> (Vect (n + 0) a) doesn’t unify with (Vect n a) even though it is the same type. In this case however one can prove they are the same and use the proof to convert them.
23:01:32 <ais523> Melvar: but you're using dependent typing, where determining whether two types are the same is uncomputable
23:01:47 <ais523> that said, even in much simpler languages, it can be difficult
23:02:09 <Melvar> Yeah, it’s “a type system in which two types can be identical without looking identical”, as you said.
23:02:11 <ais523> here's a trick question: in an Algol-like language, are (a, b) -> c and a -> (b -> c) the same type?
23:02:23 <ais523> Melvar: dependent typing is cheating for type system questions :-)
23:02:41 <ais523> (the reason it's a trick question is that you can write several chapters on the subject; it's a major part of my PHD thesis)
23:03:01 -!- Phantom_Hoover has joined.
23:03:08 <ais523> (and the main reason is because I used the syntax "(a, b)" without defining it, and there are at least two reasonable definitions)
23:07:27 <oerjan> ais523: one use of unsafeCoerce i remember is when elliott hacked together (on my suggestion, but i did _not_ suggest he implement it that way) a combination of Data.Sequence (essentially, finger tree based deques) with Data.Thrist (a form of list where the elements are _not_ the same type, but each is connected to the next like category composition)
23:08:21 <oerjan> he simply took the original Data.Sequence implementation and sprinkled it with unsafeCoerce in the right places so that he could use Any as the underlying type and just convert back and forth.
23:08:31 <shachaf> that reminds me of http://homepages.cwi.nl/~ploeg/papers/zseq.pdf
23:08:36 <shachaf> which i haven't actually read yet
23:09:09 <oerjan> you _could_ obviously implement that structure without unsafeCoerce, but it would have required defining entirely new data types and changing all of Data.Sequence to use them.
23:10:42 <oerjan> wait, he did not sprinkle unsafeCoerce _in_ the Data.Sequence implementation
23:10:57 <oerjan> he made a thin wrapper around it with such sprinkling.
23:11:18 <Melvar> oerjan: Why is it called Thrist? It seems to be the reflexive-transitive closure operator.
23:11:28 <oerjan> Melvar: threaded list, i assume
23:11:51 <shachaf> it seems to be the free category on a graph
23:12:49 <oerjan> i assume it would have been called FreeSomething if invented these days.
23:12:50 <shachaf> reflexive-transitive is the sort of thing i'd associate with relations, but you can have distinct values :: K A B
23:12:58 <shachaf> free hugs
23:15:19 <oerjan> thrist is to category as list is to monoid.
23:17:32 -!- ^v has changed nick to CarrotveePomm.
23:17:47 -!- CarrotveePomm has changed nick to ^v.
23:18:57 <shachaf> well, sort of
23:19:30 <shachaf> thrist isn't a free category on/over (what's the word?) a set
23:19:39 <Melvar> A Category looks exactly like a Preorder on Type.
23:23:01 <oerjan> a preorder is the same as a skeleton category iirc
23:23:10 <oerjan> or wait
23:23:27 <shachaf> no, a skeleton makes a preorder into a partial order
23:23:30 <oerjan> confusing terms here
23:23:59 <shachaf> a preorder is a category with at most one arrow : A -> B for each A and B
23:27:11 <Melvar> What, you actually restrict that?
23:27:14 <ais523> shachaf: well, that's sort-of twisting the definition of category to some extent
23:27:26 <ais523> the category axioms basically just give you reflexivity and transitivity there
23:28:13 <shachaf> ais523: what do you mean?
23:28:23 <ais523> shachaf: well the idea of a category is that it's very general
23:28:33 <ais523> so yes, you can fit a preorder into the categorical framework
23:28:40 <ais523> but that's because you can fit almost /anything/ into a categorical framework
23:28:59 <shachaf> i was responding to 16:23 <oerjan> a preorder is the same as a skeleton category iirc
23:29:20 <int-e> a set is a category with only identity morphisms
23:29:21 <ais523> right
23:29:30 <shachaf> anyway that's not really true
23:29:39 <ais523> int-e: a monoid is a category with one object
23:29:43 <ais523> I think
23:29:46 <int-e> ais523: yes
23:29:49 <oerjan> and i was responding (wrongly) to Melvar
23:29:49 <shachaf> there aren't that many algebraic structures that can be expressed directly as a category like that
23:30:05 <shachaf> a category is in a useful/interesting way a generalization of a monoid and of a preorder
23:30:06 <ais523> conclusion: something that is both a monoid and a set has one element, with no useful operations
23:30:21 <shachaf> (and of a set, because preorders are sets)
23:30:58 <ais523> for what I do at work, the main categorical structures I care about are those where objects can be interpreted as types, and morphisms as functions
23:31:00 <shachaf> but a category isn't a generalization of a ring or what-have-you
23:31:21 <ais523> shachaf: I know I've had to convert semirings to categories at my job
23:31:26 <oerjan> ais523: well that's the usual Hask category
23:31:28 <ais523> they still work fine as categories, you just need side conditions
23:31:34 <ais523> oerjan: it describes a large range of categories
23:31:35 <shachaf> you can talk about a category *of* rings or whatever structures you have but that's not the same thing
23:31:46 <ais523> even the subset of categories that work vaguely like type systems is pretty large and useful
23:44:23 -!- ^v has quit (Ping timeout: 240 seconds).
23:44:58 <zzo38> This quotation was found on Lambda the Ultimate: "Seriously now, I don't think such bloated languages are needed. What is needed is a programming language that is assembly, has nice S-expression syntax, and can also be 'executed' in compile-time. Then all other constructs can be made with this basic mechanism."
23:45:14 <zzo38> Well, I think, being 'executed' in compile-time is one of the main features of Forth.
23:45:32 <ais523> it's also one of the main features of Perl
23:45:52 <ais523> although Perl is unusual in that it switches between compiling and running frequently, on the fly
23:46:20 <ais523> there is the syntax BEGIN { ... } which tells the compiler to, as soon as it finishes compiling the inside of the BEGIN block, to run it
23:46:23 <ais523> before it goes back to compiling
23:46:34 <Bicyclidine> zzo38: forth with quotation, maybe
23:46:35 <ais523> and eval allows you to invoke the compiler at runtime
23:46:38 <zzo38> O, that's what it does?
23:46:52 <zzo38> Bicyclidine: What is Forth with quotation?
23:46:56 <Bicyclidine> common lisp has something like begin, with the notoriously bizarre eval-when operator
23:47:12 <Bicyclidine> zzo38: the assembly with "nice" syntax bla bla bla
23:47:38 <ais523> zzo38: yes, this means that a begin block can control the way that subsequent code is compiled, for instance
23:49:16 <Melvar> In idris, evaluation is needed for typechecking, and providers allow you to execute IO actions whose results can be used in typechecking.
23:50:36 <Bicyclidine> i have a lisp implementation i should finish that will ideally allow a slightly more usable version of sbcl's "define compiler intrinsics at runtime" stuff, but, dumb
23:50:48 <zzo38> Melvar: O, I didn't know it is possible to tamper with the typechecking in idris, but I suppose yes it can help
23:51:42 <ais523> zzo38: given that you didn't know what BEGIN does, I should probably explain "use", too; "use Foo::Bar;" is basically a synonym for "begin { require "Foo/Bar.pm"; Foo::Bar->import() } " except that IIRC it's a little cleverer about locating the file to import
23:52:03 <ais523> this sort of thing explains how syntax like "use constant" works, and why it starts with use
23:52:13 <ais523> there's a file constant.pm which injects constants into your namespace when you import it
23:52:15 <Bicyclidine> haa, it really is like CL, that's hilarious
23:52:47 <ais523> (in general, the "import" function's purpose is to inject stuff into its caller's namespace)
23:53:43 <b_jonas> and let me note that ruby specifically does not have this kind of escape from compile time to runtime, the BEGIN keyword in ruby runs a block early at runtime like perl's UNITCHECK, though of course ruby has an eval function to compile stuff at runtime
23:54:21 <b_jonas> ais523: as for a different note, I borrowed this classic book Aho, Ullman, "The Theory of Parsing, Translation and Compiling" (1972) which does seem like the book about formal languages I wanted
23:54:31 <ais523> actually, what shocked me more was discovering what syntax like "\ 4" does (that means "a reference to 4", sort-of like writing &4 in C)
23:54:49 <ais523> the reference is actually to the 4 in the parse tree of the compiled code
23:54:50 <zzo38> From what I have seen of Perl programs, it also requires that the included file returns 1 at the end.
23:55:04 <ais523> it's a read-only reference, so the fact doesn't matter, but I still think it's ridiculous
23:55:24 <b_jonas> ais523: yes it is. perl is full of crazy historical cruft like that that can't be changed now
23:55:24 <ais523> zzo38: "require" errors out if the required file doesn't evaluate to a truthy value
23:55:35 <ais523> any truthy value can be used, but 1 is traditional
23:56:07 <ais523> b_jonas: well, it's useful syntax, and thinking about it, there's no particular reason /not/ to do it like that
23:56:18 <ais523> you need a read-only copy of 4 to take a reference to
23:56:21 <ais523> and look, you have one already
23:56:52 <zzo38> ais523: Is that so that you can make the program to check if it is unusable and to have other files to read the return value to see if it is OK before continuing?
23:56:52 <Bicyclidine> the reference is actually to the 4 in the parse tree of the compiled code <- man that's almost as good as the regex introspect thing
23:57:14 <ais523> zzo38: yes, it's so that you have a way to signal that something went wrong
23:57:17 <Bicyclidine> wait, can you do &4 in C
23:57:20 <ais523> no
23:57:24 <Bicyclidine> oh ok.
23:57:38 <ais523> nor in C++ (just learned that one today)
23:57:50 <ais523> however, in modern C, you can take pointers to struct literals
23:57:55 <Bicyclidine> yesterday i learned that you can declare variables in if expressions in C++. i don't get C++'s deal
23:57:55 <ais523> &(struct foo){1, 2}
23:58:10 <ais523> Bicyclidine: huh, wonder if that works in C
23:58:20 <ais523> there are a couple of points in NetHack where that actually seems useful
23:58:20 <b_jonas> ais523: it does these days in C99 or C11, yes
23:58:21 <Bicyclidine> don't think so and hope not
23:58:35 <b_jonas> ais523: it's quite useful for for statements especially,
23:58:40 <ais523> although I guess you only get the one assignment
23:58:43 <ais523> b_jonas: obviously it's useful for for
23:58:47 <b_jonas> even if the syntax is just a limited shortcut
23:58:48 <b_jonas> yeah
23:58:50 * Bicyclidine doesn't even like doing it in for.
23:59:03 <Bicyclidine> ais523: the scope is to the rest of the if statement, you can reassign it
23:59:15 <ais523> Bicyclidine: oh right, for some reason I thought it'd only be for the conditional
23:59:17 <elliott> Bicyclidine: it's nice to stop iteration variables leaking up to the scope of the caller
23:59:23 <elliott> er, scope of the function
23:59:32 <b_jonas> I sometimes do it in perl
23:59:40 <ais523> but NetHack's full of stuff like if (((x = accessor_that_might_return_NULL)) && x->foo())
23:59:46 <ais523> err, remove the parens
23:59:51 <ais523> if (((x = accessor_that_might_return_NULL)) && x->foo)
23:59:57 <ais523> if (((x = accessor_that_might_return_NULL())) && x->foo)
23:59:59 <ais523> got it eventually
←2014-08-29 2014-08-30 2014-08-31→ ↑2014 ↑all