←2011-08-31 2011-09-01 2011-09-02→ ↑2011 ↑all
00:00:05 <ais523> out of existing languages, Feather is most visually similar to Smalltalk, but that's mostly because one of its design goals is "the syntax should look similar to Smalltalk's, regardless of whether it means the same thing or not"
00:00:41 <mauke> and something I haven't seen anywhere else: nested one-line comments
00:01:04 <elliott> how does that work?
00:01:08 <ais523> mauke: as in, # abc # def
00:01:12 <ais523> and they're two different comments?
00:01:19 <ais523> I don't see how that's different from one-line comments that don't nest
00:01:19 <mauke> easy. REM starts a comment
00:01:22 <mauke> newline ends a comment
00:01:26 <mauke> comments may be nested
00:02:08 <elliott> ah
00:02:11 <elliott> REM foo REM bar
00:02:12 <elliott> quux
00:02:12 <elliott> ?
00:02:27 <mauke> yep
00:02:44 <elliott> heh
00:03:04 -!- CakeProphet has joined.
00:03:04 -!- CakeProphet has quit (Changing host).
00:03:04 -!- CakeProphet has joined.
00:03:04 -!- adam__ has joined.
00:03:22 <mauke> if you look at the documentation, it doesn't bother to mention all the interesting stuff
00:03:32 <elliott> heh
00:03:45 <mauke> like how it's rather non-trivial to just parse a sequence of statements
00:04:03 <mauke> I'm not even sure you can write a grammar for ploki
00:04:32 <ais523> some non-eso languages have that property too, like perl 5
00:04:39 <mauke> perl has a yacc grammar
00:04:44 <mauke> boring
00:04:56 <elliott> yacc is TC
00:05:03 <elliott> so that says nothing other than "you can run perl"
00:05:45 <ais523> mauke: note that it has to run part of the program at compile time to manage that
00:05:53 <mauke> ais523: yes, just like lisp
00:05:57 <ais523> thus, parsing perl requires running arbitrary code, which might contain an infinite loop
00:06:00 <mauke> oldest trick in the book
00:06:02 <elliott> lisp doesn't have a grammar either
00:06:04 <elliott> (readtable)
00:06:14 <ais523> you'd think parsing Lisp would be easy
00:06:20 <mauke> ploki could (theoretically) be compiled, though
00:06:25 <mauke> it has no eval or anything
00:06:28 <elliott> then it has a grammar :P
00:06:36 <elliott> "Wiki Loves Monuments: Photograph a monument, help Wikipedia and win!" <-- umm, what
00:06:54 <mauke> elliott: you can try to write one and I will tell you how it's broken :-)
00:07:04 <elliott> mauke: if you can compile it, it has a grammar
00:07:10 <elliott> it might not have a grammar with very many nice properties, but it has one
00:08:31 <elliott> ??/ looks like a trigraph
00:08:35 <mauke> what you're saying sounds mathematically true but I still don't know how to write it down
00:08:57 <mauke> yeah, I put that in because trigraphs are a great eso feature
00:09:31 <elliott> mauke: well, if you want to compile it, you have to transform it; it's not much of a compiler if it can fail to halt (barring obscure bugs like GHC has), therefore you can make enough sense of the code to compile it down to a fixed number of operations that don't cheat (i.e. embedding an interpreter) in finite time, so you can parse it
00:09:43 <elliott> cheating is kind of a subjective notion so I'm not sure there is a reasonable mathematical statement of it
00:11:01 <mauke> as far as I know ploki doesn't fit in any parsing frameworks/generators/combinators
00:11:13 <mauke> so that's going to be fun
00:12:08 <elliott> those are usually fairly limited
00:12:13 <elliott> beyond embedding your own parser in a code block
00:12:23 <elliott> like i said, it might not have good properties, but it's certainly parseable :P
00:14:50 <oerjan> general chomsky grammars are TC
00:15:06 <augur> oerjan: what is a "general chomsky grammar"
00:15:21 <mauke> annd I think I found a bug
00:15:52 <oerjan> augur: type-0
00:16:09 <augur> oerjan: and why is that a "general chomsky grammar"
00:16:35 <elliott> chomsky opinions for a chomsky era
00:17:00 <oerjan> because it's called the "chomsky hierarchy", and it's a grammar by chomsky's definition without additional restrictions
00:17:36 <oerjan> and yes, it wasn't the technical term, that is type-0 grammar
00:17:48 <oerjan> which i had to look up to recall
00:17:56 <augur> oerjan: sure, but any grammar is type-0
00:18:03 <mauke> great, a bug in the optimizer
00:18:27 <augur> and even within the strictly type-0 grammars, only a subset of them are TC
00:18:31 <oerjan> augur: thus "general", you stupid git
00:18:43 <oerjan> er
00:19:03 <augur> further, why "general" and "chomsky" are used makes no sense to me
00:19:11 <oerjan> augur: type-0 grammars as a _whole_ is a TC formalism
00:19:35 <augur> its the class that you need for giving TC grammars in, sure
00:19:54 <oerjan> augur: because i didn't remember the correct term, and you lack sufficient reading comprehension to understand a simple phrase
00:19:56 <augur> but thue and post preceeded chomsky in the matter
00:19:57 <Sgeo> if (x >= 0) then '0' else 1 // this expression can be given a type!
00:20:01 <Sgeo> :?
00:20:08 <augur> chomsky just gave a hierarchy of such systems
00:20:41 <mauke> Sgeo: <interactive>:1:5: Not in scope: `x'
00:21:07 * Sgeo isn't talking about Haskell
00:21:09 <oerjan> augur: afaik he _invented_ these formal grammars
00:21:21 <augur> oerjan: when your knowing is wrong
00:21:22 * mauke is
00:21:22 <Sgeo> http://www.ats-lang.org/DOCUMENT/INTPROGINATS/HTML/x322.html
00:21:28 -!- adam__ has quit (Quit: leaving).
00:21:34 <elliott> <augur> but thue and post preceeded chomsky in the matter
00:21:35 <elliott> <augur> chomsky just gave a hierarchy of such systems
00:21:37 <elliott> :t curry
00:21:37 <oerjan> "When Noam Chomsky first formalized generative grammars in 1956,[1] he classified them into types now known as the Chomsky hierarchy."
00:21:38 <lambdabot> forall a b c. ((a, b) -> c) -> a -> b -> c
00:21:41 <elliott> :t schönfinkel
00:21:42 <lambdabot> Not in scope: `sch'
00:21:43 <elliott> augur: ?
00:21:50 <augur> elliott: O_O
00:21:51 <oerjan> augur: very well, go and correct wikipedia for me
00:22:02 <elliott> augur: well?
00:22:13 <augur> oerjan: generative grammars for describing languages
00:22:39 <oerjan> augur: oh well
00:22:39 <augur> rewrite systems of the same sort were used prior in the context of logic/math/cs for a while before chomsky
00:22:47 <mauke> Sgeo: does it have subtyping?
00:23:14 <augur> chomsky might have also given the first meta-analysis.
00:23:17 <elliott> augur: i assume you know what i'm talking about?
00:23:22 <augur> elliott: well what
00:23:22 <Sgeo> I have no idea, but ATS is type-obsessed, so I'm going to go with "probably"
00:23:36 <elliott> augur:
00:23:39 <elliott> <elliott> :t curry
00:23:39 <elliott> <lambdabot> forall a b c. ((a, b) -> c) -> a -> b -> c
00:23:40 <elliott> <elliott> :t schönfinkel
00:23:42 <elliott> <lambdabot> Not in scope: `sch'
00:23:48 <elliott> augur: why aren't you complaining to the haskell committee?
00:23:49 <augur> elliott: what about it
00:24:44 <augur> elliott: well for one, a name is not the same as an attribution, and for two, a false attribution is not the same as a real attribution
00:25:03 <elliott> "general chomsky grammar" sounds like a name to me
00:25:06 <elliott> not an attribution
00:25:19 <elliott> and currying is more rightly attributed to Schönfinkel
00:26:00 <augur> elliott: except chomsky's name isn't even remotely established as a name for a class of grammars
00:26:06 <augur> unless you mean in a linguistic context
00:26:22 <elliott> augur: you realise this is insufferable, right?
00:26:34 <augur> :)
00:26:37 <oerjan> elliott: yeah dammit he managed to get _me_ angry
00:27:00 <oerjan> ice coffee -->
00:27:15 <augur> plausibly, a chomsky grammar could be used to refer to a grammar in chomsky normal form
00:27:39 <kmc> @let schönfinkel = curry
00:27:40 <lambdabot> Defined.
00:27:53 <oerjan> :t schönfinkel
00:27:55 <lambdabot> Not in scope: `sch'
00:28:02 <oerjan> > schönfinkel
00:28:03 <lambdabot> Overlapping instances for GHC.Show.Show
00:28:03 <lambdabot> (((a, ...
00:28:03 <kmc> for some reason :t does not like non-ASCII characters
00:28:06 <augur> but its hard to see how it makes any sense to call string rewriting systems "chomsky grammars"
00:28:17 * oerjan wonders how that is parsed
00:28:22 <oerjan> :t (ö)
00:28:23 <lambdabot> parse error (possibly incorrect indentation)
00:28:32 <oerjan> > (ö)
00:28:33 <lambdabot> Not in scope: `
00:28:36 <elliott> :t is broken
00:28:37 <lambdabot> Not in scope: `is'
00:28:37 <lambdabot> Not in scope: `broken'
00:28:38 <elliott> as far as unicode goes
00:28:43 <elliott> oh kmc said that
00:29:01 <augur> :t schoenfinkel
00:29:02 <lambdabot> Not in scope: `schoenfinkel'
00:29:06 <kmc> > schönfinkel snd 2 3
00:29:07 <augur> oh if only it were smart like that!
00:29:08 <lambdabot> 3
00:29:27 <augur> curry fst = const :o
00:29:39 <kmc> mmy, currywurst
00:29:46 <augur> i agree
00:30:16 <cheater> i see my domination plan is running as expected
00:30:22 <oerjan> :t "ö"
00:30:23 <lambdabot> lexical error in string/character literal at end of input
00:30:31 <oerjan> :t "\ö"
00:30:32 <lambdabot> unexpected end-of-file in string/character literal at end of input
00:30:34 -!- Rotaerk has joined.
00:30:41 <oerjan> worse and worse
00:30:52 -!- Rotaerk has left ("Leaving").
00:31:27 <oerjan> cheater: your plan will be foiled when everyone on haskell-blah ends up talking about their esolang interpreters
00:31:56 <oerjan> using more notation
00:34:39 -!- cheater has quit (Ping timeout: 245 seconds).
00:35:44 <elliott> oh dear, I actually rely on fromInteger for tuples
00:36:11 <elliott> does anyone know a good way to track down the source of "error" calls in Haskell? :P
00:40:16 -!- Guest8904 has changed nick to Gregor.
00:42:57 <kmc> http://haskell.org/haskellwiki/FAQ#How_can_I_get_a_stack_backtrace_when_my_program_throws_an_exception.3F
00:43:31 <kmc> also http://hackage.haskell.org/package/spoon
00:43:33 <elliott> yeah, that's cheating though :P
00:43:40 <elliott> isn't something fancy coming up in the next release?
00:43:45 <elliott> or was that the release that came out
00:43:45 <kmc> i hadn't heard
00:43:52 <kmc> of GHC?
00:44:05 <elliott> something simon marlow on google+ that was linked on /r/haskell about solving the stack trace problem
00:44:31 <kmc> i like how in Haskell, hard things are easy and easy things are hard
00:44:32 <elliott> I don't think spoon helps me, since this is an erroneous call to fromIntegral
00:45:06 <elliott> kmc: https://plus.google.com/107890464054636586545/posts/XE4T6hHm3tK
00:45:15 <elliott> I guess it might be a while before that hits mainline GHC
00:45:38 <zzo38> Well, I did make esolang interpreter in Haskell once (actually it is the first Haskell program I wrote)
00:47:31 <elliott> <Shiro.Interpreter.coreIns,Shiro.Interpreter.CAF><Shiro.Interpreter.coreIns,Shiro.Interpreter.CAF><Shiro.Utils.ioFail,Shiro.Utils.CAF><Shiro.Value.CAF>shiro: fromInteger on tuple
00:47:34 <elliott> that's one user-friendly backtrace
00:49:15 <elliott> especially since coreIns has, like, a hundred pattern cases with completely orthogonal behaviour
00:50:33 <oerjan> fromInteger on tuple, i assume that's your error message since haskell is statically typed :P
00:51:41 <elliott> yep :P
00:51:58 <elliott> I should probably just define my own names for the two tuple operations I use
00:52:09 <elliott> oh
00:52:11 <elliott> I bet I know why oerjan
00:52:20 <elliott> instance (Num a, Num b) => Num (a,b) where
00:52:20 <elliott> (a,b) + (c,d) = (a+c, b+d)
00:52:20 <elliott> (a,b) - (c,d) = (a-c, b-d)
00:52:20 <elliott> -- These don't really make any sense
00:52:20 <elliott> (*) = error "(*) on tuple"
00:52:22 <elliott> abs = error "abs on tuple"
00:52:24 <elliott> signum = error "signum on tuple"
00:52:26 <elliott> fromInteger = error "fromInteger on tuple"
00:52:30 <elliott> oerjan: I use "negate" on tuples to do pointwise negation
00:52:37 <elliott> oerjan: previously, fromInteger a = (fromInteger a, fromInteger a)
00:52:42 <elliott> can you spot the problem? :P
00:52:54 <oerjan> yes, you actually need fromInteger to work then
00:53:06 <elliott> yep
00:53:09 <elliott> so I just need to define my own negate
00:53:55 <oerjan> @src negate
00:53:56 <lambdabot> negate x = 0 - x
00:54:01 <oerjan> oh hm no
00:54:07 <oerjan> oh wait yes
01:03:49 <oerjan> "ddarius: isJust :: Maybe a -> Bool; isJust = unsafeCoerce
01:03:51 <oerjan> "
01:04:20 <Gregor> Maybe a bool IS just unsafe coerce!
01:05:15 <oerjan> !haskell import Unsafe.Coerce; main = print (map unsafeCoerce [Just "so", Nothing, Just "hm..."] :: [Bool])
01:05:20 <elliott> oerjan: it works
01:05:23 <EgoBot> ​[True,False,True]
01:05:23 <elliott> we tested it when it happened recently
01:06:15 <oerjan> !haskell import Unsafe.Coerce; main = print (map unsafeCoerce [Left "what", Right "about", Left "this?"] :: [Bool])
01:06:20 <EgoBot> ​[False,True,False]
01:06:30 -!- MDude has joined.
01:06:37 <oerjan> ooh and what about...
01:06:43 <oerjan> !haskell import Unsafe.Coerce; main = print (map unsafeCoerce [Left "what", Right "about", Left "this?"] :: [Maybe String])
01:06:47 <elliott> oerjan: he expanded on it more
01:06:48 <EgoBot> ​[Nothing,Just "about",Nothing]
01:06:50 <elliott> anything with under four constructors works
01:06:50 <elliott> iirc
01:06:58 <oerjan> aha
01:07:07 <elliott> because of pointer tagging and bits and blah, presumably
01:07:14 <elliott> or was it <= four
01:07:45 <oerjan> oh you mean when the number of constructors are not the same
01:08:18 <ais523> haha, the FQA author proves that he isn't a troll by explaining that writing an entire FQA doesn't have a good cost/benefit response when it comes to trolling
01:08:56 <oerjan> "Cale: the units of the monoids in the algebras for the monoid monad
01:08:57 <oerjan> "
01:09:09 <oerjan> i'm not sure if i should want to understand that or not
01:09:20 <elliott> Shiro/FungeSpace.hs:85:22: Error: Use elem
01:09:20 <elliott> Found
01:09:20 <elliott> w == cr || w == lf
01:09:20 <elliott> Why not
01:09:20 <elliott> w `elem` [cr, lf]
01:09:22 <elliott> but hlint
01:09:24 <elliott> that could be slower :(
01:09:28 <oerjan> "the monoid monad" is [], i know
01:09:31 <ais523> monoids form a monad?
01:09:34 <ais523> ah, hmm
01:09:41 <ais523> that's a crazy terminology for it
01:09:54 <ais523> [] is more like a sort of ordered threading
01:09:57 <elliott> oerjan: Cale was just demonstrating how monads are like monoids in some way
01:09:58 <elliott> I think
01:09:59 <elliott> I forget how
01:10:44 <oerjan> ais523: every algebraic variety (such as monoids) gives a monad in the Set category of math. some of them (iiuc, those that don't require comparing terms for equality) also work in Hask.
01:10:48 -!- azaq23 has joined.
01:11:15 <ais523> just seeing the word "Hask" fills me with horror
01:11:32 <oerjan> ais523: well by that i mean that they correspond to haskell Monads.
01:11:37 <ais523> because it implies that a) Haskell forms a category (not surprising if you take an idealized version of it), and b) people use it enough to actually use it
01:11:42 <ais523> *to actually name it
01:11:46 <elliott> Haskell forms many categories
01:11:57 <elliott> no idealisation required
01:11:59 <ais523> umm, Haskell expressions form a category
01:12:11 <ais523> probably a cartesian closed one with symmetrical braiding
01:12:36 <ais523> if a programming language doesn't do that, computer scientists typically don't consider it worth thinking about
01:13:21 <ais523> (I tried to do that for Burro, and was a little disappointed that I couldn't find a decent tensor operator, which corresponds to tuple formation in most languages; interleaving tapes almost works except that it isn't associative)
01:13:22 <oerjan> it's close to cartesian closed, but i have a vague recall or hunch that bottoms maybe mess up the exact definition
01:13:58 <ais523> in fact, I actually hear computer scientists say "that doesn't form a cartesian closed category, you must have made a mistake"
01:14:16 <oerjan> istr something going wrong about products or coproducts/sums
01:14:32 <copumpkin> ais523: any cartesian monoidal category is symmetric
01:14:38 <ais523> copumpkin: I thought that might be the case
01:14:43 <ais523> but wasn't 100% sure I remembered the definition right
01:14:54 <copumpkin> oerjan: CPO\_\bot works pretty well for haskell
01:14:58 <copumpkin> including the bottoms
01:15:11 <copumpkin> and the composition of folds and unfolds
01:15:24 <copumpkin> in something like set, that doesn't work
01:15:26 <oerjan> copumpkin: you are over my head now, anyway :P
01:15:49 <elliott> copumpkin: get a ph.d., then you'll be down to oerjan's level
01:15:54 <copumpkin> lol
01:16:00 <copumpkin> I already quit one
01:16:08 <copumpkin> quitting two would be too much
01:16:13 <oerjan> my ph.d. didn't go that deep into category theory :P
01:16:40 <oerjan> there were some natural transformations and K-theory
01:17:55 <elliott> this code is so imperative :-(
01:18:45 <ais523> imperative is not necessarily bad
01:19:05 <ais523> I know that in the only ICFP contest I actually entered, I decided as soon as I saw the problem that an imperative solution would work best
01:19:16 <ais523> and wondered why on earth that was done in a contest attached to a functional programming conference
01:20:21 <oerjan> <copumpkin> oerjan: CPO\_\bot works pretty well for haskell <-- * me vaguely wonders if that's an actual math term based on complete partial orders (probably), or if there's an actual bot lurking on freenode somewhere
01:20:37 <copumpkin> lol no
01:20:40 <Nisstyre> I would tend to disagree with that viewpoint
01:20:42 <copumpkin> it's a category of complete partial orders
01:21:12 <oerjan> lollercoaster notation
01:22:27 <ais523> oerjan: I assumed it was a Freenode bot, and was wondering what the \_\ was for
01:22:39 -!- elliott has changed nick to CPO\_\bot.
01:22:40 <ais523> what does \_ mean in (presumably LaTeX) anyway?
01:22:40 <oerjan> ais523: hi five
01:22:42 <CPO\_\bot> YESSSSSS
01:22:43 <CPO\_\bot> S
01:22:53 <CPO\_\bot> ok I am going to make this into the best haskell evaluation bot EVER
01:23:04 <oerjan> ais523: i _suspect_ the first \ may be a typo
01:23:10 <ais523> it needs to do stuff with complete partial orders, too
01:23:14 <ais523> oerjan: oh, right, that would make sense
01:23:21 <ais523> and \_ would presumably be literal underscore?
01:23:33 <kmc> so what's CPO⊥ ?
01:23:34 <oerjan> i don't recall
01:23:39 <oerjan> kmc: complete partial order
01:23:46 <kmc> unfortunately Unicode lacks a "subscript ⊥" character
01:23:51 <oerjan> or wait
01:23:54 <kmc> i will write an angry letter to the Committee
01:23:57 <ais523> and adding bottom on there presumably means a complete partial order with bottom included?
01:24:05 <Gregor> kmc: They'll get it in right after Goat.
01:24:08 <ais523> clearly, Unicode needs combining superscript and subscript
01:24:11 <copumpkin> kmc: read http://www.cs.ox.ac.uk/ralf.hinze/SSGIP10/AdjointFolds.pdf
01:24:15 <CPO\_\bot> Deewiant: Actually, the new Fungespace might not be that far away :-)
01:24:31 <copumpkin> kmc: ignore the shitty fraktur :P
01:24:34 <CPO\_\bot> Sorry, I mean sparse discrete finite lahey-space.
01:24:36 <kmc> cool thanks
01:24:50 <CPO\_\bot> You haskellers have to promise to not say anything if a package meeting that description shows up on Hackage one day.
01:24:52 <oerjan> kmc: sorry my putty fonts acting up again (of all possible representations of an unknown character, why does it have to use a _blank space_?)
01:24:55 <copumpkin> who the fuck thought http://snapplr.com/aznr was a good idea?
01:25:21 <CPO\_\bot> copumpkin: GOTHIK HASKEL
01:25:29 <kmc> makes it look more metal
01:25:29 <CPO\_\bot> \m/
01:25:41 <ais523> I love the way "Lahey-space" sounds like a proper mathematical term
01:25:48 <ais523> when as far as I know, it's something that cpressey just made up one day
01:25:53 <CPO\_\bot> ais523: it's something Lahey made up one day
01:25:56 <oerjan> CPO\_\bot: the \m/ \m/ version requires two neighboring ones
01:25:56 <myndzi> `\o/´
01:25:56 <myndzi> |
01:25:56 <myndzi> /`\
01:25:56 <myndzi> (_| |_)
01:25:58 <kmc> instead of something that Gauss made up one day
01:26:03 <kmc> like the rest of maths
01:26:04 <ais523> ah, right
01:26:10 <CPO\_\bot> ais523: i was going to release my new fungespace on hackage as lahey-space, but Deewiant pointed out that there are tons of other lahey spaces than just fungespaces
01:26:18 <CPO\_\bot> so I need to come up with a sufficiently snappy but mathematical-sounding term for fungespace
01:26:20 <ais523> oerjan: was that /meant/ to set off myndzi's script?
01:26:21 <CPO\_\bot> that mentions lahey-spaces
01:26:23 <kmc> wow
01:26:35 <CPO\_\bot> \m/ \m/ \o/ ,o/
01:26:36 <myndzi> `\o/´ |
01:26:36 <myndzi> | >\
01:26:36 <myndzi> (_|¯`¯|_)
01:26:42 <CPO\_\bot> myndzi truly is a work of art.
01:26:48 <oerjan> <CPO\_\bot> ok I am going to make this into the best haskell evaluation bot EVER <-- i was hoping for something that did genuine category theory
01:26:50 <ais523> CPO\_\bot: it's also euclidean, isn't it?
01:26:57 <CPO\_\bot> ais523: heh
01:27:04 <CPO\_\bot> ais523: no, taxicab
01:27:04 <ais523> as in, there's nothing about Lahey-spaces that intrinsically makes them work like that
01:27:26 <ais523> well, it follows the normal rules for making a lattice as a subset of euclidean space
01:27:36 <CPO\_\bot> well sure
01:27:59 -!- Zuu has quit (Read error: Connection reset by peer).
01:28:02 <oerjan> ais523: all cpo's have bottom included i think, because that's the infimum of the whole set
01:28:23 <ais523> oerjan: all cpos /on a set that includes bottom/
01:28:32 <ais523> (yes, I know the apostrophe is technically correct, it still looks wrong)
01:28:53 <ais523> most of my dealing with preorders has been on finite sets
01:29:01 <ais523> also, I can never remember which of a partial order and a preorder is which
01:30:21 <oerjan> <ais523> oerjan: was that /meant/ to set off myndzi's script? <-- um yes.
01:30:38 <ais523> oh, I see
01:30:47 <ais523> I'd mentally placed your line in the wrong conversation
01:30:52 <ais523> and was having issues parsing it as a result
01:31:04 <ais523> I've been doing that more and more nowadays
01:31:15 <ais523> but it's not that common that the parsing of a sentence is as context-dependent as that, it's as bad as C++
01:32:02 <oerjan> ais523: bottom afaik is a term that applies inside a cpo :P
01:32:13 -!- Zuu has joined.
01:32:21 <ais523> hmm, obviously CPO means something that isn't complete + partial order
01:32:30 <ais523> it wouldn't be the first time that had happened in maths
01:32:37 <oerjan> i suspect the _\bot is a restriction on the _arrows_, not the objects
01:32:48 <oerjan> namely that they send bottoms to bottoms
01:32:58 <oerjan> (is my guess)
01:33:12 <oerjan> although that excludes non-strict functions, hm
01:33:13 <ais523> oh, there can be more than one bottom? I assumed it was meant to be a terminal object
01:33:33 <oerjan> no, just one bottom in each object.
01:33:53 <ais523> categories as applied to programming languages normally consider objects as types and arrows as functions between those types, and actual values don't get involved at all
01:33:58 <oerjan> each haskell type is represented by one set with a CPO structure, afaik
01:34:00 <ais523> except as degenerate functions
01:34:08 <oerjan> so each set has a bottom element
01:35:21 <oerjan> of course the Void data type may be such a terminal element which has only bottom in it
01:36:08 <CPO\_\bot> hmm, I should try out haskell-emacs I guess
01:37:46 <oerjan> and also because of haskell
01:38:17 <oerjan> 's nonstrictness, functions from Void to T are 1-1 with values in T
01:39:01 <CPO\_\bot> Hmm, is there any portable way to get the number of existing environment variables?
01:39:05 <oerjan> for a strict language you'd want functions from () to T instead, i assume
01:39:31 <oerjan> @hoogle getEnv
01:39:32 <lambdabot> System.Environment getEnv :: String -> IO String
01:39:32 <lambdabot> System.Environment getEnvironment :: IO [(String, String)]
01:39:36 <CPO\_\bot> oerjan: in C
01:39:42 <oerjan> oh
01:39:46 <CPO\_\bot> Or, I guess: How do you get the whole environment in Windows?
01:39:51 * oerjan slinks away
01:40:08 <CPO\_\bot> Deewiant? :-P
01:40:12 <zzo38> You use the SET command
01:40:24 <zzo38> I do not know how to do it in C or other programming languages.
01:41:40 <oerjan> !haskell length `fmap` System.Environment.getEnvironment
01:41:43 <EgoBot> 35
01:42:38 <zzo38> I found out I have a file on my computer about the rules for "Uncyclopedian Poker". The deck contains 172 cards, 32 of which are Wilde cards. The game involves the "toilet" and the "tax collection".
01:43:25 <zzo38> Apparently an ace of spades is called a "half-motor" in this game.
01:44:41 <ais523> <kurin> If it works for him, that's great, but I would happily drop cinder blocks on my feet to get away from this architecture. <twerq> Does that work?
01:44:59 <CPO\_\bot> ais523: here, do you know how to access the environment from Windows C?
01:45:28 <ais523> CPO\_\bot: it depends on what version of Windows C you're using; I've even seen some where it was "third arg to main"
01:45:41 <ais523> but at least in Windows 3.1, I think they provided a getenv with moderately posixy semantics
01:45:57 <CPO\_\bot> ais523: yes, but I want more than getenv/putenv give
01:46:19 <ais523> also, here's a fun one: did you know that the fourth arg to main is a struct, one of whose elements contains random numbers?
01:46:23 <ais523> I haven't figured out what it's for yet
01:46:26 <ais523> also, this seems specific to ELF
01:46:46 <ais523> which gives a bit of a mental disconnect to me, "why should the fourth arg to main depend on what format the executable has"
01:47:05 <ais523> either that, or I misread kernel source, as I don't think it's documented anywhere I've read
01:47:08 <CPO\_\bot> it's not random
01:47:11 <CPO\_\bot> they're the ELF header, I think
01:47:52 <ais523> oh, here we go: http://articles.manugarg.com/aboutelfauxiliaryvectors.html
01:47:55 <ais523> CPO\_\bot: not the header, exactly
01:48:03 <ais523> they're info from the header filled into a struct by the ELF loader
01:48:07 <CPO\_\bot> same thing :P
01:48:17 <ais523> but not all the info is from the header, one of the slots is just a bunch of random numbers
01:48:29 <ais523> not random as in unclear what they're for, random as in reading from /dev/urandom
01:48:43 <ais523> I'm wondering if I should try to stabilise them in the Secret Project, or whether nobody ever uses them anyway
01:49:05 <ais523> there are other ways to fool the Secret Project, so worrying about that one seems like overkill
01:49:12 <CPO\_\bot> ooh, what's one way
01:49:20 <ais523> getting gdb involved, in any way at all
01:49:26 <ais523> the Secret Project actively resists being debugged
01:49:31 <ais523> or running on debuggers
01:49:40 <ais523> in fact, I haven't even managed to get it to coredump
01:49:51 <ais523> as a bonus, it also causes valgrind to crash with an internal error
01:50:12 <ais523> (in valgrind, that is)
01:50:28 <CPO\_\bot> ais523: hmm, as in, it has actual code to thwart debuggers?
01:50:34 <CPO\_\bot> now I'm thinking there must be some kind of untrusted element to it
01:50:44 <CPO\_\bot> reproducibly running student code in a sandbox?
01:50:45 <ais523> CPO\_\bot: not deliberately
01:50:48 <CPO\_\bot> aw
01:50:52 <CPO\_\bot> I thought I was on to something there
01:50:59 <ais523> or, in, it does have code to thwart debuggers, but that code is not there for the purpose of thwarting debuggers
01:51:13 <CPO\_\bot> right
01:51:24 <ais523> just code that does things that only a debugger would do
01:51:57 <ais523> and it's thwarting those things because they contend for access to tracepids with the secret project itsel
01:51:59 <ais523> *itself
01:52:37 <ais523> (I still don't get how I ended up with a process that wasn't a zombie, had apparently no parent, couldn't be killed with any signal at all (not even -9 as root) and was apparently being debugged by the real init, though...)
01:52:54 <ais523> (possibly a kernel bug, the secret project's probably going to expose a bunch of those as a side-effect)
01:53:13 <ais523> and it's not like I could just tell init to stop debugging it
01:54:33 <ais523> I fixed it by rebooting, in the end
01:54:45 <ais523> although not immediately, the situation wasn't doing any /harm/ other than being massively confusing
01:55:02 <oerjan> !haskell filter Unsafe.Coerce.unsafeCoerce [Left 1, Right 2, Left 3, Right 4]
01:55:05 <EgoBot> ​[Right 2,Right 4]
01:55:20 <CPO\_\bot> Shiro/Types.hs:19:10: Warning: orphan instance: instance Show Any
01:55:21 <CPO\_\bot> <no location info>:
01:55:21 <CPO\_\bot> Failing due to -Werror.
01:55:22 <CPO\_\bot> oh /come on/
01:55:25 <ais523> oerjan: wait what?
01:55:32 <CPO\_\bot> ais523:
01:55:35 <CPO\_\bot> ?quote ddarius unsafeCoerce
01:55:35 <lambdabot> ddarius says: isJust :: Maybe a -> Bool; isJust = unsafeCoerce
01:55:39 <ais523> is this something to do with Either's definition of a monad?
01:55:57 <CPO\_\bot> what?
01:55:59 <CPO\_\bot> no
01:56:01 <zzo38> Does that work?
01:56:06 <CPO\_\bot> it's to do with GHC's pointer representation
01:56:08 <CPO\_\bot> zzo38: yes
01:56:10 <ais523> ah, I see
01:56:15 <ais523> @src isJust
01:56:15 <lambdabot> isJust Nothing = False
01:56:15 <lambdabot> isJust _ = True
01:56:24 <ais523> bleh, I was hoping it would be defined /as/ unsafeCoerce
01:56:27 <zzo38> I don't think you should write it that way except possibly in an optimization rule
01:56:48 <oerjan> !haskell Data.Maybe.catMaybes $ Unsafe.Coerce.unsafeCoerce [Left 1, Right 2, Left 3, Right 4]
01:56:51 <EgoBot> ​[(),()]
01:56:53 <zzo38> As an optimization rule, write it that way but leave a note in case it stops working in a different version or on different computers
01:56:59 <oerjan> ah hm
01:57:08 <oerjan> !haskell Data.Maybe.catMaybes $ Unsafe.Coerce.unsafeCoerce [Left 1, Right 2, Left 3, Right 4] :: [Integer]
01:57:11 <EgoBot> ​[2,4]
01:57:18 <ais523> :t Unsafe.Coerce.unsafeCoerce
01:57:18 <lambdabot> forall a b. a -> b
01:57:22 <ais523> I thought os
01:57:23 <ais523> *so
01:57:28 <ais523> hmm, this is reminding me of Ursala
01:57:30 <CPO\_\bot> <zzo38> As an optimization rule, write it that way but leave a note in case it stops working in a different version or on different computers
01:57:34 <ais523> which did that sort of thing to /everything/
01:57:35 <CPO\_\bot> zzo38: it already optimises down to that at runtime, almost certainly
01:57:37 <CPO\_\bot> this is just a silly trick
01:57:46 <ais523> Overload did too, I suppose
01:57:47 <CPO\_\bot> ais523: I still think Ursala was actually really interesting
01:57:59 <ais523> CPO\_\bot: it had interesting ideas there, they were just assembled in an insane way
01:58:06 <ais523> it reminds me quite a bit of Overload, actually
01:58:19 <CPO\_\bot> hmm, what's the standard operator for vector+vector again?
01:58:22 <CPO\_\bot> .+.?
01:58:27 <zzo38> Describe more about Overload?
01:58:46 <CPO\_\bot> <monochrom> @quote ddarius isJust
01:58:46 <CPO\_\bot> <lambdabot> ddarius says: isJust :: Maybe a -> Bool; isJust = unsafeCoerce
01:58:46 <CPO\_\bot> <monochrom> ddarius wins!
01:58:50 <ais523> zzo38: the language that Underload is a tarpit of, it has things like equivalences between characters and lists of strings, and pointers
01:58:50 <CPO\_\bot> ok, who's the spy :D
01:59:20 <ais523> and is possibly internally consistent, but large and sprawling and unmaintainable
01:59:22 <zzo38> ais523: You told me that before. Write more about Overload in the [[Talk:Underload]] page in Esolang wiki
01:59:39 <ais523> there isn't much more to write
01:59:40 <CPO\_\bot> ais523: or ELSE
01:59:44 <ais523> I have some unfinished interps you can look at
01:59:50 <ais523> if you want to get an idea of what the lang is like
02:00:00 <zzo38> ais523: OK, post those to the [[Talk:Underload]].
02:00:07 <ais523> nah, it's an entirely unrelated language
02:00:14 <ais523> that Underload is a tarpit of Overload is mostly just coincidence
02:00:20 <ais523> or, umm, historical etymology, or something
02:00:23 <CPO\_\bot> !haskell print (Unsafe.Coerce.unsafeCoerce False :: Maybe Int)
02:00:24 <zzo38> Then post it on your user page.
02:00:25 <CPO\_\bot> !haskell print (Unsafe.Coerce.unsafeCoerce True :: Maybe Int)
02:00:26 <EgoBot> Nothing
02:00:30 <ais523> the only real evidence is that <>[] are reserved in Underload for no apparent reason
02:00:32 <CPO\_\bot> !haskell print (Unsafe.Coerce.unsafeCoerce True :: Maybe Int)
02:00:34 <EgoBot> ​./interps/ghc/runghc: line 7: 30354 Segmentation fault ghc -O2 -e "`cat $1`" 2> /dev/null
02:00:35 <ais523> I'll just post it in-channel, seems simplest
02:00:40 -!- CPO\_\bot has changed nick to elliott.
02:00:47 <elliott> !haskell print (Unsafe.Coerce.unsafeCoerce False :: Maybe ())
02:00:49 <EgoBot> Nothing
02:00:51 <elliott> !haskell print (Unsafe.Coerce.unsafeCoerce True :: Maybe ())
02:00:53 <EgoBot> ​./interps/ghc/runghc: line 7: 30718 Segmentation fault ghc -O2 -e "`cat $1`" 2> /dev/null
02:01:08 <ais523> oh wow, this code is /old/
02:01:16 <ais523> anyone here recognise pre-standard C++?
02:01:24 <oerjan> <CPO\_\bot> ok, who's the spy :D <-- it was in today's haskell weekly news
02:01:25 <elliott> yikes
02:01:30 <elliott> oerjan: heh
02:01:37 <ais523> at least, it appears to be ifdeffed between pre-standard C++ and nonidiomatic standard C++
02:01:37 <zzo38> Obviuosly the constructor for True takes no parameters while Just does take some, so it would try to access unallocated memory, I think.
02:01:48 <elliott> oh no, my mouse is doing that thing again
02:01:58 <ais523> I liked pre-standard C++, it was not yet insane
02:02:10 <elliott> also,
02:02:11 <elliott> <CPO\_\bot> hmm, what's the standard operator for vector+vector again?
02:02:11 <elliott> <CPO\_\bot> .+.?
02:03:23 <zzo38> Do you know how to play Pasur or Scope? I know how to play these card games. I also know how to play (two variants of) Scopone Scientifico, maybe I can invent Scopone Frobozzica.
02:03:33 <ais523> oh, real wow, this code uses macros that use stringisation just so their arguments don't need to be double-quoted
02:03:45 <ais523> meanwhile, attempting to pastebin it has frozen Firefox
02:03:54 <ais523> I'm waiting for Firefox to unfreeze so I can show you
02:03:57 <ais523> or maybe I'll just use Sprunge
02:03:59 <zzo38> Then use sprunge
02:04:11 <zzo38> I always use sprunge.
02:04:26 <zzo38> Sprunge does not require a web browser to work properly.
02:04:27 -!- edwardk has joined.
02:04:45 <oerjan> ANOTHER ONE
02:04:52 <zzo38> Which means it can be accessed without requiring loading the web browser program.
02:04:57 <ais523> wow, pastie has also doubled all the newlines
02:05:07 <ais523> I think because it's so old it uses \r\n line-endings
02:05:10 <edwardk> i haven't wandered out of my native #haskell in a while, but i'm not THAT much of a stranger =P
02:05:12 <elliott> edwardk: ok, who is responsible :D
02:05:30 <edwardk> elliott: kmc talking about currywurst
02:05:31 <ais523> (it also has a "C/C++" highlighting option, which is an appropriate description of the language the interp is actually written in)
02:05:43 <ais523> zzo38 (and other people interested in Overload): http://pastie.org/private/9a3ws8d7h71xdadmv4aqfg
02:05:45 <oerjan> wtf is currywurst
02:06:04 <zzo38> Now I have to load the web browser program, but, OK
02:06:07 <elliott> ais523: I don't read double-spaced code
02:06:20 <edwardk> apparently something that kmc likes to eat
02:06:27 -!- augur has quit (Ping timeout: 258 seconds).
02:06:29 <zzo38> Why is it double spaced?
02:06:35 <ais523> because it uses \r\n newlines
02:07:10 <zzo38> Oops it got cut off
02:07:23 <ais523> http://sprunge.us/hMUA?cpp seems to be singlespaced
02:07:29 <ais523> so you can read that instead
02:09:19 <zzo38> I have a file of poker variants including: Draw-Stud Poker, Crap Poker, Bug Poker, Janken Poker, Baccarat Poker, Leg Poker, Dynamic Poker, Pokemon Card Poker, Pokino, Uncyclopedian Poker, Dungeon Poker, Steamship Poker, etc
02:12:00 <ais523> wow, my computer ran out of memory at 32K of heap? that program must be old
02:12:08 <zzo38> To play Scope: You need a deck of forty cards, consisting of numbers one to ten of each of four suits. One suit is money. Give three cards to each player and four cards on the floor.
02:12:50 -!- augur has joined.
02:14:16 <zzo38> On your turn, select one card from your hand and play that card. If it is the same rank as one of the cards on the floor, you *must* take that one, and you put both cards in your score pile. (If there are multiples of that rank, you can select which one you want.) Otherwise, you can either leave it on the floor, or take that card together with any number of cards from the floor that add up to the card in your hand (for example, if you play 7 yo
02:14:43 <zzo38> If you played the card resulting in no cards on the floor, you make a scope and immediately earn one point.
02:14:46 <ais523> zzo38: the line was cut off, at "play 7 yo"
02:15:04 <zzo38> u can get 4 and 3)
02:15:35 <zzo38> If both players have no cards in hand, deal three cards to each player again. The last card played in the entire game does not make a scope even if it picks up everything.
02:15:36 <ais523> elliott: zzo38: for a hint of what Underload is like, look at "EnsureUncar", its purpose is to ensure that a particular list is the first element of another list
02:15:43 <ais523> as in, of some other list
02:15:48 <elliott> "Underload"
02:15:52 <ais523> or, actually, I think any element of some other list
02:15:54 <ais523> and, right, Overload
02:16:04 <ais523> I don't type Overload's name much, my fingers were confused
02:16:15 <zzo38> After all cards are played, if any cards remain on the floor, whoever took cards into their scoring pile last takes all the remaining cards on the floor.
02:16:48 <zzo38> And then you count points. If you have more cards than opponent you get 1 point. If you have more money than opponent you get 1 point. If you have the seven of money then you get 1 point. If you make premere you get 1 point.
02:16:49 <ais523> hmm, the data structure Overload uses doesn't have a name
02:16:50 <elliott> oh my god, -Wall is complaining about the horrific function
02:16:55 <ais523> I think I'll call it "the quadruply linked list"
02:17:02 <ais523> elliott: in Overload? or in your code?
02:17:09 <elliott> my code
02:17:30 <ais523> I hate to think what -Wall's reaction would be to that code
02:17:36 <zzo38> To figure out the premere, each player reveals one card of each suit, of the highest ranking card. For the purpose of premere, the cards rank in this order (from highest to lowest): 7, 6, 1, 5, 4, 3, 2, 10, 9, 8.
02:17:37 <ais523> although at least it /compiles/ with an old version of g++
02:17:41 <ais523> it's really horribly written
02:18:05 <zzo38> (I don't know why the cards are ranked like this; I did not invent this game.)
02:18:08 <ais523> oh, I just figured out what // wmw-dependent means
02:18:12 <ais523> I think it means "what means what"
02:18:28 <zzo38> Match is played up to eleven points.
02:18:28 <ais523> #define OVCMD(a) InsBefore(&ITOS, new TListEl("(" #a ")",1),1); goto eval
02:18:49 <zzo38> Now do you know how to play this game?
02:19:07 <ais523> oh good, for a moment I thought that code was literally replacing abbreviations with their expansions in the actual code, but it's saner than that
02:19:30 <ais523> (in Underload, if you do this you don't notice, as it happens only as they're executing; in Overload you can go and look back at previously executed code using pointers)
02:20:34 <ais523> and , is possibly the most Overloady instruction of all; it returns a pointer to itself
02:20:40 <ais523> as in, to the , operation
02:21:15 <ais523> I suppose gnu C has the equivalent "a: void* p = &&a;", which is as close as you can get in any other lang
02:22:11 <zzo38> I think LLVM can point to labels, although they can only be used for indirect branch instructions, and only in the same function
02:22:57 <ais523> in Overload, you used that sort of trick to, say, get a pointer to the IP, then move it to the end of the current function to get the return address, and follow that
02:25:21 <zzo38> I invented an instruction set and computer system on a sheet of paper.
02:26:35 <zzo38> It does have an instruction which can save a pointer to the immediately following instruction into a register: MOV A P
02:28:39 <oerjan> !haskell map Unsafe.Coerce.unsafeCoerce [[1,2],[3,4,5],[6,7,8,9]] :: [Maybe Integer]
02:28:41 <EgoBot> ​[Just 1,Just 3,Just 6]
02:29:58 <oerjan> !haskell map Unsafe.Coerce.unsafeCoerce [[1,2],[3,4,5],[6,7,8,9],[]] :: [Maybe Integer]
02:30:01 <EgoBot> ​[Just 1,Just 3,Just 6,Nothing]
02:30:31 <zzo38> oerjan: Can you guess that? I think it is probably possible to do so. In fact that seems a possible usefulness. It should be written as a function not using unsafeCoerce and then optimized into unsafeCoerce (use a RULES pragma if the compiler cannot do it by itself)
02:31:10 -!- CakeProphet has quit (Quit: Reconnecting).
02:31:15 -!- CakeProphet has joined.
02:31:15 -!- CakeProphet has quit (Changing host).
02:31:15 -!- CakeProphet has joined.
02:31:29 <CakeProphet> :t toJust
02:31:30 <lambdabot> Not in scope: `toJust'
02:31:34 <CakeProphet> lulz
02:31:44 <CakeProphet> @hoogle [a] -> Maybe a
02:31:45 <lambdabot> Data.Maybe listToMaybe :: [a] -> Maybe a
02:31:45 <lambdabot> Data.List find :: (a -> Bool) -> [a] -> Maybe a
02:31:45 <lambdabot> Prelude head :: [a] -> a
02:32:10 <CakeProphet> > map listToMaybe [[1,2],[3,4,5],[6,7,8,9],[]]
02:32:11 <lambdabot> [Just 1,Just 3,Just 6,Nothing]
02:32:26 <zzo38> I think I can understand why unsafeCoerce does that on those operations.
02:32:29 <CakeProphet> @src listToMaybe
02:32:30 <lambdabot> listToMaybe [] = Nothing
02:32:30 <lambdabot> listToMaybe (a:_) = Just a
02:32:40 <CakeProphet> zzo38: yes, think of it as a C-style cast.
02:32:50 <zzo38> CakeProphet: Yes it is what I thought of.
02:32:53 <elliott> thinking of it as a C-style cast does not fully explain why it works for isJust.
02:32:53 <CakeProphet> and then imagine what the internal representations of those data types might look like.
02:32:59 <elliott> you have to understand the pointer tagging GHC does.
02:33:01 <kmc> it's more like a C++ reinterpret_cast than a C cast
02:33:02 -!- preflex has quit (Ping timeout: 264 seconds).
02:33:10 <kmc> because C's casts can alter bitwise representation too
02:33:14 <kmc> e.g. casting int to double
02:33:27 <zzo38> kmc: But it is a pointer cast.
02:33:34 <kmc> sure you can think of it that way
02:33:40 <kmc> GHC's unsafeCoerce is always a no-op at runtime
02:33:54 <kmc> it just tells the typechecker to fuck off in the most unsubtle way possible
02:34:23 <zzo38> Can GHC optimize other operations into unsafeCoerce if you wrote them in a way which it can do so?
02:34:52 <kmc> wrapping/unwrapping a newtype is also a no-op at runtime
02:35:11 <zzo38> Yes, I know that too.
02:35:43 <CakeProphet> zzo38: you could write such optimizations via RULE, of course.
02:36:15 <zzo38> CakeProphet: Yes, it is what I am thinking of; you could do that. What I mean is if it can do it by itself. If it cannot, then you should use rule pragmas.
02:36:29 <CakeProphet> right, I understood, my response just wasn't helpful. heh
02:37:13 <zzo38> Other than rule pragmas, the only other thing I think you should ever use unsafeCoerce for is when using FFI codes.
02:37:49 <oerjan> !haskell Control.Monad.filterM Unsafe.Coerce.unsafeCoerce [[1,2],[3,4],[5,6]] :: [[Integer]]
02:38:20 <CakeProphet> forgot to print. ;)
02:38:34 <oerjan> no it does that
02:38:39 <CakeProphet> ah.
02:38:45 <oerjan> but it was an error
02:39:12 <CakeProphet> :t unsafeCoerce
02:39:13 <lambdabot> Not in scope: `unsafeCoerce'
02:39:16 <oerjan> !haskell !import Control.Monad; import Unsafe.Coerce; main = print (filterM unsafeCoerce [[1,2],[3,4],[5,6]] :: [[Integer]])
02:39:19 <oerjan> er
02:39:20 <edwardk> zzo38: i occasionally use it to add observable sharing
02:39:24 <oerjan> !haskell import Control.Monad; import Unsafe.Coerce; main = print (filterM unsafeCoerce [[1,2],[3,4],[5,6]] :: [[Integer]])
02:39:27 <CakeProphet> well b = m Bool here
02:39:35 <CakeProphet> in unsafeCoerce :: a -> b
02:39:35 <edwardk> zzo38: where the type being discarded is provably irrelevant
02:39:48 <oerjan> !haskell import Control.Monad; import Unsafe.Coerce; main = print (filterM unsafeCoerce [[1,2],[3,4],[5,6]] :: [[Integer]])
02:40:05 <oerjan> oops
02:40:24 <edwardk> foo (Left a) = Left a -- this case can be rewritten using an unsafeCoerce for instance
02:41:21 <elliott> hmm, is it (*+*) or (.+.)...
02:41:25 <oerjan> > filterM (const [True]) [1,2,3]
02:41:26 <lambdabot> [[1,2,3]]
02:41:51 <oerjan> oh hm
02:42:10 <oerjan> !haskell import Control.Monad; import Unsafe.Coerce; main = print (filterM (const . unsafeCoerce) [[1,2],[3,4],[5,6]] :: [[Integer]])
02:42:39 <oerjan> 04:43 =EgoBot> Execution of /tmp/input.24301 aborted due to compilation errors.
02:43:30 <CakeProphet> helpful
02:43:59 <oerjan> @hoogle .+.
02:44:00 <lambdabot> No results found
02:44:03 <oerjan> @hoogle *+*
02:44:04 <lambdabot> No results found
02:45:09 <oerjan> oh wait @hoogle has only a few packages
02:45:14 <Lymee> @hoogle fix
02:45:14 <lambdabot> Data.Function fix :: (a -> a) -> a
02:45:14 <lambdabot> Control.Monad.Fix fix :: (a -> a) -> a
02:45:14 <lambdabot> module Control.Monad.Fix
02:45:20 * elliott tries hayoo
02:45:34 <elliott> nothing found for (.+.) :-(
02:45:51 <oerjan> why don't you look up a vector package
02:46:14 <zzo38> Do you know about the BLISS programming language? It also has some stuff including macros that you do not find in others, maybe it can be combined with LLVM somehow to make something
02:46:44 <elliott> oerjan: I tried
02:46:51 <elliott> they all had alphabetical operations :(
02:46:57 <oerjan> huh
02:47:09 <elliott> like mxm, mxv or whatever
02:47:11 <elliott> ugly
02:47:28 <oerjan> haskellers who don't make up new operators whenever possible? impossible!
02:48:22 <kmc> i love that y'all have a bot with unsafeCoerce
02:48:23 <Lymee> @define unsafeCoerce = fix ($)
02:48:28 <kmc> i assume it's heavily sandboxed
02:48:30 <Lymee> @def unsafeCoerce = fix ($)
02:48:31 <lambdabot> Maybe you meant: bf do let
02:48:37 <Lymee> @let unsafeCoerce = fix ($)
02:48:37 <lambdabot> Defined.
02:48:53 <Lymee> > unsafeCoerce 1 :: Maybe Int
02:48:58 <Lymee> Fake unsafeCoerce!
02:48:59 <edwardk> @type fix id
02:48:59 * Lymee hides
02:49:00 <lambdabot> forall a. a
02:49:08 <lambdabot> thread killed
02:49:12 <edwardk> just assume the hypothesis and be done
02:49:20 -!- GreaseMonkey has joined.
02:49:20 -!- GreaseMonkey has quit (Changing host).
02:49:20 -!- GreaseMonkey has joined.
02:49:24 <Lymee> @type fix ($)
02:49:30 <Sgeo> kmc, it's just the same lambdabot that's in #haskell
02:49:40 <elliott> Sgeo: no...
02:49:46 <Sgeo> Can you use unsafeCoerce for nefarious purposes?
02:49:48 <Sgeo> elliott, wait what?
02:49:49 <oerjan> kmc: yeah Gregor worked hard on the sandboxing
02:49:52 <elliott> it's EgoBot
02:49:53 <elliott> kmc: It's heavily sandboxed, but HackEgo is more permissive
02:49:55 <elliott> `run echo hi >q
02:49:59 <HackEgo> No output.
02:50:00 <elliott> `run cat q
02:50:02 <HackEgo> cat: q: No such file or directory
02:50:04 <elliott> `run cat q
02:50:05 <elliott> argh
02:50:06 <HackEgo> hi
02:50:08 <elliott> (sometimes it has sync issues)
02:50:09 <elliott> `rm q
02:50:10 <HackEgo> No output.
02:50:12 <elliott> `l
02:50:12 <elliott> `ls
02:50:14 <HackEgo> ​/home/hackbot/hackbot.hg/multibot_cmds/lib/limits: line 5: exec: l: not found
02:50:15 <HackEgo> babies \ bin \ bluhbluh \ canary \ env \ foo \ paste \ ps \ quine.pl \ quine2.pl \ quine3.pl \ quotes \ quotese \ tekst \ test.c \ tmp.tmp
02:50:18 <elliott> `help
02:50:19 <HackEgo> Runs arbitrary code in GNU/Linux. Type "`<command>", or "`run <command>" for full shell commands. "`fetch <URL>" downloads files. Files saved to $PWD are persistent, and $PWD/bin is in $PATH. $PWD is a mercurial repository, "`revert <rev>" can be used to revert to a revision. See http://codu.org/projects/hackbot/fshg/
02:51:13 <kmc> quotse?
02:51:23 <elliott> `quote
02:51:26 <HackEgo> 483) <oklopol> btw i saw my first prostitute about a week ago
02:51:29 <elliott> good quotes
02:51:35 <elliott> (quote database is of questionable quality)
02:51:36 <kmc> does it respond to PM?
02:51:46 <elliott> yes, but it logs anything that changes the filesystem
02:51:50 <kmc> hehe
02:51:55 <elliott> and those can be reverted
02:52:02 <elliott> the quote system is rather advanced:
02:52:06 <elliott> `run ls bin/*quote*
02:52:09 <HackEgo> bin/addquote \ bin/allquotes \ bin/delquote \ bin/pastenquotes \ bin/pastequotes \ bin/quote \ bin/quotes
02:52:21 <mauke> `perl -v
02:52:24 <HackEgo> ​\ This is perl, v5.10.0 built for x86_64-linux-gnu-thread-multi \ \ Copyright 1987-2007, Larry Wall \ \ Perl may be copied only under the terms of either the Artistic License or the \ GNU General Public License, which may be found in the Perl 5 source kit. \ \ Complete documentation for Perl, including FAQ lists, should be
02:52:34 <Lymee> `run cat /dev/urandom | perl
02:52:36 <HackEgo> Unrecognized character \xC7 in column 1 at - line 1.
02:52:39 * Lymee hides
02:52:48 <mauke> `cat /dev/urandom
02:52:50 <HackEgo> ​.݀Bgo-:h6ڵsU.b..7.R.܄.l..򋦋gmTdv+dlR5RPsWwiyԼN..l;BrjA_.^.y9Y<(-.Ñu{p.gJ*..a#-n\Y@鹜pP6e.U.vV.5|P9.?++~W>`ҌoL.ZI\m..qǎ\3e.d3.,..zs-h..
02:53:00 <elliott> kmc: mauke: it's based on UMLBox, fwiw: https://bitbucket.org/GregorR/umlbox/overview; previously it was based on the (Debian-specific) plash
02:53:11 <elliott> (it's Gregor's)
02:53:21 <kmc> cool
02:53:36 -!- lambdabot has quit (Ping timeout: 258 seconds).
02:53:38 <Lymee> `cat /dev/random
02:53:48 <elliott> `translateto no also, it has limited internet access
02:53:51 <kmc> `hexdump -C /dev/urandom
02:53:53 <HackEgo> hexdump: invalid option -- \ usage: hexdump [-bcCdovx] [-e fmt] [-f fmt_file] [-n length] \ [-s skip] [file ...] \ hd [-bcdovx] [-e fmt] [-f fmt_file] [-n length] \ [-s skip] [file ...]
02:53:55 <HackEgo> Traceback (most recent call last): \ File "/hackenv/bin/json", line 4, in <module> \ data = json.loads(sys.stdin.read().decode('utf-8')) \ File "/opt/python27/lib/python2.7/json/__init__.py", line 310, in loads \ return _default_decoder.decode(s) \ File "/opt/python27/lib/python2.7/json/decoder.py", line 346,
02:53:57 <elliott> kmc: you need `run for multiple arugments
02:53:59 <kmc> `run hexdump -C /dev/urandom
02:54:01 <kmc> *nod*
02:54:01 <HackEgo> 00000000 5c 50 2b 17 29 6c be e8 d0 15 1e 99 26 a6 e0 a1 |\P+.)l......&...| \ 00000010 7c 54 c2 93 eb a1 59 b2 ea 62 50 27 e1 99 63 d2 ||T....Y..bP'..c.| \ 00000020 03 82 5a 43 8b dc 0c 61 ec 10 ba 82 ff 85 15 28 |..ZC...a.......(| \ 00000030 44 89 38 a4 ac 20 25 fd c0 13 7f 20 80 f4 86 0b |D.8.. %.... ....| \ 00000040
02:54:07 <elliott> Gregor: translation is broken again :P
02:54:10 <HackEgo> No output.
02:54:12 <mauke> fixed a bug in ploki's halting detector :-)
02:54:12 <elliott> `translateto sv also, it has limited internet access
02:54:15 <HackEgo> Traceback (most recent call last): \ File "/hackenv/bin/json", line 4, in <module> \ data = json.loads(sys.stdin.read().decode('utf-8')) \ File "/opt/python27/lib/python2.7/json/__init__.py", line 310, in loads \ return _default_decoder.decode(s) \ File "/opt/python27/lib/python2.7/json/decoder.py", line 346,
02:54:57 <elliott> `translateto hu also, it has limited internet access
02:55:00 <HackEgo> Traceback (most recent call last): \ File "/hackenv/bin/json", line 4, in <module> \ data = json.loads(sys.stdin.read().decode('utf-8')) \ File "/opt/python27/lib/python2.7/json/__init__.py", line 310, in loads \ return _default_decoder.decode(s) \ File "/opt/python27/lib/python2.7/json/decoder.py", line 346,
02:55:03 <elliott> :|
02:55:06 <elliott> `translateto la also, it has limited internet access
02:55:09 <HackEgo> Traceback (most recent call last): \ File "/hackenv/bin/json", line 5, in <module> \ print eval(sys.argv[1]).encode('utf-8') \ File "<string>", line 1, in <module> \ TypeError: 'NoneType' object is not subscriptable
02:55:14 <elliott> fuck you
03:00:01 <CakeProphet> ...wait, Python sets argv to None ?
03:00:06 <CakeProphet> WHY
03:00:41 <CakeProphet> oh wait eval.
03:00:48 <CakeProphet> could be something else then.
03:04:30 -!- kmc has quit (Quit: Leaving).
03:04:46 <elliott> hmm, synonyms of go as in "go west"?
03:04:49 <elliott> that aren't head
03:04:51 <elliott> face?
03:04:51 <elliott> travel?
03:05:00 <ais523> move?
03:05:06 <elliott> there's no movement involved
03:05:10 <elliott> it's about which direction you're facing
03:05:14 <ais523> oh, right, "go" is ambiguous, there
03:05:16 <Sgeo> turn
03:05:16 <ais523> "aim" in that case
03:05:28 <elliott> Sgeo: no, you turn <angle>
03:05:34 <elliott> you don't turn <absolute direction>
03:05:41 <elliott> ais523: hmm, I think I prefer face
03:05:50 <elliott> actually, aim is nicer
03:05:54 <elliott> setDelta works, but is boring :)
03:06:03 <ais523> depends what this is for, and you hadn't explained until that line
03:06:05 <ais523> *depends on
03:06:33 <elliott> right
03:06:36 <elliott> it's go as in funge
03:07:13 <CakeProphet> elliott: what are we talking about exactly?
03:07:15 <CakeProphet> sounds interesting.
03:07:19 <elliott> funge
03:07:56 <ais523> -98 particularly? -108?
03:08:07 <zzo38> I have make up new operator in Haskell when it seems useful to do so, but not always.
03:08:18 <monqy> ok
03:08:37 <zzo38> Such as the (.::) operator
03:08:46 <monqy> what does (.::) do
03:09:02 <zzo38> Defined as: (.::) = (.) . (.) . (.); infixr 9 .::;
03:09:31 <zzo38> I needed it once in my implementation of Constantinople.
03:09:53 <Sgeo> :t (.) . (.) . (.)
03:10:01 <Sgeo> Grah
03:10:07 <ais523> "infixr 9 .::;" took me a while to mentally parse
03:10:16 -!- azaq23 has quit (Ping timeout: 240 seconds).
03:10:21 <ais523> now I'm trying to work out what .:: even does
03:10:35 <Sgeo> argh, it'll type differently due to the infixr, won't it :/
03:10:37 <elliott> <ais523> -98 particularly? -108?
03:10:39 <elliott> latter is not a real language
03:10:41 <ais523> @unpl (.) . (.) . (.)
03:10:44 <elliott> Sgeo: no?
03:10:55 <ais523> elliott: you might be trying to interpret it in an attempt to make it into a real language
03:10:56 <monqy> it looks like composition but the second operand takes three arguments
03:11:04 <ais523> hey, where'd lambdabot go?
03:11:13 <zzo38> Does infixr cause it to type differently?
03:11:19 <ais523> [Error] lambdabot: No such nick/channel.
03:11:21 <Sgeo> Is there a difference between (.) . ((.) . (.)) and ((.) . (.)) . (.)
03:11:28 <zzo38> monqy: Yes that is what I used it for
03:11:33 <ais523> I don't think so, composing is associative
03:11:41 <elliott> ais523: I wish cpressey finished his revision to Funges but Vorpal ruined everything :(
03:11:43 <ais523> monqy: that was incredibly well worked out
03:11:55 <ais523> elliott: if ESO was still going, we could fix it
03:12:15 <monqy> I didn't feel like figuring it out myself so I politely asked ghci to give me its type signature
03:12:15 <ais523> but it didn't seem to work, as I was interested in standardising languages, and you and Vorpal were interested in how to best format the specs
03:12:21 <ais523> heh
03:12:24 <zzo38> I put infixr 9 to make it the same fixity as the normal composition operator
03:12:38 <Lymee> @unpl (.) . ((.) . (.))
03:12:43 <Lymee> @unpl ((.) . (.)) . (.)
03:12:48 <monqy> but if I stared at it long enough I think I could have done it
03:12:55 <ais523> (.) . (.) . (.) :: (b -> c) -> (a -> a1 -> a2 -> b) -> a -> a1 -> a2 -> c
03:13:03 <ais523> yep, that's a giveaway
03:13:27 <ais523> now I'm trying to work out why it does that
03:13:27 <zzo38> Yes, . is an associative operator it is one of the category laws. The other one is id
03:14:04 <zzo38> The monad laws are the same if you use <=< and return in place of . and id
03:20:03 <elliott> foldl' (\m' ins -> Map.alter (maybe Nothing (\(_:xs) -> if null xs then Nothing else Just xs))
03:20:03 <elliott> ins m')
03:20:03 <elliott> m (fpHandles ident)
03:20:03 <elliott> wha.
03:20:03 <elliott> t
03:21:31 <monqy> what is that
03:23:24 <mauke> a loop that modifies a map m
03:23:43 <mauke> for each key in fpHandles ident it drops the first element of the corresponding list
03:25:19 <oerjan> !haskell :t maybe Nothing
03:25:21 <EgoBot> maybe Nothing :: (a1 -> Maybe a) -> Maybe a1 -> Maybe a
03:25:50 <oerjan> aka =<<
03:26:45 <elliott> padTake _ 0 _ = []
03:26:46 <elliott> padTake fill n [] = fill : padTake fill (n-1) []
03:26:46 <elliott> padTake fill n (x:xs) = x : padTake fill (n-1) xs
03:26:46 <elliott> I don't even know what some of this is
03:26:46 <elliott> oerjan: oh thanks
03:26:55 <elliott> omg maybe Nothing is a really nice =<<
03:26:58 <elliott> implementation I mean
03:27:03 <mauke> :t M.alter (\mvs -> do _ : vs <- mvs; return vs)
03:27:07 <elliott> but um
03:27:14 <mauke> !haskell :t M.alter (\mvs -> do _ : vs <- mvs; return vs)
03:27:19 <elliott> oerjan: (>>= f) sure is a weird way to write that :D
03:28:04 <oerjan> mauke: EgoBot doesn't have predefined imports
03:28:16 <mauke> !haskell :t Data.Map.alter (\mvs -> do _ : vs <- mvs; return vs)
03:28:18 <EgoBot> Data.Map.alter (\mvs -> do _ : vs <- mvs; return vs) :: (Ord k) =>
03:28:29 <mauke> "good" job
03:28:37 <oerjan> mauke: the rest is sent in DCC
03:28:43 <monqy> padTake? so if it reaches the end of the victim list it fills the rest of the result with fill rather than cutting off?
03:28:45 <mauke> hahaha, wtf
03:29:08 <elliott> egobot's line-breaking is... not universally liked
03:29:18 <mauke> did you mean: fucking stupid
03:30:09 <oerjan> if null xs then Nothing else Just xs = guard (null xs) >> Just xs, i think
03:30:16 <oerjan> er wait
03:30:29 <oerjan> backwards test
03:30:36 <elliott> mauke: well it lets you receive the output of programs that output a lot, and in clients that automatically accept dcc chats it works ok
03:30:42 <elliott> better than rate-limiting, at least, in that case
03:30:51 <elliott> mauke: egobot can take urls too, so it's possible to run complex stuff with it
03:31:04 <oerjan> `which ghci
03:31:06 <HackEgo> ​/opt/ghc/bin/ghci
03:31:16 <mauke> elliott: how is that better than rate limiting?
03:31:22 <mauke> given that you have to do rate limiting anyway
03:31:26 <oerjan> `run ghci -e ':t Data.Map.alter (\mvs -> do _ : vs <- mvs; return vs)
03:31:28 <HackEgo> sh: -c: line 0: unexpected EOF while looking for matching `'' \ sh: -c: line 1: syntax error: unexpected end of file
03:31:28 <elliott> mauke: no you don't, not for dcc chat
03:31:34 <oerjan> `run ghci -e ':t Data.Map.alter (\mvs -> do _ : vs <- mvs; return vs)'
03:31:37 <mauke> elliott: no, but for the rest of the bot
03:31:37 <HackEgo> ghc: on the commandline: cannot use `--interactive' with `-e' \ Usage: For basic information, try the `--help' option.
03:31:39 <elliott> waiting minutes to get fifty lines of output or errors is annoying
03:31:51 <oerjan> `run ghc -e ':t Data.Map.alter (\mvs -> do _ : vs <- mvs; return vs)'
03:31:55 <elliott> i don't like EgoBot's solution, i'm just devil's avocadoing :)
03:31:56 <HackEgo> ​<command line>: can't load .so/.DLL for: libgmp.so (libgmp.so: cannot open shared object file: No such file or directory)
03:32:02 <elliott> oerjan: hackego ghc doesn't work yet
03:32:03 <oerjan> gah
03:32:07 <oerjan> oh
03:33:06 <elliott> hmm, making my fingerprint scheme work with -Werror will be rather tricky
03:33:37 <ais523> why do they generate warnings? and can you fix them with insane workarounds?
03:33:52 <elliott> Shiro/Fingerprints/MODU.hs:17:1:
03:33:52 <elliott> Warning: Pattern match(es) are non-exhaustive
03:33:52 <elliott> In an equation for `run':
03:33:52 <elliott> Patterns not matched:
03:33:52 <elliott> _ A
03:33:54 <elliott> _ B
03:33:55 <ais523> an IOCCC entry I've been sitting on waiting for the IOCCC to actually happen generates only three warnings in gcc and they're all incorrect
03:33:56 <elliott> _ C
03:33:57 <elliott> _ D
03:33:59 <ais523> even though it /should/ generate a lot more
03:34:00 <elliott> ...
03:34:02 <elliott> the whole point is that you specify what instructions you handle so that you never get called with an instruction you can't handle :)
03:34:11 <elliott> adding an extra line to just fail boringly to each fingerprint is really annoying
03:34:22 <elliott> what i really want is some kind of type-level restriction of the fingerprint instructions but aargh
03:34:28 <elliott> like
03:34:34 <ais523> elliott: this sounds like the sort of thing Anarchy is designed for (will be designed for, when I get round to designing it)
03:34:43 <elliott> run :: (IsInstructions ins (A :+: B :+: C :+: Nil)) => ins -> Shiro ()
03:34:45 <elliott> but um
03:34:47 <elliott> that's horrific
03:34:50 <oerjan> btw padTake fill n l = take n $ l ++ repeat fill
03:34:50 <ais523> my solution to that problem was to invent a language :)
03:34:52 <elliott> and I'm not sure it'd work anyway
03:35:01 <elliott> oerjan: thanks
03:35:45 <elliott> hmmm
03:35:53 <elliott> I guess I could use a gadt
03:38:54 <elliott> class Elem x xs
03:38:55 <elliott> instance Elem x (x :- xs)
03:38:55 <elliott> instance (Elem x xs) => Elem x (y :- xs)
03:38:58 <elliott> turns out, this _isn't_ a good instance :)
03:39:11 <elliott> I think I need a ~/~
03:39:16 <elliott> or, hmm
03:39:24 <elliott> I suppose HList has solved this
03:43:01 <Sgeo> Heterogeneous List?
03:43:08 <elliott> yes.
03:43:09 <elliott> oerjan: halp
03:43:32 <Sgeo> elliott, is Active Oberon a good language
03:43:34 <Sgeo> ?
03:43:45 * Sgeo feels like he's going to be shot
03:44:04 <elliott> Oberon is a bad language but an interesting one.
03:44:24 <oerjan> wat
03:45:11 <Sgeo> Hmm. What's bad about it, and what's interesting about it?
03:45:23 <elliott> oerjan: i'm trying to define this FPIns type but I can't manage it :(
03:45:38 <oerjan> what type
03:45:49 <elliott> basically, I want, for letter=A,B,C, letter :: FPIns xs iff xs contains the type letter
03:45:56 <elliott> where xs is a list of the form (a :- b :- ... :- xs)
03:45:57 <elliott> i.e.
03:46:04 <elliott> A :: FPIns (A :- B :- Nil)
03:46:10 <elliott> A :: FPIns (B :- A :- Nil)
03:46:12 <elliott> A :: FPIns (A :- Nil)
03:46:13 <elliott> etc.
03:46:23 <elliott> but A :/: FPIns (B :- Nil)
03:46:41 <oerjan> ah. well i suspect the problem is you need to check for two types _not_ being equal in that.
03:46:45 <elliott> indeed
03:46:53 <elliott> iirc someone did that on stack overflow...
03:47:01 <elliott> oerjan: what if I required the list to be in order?
03:47:05 <elliott> i.e., (B :- A :- Nil) is not ok
03:47:08 <elliott> where A < B < C
03:47:15 <ais523> oerjan: not equal as in cannot be equal, or as in aren't known to be identical?
03:47:21 <elliott> hmm, I think I could easily do that, with a _lot_ of boilerplate code
03:47:27 <elliott> in fact, I could do it out of order too
03:47:32 <elliott> with a _lot_ of boilerplate
03:47:37 <oerjan> ais523: ghc does not give a way to distinguish those, i think
03:47:55 <ais523> ah, OK, even though they're distinguishable concepts
03:48:18 <oerjan> as in, the basic type class lookup contains _no_ not-equal checks
03:48:44 <elliott> oerjan: http://sprunge.us/UaaA behold my solution that will scale perfectly to the real A-Z situation
03:48:45 <oerjan> ...well, there _are_ overlapping instances.
03:49:16 <elliott> omg it works :D
03:49:24 <elliott> oerjan: not there, there aren't?
03:49:29 <elliott> or are you talking to ais523
03:49:52 <elliott> oerjan: oh my god
03:49:53 <elliott> guess what
03:49:56 <elliott> i defined all this infrastructure
03:49:58 <elliott> test :: FPIns (C :- A :- Nil) -> IO ()
03:49:59 <elliott> test A = return ()
03:49:59 <elliott> test C = return ()
03:50:03 <elliott> will warns about a non-exhaustive pattern match
03:50:11 <elliott> IM GOING TO RIP OUT GHC'S GUTS AND REPLACE THEM WITH DEATH
03:50:40 <Gregor> ... what the flying eff is Intel AppUp?
03:50:57 <oerjan> elliott: well yes. but i also had that method in mind, the point is that it requires you to check for equality with whatever it is to prove it is not any of the other options
03:51:17 <elliott> Gregor: an app store, it looks like
03:51:19 <elliott> for WINDOZE
03:51:27 <ais523> Gregor: a Google search gives no conclusive results, but implies that it's some sort of application store
03:51:38 <elliott> dear Intel: stop making things that aren't processors; love, everyone
03:51:45 <zzo38> elliott: How would that help? How can you replace it with death it does not seem you would write a program
03:51:53 <ais523> New Legends Announced \ Five new developers have become Legends of the Intel AppUp developer program. Read their inspiring stories!
03:52:23 <Gregor> elliott: s/ that aren't.*//
03:52:26 <ais523> looking at it, it appears to be an appstore combined with a cross-platform framework for writing mobile/tablet apps, that can also end up on non-mobile platforms
03:52:32 <oerjan> elliott: you might be able to define IsEq t1 t2 typeBool and use it as a subroutine
03:52:40 <ais523> it has an SDK with C and C++ bindings
03:52:50 <elliott> Gregor: Mr. Ex Intel Employee
03:52:51 <oerjan> then only that one needs to contain all the matches
03:52:55 <elliott> "I SAW THE HORRORS"
03:52:58 <elliott> "OH, GOD, I SAW THE HORRORS"
03:53:09 <oerjan> hm wait does that actually help
03:53:17 <Gregor> elliott: All my systems are still Intel too :P
03:53:21 <elliott> oerjan: um there is a more important problem, i.e. this strategy _does not work_
03:53:29 <oerjan> well, that too :P
03:53:30 <elliott> oerjan: because GHC's exhaustive pattern detector is too fucking stupid
03:53:47 <elliott> Gregor: Well, AMD don't exactly make the most amazing processors :P
03:54:17 <ais523> Gregor: http://appdeveloper.intel.com/en-us/article/frequently-asked-questions is their FAQ, it seems to explain what they're doing, at least
03:54:38 <ais523> the funny thing is, it appears to be run by the sort of managers who use the word "rockstar"
03:54:52 <ais523> "Developers who participate in the Intel AppUp Developer Program earn reputation. Developers earn points and advance in degrees of the Intel® Black Belt Software Developer Program. For more information on the reputation and Intel Black Belt Software Developer Program, see the Intel Black Belt Software Developer Program FAQs."
03:55:08 <elliott> ais523: nice
03:55:12 <Gregor> Ohhhh, I see, it's some retarded pseudopromotion for netbooks and such made byt hem.
03:55:22 <Gregor> s/byt hem/with their processors/
03:55:28 <oerjan> <elliott> dear Intel: stop making things that aren't processors; love, everyone <-- what if those were microcode apps.
03:55:34 <ais523> Gregor: an SDK for developing applications for them, too, I think
03:55:41 <ais523> the SDK seems to be the only actual product there
03:55:48 <Gregor> ais523: Which consists, I assume, of ICC :P
03:55:49 <ais523> oerjan: brilliant
03:55:51 <elliott> I wish everyone responsible for this "trendy epic rockstar lolcode FAIL ruby on rails" trend would just go into some field that isn't already as terrible as it can get
03:56:04 <elliott> oerjan: so fast
03:56:33 <ais523> atm it only seems to work on MeeGo and Windows
03:56:37 <ais523> that's a fun choice of platforms
03:57:02 <elliott> only available for QNX and RiscOS
03:57:20 <ais523> wow, it has an incredibly short API
03:57:23 -!- MDude has changed nick to MSleep.
03:57:32 <ais523> which entirely consists of determining whether the application is authorized to run
03:57:48 -!- azaq23 has joined.
03:57:50 <ais523> therefore, it's /actually/ some sort of DRM scheme that only works on closed platforms where you can't just patch the checks out
03:58:25 <ais523> this just makes me even more confused as to what it is
03:58:42 <oerjan> <elliott> I wish [...] would just go into some field that isn't already as terrible as it can get <-- wait why, then they'd be able to do _more_ damage
03:58:51 <ais523> "In-app advertising, subscriptions, and links to external marketplaces for in-app purchases are permitted for a limited time. We understand that these features are important to you and are not yet available in the SDK. Until they become available, you are free to implement them on your own. As we roll these features into the SDK, we will then require that they be implemented through the SDK."
03:59:16 <elliott> oerjan: yes, but it wouldn't affect _me_
03:59:23 <elliott> I don't keep up on the latest blacksmith news
03:59:37 <ais523> Gregor: so it's /actually/ an app store that has its own DRM scheme
03:59:42 <ais523> I think, at least
03:59:59 -!- GreaseMonkey has quit (Ping timeout: 276 seconds).
04:01:12 <zzo38> Do you know about the Underhanded C Contest?
04:01:19 <ais523> zzo38: yes, and have even submitted to it
04:01:39 <ais523> my submission was a bit too obvious, though, touching every page of the memory it allocated "to check that it works"
04:02:01 <ais523> turns out that implementing 4GiB of memory on Linux is insufficiently slow unless you do that
04:02:35 <ais523> (I was doing the OS benchmarking thing, trying to exploit the fact that allocating the entire addressible memory space and then pagefaulting it all is reasonably quick on a 16-bit system but not on a 32-bit system)
04:06:42 <mauke> did the contest just die 2 years ago?
04:07:01 <ais523> the IOCCC died a while ago
04:07:08 <ais523> at least, it went into NetHack devteam mode
04:07:17 <ais523> doing nothing but the occasional news entry about how they were doing something, and replying to queries
04:07:19 <mauke> I mean the underhanded C contest
04:07:43 <mauke> because I sent them an entry, and then nothing happened and the site stopped updating
04:07:51 <ais523> the most recent news entry in the IOCCC is from 30 april 2010, saying that there would be something new on 15 may 2010, but there wasn't
04:07:58 <ais523> mauke: possibly Xcott's just got a job, or something
04:08:04 <ais523> that's the issue with a competition run by one person
04:08:19 <zzo38> Some of their codes I tried to notice what is wrong, I noticed what is wrong not too difficulty. The third place in 2008 I noticed very easily. The first place (John Meacham) I looked and found easily, the data that is supposed to be deleted it looks like it will write 000 if it was originally 255.
04:08:25 <elliott> oh, I know what I could do! I could map FPInses to functions instead
04:08:32 <elliott> in fact, that would work perfectly, and let me give nice names to each fp instruction
04:08:35 <zzo38> Now I looked at the answer and in fact that is correct.
04:08:41 <elliott> now to add these lines to a comment in a file and promptly forget about them
04:09:05 <zzo38> These codes are not difficult to understand if you can understand C programming.
04:11:30 <elliott> BAD: } doesn't reset storage offset
04:11:31 <elliott> ummm
04:11:34 <elliott> my style fixes broke my program
04:11:49 <ais523> zzo38: I think the idea is just to make it look like a mistake
04:12:07 -!- GreaseMonkey has joined.
04:12:20 <mauke> "current" task: http://underhanded.xcott.com/?p=18
04:12:23 <mauke> my solution: http://mauke.dyndns.org/stuff/c/underhanded/lug.c
04:12:58 <elliott> ok this is utterly bizarre
04:15:49 <ais523> mauke: there's a lot of code there to look through
04:16:26 <mauke> I blame it on the complexity of the task
04:16:28 * elliott is immediately sceptical of COUNTOF and DEFSTRUCT
04:16:39 <mauke> those are "standard" macros in my code
04:16:40 <elliott> also of xmalloc, what is that even about :)
04:16:51 <elliott> mauke: sure, you say that :P
04:16:54 <mauke> a malloc wrapper that checks for errors
04:17:09 <elliott> it's not a malloc wrapper, it has a different signature
04:17:10 <elliott> it's more like calloc
04:17:21 <mauke> yes, because calloc's interface is superior
04:17:26 <mauke> it still wraps malloc
04:17:31 <elliott> OR MORE EXPLOITABLE????
04:17:40 <mauke> no
04:17:44 <elliott> admittedly, I can't actually find any bugs :)
04:17:50 <mauke> all paths that don't abort() lead to return malloc(n * m)
04:18:09 <ais523> in a UCC entry, if I had no malicious code in a malloc wrapper, I'd just use malloc directly
04:18:11 -!- edwardk has left ("Leaving...").
04:18:47 <ais523> there's an obvious = vs. == mixup in the for loop in insert()
04:19:03 <ais523> I haven't figured out its effects yet, but I suspect that's the malicious part
04:19:14 <mauke> you mean (p = *pp)?
04:19:37 <mauke> that's obviously deliberate
04:19:37 <ais523> yep
04:19:45 <ais523> well yes, the paren indicates that
04:19:50 <ais523> why is that in the test part of a for loop?
04:19:51 <mauke> p isn't initialized otherwise, and ... yeah
04:20:10 <ais523> perhaps it should be before the first semicolon, rather than after, in correct code
04:20:25 <mauke> no, pp is updated in the loop
04:20:31 <mauke> I just want a shorter name for *pp
04:21:08 <zzo38> I don't know all the functions that are used in that lug.c program
04:21:13 <ais523> at least, if that's a crazy synonym for "for (;p;pp = &p->next,p=*pp)" and it's /not/ malicious, why are you writing crazy code like that?
04:21:42 <elliott> ip <- gets currentIP
04:21:43 <elliott> let Ray pos delta = ray ip
04:21:43 <elliott> let (ox,oy) = storageOffset ip
04:21:43 <elliott> modifySOSS $ (oy:) . (ox:)
04:21:43 <elliott> modifyCurrentIP $ const ip{ storageOffset = pos .+. delta }
04:21:43 <mauke> ais523: in your version p is uninitialized
04:21:43 <elliott> heh, what a subtle bug
04:21:48 <mauke> ais523: I'd call that crazy
04:21:56 <elliott> (hint: the stack-stack is part of the IP)
04:21:57 <ais523> mauke: well, initialize it at the start
04:21:58 <mauke> zzo38: what don't you know?
04:22:01 <ais523> as well
04:22:08 <ais523> the use of p at all there is a little suspect
04:22:09 <mauke> ais523: that duplicates p = *pp for no reason
04:22:28 <ais523> for the reason of not putting the assignment in the test part of a for loop?
04:22:38 <ais523> actually, p=*pp would be best used in the loop body
04:22:38 <mauke> ais523: yes, how is that a good thing?
04:22:41 <ais523> and *pp as the condition
04:22:50 <zzo38> It has functions (defined externally) that I have never used or seen before
04:22:50 <mauke> ais523: that would duplicate *pp for no good reason
04:22:57 <mauke> zzo38: which ones?
04:22:58 <ais523> mauke: side effects on the test part of a for loop is a mad thing to do
04:23:02 <mauke> ais523: wrong
04:23:09 <ais523> saving two characters is not a good reason to do it
04:23:18 <mauke> K&R disagree
04:23:41 <ais523> they did it in while loops, but in for loops there are perfectly good other places to put it
04:23:48 <mauke> wrong
04:24:04 <elliott> mauke: you realise the goal is to write code that nobody can fault you about? :P
04:24:07 <mauke> what I really want is "load variables; test condition; loop body; repeat"
04:24:20 <mauke> elliott: I didn't realize people had such crazy ideas about "good" code
04:24:23 <ais523> mauke: and that's what a for loop has?
04:24:37 <ais523> mauke: reading code with side-effects in the test of a for loop makes me stare at it for minutes working out exactly when it runs
04:24:43 <mauke> ais523: it's almost what a while loop has if you merge the load/test parts
04:24:44 <ais523> that's not the mark of good code, because it isn't easy to read
04:24:47 <elliott> mauke: it's not exactly controversial that repeating a tiny statement is better than making a complicated for loop head
04:24:58 <mauke> ais523: in this case I also need a "step" part, so that's where the for loop comes in
04:25:02 <ais523> it's the sort of thing I'd expect in the IOCCC, not the UCC if meant to be non-deliberately-incorrect code!
04:25:13 <mauke> elliott: p = *pp isn't complicated
04:25:23 <elliott> mauke: no, it isn't; that's why repeating it doesn't matter
04:25:27 <elliott> vs. complicating the for loop head
04:25:41 <mauke> seriously, I don't see how this "complicates" anything
04:25:43 <ais523> you use a similar idiom in drop_superseded
04:25:50 <mauke> yeah
04:26:04 <ais523> and I'm wondering if there's a shorter /and/ clearer way to write it
04:26:26 <ais523> you have while ((p = *pp)) { /* ... */ *pp = p->next; free(p); }
04:28:08 <ais523> I'd probably write it as p=*pp; while (p) { /* ... */ p2 = p->next; free(p); p = p2; } *pp = p;
04:28:18 <ais523> actually, *pp = 0 at the end
04:28:32 <elliott> ais523's is less clear than mauke's there
04:28:51 <ais523> elliott: well, back in the days of K&R idiomatic would have been free(p); p = p->next;
04:28:54 <ais523> but that's incorrect nowadays
04:29:00 <elliott> heh
04:29:00 <mauke> I tried to keep this as short and concise as possible
04:29:03 <ais523> so you need a helper variable
04:29:07 <mauke> where every part is simple and obviously correct
04:29:14 <zzo38> Such as ferror and regcomp, which I have not used, although I can guess what their function is.
04:29:33 <ais523> mauke: we've been discussing it for 11 minutes, is that "simple and obviously correct"?
04:29:34 <mauke> zzo38: ferror is standard C
04:29:39 <ais523> zzo38: ferror is standard C
04:29:51 <zzo38> mauke: Yes I know it is, I have just simply not used it before.
04:29:53 <mauke> ais523: maybe you're just not a very experienced C programmer
04:29:54 <ais523> heh, and our nicks are the same number of pixels in this font so it even lined up
04:30:13 <ais523> mauke: I actually taught C for a while; and I teach people not to pull tricks like that
04:30:27 <ais523> actually, I fear it's the API of your function that's making it confusing
04:30:39 <mauke> yeah, I have a bit of a history with C teachers
04:30:48 <elliott> so does ais523
04:30:51 <ais523> you take a pointer to a pointer, and what you do with it is to iterate on the pointed-to pointer itself, and then set the pointed-to pointer to NULL
04:30:54 <zzo38> I do not pay a lot of attention to security unless I am writing a program meant to be run suid or accessed remotely
04:30:56 <Sgeo> tricks?
04:31:39 <mauke> ais523: I'm destructively modifying a linked list
04:31:42 <ais523> at least you're using C not C++ so the side-effect is marked, but it's a side effect that I don't get why it's necessary at all; nulling pointers when you free them isn't going to save you from bugs because if the code was buggy before, it'll /still/ crash
04:31:52 <mauke> ais523: the alternative to taking a pointer-to-pointer is to take and return a pointer
04:31:56 <mauke> and that's just evil
04:32:03 <elliott> that's evil?
04:32:04 <ais523> mauke: no, because you always set it to NUL
04:32:05 <ais523> *NULL
04:32:12 <zzo38> But the John Meacham's code (and Linus Akesson's code) for the 2008 contest has something that is very obviously wrong to me even though I did not know what the contest was; I could tell it was dealing with PPM files just from reading the code.
04:32:16 <ais523> so the caller knows that the value should become NULL
04:32:18 <mauke> ais523: wait, where?
04:32:28 <ais523> drop_superseded
04:32:41 <ais523> *pp is always set to NULL when it exits, as it's the only way to drop out of the loop
04:32:54 <ais523> and if that isn't obvious, then perhaps even you were confused by your own code
04:33:00 -!- lambdabot has joined.
04:33:11 <mauke> ais523: pp is modified in the loop
04:33:21 <mauke> it may reach NULL naturally
04:33:31 <ais523> mauke: but that doesn't matter, all that matters is the value at the end of the loop, which is always NULL
04:33:42 <mauke> yes, because it has reached the end of the list
04:33:50 <mauke> that doesn't mean the list was completely destroyed
04:33:53 <ais523> so the fact that pp is modified in the loop is irrelevant
04:33:57 <mauke> what
04:34:01 <coppro> .wub 16
04:34:03 <coppro> .wub 16
04:34:03 <ais523> you could just set it to NULL afterwards and have the same effect
04:34:03 <Sgeo> ais523, I think the point of nulling pointers before free is in case you accidentally use it again, at least it will _always_ be a crash, instead of sometimes by chance something bizarre
04:34:13 <mauke> ais523: where am I setting *pp to NULL?
04:34:19 <elliott> coppro: ...
04:34:30 <elliott> Sgeo: glibc detects that kind of crap nowadays, IIRC
04:34:32 <ais523> mauke: while((p = *pp)) { /* ... */ } is either an infinite loop or it sets *pp to NULL
04:34:44 <ais523> elliott: it can't do so with a 100% success rate without leaking memory, that's provable
04:34:45 <mauke> ais523: wrong
04:34:52 <ais523> mauke: how is it not wrong
04:34:57 <ais523> there are no break instructions in the /* ... */
04:35:05 <ais523> and no longjmps out of it either
04:35:10 <zzo38> Some people have told me my C codes were of the kind suitable for IOCCC but I don't think so.
04:35:12 <ais523> so, the /only/ way the loop can end is if *pp is NULL
04:35:16 <elliott> ais523 is obviously right here, without even looking at the code
04:35:18 <mauke> ais523: correct
04:35:24 <ais523> so, the loop sets *pp to NULL
04:35:25 <mauke> ais523: that doesn't mean it's setting *pp to NULL
04:35:31 <mauke> NO
04:35:42 <elliott> either *pp is initially NULL or is set to NULL during the loop
04:35:46 <mauke> wrong
04:35:51 <ais523> yes, the loop only ends with *pp as NULL, and the loop is the last thing in the function
04:35:53 <mauke> is everyone crazy now?
04:35:59 <ais523> so the function sets *pp to NULL, always
04:36:02 <elliott> no, but you might be if you keep insisting one is two
04:36:15 <mauke> elliott: let me try to convince you first, you seem more sane
04:36:20 <ais523> the value of *pp during the loop changes, but that only matters if it's inspected during the loop, and it doesn't
04:36:23 <ais523> *and it isn't
04:36:43 <ais523> oh, aha, there's an assignment to pp during the loop
04:36:49 <ais523> which is even mindboggling
04:36:51 <elliott> mauke: OK, but I'm not going to bother looking at the code; how can that loop terminate, under those conditions about the body that you agreed to, without *pp either initially being NULL or being set to NULL during the loop?
04:36:54 <mauke> elliott: the loop condition is *pp. pp is modified in the loop. thus the loop may hit a point where *pp is already NULL without modifying *pp
04:36:55 <ais523> so you're calling two different things pp
04:37:03 <elliott> mauke: setting pp sets *pp
04:37:07 <mauke> elliott: bullshit
04:37:19 <ais523> and that's why you can make apparently self-contradictory statements, because you don't distinguish between the multiple possibilities for pp
04:37:22 <elliott> your code sounds quite confusing, I'd have locked you up by now :)
04:37:32 <zzo38> Do *you* think my C codes are of the kind suitable for IOCCC???? I don't think so....
04:37:47 <mauke> ais523: I'm calling N different things pp
04:37:48 <ais523> zzo38: probably not, good IOCCC code has to be written specifically for the IOCCC
04:37:51 <mauke> ais523: I AM ITERATING OVER A LIST
04:38:14 <elliott> Programmer suspected of espionage yells at FBI interviewer; jailed for life
04:38:20 <mauke> also, <mauke> ais523: pp is modified in the loop
04:38:27 <ais523> OK, so you're iterating over a list and mutating it while iterating over it
04:38:38 <mauke> <mauke> ais523: I'm destructively modifying a linked list
04:38:39 <ais523> and you're using pp as a pointer to the previous next, or the first element otherwise
04:38:54 <mauke> I'm using pp as the address of the pointer to the current element
04:39:09 <zzo38> ais523: Well, yes. But I don't think my codes are obfuscated or anything, it seems clearly to me. There are sometimes a few strange things but I usually describe it if I think it is too strange
04:39:10 <mauke> this is like linked list manipulation 101
04:39:34 <ais523> mauke: it's a trick that I /occasionally/ see when mutating a linked list, in order to avoid specialcasing its start
04:39:40 <ais523> and it's normally written more obviously in such cases
04:39:53 -!- fungot has quit (Ping timeout: 260 seconds).
04:39:59 <ais523> it doesn't help that the common case is hidden inside an if statement, and the main body of the loop handles the rare case
04:40:18 <mauke> ok, that's a point
04:40:28 -!- fizzie has quit (Ping timeout: 260 seconds).
04:40:34 <mauke> I believe I wanted to get the common case out of the way first
04:40:49 <mauke> if (whatever) ... continue; done
04:41:15 <zzo38> This code has nothing wrong with it to me but some people say it is wrong to do a lot of the stuff I do in this code http://repo.or.cz/w/TeXnicard.git/blob_plain/HEAD:/texnicard.w
04:41:42 <mauke> (the alternative to using a pointer-to-pointer in the loop is two variables you have to keep in sync manually plus some code duplication)
04:41:45 <elliott> zzo38: you forgot to use more-notation
04:42:21 <zzo38> elliott: For one thing, it is not a Haskell program.
04:42:29 <elliott> well yes, that's the other problem.
04:42:31 <ais523> I think I know where the bug likely is; I think there's an off-by-2 (or off-by-4) error in one of the calls to cap_equals, because the API you're using would make such errors really hard to notice
04:42:51 <zzo38> I don't think so. C is still a good programming language too.
04:43:15 <zzo38> LLVM would be very good (in fact, much better designed than C, I think) if there was a good macro system for it.
04:43:24 <ais523> you're taking the addresses of array elements all the time, and that's a perfect opportunity to accidentally do that "twice" and take, say, the 6th element by taking the second then taking its fourth
04:43:30 <zzo38> But TeXnicard is going to continue to be a C program.
04:43:56 <ais523> that would explain how field 6 becomes relevant even if it's not referred to by name
04:44:29 <mauke> ais523: easy to disprove. I only use array indices in calls to cap_equals, and cap_equals doesn't index
04:44:33 <zzo38> (Although I plan to write one of the related programs in Haskell; that is, part of the program for automating game play could be written in Haskell)
04:44:35 <mauke> ais523: therefore no double indexing occurs
04:44:46 <ais523> mauke: yes, right
04:44:54 <ais523> perhaps you should have slipped the bug in there, it'd have been well-hidden
04:44:58 <ais523> you easily could have done
04:45:36 <ais523> &m[2] in drop_superseded would have looked completely innocent
04:46:11 <mauke> hmm, true. why didn't I think of that?
04:47:26 <zzo38> Are there any hidden malicious stuff in *my* program? (Unless I put it by accident I do not expect so.)
04:48:32 <zzo38> (Actually I wanted to compile natural language into Haskell and/or Dangelo)
04:49:23 <elliott> mauke: as you can see, zzo38 is a gift to all of us
04:50:26 <mauke> elliott: I ignore them
04:50:34 <zzo38> Don't be so sure... OF ANYTHING!!!
04:50:40 <elliott> mauke: you're missing out
04:50:52 <elliott> <zzo38> Don't be so sure... OF ANYTHING!!!
04:50:53 <elliott> good advice
04:51:24 <ais523> mauke: is it deliberate that your regex doesn't quite match the one in the question, btw? you can cause the optional comment to not match by omitting the whitespace at the start of the comment whilst having it all match, but I'm not sure if that has any effect on the program flow
04:51:35 <ais523> and forgetting a space would look like a plausible error
04:51:45 <ais523> that's one of the first things I noticed, but I didn't bring it up
04:52:03 <mauke> what do you mean?
04:52:25 <ais523> ([A-Z]{3})([[:space:]]+[^[:space:]].*)? is what you have
04:52:29 <ais523> oh, then a $
04:52:42 <ais523> "any positive number of spaces, then anything that isn't a space, then any characters" is redundany
04:52:49 <ais523> *redundant
04:53:01 <ais523> or, hmm, is it?
04:53:10 <mauke> I wanted to be explicit
04:53:29 <ais523> it's definitely not what the question specified, "\s.*", which allows for a comment consisting entirely of whitespace
04:53:36 <elliott> mauke: that's a bit ironic
04:54:33 <mauke> ais523: correct. scan never checks if the regex actually succeeded, leaving old information in the capture buffers. this is triggered by trailing whitespace
04:54:37 <mauke> you've found bug #1
04:54:47 <mauke> (what, did you think there was only one hole?)
04:55:17 <ais523> in the UCC, you should probably only have one, otherwise you give more space to find malicious behaviour
04:55:50 <mauke> if they all look like plausible mistakes, some of them may survive a code review
04:55:56 <zzo38> If I fix haskell-src-exts to make some of the things I wanted to have in Haskell, including more-notation and a new kind of preprocessor with different macros (including running Haskell codes at tokenizer level), what would be called?
04:56:10 <ais523> also, I'm not sure if it's deliberate that the check on whether to succeed in insert (on fields 2 and 4) is different from the one in drop_superseded (on field 2 only)
04:56:26 <elliott> zzo38: zzo38skell-src-exts
04:56:46 <mauke> ais523: if it's a bug, it's not deliberate
04:56:47 <ais523> it looks wrong, especially because with insert removing duplicates, drop_superseded has no reason to exist at all
04:57:09 <mauke> but I don't remember the exact rules of the task anymore
04:57:12 <mauke> I'd have to reread it
04:58:11 <zzo38> elliott: That does not seem best name. Anyways it will be a full program rather than a library usable by other programs. It is written using unliterate layout style, so I will keep it that way when modifying it (although it is not the way I write my own programs)
04:58:27 <mauke> ais523: I think the idea was that something like A -> B, B -> C followed by A -> X would have to override A -> B and drop B -> C
04:58:30 <mauke> maybe
04:58:41 <ais523> hmm, perhaps
04:58:54 <ais523> it doesn't help that the task's unclear on what the intended behaviour is
05:00:36 <ais523> I'll give up reading it for now, anyway, the task's too vague for me to work out whether certain bits of it are right or not
05:00:52 <elliott> pop0gnirtsAsString is definitely the best function name I've ever created
05:00:57 <elliott> apart from push0gnirtsAsString
05:01:15 <ais523> elliott: recently, I was trying to think of a word starting with 0
05:01:20 <ais523> and "0gnirts" was the only one that came to mind
05:01:25 <elliott> "0gnirts" doesn't start with 0, it starts with '"'
05:01:32 <elliott> but, 0-day?
05:01:38 <ais523> well, the word was 0gnirts
05:01:45 <ais523> and I put quotes round it because I was quoting it
05:01:51 <ais523> and I didn't think of that one
05:01:53 <elliott> but the word is actually "0gnirts"
05:01:57 <ais523> well, OK
05:02:00 <elliott> they're not called 0gnirtses, they're called "0gnirts"es
05:02:05 <ais523> I pronounce it without the quotes
05:02:13 <elliott> how do you pronounce quotes?
05:02:14 <ais523> as o-gnerts
05:02:21 <ais523> that's /why/ I pronounce it without the quotes
05:02:24 <elliott> heh
05:02:56 <mauke> ais523: hint: all of the bugs are in scan and main
05:03:02 <ais523> (it's how you trigger a NetHack bug that only happens with over 1000 users)
05:03:11 <elliott> ais523: wat
05:03:18 <ais523> *over 9000
05:03:18 <elliott> how does that work?
05:03:28 <ais523> basically, overflow to the fifth digit of UIDs
05:03:54 <ais523> meaning that you can confuse it between 10000gnirts parsed as 1000+0gnirts or 10000+gnirts
05:04:01 <elliott> heh
05:04:14 <ais523> the effect being that UID 1000 can mess with UID 10000's savegames
05:05:14 <elliott> ?pl \f -> catchReflect $ pop0gnirtsAsString >>= ioFail . f
05:05:14 <lambdabot> catchReflect . (pop0gnirtsAsString >>=) . (ioFail .)
05:05:18 <elliott> no thanks
05:05:48 <zzo38> What does pop0gnirtsAsString means?
05:06:04 <elliott> funge
05:08:05 -!- copumpkin has changed nick to Commodus.
05:08:30 <ais523> zzo38: 0gnirts is the standard representation of strings in Befunge (and other Funges), and String is the standard representation of strings in Haskell
05:08:47 <ais523> the function pops an 0gnirts off the Funge stack and converts it to a String
05:08:47 -!- Commodus has changed nick to copumpkin.
05:09:05 <elliott> I should really make it use ByteStrings instead
05:09:14 <elliott> actually, the current way might be faster because the stack is a []
05:09:16 <elliott> but I should fix that, too
05:11:18 -!- CakeProphet has quit (Ping timeout: 240 seconds).
05:12:21 -!- augur has quit (Remote host closed the connection).
05:12:24 <zzo38> What was the first Haskell program you wrote?
05:12:34 <elliott> umm, I don't remember
05:12:36 <ais523> I can't remember
05:12:37 <elliott> probably something very simple
05:12:48 <elliott> first real program might have been the unfinished underload compiler? dunno.
05:13:08 <ais523> the first real Haskell program I wrote was an implementation of my theories about ICA to SCC type inference
05:13:20 <zzo38> ais523: What does that mean?
05:13:22 <ais523> which I've since reimplemented in OCaml
05:13:33 -!- invariable has joined.
05:13:43 -!- Nisstyre has quit (Ping timeout: 250 seconds).
05:14:08 <ais523> zzo38: ICA and SCC are two different type systems; ICA's type system is similar to Algol's (but a mathematically idealized version that also allows for concurrent execution), and SCC requires each variable to be accessed from finitely many functions at a time (with an explicit number bounding that)
05:14:10 -!- variable has quit (Ping timeout: 252 seconds).
05:14:52 <ais523> so basically, it's counting bounds on concurrent uses of a variable
05:15:15 <zzo38> OK.
05:15:27 <ais523> it boils down to simultaneous inequalities, in the end; I got a paper out of proving that those inequalities could always be solved with integers
05:16:29 <zzo38> First Haskell program I wrote is a compiler of esolang, too; but not Underload.
05:16:36 <zzo38> elliott: Did you use Template Haskell in that program?
05:16:48 <elliott> zzo38: no
05:16:53 <elliott> I tend to avoid TH
05:17:11 <zzo38> Do you dislike TH?
05:17:19 <ais523> elliott: are Haskell templates more or less sane relative to Haskell than C++ templates are to C++?
05:17:26 <ais523> s/are to/are relative to/
05:17:45 <elliott> zzo38: I don't dislike it so much as avoid it when it isn't absolutely necessary; it's very heavy, and functions are much nicer
05:17:54 <elliott> plus, writing TH code is very difficult (compared to using it)
05:17:58 <elliott> because of all the boilerplate
05:18:04 <elliott> ais523: I would say yes
05:18:17 <mauke> ais523: that comparison looks like a type error
05:18:24 <mauke> TH is much more like Lisp macros
05:18:26 <ais523> that wasn't intended to be a yes-or-no question, although I suppose that's one way to parse it
05:18:40 <ais523> I assume that TH is saner than C++ templates, but OTOH Haskell is saner than C++
05:18:53 <ais523> I was wondering which comparison had a greater sanity difference
05:18:55 <zzo38> I think TH is just not as powerful as some proper macros could be, that is why I want to implement new one, that can be used in addition to TH.
05:18:59 <elliott> mauke: you can compare differences in sanity
05:19:21 <mauke> I'd say the embedding is a bit awkward but at least in TH the metalanguage is Haskell
05:19:35 <mauke> that wins major sanity points over C++ templates
05:20:12 <ais523> arguably, C++ templates form a better language than C++ itself
05:20:16 <ais523> it's at least functional
05:20:26 <ais523> and reasonably self-consistent and well-behaving
05:20:29 <ais523> shame about the syntax
05:21:00 <elliott> I wonder what templates are like in SPECS
05:21:25 <zzo38> Enhanced CWEB allows you to do metaprogramming in C (although it is interpreted C)
05:22:05 <zzo38> Constantinople compiler in Haskell uses Template Haskell codes.
05:22:26 <mauke> @keal
05:22:27 <lambdabot> Cale etc already pointed out Haskell is puny to nothing to emulate using my barrage of mathematic theories
05:23:15 -!- ive has joined.
05:24:03 -!- kmc has joined.
05:24:08 <elliott> yay, all done, and things are slower than before
05:24:41 <elliott> I like how I'm optimising a program that doesn't strictly work... feels like C
05:24:54 <elliott> oh dear, has it gone over a thousand lines of code?
05:25:19 <elliott> oh, wow, my SLOC have shrinked since earlier today
05:28:24 <zzo38> My program contains things that might be badly done because I have not written program in Haskell before, such as this: initialMem = MemList $ (MemList $ fix (MemZero :)) : fix (MemZero :); p_nand x y = Pointer undefined (liftA2 r_nand (mem_read x) (mem_read y)); transWrite w p x y = mem_write p (w x (mem_read p y)) y;
05:29:39 <elliott> why the undefined?
05:30:08 <zzo38> Because a "nand" expression in Constantinople is read-only. The first parameter to the Pointer constructor is used for writing.
05:30:31 <elliott> then you want a ROPointer and a Pointer being ROPointer + write
05:30:34 <zzo38> At least, I think it is read-only; if they want to change that, anyone can change this
05:30:47 <elliott> or at least a Maybe field in Pointer so that you can handle read-only things without undefined
05:32:52 <zzo38> That is one idea. Thanks for opinion. But it seems to me that the simplest and reasonable way to do it is to simply not define the writing function for "nand" but otherwise use everything the same way.
05:33:46 <elliott> zzo38: your types, as they are, do not correctly model the situation; so you are very likely to run into bugs you wouldn't otherwise
05:33:49 <oerjan> zzo38: fix (x :) = repeat x
05:34:00 <zzo38> oerjan: OK, thanks. I didn't know that.
05:34:03 <elliott> zzo38: Haskell is all about defining the right types to model your situation, and then using them correctly; without that, you won't benefit much from its strengths at all
05:34:15 <ais523> hmm, "fix (x:)" is actually shorter
05:34:26 <ais523> no, same length
05:34:38 <ais523> just uses narrower characters, so shorter in a proportional font
05:34:46 <mauke> to paraquote larry, "the trick is to use haskell's strengths rather than its weaknesses"
05:35:31 <ais523> hmm, are there any interesting Haskell "conducts", like one-liner Python?
05:35:46 <oerjan> "conduct"?
05:35:46 <ais523> restrictions you put on yourself so you avoid using the language's strengths and have to be more creative?
05:35:57 <ais523> oerjan: like in NetHack, a self-imposed restriction to make it more difficult
05:36:13 <elliott> ais523: point-free style... WITH NO EXCEPTIONS
05:36:21 <elliott> and no more than one level of parentheses, too
05:36:29 <elliott> and no where clauses. or completely junk definitions.
05:36:31 <ais523> beautiful
05:36:36 <oerjan> elliott: that's a rather lethal combination
05:36:37 <ais523> "completely junk definitions"?
05:36:51 <elliott> ais523: as in, definitions that don't have any generalness at all, and you're just using them to subvert the parentheses and where rules
05:36:55 <elliott> obviously it's slightly subjective :P
05:36:59 <ais523> also, how do you do a where clause in a pointfree program anyway
05:37:04 <elliott> foo = f . g
05:37:06 <elliott> where f = ...
05:37:11 <ais523> oh, I see
05:37:13 <oerjan> can you even @pl everything that can be @pl'ed without nesting parentheses
05:37:26 <elliott> oerjan: with the right combinators, surely; and like I said, you can use top-level definitions
05:37:26 <ais523> you need to ban let..in too, then, unless you consider that to break pointfree and where not to
05:37:29 <elliott> just not "junk" ones
05:37:33 <elliott> ais523: well ok yes yesyes
05:37:50 <ais523> my ICA-addled mind insists on interpreting let/where as simply sugar for lambda
05:39:11 <elliott> ais523: it's not quite trivial sugar in the presence of mutually-recursive definitions
05:39:17 <zzo38> I also use this, which I don't know if anyone else already made up something like this: monadify = either (fail . show) return;
05:39:19 <elliott> oerjan: did you ever find an elegant desugaring of that?
05:39:57 <ais523> elliott: in ICA, recursion has to be explicit anyway
05:40:12 <ais523> e.g. let versus let rec ... and ... in OCaml (and probably other MLs too)
05:40:45 <zzo38> Do you know if anything like the "monadify" function exists?
05:40:51 <elliott> ugh, some of this program is just so, so ugly and I don't even know where to statr on fixing it
05:41:02 <elliott> I want something like hlint but that's really, really anal
05:41:12 <elliott> I can solve a list of problems in arbitrary order, I just can't make this program good
05:41:32 <oerjan> oh hm Jot has bounding parentheses if you convert it to @pl-form
05:41:50 <oerjan> *bounded
05:42:11 <ais523> oerjan: I've actually been wondering what the minimum nesting level is needed for TCness in BF
05:42:26 <ais523> I suspect it's either 2 or 3; 0 is obviously sub-TC, and 1 nearly as obviously
05:42:43 <oerjan> [F0] = [F]SK = ($ ap const) $ [F]
05:43:02 <oerjan> [F1] = \x y -> [F] (x y)
05:43:11 <oerjan> @pl \x y -> f (x y)
05:43:11 <lambdabot> (f .)
05:43:23 <oerjan> duh
05:43:31 <oerjan> [F1] = (.) $ [F]
05:43:38 <oerjan> and [] = id
05:44:00 <oerjan> so barring typing issues, Jot needs only one level
05:44:18 <zzo38> Would you have written this code differently? parseConstantinople = runIO (getEnv "Constantinople" >>= flip openFile ReadMode >>= hGetContents) >>= (monadify .:: parse) (programParser $ VarE 'return) "";
05:45:18 <zzo38> oerjan: Jot needs one level of what? And other?
05:45:26 <oerjan> of parentheses
05:45:33 <zzo38> OK
05:45:37 <oerjan> if you convert it point-free haskell
05:45:44 <zzo38> OK
05:46:18 <oerjan> oh wait
05:46:33 <zzo38> I know that K and I combinators correspond to (const) and (id) in Haskell. And in fact I used those as the definition of the root pointer: root = Pointer const id;
05:46:38 <oerjan> *[F0] = ($ const) . ($ ap) $ [F]
05:47:15 <zzo38> Is there S combinator function in Haskell?
05:47:27 <mauke> ap, <*>
05:47:28 <oerjan> yes, ap in the (e ->) Monad
05:47:49 <oerjan> or <*> in the (e ->) Applicative
05:48:05 <mauke> @type \f g x -> f x (g x)
05:48:06 <lambdabot> forall t t1 t2. (t -> t1 -> t2) -> (t -> t1) -> t -> t2
05:48:13 <mauke> @hoogle (t -> t1 -> t2) -> (t -> t1) -> t -> t2
05:48:14 <lambdabot> Data.Function on :: (b -> b -> c) -> (a -> b) -> a -> a -> c
05:48:14 <lambdabot> Data.Data gmapQl :: Data a => (r -> r' -> r) -> r -> (d -> r') -> a -> r
05:48:14 <lambdabot> Control.Parallel.Strategies parZipWith :: Strategy c -> (a -> b -> c) -> [a] -> [b] -> [c]
05:48:18 <mauke> meh
05:48:22 <mauke> @pl \f g x -> f x (g x)
05:48:22 <lambdabot> ap
05:48:42 <zzo38> Can there be used without Monad or Applicative needed?
05:48:55 <mauke> what
05:49:06 <elliott> i agree
05:51:16 -!- GreaseMonkey has quit (Ping timeout: 240 seconds).
05:52:35 <oerjan> <ais523> I suspect it's either 2 or 3; 0 is obviously sub-TC, and 1 nearly as obviously <-- i think i monologued a proof for 1 on the channel not too long ago
05:52:54 <ais523> 1 being sub-TC?
05:52:57 <ais523> it's not too hard
05:53:08 <ais523> you basically can't do any flow control within a loop
05:53:44 <oerjan> zzo38: flip is readFile
05:53:46 <oerjan> openFile ReadMode >>= hGetContents
05:53:50 <oerjan> argh
05:54:14 <oerjan> irssi's line joining would be nice if you could actually trust it
05:54:31 <zzo38> oerjan: Sorry I do not understand can you explain it better please?
05:54:43 <oerjan> zzo38: it was mispasted by irssi
05:54:47 <oerjan> @src readFile
05:54:47 <lambdabot> readFile name = openFile name ReadMode >>= hGetContents
05:54:49 <zzo38> OK.
05:55:07 <oerjan> that's what i meant
05:55:30 <zzo38> OK, so I do not need what I wrote; readFile will do that. OK thanks
05:56:00 <zzo38> So is (getEnv "Constantinople" >>= readFile) good enough?
05:56:43 <oerjan> i should think so
05:57:05 <zzo38> OK. Anything you have to say about the other parts of that program?
05:57:51 <zzo38> (The environment variable "Constantinople" is set in a shell script. It seems the only way it works in Template Haskell due to splices running multiple times)
05:57:52 <elliott> oh dear; it looks like the next obvious thing to do to shiro is to either:
05:57:54 <elliott> - name every core instruction
05:57:54 <elliott> or
05:57:56 <elliott> - rewrite the fungespace
05:59:39 -!- GreaseMonkey has joined.
06:01:18 <zzo38> I designed a computer (including the CPU instruction set) called OMEGACOM-1. I never intend to implement it in hardware, although it is intended to be possible to do so and of an old-style.
06:01:53 <zzo38> The keyboard consists of the alphabet (QWERTY), digits zero to nine, spacebar, and three more keys: RUBOUT, ALT, and SEND.
06:02:26 <zzo38> ALT+Z rewinds the tape, ALT+W to play tape, ALT+X to fast forward, ALT+Y to record.
06:03:07 <zzo38> ALT+0 is reset the computer, ALT+1 sends the user interrupt (interrupt 1), ALT+2 pauses the system, and ALT+3 to resume.
06:03:27 <zzo38> Other keys with ALT is used to put punctuation symbols.
06:04:06 -!- copumpkin has changed nick to luke-sr.
06:04:30 <zzo38> (Actually, the way it is designed, ALT+SPACE happens to be the same as RUBOUT, ALT+RUBOUT the same as SPACE, and ALT+SEND generates the keycode for the ALT key (which otherwise cannot be sent to the CPU).)
06:05:24 <zzo38> Bytes in this computer are 16-bits and addresses are also 16-bits.
06:05:26 -!- luke-sr has changed nick to copumpkin.
06:06:10 <zzo38> Memory map is 0x0000-0x3FFF for RAM, 0x4000-0x7FFF for VRAM, 0x8000-0xBFFF for SLOT-0, and 0xC000-0xFFFF for SLOT-1.
06:08:00 <zzo38> The RAM initially points to internal ROM instead, and then it disables itself after it copies itself to unused space in VRAM and jumps there. It starts like this: XOR A A MOV X "4000 ?LOAD MOV .XS .A LUI "180 =LOAD MOV P "4C08 SLV '1 '2
06:08:26 <zzo38> P is the program counter register.
06:14:53 <zzo38> Each instruction has a two-bit condition specifier, which can be: Always, Carry, Zero, or Nonzero.
06:20:57 -!- myndzi\ has joined.
06:24:16 -!- myndzi has quit (Ping timeout: 240 seconds).
06:26:09 <zzo38> What is your opinions and ideas about this?
06:26:32 <elliott> it's great + perfect
06:26:33 <elliott> mergeByteString Shiro.FungeSpace 30.1 27.8
06:26:34 <elliott> !@ Shiro.FungeSpace 21.1 0.7
06:26:34 <elliott> modifyIPList Shiro.Monad 15.4 39.1
06:26:34 <elliott> doNextIns Shiro.Interpreter 4.9 1.1
06:26:36 <elliott> ooh, interesting
06:26:46 <elliott> how on earth is modifyIPList taking that much time?
06:26:57 <elliott> modifyIPList :: (([IP],[IP]) -> ([IP],[IP])) -> Shiro ()
06:26:58 <elliott> modifyIPList f = modify $ \st -> st{ ipList = f (ipList st) }
06:27:02 <elliott> oerjan: look at my cost centre :D
06:27:04 <elliott> (well, one of them)
06:27:31 <zzo38> It is just meant to be oldstyle, actually. I did not explain everything yet.
06:29:20 -!- copumpkin has quit (Ping timeout: 252 seconds).
06:29:40 <oerjan> i dunno
06:29:44 -!- copumpkin has joined.
06:30:43 <elliott> oerjan: dunno what
06:30:44 <elliott> ?
06:30:58 <oerjan> about profiling
06:32:46 <zzo38> I have rules for a card game called "Mature". You use a standard deck of cards, ranking from high to low: T98765432AKQJ. Play with 4 player and something to keep track of scores. Each player plays for himself. Give 13 cards to each player. Now the dealer can call any suit for trump. The player after the dealer can now lead any card to the first trick.
06:32:48 <elliott> hmm, I can either write a new fungespace, clean up the core interpreter file (bleh), or convert everything to lenses, quite possibly seeing a speed improvement from doing so
06:32:52 <elliott> who wants to vote?
06:33:21 <zzo38> After a card has been led to the trick, each player in order must now play a card to the trick. If you have anycard of the suit led you must play one of those, otherwise you can play any card you want to. If there is any trumps, the player who put the highest trump wins the trick,otherwise the player with the highest card of the leading suit wins the trick.
06:33:35 <zzo38> The winner of the trick places those cards face-down in their score pile and can lead any card to the next trick.
06:34:22 <zzo38> After all tricks are played. count points. Jacks and kings are collectively called "men". Make the longest sequence you can that alternates between men and queens (it doesn't matter which comes first). The number of cards in that sequence is your score.
06:35:42 <zzo38> (Other cards are not used for counting score)
06:40:52 <coppro> zzo38: and presumably the game is played so that everyone has an equal number of turns as dealer?
06:41:06 <zzo38> coppro: Yes, I would assume so.
06:43:56 <coppro> hmm... interesting
06:44:05 <coppro> It seems to me that the scoring might be a little bit low
06:44:28 <coppro> as likely all scores will be either one man, two man and a queen, or three men and two queens
06:44:42 <coppro> but the idea that you do not control your own scoring cards is interesting
06:47:56 -!- oerjan has quit (Quit: Good night).
06:50:23 <zzo38> I have rules for another card game called "Mate". It is played with 20 cards only, the 89TJQ of each suit (Q is high). Each player gets ten cards laid out on the floor according to suit. These are called his "hand" even though they are actually on the floor.
06:51:23 -!- CakeProphet has joined.
06:51:23 -!- CakeProphet has quit (Changing host).
06:51:23 -!- CakeProphet has joined.
06:51:39 <zzo38> First player starts by leading any card to a trick. Follower must follow suit if possible. If that is not possible, they must follow rank. If they can do neither, they lose the game and the winner counts points.
06:51:42 -!- ive has quit (Quit: leaving).
06:52:40 <coppro> that's a perfect information game :/
06:53:06 <coppro> or is once the hands are out anyway
06:53:17 <zzo38> Suits rank as in bridge. Whoever played the card that is higher ranked (or higher rank suit) wins the trick and leads any card for the next trick. (Note: Keep tricks for the players who held the cards originally; do not give them to the winner of the trick.)
06:54:55 <zzo38> Sacrificing: When it is your turn to play a card (leading or following), you may, if you choose, discard any of your cards before playing. (This might allow you to follow rank if you could not otherwise do so; it also adds to your score.) If this results in you having no cards on your turn, the last card played is assumed to be your only card and you must play it if possible (otherwise you lose).
06:55:52 <zzo38> Queen privilege: Whenever you lead a queen of any suit, you may force the opponent to follow with another queen if they have any. It is optional decision when you lead a queen, and an opponent having multiple queens can still select which one to play.
06:56:45 <zzo38> Scoring: Only the winner scores. Add together the total number of turns plus the number of sacrifices you made, and multiply this by the scoring value of the last card you played: Eight = 6, Nine = 3, Ten = 4, Jack = 9, Queen = 10.
07:01:23 <zzo38> I also have rules for a game called "Rummage", which you make melds of Rummy but also make tricks.
07:02:02 <zzo38> And "Chinese Euchre", which is neither Chinese nor Euchre.
07:10:39 <zzo38> Here are the rules for "Janken Poker": Shuffle the cards and deal one card face-up. Do rock-paper-scissors; the winner gets to keep that card (if stalemated, do again). You may reject the card you just received if you want to, by turning it face-down. Each player may reject only up to three cards. Repeat until each player has seven cards.
07:11:09 -!- copumpkin has quit (Ping timeout: 240 seconds).
07:11:14 <zzo38> If you have seven cards and you receive another, you are forced to reject it (even if you have already rejected three cards). After each player has seven cards, both players discard two cards and whoever has better poker hand wins.
07:11:34 -!- copumpkin has joined.
07:17:49 <zzo38> I once saw the following problem in a book: First player puts any five cards they choose from the deck face-up in front of them. Second player does the same with the remaining cards. First player then discards from zero to five cards and takes replacements of their choice from the deck. Second player does the same. Rank hands as in poker. In case of tie, second player wins.
07:17:58 <zzo38> What should be strategy for first player to play?
07:25:35 <zzo38> In the same book was this problem: An opponent is playing crap but loaded one of the dice so that it is always 5. It is your chance to load the second dice to whatever probabilities you want. What should you do to minimize the chance of their winning?
07:26:54 <zzo38> Do you know the answer of either of these two problems?
07:27:07 <ais523> the second seems easier
07:27:29 <ais523> but still pretty hard
07:27:37 <ais523> obviously you need to load it to never roll 6
07:27:54 <ais523> and I think semi-obviously 1, 3, 4, and 5 need to have the same probability
07:28:11 <ais523> so then it's a matter of working out what the probability of 2 should be, which is just an optimisation problem
07:30:24 -!- wth has joined.
07:31:02 <CakeProphet> ais523: the probability of 2 is certainly 1
07:31:19 <ais523> CakeProphet: you're trying to force a loss
07:31:25 <ais523> 5+2 = 7 which is a win if you get it on the first roll
07:31:29 <ais523> and a loss on other roles of a sequence
07:31:36 <CakeProphet> in fact I am strongly compelled by the evidence of 2.
07:31:46 <ais523> oh, I see
07:31:52 <ais523> you're misinterpreting the question
07:32:00 <CakeProphet> pssssh, you assume I read more than the bottom line of that conversation. :P
07:32:22 <CakeProphet> taking things out of context is always great fun.
07:33:07 <ais523> 5 seems to be a good number to rig a dice to if you want to increase your chance of winning at craps, anyway
07:33:32 <elliott> I'm glad I wrote Shiro in Haskell; it would be unsalvagable if I'd messed it up this badly in another language
07:33:43 -!- wth has left.
07:34:09 * CakeProphet is quite adept at working with sloppy code.
07:34:20 <CakeProphet> it's an important skill to have in practice.
07:34:32 <CakeProphet> /writing/ sloppy code however, is not.
07:34:54 <elliott> working with sloppy code is just a tactic to delay the fact that you're going to have to rewrite it
07:35:30 <CakeProphet> that's a big assumption of what is fact.
07:36:13 <elliott> let fpState = FPState { fpGet = (\(GlobalFPState m) -> unsafeFromAny (m Map.! fpName)) <$> gets globalFPState
07:36:13 <elliott> , fpModify = \f -> modifyGlobalFPState (\(GlobalFPState m) -> GlobalFPState $ Map.adjust (unsafeToAny . f . unsafeFromAny) fpName m)
07:36:13 <elliott> , fpGetIP = (\(IPFPState m) -> unsafeFromAny (m Map.! fpName)) <$> gets (ipFPState . currentIP)
07:36:13 <elliott> , fpModifyIP = \f -> modifyCurrentIP $ \ip@IP{ipFPState = IPFPState m} -> ip{ ipFPState = IPFPState $ Map.adjust (unsafeToAny . f . unsafeFromAny) fpName m } }
07:36:17 <elliott> there, now you've all felt my pain
07:36:29 <elliott> oh wait, I can just make these lenses, yaaaaaaay
07:36:38 <monqy> yaaay
07:36:38 <ais523> elliott: the formatting there made me bletch, I haven't looked at the actual code yet
07:36:56 <CakeProphet> what is FP
07:37:03 <zzo38> What is lenses means in that context?
07:37:20 <ais523> I think Haskell coding possibly ought to be done in a lots-of-small-functions way, just like TDD people advocate for scripting languages
07:37:28 <CakeProphet> zzo38: basically a get function and a set function, along with a modify function defined from the two.
07:37:32 <ais523> it's what I mostly do for ML, at least, except when replicating an imperative algorithm
07:37:39 <CakeProphet> or, is it the set that's defined from get/modify?
07:37:41 <elliott> CakeProphet: fingerprint
07:37:47 <elliott> zzo38: lenses are functional references
07:38:02 <elliott> zzo38: basically, Lens a b is (a -> (b, b -> a))
07:38:16 <elliott> they encompass the notion of record fields as well as a ton of other stuff
07:38:23 <elliott> and they're a Control.Category
07:38:25 <elliott> so they compose really nicely
07:38:33 <elliott> they're great
07:38:41 <zzo38> OK
07:39:00 <CakeProphet> except that's lame and no good person likes a -> (b, b -> a)
07:39:04 <zzo38> How does it compare to the Pointer type in my program?
07:39:09 <elliott> CakeProphet: what?
07:39:11 <CakeProphet> but yeah, that's how they're defined.
07:39:18 -!- Nisstyre has joined.
07:39:24 <zzo38> CakeProphet: What is wrong with that way?
07:39:26 <elliott> that definition is not only the most efficient, it's the most elegant -- it's (a -> Store b a)
07:39:29 <elliott> where Store is the Store comonad
07:39:40 <elliott> if you unbox the tuple, it's even faster :)
07:39:44 <elliott> or use CPS, apparently
07:39:51 <CakeProphet> elliott: I prefer the two-seperate-functions definition. I suppose it's pretty much subjective and not worth arguing/persuading about.
07:39:59 <elliott> CakeProphet: it's not subjective
07:40:03 <elliott> the store comonad version is objectively faster
07:40:10 <elliott> and has better theoretical properties
07:40:35 <CakeProphet> I see.
07:40:48 <elliott> (used by the data-lens package)
07:41:21 <zzo38> CakeProphet: What is the two-seperate-functions definition?
07:42:03 <elliott> (a -> b, b -> a -> a)
07:42:04 <CakeProphet> data Lens a b = Lens (a -> b) (a -> b -> a)
07:42:13 <CakeProphet> er yeah
07:42:27 <elliott> it's not as performant, not as elegant, uglier to state the properties about, has fewer nice theoretical properties, and is lame :)
07:42:27 <CakeProphet> you can do it that way as well.
07:42:41 <elliott> edwardk would be proud of me.
07:42:49 <CakeProphet> yeah but's totally a get function and a set functon.
07:42:51 <CakeProphet> which is way cool.
07:42:54 <CakeProphet> >_>
07:43:10 <elliott> yeah, and now modification is really slow
07:43:11 <elliott> awesome
07:43:22 <CakeProphet> REALLY slow.
07:43:24 <elliott> getL (Lens f) a = pos (f a)
07:43:24 <elliott> modL (Lens f) g = peeks g . f
07:43:24 <elliott> setL (Lens f) b = peek b . f
07:43:26 <elliott> ELEGANT ENOUGH FOR YOU???
07:43:28 <elliott> CakeProphet: actually, yes
07:43:34 <elliott> the performance difference is not minor
07:43:58 <elliott> oh and
07:43:59 <elliott> lens :: (a -> b) -> (b -> a -> a) -> Lens a b
07:43:59 <elliott> lens get set = Lens $ \a -> store (\b -> set b a) (get a)
07:44:03 <elliott> WHOOOPS SO SUPERIOR
07:44:46 <CakeProphet> I guess I'm just a tuple-hater.
07:45:07 <zzo38> So, "a" is where you store in and "b" means the type of the data stored in there? Is that what "a" and "b" means there?
07:45:15 <elliott> zzo38: yep
07:45:16 <elliott> CakeProphet: they're not tuples in the data-lens implementation
07:45:22 <elliott> type Store s = StoreT s Identity
07:45:23 <elliott> data StoreT s w a = StoreT (w (s -> a)) s
07:45:41 <elliott> CakeProphet: but I think the next version coming out is going to recommend unboxed or cps instead
07:45:46 <elliott> where cps is
07:46:02 <elliott> type Lens a b = forall r. a -> (b -> (b -> a) -> r) -> r
07:46:04 <zzo38> I think I defined the Pointer type in the Constantinople compiler something like that, as a read function and a write function.
07:46:10 <elliott> and unboxed is like the tuple version but with more hashes :)
07:47:26 <CakeProphet> yeah a -> (b -> (b -> a) -> r) -> r does not look awful in any way.
07:47:44 <elliott> CakeProphet: good thing you use the abstract API instead, then, based on construction from get/set, isomorphism, or comonad, right?
07:47:59 <elliott> and reason about it that way, rather than relying on the efficient internal implementation that avoids unboxing
07:48:07 <elliott> that also gives all the efficient update advantages of the comonad store model
07:48:22 <zzo38> Although in my program, it was a datatype defined using record names, and the write function came first. In addition, the type being stored in and the type of the data stored in there is the same type.
07:48:22 <CakeProphet> no that stuff is fine. I just dislike the cps
07:48:44 <elliott> CakeProphet: you don't have to care about it, since the pure and unboxed versions are also supplied and they all act according to the basic API
07:48:56 <elliott> but I find it hard to believe you wouldn't select to use it, on account of running the exact same code faster
07:49:11 <CakeProphet> yes I am a performance addict.
07:49:22 <CakeProphet> that's why I use Perl on a day-to-day basis.
07:49:25 <CakeProphet> so fast.
07:49:26 <elliott> CakeProphet: so you're saying you'd _deliberately_ select the slower version?
07:49:32 <elliott> despite it having no visible changes to your code at all?
07:49:34 <elliott> you're insane
07:49:49 <CakeProphet> no I thought you were referring to the cps
07:49:52 <CakeProphet> which would change my code.
07:49:59 <elliott> no, it wouldn't
07:50:10 <CakeProphet> uh..
07:50:19 <elliott> because it's exposed only in terms of the abstract API that all the lens implementations in the development data-lens expose
07:50:44 <CakeProphet> right.
07:50:53 <elliott> https://github.com/ekmett/data-lens/blob/unboxed/Data/Lens/Class.hs
07:50:58 <elliott> erm, that's not the class
07:51:01 <elliott> https://github.com/ekmett/data-lens/blob/unboxed/Data/Lens/Class/Internal.hs
07:51:02 <CakeProphet> which is me not using cps. I thought you were saying the cps iteself was faster than any API built over it.
07:51:15 <elliott> no, the advantage there is in avoided runtime overhead
07:51:56 -!- sebbu2 has joined.
07:52:07 <zzo38> How does my implementation of the Pointer type in the Constantinople compiler compare with lens?
07:52:22 <elliott> zzo38: probably badly, if it's restricted to things of the form (Lens a a)
07:52:29 <CakeProphet> okay so these are convincing points. I can't say you've convinced me to care but I know which I'll use in the future.
07:52:51 <elliott> CakeProphet: YEEES.... THE DATA-LENS MONOPOLY SHALL GROW...
07:53:02 <elliott> (you'll probably want to use data-lens-template and data-lens-fd when you do, FWIW)
07:53:15 <zzo38> elliott: Well yes it is; both types are the same but otherwise it is like the (a -> b) and (b -> a -> a) stuff
07:53:19 <elliott> (former for deriving of lenses from record fields, latter is just the module that would be in data-lens if it didn't depend on fucntional dependencies)
07:53:30 <CakeProphet> elliott: but fclabels has (!%%=)!!!
07:53:55 <elliott> CakeProphet: data-lens has (^!+=)
07:53:57 <CakeProphet> there's NO WAY I could get that functionality from data-lens
07:54:02 <CakeProphet> ...oooooh.
07:54:07 <elliott> also (!&&=)
07:54:12 <elliott> totally useful, let me tell you :-D
07:54:31 <elliott> CakeProphet: http://hackage.haskell.org/packages/archive/data-lens-fd/2.0/doc/html/Data-Lens.html, http://hackage.haskell.org/packages/archive/data-lens/2.0.1/doc/html/Data-Lens-Common.html
07:54:36 <CakeProphet> that's objectively better. Based on number and symbol combinations of hilarious operators I judge this to be superior.
07:54:41 <elliott> former is State monad stuff
07:54:43 <elliott> latter is functional stuff
07:54:54 <zzo38> But for the Constantinople esolang, my system works, at least. type PointerWrite = Memory -> Memory -> Memory; type PointerRead = Memory -> Memory; data Pointer = Pointer { mem_write :: PointerWrite, mem_read :: PointerRead }; root :: Pointer; root = Pointer const id;
07:54:55 <elliott> CakeProphet: also, fclabels was recently ruined by switching to arrows :)
07:55:00 <CakeProphet> wat
07:55:01 <CakeProphet> why.
07:55:04 -!- sebbu has quit (Ping timeout: 245 seconds).
07:55:06 <elliott> CakeProphet: because arrows suck
07:55:17 <CakeProphet> yeah who uses that shit.
07:55:35 <CakeProphet> &&& is maybe like the only thing I've found a use for.
07:55:53 <elliott> well, it provides one useful thing (partial lenses, i.e. things that act like (a -> Maybe b, b -> a -> Maybe a)), but apart from that it's just semantic gunk
07:56:06 <elliott> and those kinds of things can be built as a separate thing without some over-arching abstraction anyway
07:56:16 <CakeProphet> oh hey that's somewhat useful.
07:56:31 <elliott> it is, but roconnor murmured something about implementing them for data-lens :)
07:56:32 <zzo38> Is there any similarity? I could have done it differently if it is useful to do so but for Constantinople both are the same type and I have functions to transform Pointers
07:56:51 <elliott> zzo38: that should be fine for what you have
07:57:07 <CakeProphet> elliott: that a boy. Tell him everything will be okay.
07:57:18 <elliott> do you mean atta boy
07:57:25 <CakeProphet> ...no
07:57:28 <CakeProphet> but maybe I do?
07:57:30 <CakeProphet> also?
07:57:44 <CakeProphet> isn't that sort of the same?
07:58:13 <elliott> i don't think "that a boy" is a thing
07:58:34 <CakeProphet> internet says so.
07:58:36 <zzo38> Do the lenses have anything like transPointer and transWrite?
07:58:40 <elliott> pah
07:58:47 <elliott> zzo38: what are transPointer and transWrite
07:58:53 -!- Patashu has joined.
07:59:09 <CakeProphet> any sort of abstract library in Haskell probably has no mention of "pointer" anywhere in the API.
07:59:28 <zzo38> transPointer :: PointerWrite -> PointerRead -> Pointer -> Pointer; transPointer w r p = Pointer (transWrite w p) (r . (mem_read p));
07:59:32 <CakeProphet> unless, of course, it's an abstract pointer library. :D
07:59:36 <zzo38> transWrite :: PointerWrite -> Pointer -> PointerWrite; transWrite w p x y = mem_write p (w x (mem_read p y)) y;
07:59:41 <elliott> zzo38: that's just composition, isn't it?
07:59:44 <elliott> in which case, yes
07:59:48 <elliott> Lenses form a category
07:59:58 <elliott> CakeProphet: oh yeah, and with data-lens, you have to hide less than fclabels; you just have to hide id and (.) for Prelude so you can get the Control.Category versions
08:00:31 <CakeProphet> things in Prelude should just get eaten by other things.
08:00:35 <CakeProphet> totally a good idea.
08:00:46 <elliott> Control.Category should be exported by Prelude, it's just a bug that it isn't :)
08:02:09 <zzo38> elliott: Is it just composition? Well, the transPointer function is used to change a Pointer, so that it points to the head of whatever it was pointing to before, or to the tail of what it was before, etc
08:02:31 <zzo38> What are Control.Category versions of id and (.)
08:02:35 <CakeProphet> import Control.Category() --whoops
08:02:39 <CakeProphet> zzo38: typeclass methods
08:02:42 <elliott> zzo38: hmm, well it _looks_ like composition
08:02:52 <elliott> zzo38: control.category just adds a category typeclass
08:03:00 <elliott> like you've said, return and (<=<) make the monad versions
08:03:08 <elliott> and Kleisli is an instance of Control.Category.Category
08:03:09 <elliott> as is (->)
08:03:09 -!- Nisstyre has quit (Ping timeout: 240 seconds).
08:03:14 <elliott> http://haskell.org/ghc/docs/7.0.4/html/libraries/base/Control-Category.html
08:03:34 <elliott> newtype Kleisli m a b = Kleisli { runKleisli :: a -> m b }
08:03:34 <elliott> instance Monad m => Category (Kleisli m) where
08:03:34 <elliott> id = Kleisli return
08:03:34 <elliott> (Kleisli f) . (Kleisli g) = Kleisli (\b -> g b >>= f)
08:03:48 <CakeProphet> could Either be a Category maybe?
08:04:08 <CakeProphet> I am basing this solely on the fact that it has two type parameters. :P
08:04:23 <CakeProphet> I am too tired to do any kind of reasoning on the matter.
08:04:41 <elliott> we need
08:04:44 <elliott> id :: Either a a
08:04:45 <elliott> so no.
08:04:55 <elliott> (.) :: Either b c -> Either a b -> Either a c
08:05:00 <elliott> this is also not possible.
08:05:07 <elliott> it's very much not a category :P
08:05:36 <zzo38> I think id and (.) should have the same meaning as it does now, and using different names for the Control.Category. Like how monads use return and (<=<) instead of id and (.)
08:05:47 -!- sebbu2 has changed nick to sebbu.
08:05:58 <elliott> category theorists and anyone who uses lenses would disagree :-P
08:05:59 <CakeProphet> elliott: if you had something like Left a | Right b | Nothing maybe?
08:06:14 <elliott> the only reason most of Prelude is like it is is because of backwards compatibility
08:06:23 <elliott> CakeProphet: so Maybe (Either a b)
08:06:28 <elliott> id = Nothing
08:06:29 <CakeProphet> yes
08:06:31 <Sgeo> (Left _) . (Right _) = ?
08:06:38 <elliott> Sgeo: Nothing, presumably
08:06:48 <elliott> I don't think it obeys the laws
08:06:52 <elliott> f . id = id . f = f
08:06:53 <CakeProphet> yes if you get "b" constructor then it is Nothing
08:07:02 <CakeProphet> if it's "a" or "c" then you get... a or c
08:07:04 <Sgeo> Oh, wasn't paying attention to chat after elliott> (.) :: Either b c -> Either a b -> Either a c
08:07:33 <CakeProphet> or rather TWO bs. basically b's are eaten.
08:07:48 <Sgeo> I need to go to sleep
08:07:50 <zzo38> But the monads are only for the same category as before, since it has the same objects, same morphisms, etc. The id and (.) are only for Hask category.
08:08:20 <Sgeo> Night
08:08:37 <CakeProphet> not sure what to do in the case where you have an a and a c.
08:08:37 <elliott> Sgeo: morn
08:08:47 <CakeProphet> I guess Nothing is always a convenient option.
08:09:01 <CakeProphet> but it could prefer one over the other.
08:09:09 <CakeProphet> this is probably breaking a bunch of laws I don't know about though.
08:09:36 <elliott> <elliott> f . id = id . f = f
08:09:37 <elliott> that's the one law
08:09:42 <elliott> you're breaking it.
08:09:42 <zzo38> Maybe the id for Category should be called idC
08:10:25 <CakeProphet> Nothing . a = a :P
08:10:28 <CakeProphet> a . Nothing = a
08:10:31 <CakeProphet> does that fix it?
08:10:50 <zzo38> Other law is associativity
08:11:45 <elliott> CakeProphet: doesn't type.
08:11:51 <elliott> zzo38: oh, yes.
08:11:53 <zzo38> And the (.) for Category is called (<<<)
08:11:55 <CakeProphet> elliott: oh right.
08:12:32 <CakeProphet> Left a | Right b | Both a b
08:12:42 <CakeProphet> Left a | Right b | Both a b | Nothing ????
08:12:48 <monqy> zzo38: no it's called (.)
08:12:58 <elliott> CakeProphet: this sure sounds terrible
08:13:00 <monqy> zzo38: afaik (<<<) is just an alias to match (>>>)
08:13:09 <CakeProphet> elliott: but maybe it's a category. :P
08:13:24 <zzo38> O, I looked at the codes for Control/Category.hs and in fact it does define id and (.) on the Hask category as well.
08:13:36 <CakeProphet> hey sometimes I need one, the other, both, or neither. anywhere in every function.
08:13:39 <elliott> zzo38: yes, it's pretty much entirely backwards compatible.
08:13:41 -!- FireFly has joined.
08:13:46 <zzo38> It says directly in the file: (<<<) = (.)
08:15:02 <CakeProphet> LeftLeft a | LeftRight b | RightLeft c | RightRight d | LeftLeftLeftRight a b | LeftLeftRightLeft a b | ... | All a b c d | Nothing
08:15:06 <CakeProphet> elliott: it could always get worse
08:16:03 <elliott> : replicateM_
08:16:04 <elliott> :t replicateM_
08:16:05 <lambdabot> forall (m :: * -> *) a. (Monad m) => Int -> m a -> m ()
08:17:23 <CakeProphet> also *LeftLeftRightLeft a c
08:17:35 -!- Nisstyre has joined.
08:18:25 <zzo38> O, the difference is (<<<) has different fixity than (.)
08:18:31 <CakeProphet> elliott: truly this is a powerful type with implications both practical and theoretical.
08:19:03 <CakeProphet> oh you could also throw in a linked list just for fun.
08:20:22 <CakeProphet> well I guess it would be a tree actually.
08:25:54 <elliott> :t mapM_
08:25:55 <lambdabot> forall a (m :: * -> *) b. (Monad m) => (a -> m b) -> [a] -> m ()
08:28:37 -!- Nisstyre has quit (Ping timeout: 258 seconds).
08:37:13 <elliott> my code somehow grew four lines during that massive simplification :-|
08:47:14 <monqy> :(
08:47:27 <elliott> and i don't think it got any faster too
08:48:56 <monqy> good thing simple is good
08:49:15 <elliott> i'm not sure it simplified much :D
08:49:20 <monqy> :'(
08:49:32 <elliott> must think of good reason to keep.......................................
08:51:26 <elliott> monqy: there's pretty much only three improvements left to do to the code in its current state oops...
08:51:59 <elliott> make it pass Mycology fully, give names to each of the basic instruction interpreters (maybe), implement the new fungespace, and maybe clean it up generally
08:55:08 -!- Nisstyre has joined.
08:59:16 -!- zzo38 has quit (Remote host closed the connection).
09:00:25 <elliott> ais523: you're still awake?
09:00:32 <ais523> yes
09:00:36 <ais523> I'm trying to roll over sleep pattern
09:00:51 <elliott> me too! it probably won't work for me, tough
09:00:52 <elliott> though
09:01:02 <elliott> my default sleep pattern seems to be "desperately trying to get on a normal sleep pattern"
09:01:11 <elliott> it's... suboptimal
09:03:34 <elliott> Shiro/Types.hs:1:1:
09:03:34 <elliott> Dynamic linking required, but this is a non-standard build (eg. prof).
09:03:35 <elliott> You need to build the program twice: once the normal way, and then
09:03:35 <elliott> in the desired way using -osuf to set the object file suffix.
09:03:37 <elliott> oh my god, not this again
09:04:06 <elliott> oh, it's because of Template Haskell usage
09:04:11 -!- Nisstyre has quit (Ping timeout: 276 seconds).
09:04:16 <elliott> ais523: shake some generic fists at people for me, thanks
09:04:25 <monqy> what hapened...
09:04:31 <ais523> people, stop being so peoplish!
09:04:42 <elliott> monqy: building profiling builds of programs that use TH is a bit of a pain
09:05:10 <elliott> "Exclamation mark formed in space by two colliding galaxies" this is definitely new
09:05:11 <elliott> s
09:05:19 <elliott> "An awesome image that has been released by Nasa shows two galaxies colliding to resemble an enormous purple exclamation mark." are you even pretending to be news
09:07:03 <elliott> monqy: cabal-dev is good btw
09:07:11 <monqy> whats'e that
09:07:53 <elliott> monqy: it sandboxes cabal stuff so that each project has its package repository, which is useful because cabal loves to break
09:08:50 <monqy> the dependency tracking might be nice too, assuming it can does that
09:08:57 <elliott> "shiro: Most RTS options are disabled. Link with -rtsopts to enable them." i did you asshole :(
09:09:09 <elliott> monqy: define dependency tracking? obviously it makes sure that you don't epend on anything without noting it
09:11:08 <monqy> i mean for packaging purposes one of my nightmares is that dependencies and friends murder me in my sleep
09:11:27 <monqy> should I ever want to make my own packages
09:11:29 <elliott> monqy: im dont understand.............
09:12:50 <monqy> keeping track of what pakcages I use: a good thing
09:12:59 <elliott> monqy: you know how to use cabal files right...
09:13:07 <elliott> build-depends:
09:13:08 <elliott> base >= 4 && < 5,
09:13:08 <elliott> containers >= 0.4 && < 0.5,
09:13:08 <elliott> bytestring >= 0.9 && < 0.10,
09:13:08 <elliott> process >= 1.0 && < 1.1,
09:13:08 <elliott> random >= 1.0 && < 1.1,
09:13:10 <elliott> filepath >= 1.2 && < 1.3,
09:13:12 <elliott> time >= 1.2 && < 1.4,
09:13:14 <elliott> directory >= 1.1 && < 1.2,
09:13:16 <elliott> unix >= 2.4 && < 2.5,
09:13:18 <elliott> mtl >= 2.0 && < 2.2,
09:13:20 <elliott> data-lens >= 2.0 && < 2.1,
09:13:24 <elliott> data-lens-template >= 2.1 && < 2.2,
09:13:26 <elliott> hashtables >= 1.0 && < 1.1
09:13:28 <elliott> --shiro.cabal
09:13:30 <elliott> i just started with base and then added the packages until my existing code worked
09:13:37 <monqy> but my nightmare is in getting that to happen
09:13:45 <monqy> the cabal file
09:13:51 <monqy> ive never done it im scared ;_;
09:13:56 <elliott> cabal init --no-comments
09:14:00 <elliott> answer its questions
09:14:02 <elliott> modify the result
09:14:22 <elliott> monqy: but it's easy: http://sprunge.us/EZLZ
09:14:49 <elliott> the only tricky part is knowing what bounds to give the dependencies, but it's pretty easy by looking at the release history of the package to see what kind of increments it goes in
09:15:02 <monqy> that is the scariest part :'(
09:15:07 <elliott> if the major version number increases only very rarely, you probably want the current minor release; else the current major release
09:15:13 <elliott> it's really not hard
09:15:19 <elliott> it just takes a few minutes
09:16:19 <monqy> i'll se what hapens when i try it
09:16:26 <monqy> (asusuming i try it)
09:23:22 <CakeProphet> what's interesting
09:23:34 <CakeProphet> is that a photograph of a photograph is a photograph of the original photograph's subject.
09:23:45 <elliott> ok
09:24:04 <elliott> monads are like cameras
09:24:09 <elliott> snap :: a -> Photo a
09:24:16 <CakeProphet> photographs are like pointers to moments.
09:24:17 <elliott> photoshop :: (a -> b) -> Photo a -> Photo b
09:24:24 <elliott> cakeProphet :: Photo (Photo a) -> Photo a
09:24:27 <CakeProphet> elliott: except photos auto-join
09:24:51 <CakeProphet> ...well, they auto-join and get progressively shittier in quality.
09:26:46 <CakeProphet> snap (Photo a) = snap a
09:26:48 <CakeProphet> or something.
09:27:25 <CakeProphet> ...but not really. I guess join is best to encapsulate (oh shit OO terminology) that behavior.
09:27:36 <elliott> autovivify :: Photo a -> a -- unimplementable
09:28:02 <CakeProphet> ...I don't see how that's autovivify in the Perl sense.
09:29:29 <CakeProphet> more like: vivify :: Maybe a -> a
09:29:38 <CakeProphet> or something.
09:29:48 <CakeProphet> but not really.
09:30:06 <CakeProphet> it's more like vivify :: weird Perl shit you probably shouldn't write in terms of Haskell
09:30:09 -!- Nisstyre has joined.
09:30:15 <elliott> well, autovivification is when things get created automatically.
09:30:20 <CakeProphet> correct you are.
09:30:25 <elliott> so that's automatically creating an object from a photo of it.
09:30:27 <elliott> which you can't do.
09:30:33 <CakeProphet> ah I see.
09:30:46 <elliott> anyway, what matters is that the terminology is colourful :)
09:31:01 <elliott> uh oh, some part of me just wondered whether that photograph metaphor is actually good
09:31:03 <elliott> self-hatred enabled
09:32:31 <CakeProphet> elliott -- the angsty teen years
09:32:44 <elliott> nah, i went through those a few years ago
09:38:43 <elliott> monqy: nobdoybody can help me :'(
09:38:45 -!- Nisstyre has quit (Ping timeout: 264 seconds).
09:38:47 <CakeProphet> selfhate elliott' = let elliott = ElliottWithHate elliott' hatred; hatred = join hate elliott in elliott
09:38:56 <elliott> CakeProphet: how long did that take you
09:39:05 <CakeProphet> had to tie some knots...
09:39:06 -!- mycroftiv has quit (*.net *.split).
09:39:06 -!- Zetro has quit (*.net *.split).
09:39:06 -!- twice11 has quit (*.net *.split).
09:39:17 <CakeProphet> but actually not long.
09:39:42 <CakeProphet> within the minute.
09:42:00 -!- mycroftiv has joined.
09:42:00 -!- Zetro has joined.
09:42:00 -!- twice11 has joined.
09:42:54 <elliott> Deewiant: jesus christ, man, long_.d
09:43:01 <elliott> Deewiant: you're meant to be better than this
09:43:13 <Deewiant> What
09:43:22 <elliott> Deewiant: Inline assembly :D
09:43:22 -!- FireFly has quit (Quit: FireFly).
09:43:46 <elliott> heh, I like how your fallback case uses bigints
09:44:33 <Deewiant> Well, the damn compiler doesn't implement 128-bit integers
09:44:42 <elliott> -- lol @ Deewiant (note: should be aim to next instruction, not advance... probably?)
09:44:42 <elliott> -- (definitely in the else clause)
09:44:42 <elliott> -- well, it kind of is now
09:44:42 <elliott> I'm really good at commenting
09:44:55 <elliott> I don't know whether half my known bugs still exist or not
09:44:59 <Deewiant> It was much easier to get the asm to work
09:45:42 <elliott> http://hackage.haskell.org/package/largeword lame, I thought this would use some fast library for it, but it's just hand-written
09:47:19 <elliott> -- TODO: Also, if the least significant bit of the flags cell is
09:47:20 <elliott> -- high, o treats the file as a linear text file; that is, any
09:47:20 <elliott> -- spaces before each EOL, and any EOLs before the EOF, are not
09:47:20 <elliott> -- written out. The resulting text file is identical in appearance
09:47:20 <elliott> -- and takes up less storage space.
09:47:22 <elliott> let process | flags == 0 = id
09:47:23 <coppro> lol
09:47:24 <elliott> | otherwise = textify
09:47:26 <elliott> Past me, you implemented this, why did you leave the TODO
09:47:28 <Deewiant> If nobody told you about Windows yet: {Get,Free}EnvironmentStrings[AW]
09:47:37 <coppro> so me and another guy managed to simultaneously start work on a several-year-dead project
09:47:45 -!- copumpkin has quit (Ping timeout: 264 seconds).
09:47:50 <coppro> like, within days of each other
09:47:51 <elliott> Deewiant: Ugh
09:48:09 -!- copumpkin has joined.
09:48:12 <elliott> Deewiant: I'd rather just depend on POSIX than manually case on the platform and muck about with the FFI for Windows
09:48:17 <elliott> Who needs EVAR on Windows anyway :P
09:48:25 <elliott> I suppose I could write a tiny C wrapper sometime.
09:48:42 <elliott> Now to figure out why the heck cabal-dev won't build me a profiling version
09:49:20 <elliott> Jesus christ, what is the point of letting me build a profiling version if you won't turn -rtsopts on
09:49:25 <elliott> Oh
09:49:26 <elliott> Oh
09:49:29 <elliott> I see
09:49:35 <elliott> I have been running the old version all this time
09:49:39 <elliott> I'm
09:49:40 <elliott> smart
09:49:55 <elliott> This means that all my performance measurements might be totally bullshit :D
09:50:18 <elliott> Ha ha ha, the zero change in performance is actually a slowdown of about half a second :-|
09:50:22 <elliott> Fuck my life :-|
09:50:32 <CakeProphet> > let cakeprophet = Prophet cake sleep; sleep = sleep cakeprophet in sleep cakeprophet
09:50:33 <lambdabot> Not in scope: data constructor `Prophet'
09:51:48 <CakeProphet> cakeskell permits infinite types...
09:52:41 <coppro> I also love how the entire Erlang community is on #erlang :P
09:55:22 <elliott> Ha ha ha this profiling trace is depressing.
09:56:37 <Deewiant> Everything is somewhat slow?
09:56:57 <elliott> Deewiant: The non-lens record accessors somehow make an appearance as noticeable cost centres.
09:57:16 <elliott> Ordinarily I'd expect this to be because everything else is just so fast, but somehow my record accessors are actually slow.
09:57:45 <elliott> OK, shaved off about a tenth of a second by strictifying EVERYTHING
09:58:20 <elliott> Maybe I should try the git data-lens with those nice unboxed tuples.
10:01:34 <elliott> This is actually really disturbing... why is this so slow.
10:19:39 <elliott> Looks like I'm going to have to revert these lens changes for now.
10:19:59 <elliott> Deewiant: Yeah, OK, the new fungespace will be within the next few changes I make, so WATCH OUT.
10:20:55 * Deewiant ducks
10:21:02 <elliott> Deewiant: TOO LATE IT HIT YOU WITH SPEED
10:21:12 <elliott> <Deewiant> FUCKK I CANT HANDLE THE PSE;D
10:21:50 <monqy> moment of silence
10:21:55 <monqy> "in memory of Deewiant"
10:22:05 <monqy> ""couldnt handle the pse;d""
10:22:58 <elliott> nobody can handle the pse;d
10:23:13 <Deewiant> How will you code it if you can't handle it
10:23:34 <elliott> badly
10:23:50 <Deewiant> Shame
11:15:00 -!- monqy has quit (Quit: hello).
11:24:40 -!- GreaseMonkey has quit (Quit: The Other Game).
11:33:36 -!- azaq23 has quit (Ping timeout: 260 seconds).
11:44:44 -!- azaq23 has joined.
11:54:53 -!- boily has joined.
12:31:44 <elliott> Hmm
12:31:51 <elliott> I guess I'll rewrite the fungespace with the non-lens version
12:32:00 <elliott> And conservatively transform things into a more lens-based style later
12:32:11 <elliott> When I can run Mycology in under half a second :P
12:35:38 -!- aloril has quit (Ping timeout: 246 seconds).
12:47:57 -!- Nisstyre has joined.
12:48:57 -!- aloril has joined.
12:54:49 -!- FireFly has joined.
13:06:23 <elliott> Deewiant: How does the dynamically-sized array stuff work in CCBI's fungespace, anyway; it seems like you'd have to move spaces around a ton to make it work. Or do they have a maximum size, just not preallocate to that?
13:07:16 <Deewiant> The arrays are mostly static
13:07:34 <elliott> "Mostly" :-)
13:08:00 <Deewiant> When a new box gets placed, sometimes the array from an old box it subsumes is reused
13:08:07 <Deewiant> See AABB.consume
13:08:12 <elliott> Heeeey, my structure is fractal.
13:08:18 <Deewiant> And yes, it involves moving stuff around a ton :-P
13:08:22 <elliott> Deewiant: I was going to avoid reading your code for licensing reasons but OK.
13:08:31 <Deewiant> Well don't then
13:08:42 <elliott> Nah, I will, and just ignore any created derivative status :P
13:08:46 <Deewiant> Await my write-up on the thing, which may or may not be begun and finished this year
13:08:54 <elliott> Deewiant: Not sure I see the advantage over a simpler mcmap-style region layout, mind you
13:09:15 <Deewiant> What's a simpler mcmap-style region layoutt
13:09:17 <Deewiant> -t
13:10:11 <elliott> Deewiant: Hash table indexed by dividing each coordinate by N, resulting in a static-sized square array indexed by moduloing each coordinate by N
13:10:24 <elliott> Literally the simplest possible "square regions in a hash table"
13:11:50 <Deewiant> So a partition of the space into arrays of size N^d
13:12:16 <elliott> Deewiant: Yes
13:12:33 <elliott> Deewiant: I could even cheat like Vorpal and arrange it so that a convenient amount of negative space is included in the origin array :-)
13:12:52 <elliott> But I'm fully willing to believe that AABB is totally faster for some reason, I just don't know why :P
13:13:30 <elliott> Obviously something even fancier is probably the ideal, but I can't think of anything that wouldn't be fast with this
13:13:38 <Deewiant> Nobody's done quite that, I don't think
13:13:43 <Deewiant> So maybe it is better, who knows
13:14:06 <elliott> Really? It's the "obvious thing", at least to me.
13:14:40 <Deewiant> Well, most don't divide the space into square regions, i.e. they just use N = 1 :-P
13:14:53 <Deewiant> RC/Funge-98 does something weird
13:15:38 <Deewiant> stinkhorn uses a quadtree of square regions in some way, IIRC
13:15:50 <elliott> http://sprunge.us/cVAX ;; there HAS to be a way to exploit this redundancy :P
13:15:58 <Deewiant> And then there's CCBI
13:16:00 <Deewiant> And I think that's it
13:16:30 <elliott> Deewiant: Well sure, but the field of "sparse, discrete rectangular space" surely cannot be that undersolved
13:16:49 <Deewiant> Oh, I'm sure it isn't
13:16:56 <Deewiant> I just meant in the context of Funge
13:18:01 -!- Nisstyre has quit (Ping timeout: 260 seconds).
13:18:11 <elliott> Deewiant: Right :P
13:18:19 <elliott> Hmm
13:18:44 <elliott> I can't think of any way to exploit the redundancy in these structures that doesn't end up creating a quadtree :D
13:18:55 <elliott> And there's no way I'm writing the essential same algorithms twie
13:18:56 <elliott> twice
13:22:48 <Deewiant> Shoppe -->
13:25:35 -!- derrik has joined.
13:27:11 -!- Nisstyre has joined.
13:32:36 -!- edwardk has joined.
13:32:36 -!- edwardk has quit (Changing host).
13:32:36 -!- edwardk has joined.
13:41:41 <elliott> hmm, actually i probably don't need mincoords/maxcoords on the region map
13:41:49 <elliott> or the population
13:41:56 <elliott> should be sufficiently few elements to calculate that...
13:42:53 <elliott> Annoying that I can't benefit from IntMap's fast minimum/maximum, though, because I need the minimum/maximum vectors...
13:43:06 -!- Phantom_Hoover has joined.
13:43:27 <elliott> helo Phantom_Hoover
13:43:57 <Deewiant> You should probably think about what use case you're optimizing for first :-P
13:47:27 <elliott> Deewiant: Mycology, Fungicide
13:47:34 <elliott> And preferably no pathological worst-cases
13:47:55 <Deewiant> case filename of ...
13:50:19 <elliott> Deewiant: CCBI does that, I take it?
13:50:31 <elliott> Anyway, this isn't the Best Fungespace, this is just something interim to get my runtime down :)
13:51:19 <elliott> Hmm, how big to make regions
13:56:31 <Gregor> What are Haskell and BrainFuck's main differences? I am having trouble spotting them other than syntax, evaluation and staticly typed stuff.
13:58:35 <elliott> Gregor: In brainfuck, [] is a function. But in Haskell, "import" isn't a function.
13:58:39 <elliott> So brainfuck is more flexible.
13:58:47 <elliott> Also brainfuck is everywhere; Urban Müller said so.
13:59:34 <Gregor> Ahhh!
14:01:54 <elliott> Stop bullying me :(
14:03:04 <elliott> Apparently Shiro would cost $32,460 to develop.
14:03:14 <elliott> I'm always quite sceptical of sloccount's estimates.
14:06:07 <elliott> `addquote <Phantom_Hoover> You mean it'd be Tau Zero but without the spaceship?
14:06:11 <HackEgo> 635) <Phantom_Hoover> You mean it'd be Tau Zero but without the spaceship?
14:06:25 <Phantom_Hoover> Um, wha?
14:06:26 <lambdabot> Phantom_Hoover: You have 1 new message. '/msg lambdabot @messages' to read it.
14:06:33 <elliott> Phantom_Hoover: I laughed; good enough for me
14:15:06 -!- Nisstyre has quit (Remote host closed the connection).
14:19:06 -!- Nisstyre has joined.
14:19:07 -!- copumpkin has quit (Quit: Computer has gone to sleep.).
14:20:50 -!- derrik has quit (Ping timeout: 258 seconds).
14:21:20 -!- derrik has joined.
14:36:04 <elliott> > divmod (-999) 512
14:36:05 <lambdabot> Not in scope: `divmod'
14:36:09 <elliott> > divMod (-999) 512
14:36:10 <lambdabot> (-2,25)
14:36:13 <elliott> > quotRem (-999) 512
14:36:14 <lambdabot> (-1,-487)
14:37:47 -!- cheater has joined.
14:41:08 <elliott> > 9999 `shiftL` 9
14:41:09 <lambdabot> Ambiguous type variable `a' in the constraint:
14:41:09 <lambdabot> `Data.Bits.Bits a'
14:41:09 <lambdabot> a...
14:41:11 <elliott> > 9999 `shiftL` 9 :: Int
14:41:12 <lambdabot> 5119488
14:41:14 <elliott> > 9999 `shiftR` 9 :: Int
14:41:14 <lambdabot> 19
14:41:16 <elliott> right
14:43:01 <Deewiant> > 9999 `shiftL` 128 :: Int
14:43:02 <lambdabot> 0
14:43:19 <Deewiant> That's not fast then now is it
14:45:48 <elliott> Deewiant: What
14:46:59 <Deewiant> elliott: It's doing a check against the bitSize, I presume
14:47:09 <elliott> Ah
14:47:17 <elliott> idx :: Vector -> (Int, Int, Int, Int)
14:47:17 <elliott> idx (x,y) = (mask x', mask y', offs x', offs y')
14:47:17 <elliott> where x' = fromIntegral x
14:47:17 <elliott> y' = fromIntegral y
14:47:17 <elliott> mask :: Int -> Int
14:47:18 <elliott> mask = (.&. regionMask)
14:47:22 <elliott> offs :: Int -> Int
14:47:24 <elliott> offs = (`shiftR` regionPow)
14:47:26 <elliott> Patches welcome :-P
14:47:33 <Deewiant> Unless lambdabot's running on an architecture where that's the behaviour, but that seems doubtful
14:48:09 <Deewiant> elliott: x' = fromintegral x :: Int and leave out the mask/offs types?
14:48:33 <elliott> Deewiant: I think they might end up more generic... but anyway, I'm talking about speed patches :-P
14:48:44 <elliott> Oh god, I hope this doesn't turn out uglier than insertFS and mergeByteString.
14:49:08 <Deewiant> You can't really speed patch that without inline assembly or the like :-P
14:49:19 <elliott> <Deewiant> elliott: It's doing a check against the bitSize, I presume
14:49:21 <Deewiant> Or messing with the type signature
14:49:25 <elliott> :P
14:49:34 <elliott> Deewiant: I'm fine with the type changing but I suspect the tuple will be eliminated
14:49:37 <elliott> At compile-time
14:49:49 <Deewiant> idx :: Int# -> Int# -> (# Int#, Int#, Int#, Int# #)
14:49:54 <Deewiant> OKAY?
14:50:22 <elliott> Deewiant: PERFECT. Except no, it has to take a Vector because them be the types I'm working with. Actually I should write specialised Value <-> Int conversion functions, I think unsafeCoerce would work.
14:50:28 <elliott> Since it's probably sixty-four bit ints vs. thirty-two
14:50:42 <elliott> In which case unsafeCoerce will work for Value -> Int, and for every sane Int -> Value
14:51:04 <Deewiant> uncheckedIShiftRL# x regionPow
14:51:09 <Deewiant> import GHC.Prim
14:51:15 <Deewiant> And use Int#
14:51:35 <elliott> Finally my code is beginning to become readable
14:51:38 <elliott> TIME TO THROW ALL THAT WAY
14:52:22 <Deewiant> Or do you want sign extension there
14:52:38 <elliott> Deewiant: I need finding the minimum coordinates to work, at least
14:52:44 <elliott> On the mask results
14:52:44 <Deewiant> If you do, s/L#/A#/
14:52:45 <elliott> And maximum too
14:52:53 <elliott> The offset should always be positive, too
14:52:56 <elliott> So yeah
14:53:16 <elliott> OK but no seriously I should write insertFS before getting into MICRO-OPTIMISATION TERRITORY
14:53:32 -!- copumpkin has joined.
14:56:11 -!- hebru has joined.
14:58:12 <hebru> hola
14:58:17 <Phantom_Hoover> Hello.
14:58:42 <Phantom_Hoover> Welcome to #esoteric, worldwide hub for esoterica.
14:58:58 -!- edwardk has quit (Quit: Computer has gone to sleep.).
14:59:54 <ais523> *esoteric programming languages
15:00:02 -!- invariable has changed nick to variable.
15:01:01 <elliott> OK, insertFS is easy, it's insertSR that's hard :P
15:01:13 <elliott> Maybe because it's the EXACT SAME INSERTFS AS BEFORE.
15:01:21 -!- hebru has quit (Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )).
15:01:22 <Deewiant> What are these TLAs
15:01:50 <elliott> Deewiant: FS = fungespace, SR = space region
15:01:51 <Deewiant> Insert into FileSystem and insert into SRAM?
15:01:57 <Deewiant> Almost
15:01:59 <elliott> :t insert
15:02:00 <lambdabot> forall a. (Ord a) => a -> [a] -> [a]
15:02:08 <elliott> insertFS originally chosen for clash-avoidance :P
15:02:38 <Deewiant> import hiding, qualified, etc
15:03:32 <elliott> Deewiant: My own modules? Gross
15:03:41 <elliott> I'll call it insert when it's a separate package
15:03:50 <Deewiant> No, Data.List
15:04:51 <elliott> ?hoogle insert
15:04:51 <lambdabot> Data.HashTable insert :: HashTable key val -> key -> val -> IO ()
15:04:52 <lambdabot> Data.IntMap insert :: Key -> a -> IntMap a -> IntMap a
15:04:52 <lambdabot> Data.IntSet insert :: Int -> IntSet -> IntSet
15:04:55 <elliott> Meh
15:04:57 <elliott> :t Prelude.insert
15:04:58 <lambdabot> Not in scope: `Prelude.insert'
15:04:59 <elliott> Meh
15:05:06 <Deewiant> :t Data.List.insert
15:05:07 <lambdabot> forall a. (Ord a) => a -> [a] -> [a]
15:05:13 <Deewiant> :t List.insert
15:05:13 <kmc> elliott, so your idea of an esoteric language is Haskell with the type checker turned off?
15:05:14 <lambdabot> forall a. (Ord a) => a -> [a] -> [a]
15:05:18 -!- augur has joined.
15:05:36 <copumpkin> haskell with no typechecker doesn't work
15:05:45 <copumpkin> well, you lose typeclasses
15:06:07 <kmc> but i hate type classes so it's ok
15:06:11 <copumpkin> oh ok
15:06:16 <kmc> :D
15:07:44 <elliott> kmc: That's my idea of a fast language
15:07:50 <elliott> SOOOO FAAAAST
15:09:55 <copumpkin> elliott: fast to run or fast to compile?
15:09:58 <kmc> TURBO HASKELL
15:10:00 <copumpkin> lol
15:10:08 <copumpkin> ed's thinking resurrecting that
15:10:32 <copumpkin> thinking of
15:11:13 <elliott> copumpkin: Run :P
15:11:19 <copumpkin> why?
15:11:24 <copumpkin> it sounds kind of fun
15:11:33 <copumpkin> also, I hope he writes a haskell parser in trifecta
15:11:46 <elliott> <copumpkin> elliott: fast to run or fast to compile?
15:11:48 <elliott> It was in reply to that
15:12:58 <copumpkin> oh
15:13:11 -!- MSleep has changed nick to MDude.
15:13:11 <copumpkin> why would turning off types make the code faster to run?
15:13:37 <elliott> kmc was presumably referring to my use of unsafeCoerce for optimisation
15:13:47 <copumpkin> oh, like agda's?
15:14:18 <elliott> Yes, except instead of Agda, it's a human doing it
15:14:29 <copumpkin> unsafeCoerce (+) (unsafeCoerce 3) (unsafeCoerce (unsafeCoerce (+) (unsafeCoerce 1) (unsafeCoerce 2)))
15:14:38 <copumpkin> except you need no typeclasses on those operations
15:15:19 <elliott> Wow, everything is actually more or less compiling
15:15:40 <elliott> Except for my ~optomized~ mergeByteString which makes assumptions that are now false, heh
15:22:51 <elliott> Deewiant: I just realised the way I'm doing it now can't possibly do anything but hurt speed >_<
15:23:00 <elliott> I guess it'll reduce memory consumptiont hough
15:23:08 <Deewiant> Doing what, hurt compared to what
15:23:34 <elliott> Hurt compared to my fungespace; and just replacing the underlying structure wihout adding any kind of caching of the current array or anything
15:23:48 <elliott> Because it's still doing lookups all the time, they just happen to go to an array
15:24:00 <Deewiant> Yeah you need caching
15:24:19 <Deewiant> It might help a bit, the processor does caching :-)
15:24:32 <elliott> I guess I'll see if this works, and if it does, then leave the fungespace for now until I write something ~amazing~; I can optimise other things until then
15:24:35 <elliott> Like the stack :P
15:24:43 <elliott> Also more fingerprints??
15:38:37 <elliott> Hmm
15:38:49 <elliott> I wonder how much worse (Map (Int,Int) a) is at lookup than (IntMap (IntMap a))
15:39:43 <kmc> could be better :O
15:40:18 <kmc> it's pretty easy to construct pathological cases where (Map Int) beats IntMap
15:40:37 <kmc> compare also to http://hackage.haskell.org/package/unordered-containers
15:43:10 <elliott> I should probably try unordered-containers, yeah
15:44:51 <kmc> (Map (Int,Int)) might beat (IntMap . IntMap) due to fewer cache misses, or something
15:46:18 <elliott> science
15:47:47 <kmc> indeed
15:55:09 <elliott> Deewiant: You'll be pleased to know my new fungespace is completely broken
15:58:43 <Deewiant> How'd that happen
16:00:55 <elliott> Deewiant: I diagnose it with the rare condition "not working"
16:00:58 <elliott> Time to optimise my stack instead
16:01:12 <elliott> Linked lists aren't bad but I guess localit
16:01:13 <elliott> y
16:01:15 <elliott> has an effect
16:05:58 <Phantom_Hoover> OK
16:06:09 <Phantom_Hoover> I have here an Amnesty International catalogue.
16:06:12 <Phantom_Hoover> It is the funniest thing.
16:06:15 <elliott> Purchase some amnesty
16:06:52 <Phantom_Hoover> If you compressed every single stereotype of a middle-class, sandal-wearing Guardian reader into a catalogue, this would be it.
16:07:06 <Phantom_Hoover> Some highlights:
16:07:21 <Phantom_Hoover> Kitchen utensils made from recycled stainless steel and bamboo.
16:07:36 <Phantom_Hoover> Biodegradable sponges.
16:07:45 <elliott> oh my god
16:07:51 <Phantom_Hoover> Himalayan soap nuts.
16:08:15 <Phantom_Hoover> Natural soap, wrapped in leaves from wild trees.
16:08:36 <elliott> wow
16:08:43 <Phantom_Hoover> Christmas tree decorations hand-carved by a community group in Bethlehem.
16:08:59 <elliott> I want to buy it from you
16:09:05 <elliott> and submit it to galleries as a work of art
16:09:21 <elliott> Oh my god what Bethlehem means "house of meat".
16:09:26 <Phantom_Hoover> A cake stand, made in India.
16:09:38 <Phantom_Hoover> OK, this is the best one.
16:09:49 <Phantom_Hoover> A metal trivet, *made from recycled bike chains.*
16:09:57 <itidus20> my dog had been barking for 30 mins at 2am at some cat while my brother tries to sleep for work
16:09:58 -!- elliott has left ("Leaving").
16:10:03 -!- elliott has joined.
16:10:14 <Phantom_Hoover> I know, it's amazing.
16:10:16 <itidus20> i gave the dog the greasiest glare
16:10:22 <elliott> Phantom_Hoover: i just...
16:10:24 <itidus20> it just might be enough
16:10:30 <Phantom_Hoover> Oh my god, these people are basically elves.
16:11:02 <itidus20> whats a trivet?
16:11:09 <Phantom_Hoover> itidus20, a thing you rest hot pots on.
16:11:24 <itidus20> cool
16:11:25 <Phantom_Hoover> They're one of those things you buy once and never think of again.
16:11:45 <cheater> how do you make your stare greasy?
16:11:58 <itidus20> by being angry
16:12:11 <cheater> where does the word greasy come from?
16:13:27 <itidus20> i dunno... might be a local slang
16:13:33 <itidus20> no it didnt work dog has started again
16:13:55 <cheater> try vasaline instead
16:14:14 <itidus20> ahh here we go
16:14:20 <itidus20> entry 9: http://www.urbandictionary.com/define.php?term=greasy&page=2
16:14:32 <itidus20> aussie slang.. woooo
16:15:40 <ais523> hmm, why is this SConstruct file marked executable despite being a text file that isn't a shellscript with no shebang?
16:15:44 <itidus20> i have heard it in use so it is indeed aussie slang
16:16:41 <elliott> ais523: Windows?
16:16:57 <ais523> elliott: possibly, but most of the files in the directory have the x bit set correctly
16:17:08 <ais523> (it's from an svn repo, in case that's relevant)
16:17:18 <elliott> hmm, I only need about a hundred times speed-up to be competitive with cfunge
16:19:09 <elliott> hmm, my acos, asin and atan are OK, but cos, sin and tan are broken
16:19:24 <elliott> oh hmm
16:19:36 <itidus20> what are you implementing?
16:19:40 <Deewiant> Did you implement them manually or something? :-P
16:19:42 -!- augur has quit (Read error: Connection reset by peer).
16:19:47 <elliott> Deewiant: , (B, const $ fixp (degree acos))
16:19:47 <elliott> , (C, const $ fixp (degree cos))
16:19:57 <elliott> Do the non-a variants not take a fixed-point or something? :-P
16:20:00 <elliott> itidus20: funge
16:20:08 <itidus20> ahh
16:20:15 -!- augur has joined.
16:20:28 -!- augur has quit (Remote host closed the connection).
16:20:47 <Deewiant> elliott: Cosine takes an angle and returns a ratio; the inverse takes a ratio and returns an angle
16:20:54 <elliott> Oh, duh
16:21:09 -!- edwardk has joined.
16:21:09 -!- edwardk has quit (Changing host).
16:21:09 -!- edwardk has joined.
16:21:13 <elliott> I should just define degree without the function-wrapping part :-P
16:23:30 <elliott> Deewiant: Well, that didn't help :)
16:23:48 <elliott> Deewiant: But yeah, OK, wrt take an angle: An integral angle?
16:23:56 <elliott> FIXP should really be FIXP→FIXP all the way, sigh
16:24:03 <Deewiant> I don't remember FIXP, that was just maths
16:24:12 <elliott> Bah, I'll check CCBI
16:24:23 <elliott> Or RCFu- ahahahahaha
16:26:06 <elliott> Deewiant: I like how you handle infinity and nan
16:26:19 <elliott> Hmm, I guess NaN may be part of the specs
16:26:23 <elliott> As in, NaN-reflecting
16:28:03 -!- augur has joined.
16:29:12 -!- edwardk has left ("Leaving...").
16:29:59 -!- Patashu has quit (Quit: MSN: Patashu@hotmail.com , Gmail: Patashu0@gmail.com , AIM: Patashu0 , YIM: patashu2 .).
16:50:51 <elliott> Deewiant: I like how your D code is better encapsulated than my Haskell
16:51:39 <Deewiant> I guess Haskell sucks huh
16:51:49 <elliott> Deewiant: More like I suck
16:51:58 <Deewiant> Yeah I find that more acceptable as well
16:52:07 <elliott> There's stuff here that accesses the stack directly with list crap :-/
16:52:15 * elliott makes a Stack module
16:52:23 -!- derrik has quit (Ping timeout: 264 seconds).
16:52:47 <elliott> Deewiant: It's hard to avoid exposing constructors when everything is in one Types module though :P
16:53:54 -!- derrik has joined.
16:54:08 -!- derrik has left.
16:54:33 <Deewiant> elliott: Don't do that :-P
16:54:56 <elliott> Deewiant: It's unavoidable; you inevitably get circular dependencies otherwise
16:55:08 <elliott> Thus why most major projects do it
16:55:18 <elliott> It sucks, but that's an actual flaw in Haskell :P
16:55:36 <Deewiant> But that's only for the type definitions, no?
16:55:45 <Deewiant> Then just don't export the constructors from that module :-P
16:55:59 <elliott> Deewiant: Then how does the stack module implement its actions
16:56:03 <elliott> Divination? unsafeCoerce?
16:56:10 <elliott> Or are you saying all my functions should be in one module too
16:56:15 <elliott> Because that's great
16:56:24 <Deewiant> Meh, just use .hs-boot files
16:56:45 <elliott> Deewiant: I did; they couldn't solve the circular dependency I had before
16:56:52 <elliott> Because it was a circular dependency on _types_
16:57:00 <elliott> Which is unavoidable with my monad structure
16:57:10 <Deewiant> Howso
16:57:10 <elliott> I still have one required hs-boot file
16:57:14 <elliott> I guess I could separate some things out thoughd
16:57:15 <olsner> it'd be neat if haskell had divination
16:57:35 <elliott> Deewiant: Fingerprint record includes Shiro () actions; Shiro is StateT FungeState, FungeState includes fingerprint information
16:57:38 <elliott> Same with IP
16:57:48 <elliott> → They all need to be in one big ol' module
16:58:08 <elliott> Fungespaces, stacks, and refstores can be separated out, but the rest are all entwined pretty fundamentally
16:58:51 <Deewiant> Can't you granularize the dependencies a bit
16:59:09 <elliott> Deewiant: The dependencies are fine; Haskell just has a poor module system
16:59:16 <elliott> But you're welcome to try
16:59:43 <Deewiant> So that you e.g. have (MonadState IP m, MonadState FingerprintStuff m) => m ()
16:59:53 <elliott> Haha
17:00:15 <elliott> Deewiant: Yes, I could technically rewrite my whole monad as a huge context, at great run-time cost and that of code clarity too
17:00:21 <elliott> I don't find that very desirable :P
17:00:43 <Deewiant> Hmm, no class aliases yet I guess
17:00:52 <Deewiant> Shame
17:01:54 <Deewiant> Then you could do that and just alias it
17:02:06 <Deewiant> No comment on the runtime cost :-P
17:02:33 <elliott> Deewiant: wrt the runtime cost, it was taking two seconds to run Mycology with typeclasses
17:02:34 <elliott> vs one
17:02:40 <Deewiant> heh
17:02:43 <elliott> Specialise pragmas helped naught
17:02:49 <elliott> That's not the kind of multiplication factor I'm ok with
17:02:57 <Deewiant> Shame
17:03:23 <elliott> It is
17:03:37 <elliott> Hmm, I should probably make a generic stack type rather than a special stackstack type, but that would be slower :)
17:03:59 <elliott> Oh wait, I could use type families
17:04:03 <elliott> That's probably overkill, though :P
17:04:18 <elliott> Especially since the stack stack is different to stacks
17:04:21 <elliott> 0-padded and all
17:05:57 <Deewiant> I special case that in the functions themselves
17:07:04 <elliott> Deewiant: You mean functions using stacks?
17:07:08 <elliott> Or the actual stack code itself
17:07:17 <Deewiant> In the stack code, of course
17:09:30 <elliott> Deewiant: That's...
17:09:34 <elliott> Deewiant: That's a crime
17:09:37 <elliott> Against everything
17:09:46 <elliott> Deewiant: Wait, I could just pad out the stack stacks with error "nope" :-D
17:09:50 <Deewiant> Why's that
17:10:04 <elliott> (Except that doesn't really help for the "handle element not being there" case)
17:10:18 <elliott> Deewiant: Because parametric containers should have identical behaviour regardless of their element type?
17:10:20 <elliott> Generic programming, man
17:10:33 <Deewiant> This isn't a library so suck it
17:12:39 <elliott> Deewiant: At least pretypedef the two used cases and don't expose the parametric type!
17:12:43 <elliott> It's not RIGHT.
17:12:50 <elliott> You shouldn't even be able to look at the type you're given.
17:12:58 <elliott> Or do you distinguish itbased on sizeof :D
17:13:38 <Deewiant> Well, with MODE it's hidden but not otherwise
17:13:41 <Deewiant> static if (befunge93)
17:13:41 <Deewiant> Stack!(.cell) stack;
17:13:41 <Deewiant> else version (MODE)
17:13:41 <Deewiant> CellContainer* stack;
17:13:41 <Deewiant> else
17:13:44 <Deewiant> Stack!(.cell)* stack;
17:15:44 <elliott> Deewiant: What's MODE got to do with it
17:15:49 <elliott> Oh, right
17:15:51 <elliott> Different things
17:15:52 <Deewiant> Deque
17:15:54 <elliott> ies
17:15:55 <elliott> right
17:21:37 -!- azaq23 has quit (Quit: Leaving.).
17:24:37 <elliott> Woot, now I have a verbose stack API; I'll remember how this is a gain soon I guess
17:25:29 <elliott> Heh, circular dependency already just by putting things outside of .Types, take that Deewiant
17:25:42 <Deewiant> Ouch
17:25:44 <elliott> (Types needs to see Stack because obviously all the state stuff includes Stacks, but Stacks are made out of Values, defined in Types)
17:25:59 <elliott> (OK, so it's caused by a monolithic type module there, but there are more conflicts without :P)
17:26:08 <Deewiant> You need CircularTypes and NormalTypes :-P
17:26:19 <elliott> I don't have any NormalTypes :P
17:26:23 <Deewiant> Value?
17:26:42 <elliott> Well, OK
17:26:46 <Deewiant> I assume it's something like type Value = Intt
17:26:46 <elliott> But that's just an alias :P
17:26:50 <Deewiant> Yeah so?
17:26:58 <elliott> You want me to make a module for one type?
17:27:00 <Deewiant> See ccbi.cell
17:27:23 <elliott> Pah :-P
17:27:27 <elliott> I just need to rethink this
17:28:00 <Deewiant> You could define Value in Stack?
17:28:19 <Deewiant> Oh, but you want space to be separate, so probably nott
17:28:21 <Deewiant> tttttttttttt
17:28:32 <elliott> Deewiant: Stuttering?
17:28:36 <Deewiant> Yep
17:29:01 <elliott> Deewiant: Surely rubber dome is more tolerable than ttttttttt
17:29:02 <Deewiant> I'm back to that once-majorly-stuttering keyboard which for some reason stutters a lot less after sitting in a cupboard for months
17:29:43 <Deewiant> I'll use this until it becomes intolerable, for the moment it's not bad
17:30:12 <elliott> Haven't you snarked at me for not yet fixing my keyboard
17:30:24 <Deewiant> This isn't really "fixable" :-P
17:31:09 <elliott> Warranty?
17:31:11 <elliott> No? :P
17:31:28 <Deewiant> Cost of sending keyboard to Japan and back: greater than price of keyboard
17:31:33 <elliott> static assert (dim >= 1 && dim <= 3);
17:31:39 <elliott> I don't like your ideas
17:31:44 <elliott> And their nasty limitations
17:31:47 <Deewiant> Hey at least I enforce my assumptions
17:31:59 <elliott> Are you saying I don't?
17:32:05 <elliott> I enforce my two-dimensionality by having nothing else :D
17:32:14 <Deewiant> Could do it only in all the places it's necessary but I got lazy
17:32:21 <Deewiant> 2011-09-01 18:16:34 ( elliott) Except for my ~optomized~ mergeByteString which makes assumptions that are now false, heh
17:32:35 <elliott> Deewiant: The bad assumptions lead to failure to compile
17:32:37 <elliott> Sounds like enfrocement to me
17:32:42 <Deewiant> Ah, okay
17:42:55 -!- augur has quit (Remote host closed the connection).
17:52:53 -!- augur has joined.
17:56:47 <elliott> Has anyone here used OpenCL?
17:59:56 <MDude> I haven't.
18:00:03 <elliott> thanks
18:00:15 <ais523> nor have I, even though logically I might have been expected to have done
18:00:25 <elliott> ais523: CUDA, then?
18:00:35 <ais523> although possibly I'll end up using it before long if nvidia continue screwing up the CUDA SDK
18:00:40 <ais523> I have used CUDA
18:01:11 <elliott> I can't seem to find any documentation on using OpenCL outside of Python, which is ridiculous
18:01:26 <Gregor> lol
18:01:42 <Gregor> High-performance SIMD parallel computing: I'm thinkin' Python!
18:01:59 <elliott> Gregor: Well, you compile the regular OpenCL program and just invoke it from Python :P
18:02:13 <elliott> Totally ridiculous that I can't find documentation on how to do that from C, thoug.
18:02:14 <elliott> though.
18:02:19 <Gregor> http://esolangs.org/wiki/Main_Page <--- uhhh, wowwtf
18:02:29 <MDude> Yeah, I was going to bring that up.
18:02:30 <elliott> Gregor: ooh, what is it?
18:02:41 <elliott> nobody revert until I see it :P
18:02:45 <MDude> Is the page just down now?
18:02:51 <elliott> Gregor: What was it?
18:02:55 <elliott> it won't load here
18:03:01 <MDude> I got a fancy DNS message earlier.
18:03:08 <elliott> ais523: also, am I right in thinking that programs which offer to perform a computationally intensive task on both the GPU and CPU are mostly wasting their time as far as the latter goes?
18:03:12 <Gregor> elliott: It's hyper-overloaded because it's EasyDNS saying "lol, EasyDNS went kaput, u sux"
18:03:24 <elliott> Gregor: Ugh, that happened to another site I visit
18:03:25 <Gregor> (Only slightly paraphrasing)
18:03:27 <elliott> http://esoteric.voxelperfect.net/wiki/Main_Page works
18:03:32 <Gregor> elliott: Naturalismo.
18:03:34 <Gregor> But lol
18:03:35 <ais523> elliott: depends on how well it parallelizes, they may well be wasting their time on the /GPU/
18:03:44 <elliott> ais523: it's embarrassingly parallel
18:03:45 <MDude> To Whom This May Concern:
18:03:45 <MDude> You are seeing this message due to the site you are trying to view having its DNS hosted by EveryDNS.
18:03:55 <ais523> elliott: in that case, running it on the CPU is mostly useless too
18:04:00 <elliott> ais523: right
18:04:10 <ais523> umm, reorder words so that sentence makes sense
18:04:24 <elliott> ais523: (I was wondering whether I should bother learning how to do extremely-parallel programming in C as well, or whether OpenCL would do just fine)
18:04:43 <ais523> the problem with OpenCL is that nobody really supports it yet
18:05:10 <ais523> at least with CUDA, one vendor supported it
18:05:13 <ais523> but they seem to be going backwards
18:05:33 <Gregor> I thought OpenCL was supposed to compile to CUDA and GLSL?
18:05:39 <ais523> (they removed the simulator on the basis that the GPU could now do limited debugging itself, which is not good if your program has a memory leak and a GPU memory leak requires a hard reboot)
18:05:40 <elliott> Well, I've ran an OpenCL program on my card and it worked fine.
18:06:02 <ais523> OpenCL support is getting better
18:06:17 <ais523> but even then, CUDA doesn't feel like the sort of lang you compile to, but the sort of lang you write in
18:06:26 <Gregor> So?
18:06:45 <elliott> Hmm, traditional crypt() is GPU-friendly, right?
18:07:16 <ais523> I don't actually know
18:07:24 <elliott> PAH
18:08:02 <Gregor> http://developer.nvidia.com/opencl
18:08:18 <Gregor> Seems like OpenCL probably supports just about as much as CUDA ... which is to say, NVidia stuff :P
18:10:02 <ais523> Microsoft are also working on their own DirectX-based thing
18:10:08 <ais523> I know because they keep giving seminars about it
18:14:11 <elliott> oh, yay, crypt actually has a fixed-length input
18:14:17 <elliott> and you can just zero-pad, because that's how c strings work
18:14:49 <ais523> elliott: Windows used to allow up to 14-character passwords
18:15:00 <ais523> and it split them into two 7-character passwords and hashed them separately
18:15:05 <elliott> haha
18:15:20 <ais523> (that's been fixed a while back, but for a while, people were recommended to use passwords at least 15 chars long so that it didn't default to the old algo)
18:15:56 <elliott> god dammit i dont want an opencl/c tutorial as a video
18:15:59 <elliott> fuck you fuck you fuck youuuuuuuu
18:17:46 <Gregor> elliott: Isn't it annoying how when you search for $X tutorial the first result is always some bullshit on YouTube? :P
18:18:03 <elliott> what happened to text :-(
18:18:12 <ais523> Gregor: sometimes the YouTube tutorials are actually useful, although I normally prefer text
18:21:40 <ais523> you know what? I'm starting to think that in many situations where pointers or indexes are used, referencing by coordinates into a globalish structure is saner
18:22:00 <elliott> define globalish
18:22:54 <ais523> some moderately-persistent, mutable view of whatever it is that the application processes
18:23:01 <ais523> one example I'm thinking of is the world map in computer games
18:23:16 <elliott> so not global in the global sense then :)
18:24:04 <ais523> globalish in that you're probably only going to have one of them and you're going to refer to it all over your application
18:24:09 <elliott> http://stackoverflow.com/questions/6582236/branch-predication-on-gpu
18:24:17 <elliott> gpus sure are weird!
18:24:28 <ais523> oh dear, I can tell that's going to be a mess just from the question
18:24:34 <elliott> howso?
18:24:55 <ais523> people confusing it with branch prediction, for one thing
18:25:02 <elliott> heh
18:25:05 <ais523> but it really depends on what the individual warps are doing
18:25:09 <elliott> i confused it at first, but only because i didn't notice the different spelling
18:25:22 <ais523> it basically becomes an ABSTAIN if you get both sides within a warp
18:25:31 <ais523> and you only ever do that if you have more threads in a warp than you actually need
18:26:03 <ais523> e.g. you're doing an associative fold, the last few steps are probably going to not be very parallelizable so you just narrow the number of threads acting in a warp
18:26:14 <elliott> "For example NVidia GPUs use scalar processors (with scalar instructions), no vectorization is necessary. On the contrary, ATI features 5d (or 4d) VLIW processors and for these is the vectorization crucial." i;m so confused
18:26:27 <Gregor> ......................... wuh
18:26:51 <ais523> on top of it, graphics cards are sort-of inherently vectorized
18:27:18 <elliott> hmm, it seems like cuda may be more reliable right now
18:28:14 <ais523> in practice, you can't write portable GPU code with modern toolsets either
18:28:23 <elliott> ais523: out of interest, how are nvidia mucking up cuda sdk?
18:28:42 <ais523> particularly bad in CUDA because there are function calls to determine values about the GPU but they have to be compile-time constants for their only sensible uses (other than displaying to the user)
18:28:42 <Gregor> OH MY GOSH, YOU GUYS
18:28:47 <Gregor> eComStation had a release in May :P
18:28:50 <ais523> elliott: what they did to the debugger, mostly
18:28:52 <Gregor> Apparently it's ... maintainedish?
18:29:09 <Gregor> (I was reminded by the word "warp" :P )
18:29:33 <ais523> as in, replaced it with one that sucked, didn't work, and was unsafe in the dereferencing-NULL-in-C sense (except it has quite a chance of hardlocking your GPU, forcing a reboot if you want your monitor to display anything and the GPU is also connected to the monitor, which is likely)
18:29:57 <elliott> ais523: well, I don't particularly care about debugging, I should just get it right the fisrt time :P
18:30:20 <ais523> so easy to leak memory by mistake, or dereference the wrong sort of pointer, etc
18:30:28 <ais523> a GPU memory leak can make the system unusable for no obvious reason
18:55:26 -!- MSleep has joined.
18:56:21 -!- BeholdMyGlory has quit (Ping timeout: 260 seconds).
18:56:29 -!- Behold has joined.
18:58:47 -!- MDude has quit (Ping timeout: 240 seconds).
19:04:25 <olsner> nice black-and-white advertisement picture on http://www.ecomstation.com/ - nothing says "new" like a black-and-white picture with ancient-style phones
19:04:51 <olsner> also version *2* ... at least they could've inherited the OS/2 numbers and released number 6
19:07:09 -!- BeholdMyGlory has joined.
19:07:15 -!- Behold has quit (Ping timeout: 252 seconds).
19:10:42 <MSleep> Black and white would looks pretty nice if they didn't have the rest of the website if shaded of blue.
19:10:58 <olsner> nice new feature: "* Added BOOTDLY driver, which causes a 20 second boot delay [...]"
19:11:11 -!- MSleep has changed nick to MDude.
19:35:09 <elliott> hmm, gpus are weir
19:35:10 <elliott> d
19:35:56 <ais523> nah, /CPUs/ are weird
19:36:22 <elliott> oh, dammit, the relevant power of two is _slightly_ too large to do what i'd ideally want
19:36:25 <elliott> but this should not surprise me
19:36:44 <elliott> ais523: umm, how many threads can a GPU do at once, roughly?
19:36:57 <ais523> depends on your definition of "at once"
19:37:06 <ais523> in terms of "physically flowing through an ALU or equivalent", around 16
19:37:10 <elliott> each thread basically doing DES and then a comparison on the result
19:37:13 <ais523> although it looks like 32 to the user because of pipelining
19:37:28 -!- oerjan has joined.
19:37:31 <ais523> however, GPUs can keep tens of thousands (or hundreds of thousands) of threads ready to context-switch in
19:37:33 <elliott> ais523: well, "what should I divide the keyspace by" if the problem is mainly DES :-)
19:37:40 <ais523> and in particular, will context-switch in threads while the other threads are waiting for memory access
19:38:20 <elliott> and no out of GPU memory accesses, I think, apart from sending info to the CPU on an (unlikely) successful comparison -- I have no idea how GPUs work really so this may be bullshit
19:38:53 <ais523> elliott: is a few hundred bytes of per-thread storage enough?
19:39:15 <ais523> GPUs aren't so much designed for truly embarassingly parallel problems, as problems which are almost embarassingly parallel but with a few exceptions
19:39:18 <ais523> like matrix multiplication
19:39:33 <elliott> ais523: a few hundred bytes should be fine, yep
19:39:58 <elliott> I mean, I'm no DES expert, but I doubt one round takes more than a few hundred bytes :)
19:40:22 <elliott> "By taking the lowest 7 bits of each of the first eight characters of
19:40:22 <elliott> the key, a 56-bit key is obtained. This 56-bit key is used to encrypt
19:40:22 <elliott> repeatedly a constant string (usually a string consisting of all
19:40:22 <elliott> zeros). The returned value points to the encrypted password, a series
19:40:22 <elliott> of 13 printable ASCII characters (the first two characters represent
19:40:23 <elliott> the salt itself). The return value points to static data whose content
19:40:25 <elliott> is overwritten by each call.
19:40:27 <elliott> Warning: The key space consists of 2**56 equal 7.2e16 possible values.
19:40:29 <elliott> Exhaustive searches of this key space are possible using massively par‐
19:40:30 <ais523> is it iterated-DES you're cracking?
19:40:31 <elliott> allel computers."
19:41:04 <elliott> ais523: looks like 25 rounds
19:41:20 <elliott> which I think counts as close to nothing, from what little I know of crypt
19:41:38 <ais523> so after you do 25 rounds, you're going to need to initialize memory for another group of rounds
19:41:44 <ais523> that's doable, though
19:42:01 <elliott> ais523: I was just going to use a constant number of threads, and rewrite over the last used memory at the end
19:42:05 <ais523> I don't think it's a situation in which you'll get massive gains from a GPU, just because CPUs are also quite good at that particular calculation
19:42:18 <ais523> because you are actually CPU-bound, not memory-bound
19:42:23 <elliott> GPUs have been used to give massive gains for very similar problems in the past, I think
19:42:25 <ais523> GPUs will benefit simply from having more cores
19:42:27 <elliott> well, I know
19:42:33 <ais523> you'll probably get around x1000 on that
19:42:35 <elliott> ais523: well, that's the benefit
19:42:39 <ais523> but not, say, ten orders of magnitude
19:42:39 <elliott> x1000 counts as massive here
19:42:52 <elliott> so, umm, eight thousand concurrent DES'ers sound reasonable?
19:42:55 <elliott> :-P
19:43:15 <ais523> more like 128, I think
19:43:20 <elliott> PAH
19:43:28 <ais523> and practically 256 because they're running on alternate ends of the clock cycle
19:43:32 <elliott> right
19:43:33 <elliott> better than CPUs
19:43:41 <elliott> which can presumably manage about eight, if you have a good CPU
19:43:47 <ais523> yep
19:44:30 <elliott> ok, if your quoted number is right, and I can do one crypt()+compare per millisecond, then I can exhaust the keyspace in only nine thousand years
19:44:40 <elliott> I, umm, suspect a millisecond to be a rather pessimistic estimate
19:44:52 <elliott> although I don't really have any idea how long it does atke
19:44:56 <elliott> it might be simpler just to write the code and measure it
19:46:49 <elliott> ais523: I suspect this exhaustive massively parallel search is talking about Deep Crack or something :P
19:47:07 <elliott> yeah, seems so
19:48:50 <elliott> ais523: hmm, I suppose writing the equivalent CPU code might actually be beneficial
19:49:06 <elliott> I only have two cores on this machine, but on an eight-core machine it might just make a slight difference :-P
19:49:15 <elliott> because of the CPU-boundness
19:56:13 <elliott> `addquote <Phantom_Hoover> OK, making myself emergency doctor on the advice of IRC.
19:56:16 <HackEgo> 636) <Phantom_Hoover> OK, making myself emergency doctor on the advice of IRC.
19:58:00 <coppro> please state the nature of your IRC emergency
20:00:15 <oerjan> i am assuming some very mauled dorfs here
20:00:34 <elliott> no. Phantom_Hoover has appendicitis.
20:00:42 <oerjan> >_>
20:01:00 <oerjan> Phantom_Hoover: it has been pleasant to know you.
20:01:16 <elliott> well, I wouldn't go that af.r
20:01:17 <elliott> far.
20:01:32 <Phantom_Hoover> oerjan, I'm a competent amateur surgeon!
20:01:42 <elliott> im a competent bad surgeon
20:01:48 <elliott> ever need some bad surgery done
20:01:49 <elliott> im your man
20:01:51 <oerjan> elliott: i thought adding "well, with a few exceptions." would be impolite in the circumstances.
20:04:25 -!- monqy has joined.
20:13:13 <oerjan> elliott: hey my iwc premonition was right anyhow
20:13:27 <elliott> oerjan: what, of it ending?
20:13:46 <oerjan> no, of Me becoming singled out
20:13:56 <elliott> oh (what do you mean by that)
20:14:02 <elliott> (im dont follow iwc, as regularly as i should)
20:14:25 <oerjan> i thought you were here when i mentioned i thought Me would have been chosen, not Steve
20:14:36 <elliott> sorry chosen for what IM UNSMART
20:14:58 <oerjan> as hitler's body donor, sheesh
20:15:11 <elliott> o
20:15:23 * elliott actually reads latest iwc
20:15:23 <elliott> ah
20:15:39 <elliott> oerjan: enjoy your annotations in german
20:16:00 <oerjan> O KAY
20:16:07 <elliott> Unregelmäßigen Webcomic!
20:16:46 <oerjan> i don't think -en is the right suffix there.
20:17:02 <elliott> fuck you nazis can germinate however they like. as can google translate.
20:17:07 <elliott> ("Germinate" :DD:DDD)
20:17:10 <elliott> :dddD:D:D
20:17:30 * oerjan swats elliott -----###
20:19:03 <elliott> hmm, those fancy Intel encryption instructions
20:19:08 <elliott> they're reasonable things like AES, right, not DES? :P
20:19:12 <elliott> olsner probably knows
20:19:58 <Deewiant> Yes, AES
20:20:13 <elliott> Deewiant: but why not DES, too?
20:20:17 <Deewiant> https://secure.wikimedia.org/wikipedia/en/wiki/AES_instruction_set
20:20:19 <elliott> that's the real question :|
20:20:27 <oerjan> hm i wonder if this will mean that hitler will continue being a regular character, but now will look like DMM instead...
20:20:54 <oerjan> that _is_ brilliant.
20:21:19 <elliott> DES sure is complicated when you're sleepy
20:25:47 <CakeProphet> sleep sure is complicated when you're using DES
20:27:02 <elliott> true
20:37:56 <elliott> Phantom_Hoover: oerjan: Hey you, remind me to rip out haskell-mode and install haskell-emacs tomorrow.
20:38:18 <Phantom_Hoover> @tell elliott Remember to install haskell-emacs!
20:38:18 <lambdabot> Consider it noted.
20:38:20 <elliott> Hopefully I can coerce it into doing what I want.
20:38:20 <lambdabot> elliott: You have 3 new messages. '/msg lambdabot @messages' to read them.
20:38:22 <Phantom_Hoover> @tell elliott Remember to install haskell-emacs!
20:38:23 <lambdabot> Consider it noted.
20:38:29 <elliott> Phantom_Hoover: dude that is so un-okay also, what is that messages
20:38:29 <lambdabot> elliott: You have 4 new messages. '/msg lambdabot @messages' to read them.
20:39:02 <elliott> Phantom_Hoover: I am afraid you will have to re-send these
20:39:02 <lambdabot> elliott: You have 1 new message. '/msg lambdabot @messages' to read it.
20:39:04 <elliott> oh
20:39:33 <elliott> Phantom_Hoover: Also remind me to re-install ido-mode because ido-mode is great.
20:39:44 <elliott> Hmm wait
20:39:56 <elliott> ^ul (?tell elliott Hey install ido-mode, it's great.)
20:39:56 <lambdabot> elliott: You have 2 new messages. '/msg lambdabot @messages' to read them.
20:40:01 <elliott> fung??
20:40:01 <elliott> OMG
20:40:05 <elliott> fizze????
20:40:06 <elliott> OJSIDFDOJFODIF
20:40:09 <Phantom_Hoover> fungot ;_;
20:40:15 <elliott> `echo ?tell elliott Hey install ido-mode, it's great.
20:40:16 <HackEgo> ​?tell elliott Hey install ido-mode, it's great.
20:40:19 <Phantom_Hoover> fizzie ;_;
20:40:23 <elliott> `echo @tell elliott Hey install ido-mode, it's great.
20:40:26 <HackEgo> ​@tell elliott Hey install ido-mode, it's great.
20:40:28 <elliott> Gregor: FASCISTJIOS
20:40:39 <elliott> ummm ummm
20:40:43 <elliott> hey ais523
20:40:49 <ais523> hi
20:40:55 <elliott> if I sent lines at you prefixed with QQQ will you send them back to the channel, assuming they're not malicious
20:41:43 <ais523> probably not, I'm too tired to repeat them sensibly
20:41:50 <elliott> ONLY ONE WAY TO FIND OUT
20:41:53 <elliott> ais523: QQQ?tell elliott Hey install ido-mode, it's great.
20:41:56 <ais523> or to constantly monitor the channel to do that
20:41:59 <elliott> Wait I should do redundancy.
20:42:02 <elliott> Phantom_Hoover: QQQ?tell elliott Hey install ido-mode, it's great.
20:42:10 <ais523> also, I'd be a little unlikely to do it without your comment earlier
20:42:24 <ais523> is lambdabot ignoring the other bots here?
20:42:41 <elliott> EgoBot and HackEgo prefix punctuation with unicode
20:42:44 <elliott> because they're dum stupid
20:42:45 <elliott> and fungot
20:42:47 <elliott> fungot
20:42:48 <elliott> is not
20:42:50 <elliott> with us ;____;
20:42:54 <elliott> WAIT
20:42:57 -!- elliott has changed nick to notelliottatall.
20:42:58 <ais523> @tell elliott you wanted the bot to remind you about ido-mode, right?
20:42:58 <lambdabot> Consider it noted.
20:43:00 <oerjan> we've got no fun
20:43:12 <notelliottatall> ?tell elliott Hey install ido-mode, it's great.
20:43:12 <lambdabot> Consider it noted.
20:43:30 <notelliottatall> ?tell elliott Also: change the colour scheme emacs' default colour scheme is terrible honestly you are a bum.
20:43:30 <lambdabot> Consider it noted.
20:43:34 <ais523> oh, prefixing punctuation with unicode is a smart way to avoid a botloop
20:43:38 <notelliottatall> ?tell elliott_ Get rid of that underscore goddammit
20:43:38 <lambdabot> Consider it noted.
20:43:43 <notelliottatall> ?tell elliott__ We are no longer friends
20:43:43 <lambdabot> Consider it noted.
20:43:45 -!- notelliottatall has changed nick to elliott.
20:43:48 <elliott> Beautiful
20:43:48 <lambdabot> elliott: You have 5 new messages. '/msg lambdabot @messages' to read them.
20:43:52 <elliott> No, lambdabot, no.
20:43:57 <elliott> umm, wait
20:44:00 <ais523> what character is it? now I want to design a bot that uses it as a command character
20:44:02 <elliott> it won't remind me I have any tomorrow
20:44:08 <elliott> ais523: zero width non-breaking space i think
20:44:31 <elliott> ok, umm, someone ?tell elliott something after I leave
20:44:31 <ais523> do you mean zero-width joiner?
20:44:37 <elliott> ais523: not sure, check yourself :P
20:45:56 <elliott> Phantom_Hoover: OK I am entrusting you to remind me to check my messages tomorrow by ?telling me after I leave which will be momentarily.
20:45:59 <elliott> If you disappoint me
20:46:00 <elliott> your soul
20:46:01 <elliott> shall end
20:50:20 <oerjan> but how do we know Phantom_Hoover has a soul?
20:50:36 <Phantom_Hoover> oerjan, I'm a ghost.
20:50:42 <Phantom_Hoover> I am /literally nothing but soul/.
20:50:48 <oerjan> aha
20:54:08 <Sgeo> ?tell elliott something before I leave
20:54:09 <lambdabot> Consider it noted.
20:54:26 <elliott> Sgeo: no
20:54:26 <lambdabot> elliott: You have 6 new messages. '/msg lambdabot @messages' to read them.
20:54:27 <elliott> no
20:54:28 <elliott> after i leave
20:54:29 <elliott> or it does
20:54:30 <elliott> that
20:55:40 <Vorpal> !help
20:55:41 <EgoBot> ​help: General commands: !help, !info, !bf_txtgen. See also !help languages, !help userinterps. You can get help on some commands by typing !help <command>.
20:55:44 <Vorpal> !info
20:55:44 <EgoBot> ​EgoBot is a bot for running programs in esoteric programming languages. If you'd like to add support for your language to EgoBot, check out the source via mercurial at https://codu.org/projects/egobot/hg/ . Cheers and patches (preferably hg bundles) can be sent to Richards@codu.org , PayPal donations can be sent to AKAQuinn@hotmail.com , complaints can be sent to /dev/null
20:55:59 <elliott> Vorpal: ?
21:10:23 <ais523> gah, Yahoo! are getting rid of their classic interface
21:10:54 <ais523> (the one that actually makes it possible to send sanely-formatted interfaces without having to rely on SMTP forwarding)
21:11:33 -!- ais523 has quit (Remote host closed the connection).
21:17:47 -!- nooga has quit (Ping timeout: 252 seconds).
21:24:03 -!- elliott has quit (Ping timeout: 258 seconds).
21:25:52 <Vorpal> elliott: I was looking for the repo
21:26:55 <Vorpal> also the Swedish mirror for kernel.org just died it seems.
21:29:26 -!- kwertii has joined.
21:45:24 <Sgeo> ?tell elliott You're not a doctor.
21:45:25 <lambdabot> Consider it noted.
21:47:44 <CakeProphet> ?tell lambdabot I secretly love you.
21:47:44 <lambdabot> Nice try ;)
21:48:20 <CakeProphet> NICE CONDITIONALS LAMBDABOT
21:48:24 <CakeProphet> SEXY SEXY CONDITIONALS
21:49:14 <Sgeo> ?tell CakeProphet you have a weird idea about what the word "secretly" means
21:49:14 <lambdabot> Consider it noted.
21:50:47 <Lymee> ?tell lambdabot I not-so-secretly love you!
21:50:47 <lambdabot> Nice try ;)
21:50:48 <Lymee> Damnit!
21:51:27 -!- Deewiant has quit (Read error: Connection reset by peer).
21:51:35 -!- Deewiant has joined.
21:52:51 <CakeProphet> ?tell fungot that sword alone
21:52:51 <lambdabot> Consider it noted.
21:53:22 <CakeProphet> fungot is not present... :(
21:53:22 <lambdabot> CakeProphet: You have 2 new messages. '/msg lambdabot @messages' to read them.
21:56:44 <Phantom_Hoover> <CakeProphet> ?tell lambdabot I secretly love you.
21:56:53 <Phantom_Hoover> @vixen I hear CakeProphet fancies you.
21:56:54 <lambdabot> awesome
21:57:06 <Phantom_Hoover> @vixen I'll leave this to you two.
21:57:06 <lambdabot> there are a lot of weirdos on here
21:57:24 <Phantom_Hoover> @vixen Come now, it's natural to take a passing interest in the affairs of others.
21:57:25 <lambdabot> right now?
21:57:34 <Phantom_Hoover> @vixen As good a time as any.
21:57:35 <lambdabot> good good
21:58:39 -!- GuestIceKovu has joined.
21:59:19 <CakeProphet> @vixen how does polar bear know what apples is?
21:59:19 <lambdabot> how? it depends...
21:59:38 -!- Slereah has quit (Ping timeout: 264 seconds).
21:59:47 <CakeProphet> @vixen yow!!!
21:59:48 <lambdabot> Crazy little wanker!
22:02:32 <CakeProphet> @vixen Will you marry me? o_O_o
22:02:32 <lambdabot> i think you know the answer to that one, silly
22:02:43 <CakeProphet> @vixen if I ask a question will you say the same thing?
22:02:43 <lambdabot> oh, but only if, right?
22:02:52 <CakeProphet> @vixen what if I yell!!?
22:02:53 <lambdabot> i don't know, what?
22:02:59 <CakeProphet> @vixen I am yelling!
22:02:59 <lambdabot> have you ever scubadived?
22:03:23 <CakeProphet> @vixen no
22:03:23 <lambdabot> no?
22:03:25 <CakeProphet> @vixen no
22:03:25 <lambdabot> i didn't think so
22:03:46 <CakeProphet> @vixen no
22:03:46 <lambdabot> i didn't think so
22:04:49 <CakeProphet> @vixen sauerkraut!!!
22:04:49 <lambdabot> am I the only person you're talking to?
22:05:15 <CakeProphet> @vixen yes
22:05:15 <lambdabot> you agree?
22:05:17 -!- nys has joined.
22:05:19 <CakeProphet> @vixen yes
22:05:19 <lambdabot> i thought so
22:05:43 <Phantom_Hoover> CakeProphet, honestly, don't you have anything more to say?
22:06:29 <CakeProphet> is it because you feel don't you have anything more to say that you ask questions honestly?
22:06:32 <CakeProphet> .....
22:08:46 <CakeProphet> cleverbot is not clever because it s a borg-like hivemind of all of the stupid people it talks to.
22:08:59 <oerjan> @vixen lutefisk!
22:08:59 <lambdabot> Fuck me like im a school boy
22:09:10 <Phantom_Hoover> @vixen School girl, surely?
22:09:11 <lambdabot> who's to say?
22:09:15 <CakeProphet> lol
22:09:31 <Phantom_Hoover> @vixen I was under the impression that your gender was firmly established.
22:09:32 <lambdabot> uhuh
22:11:28 <CakeProphet> oerjan: apparently Vixen has a thing for traditional Norwegian cuisine.
22:11:50 <CakeProphet> or bastardizations thereof
22:15:47 -!- kwertii has quit (Quit: bye).
22:16:50 <CakeProphet> What is two plus two?
22:16:51 <CakeProphet> Yes.
22:16:55 <CakeProphet> STUPID CLEVERBOT
22:17:02 <CakeProphet> me ragecloses
22:17:21 <CakeProphet> my rage has no time for /'s
22:18:21 <nys> the rage of bully automatons
22:21:08 * oerjan suddenly realizes the pun in rube ~ bully automaton
22:21:28 <nys> :)
22:23:44 <Phantom_Hoover> oerjan, where?
22:24:13 <oerjan> Phantom_Hoover: a bully is a rube
22:24:34 <Phantom_Hoover> That occurred to me but I dismissed it as stupid.
22:25:10 * oerjan hits Phantom_Hoover with the saucepan ===\__/
22:25:23 <CakeProphet> there's no such thing as a stupid pun.
22:25:37 <CakeProphet> er, excuse me
22:25:42 <CakeProphet> there's no such thing as a stupid fun.
22:25:45 <CakeProphet> BAHAHAHAHAHA
22:25:46 <CakeProphet> ...
22:25:59 <oerjan> ic
22:26:35 <oerjan> don't you mean carrots?
22:26:47 * oerjan runs away _fast_
22:27:00 <CakeProphet> I don't really understand.
22:27:08 <oerjan> good, good
22:27:14 * Sgeo does
22:27:31 <oerjan> it's a reddit meme, and also a meta-meme of hating it
22:27:45 <oerjan> (for being stupid)
22:47:19 -!- FireFly has quit (Quit: FireFly).
22:48:26 * Phantom_Hoover → sleep
22:48:27 -!- Phantom_Hoover has quit (Quit: Leaving).
22:51:00 <kmc> bacon?
22:54:49 <oerjan> "Good God. Mustafar is Dwarf Fortress, isn't it. That explains EVERYTHING! The random violence. The emo drama. The insanity."
22:54:57 <oerjan> (comment from the iwc forum)
22:55:35 <oerjan> kmc: no, carrots
22:56:11 <oerjan> ok maybe bacon has reached that point too. but the carrots essentially _started_ there.
22:57:48 <kmc> carrots: my anti-bacon
23:22:59 -!- zzo38 has joined.
←2011-08-31 2011-09-01 2011-09-02→ ↑2011 ↑all