←2012-01-16 2012-01-17 2012-01-18→ ↑2012 ↑all
00:26:42 <zzo38> I found something called "The Online Book Initiative". It seem pretty good. It is at gopher://gopher.std.com
00:44:06 -!- itidus21 has joined.
00:44:56 -!- SteppenwolfVM has joined.
00:45:06 -!- SteppenwolfVM has left ("Oh look.... it's a part!").
00:54:41 -!- SteppenwolfVM has joined.
00:55:31 -!- SteppenwolfVM has left ("Oh look.... it's a part!").
01:00:57 -!- GreaseMonkey has quit (Read error: Connection reset by peer).
01:01:41 -!- GreaseMonkey has joined.
01:25:29 -!- Sgeo has quit (Ping timeout: 240 seconds).
01:39:56 -!- Sgeo has joined.
02:10:09 -!- Sgeo has quit (Quit: Leaving).
02:11:58 <kallisti> @hoogle [a] -> ([a], [a])
02:11:58 <lambdabot> Prelude break :: (a -> Bool) -> [a] -> ([a], [a])
02:11:58 <lambdabot> Data.List break :: (a -> Bool) -> [a] -> ([a], [a])
02:11:58 <lambdabot> Prelude span :: (a -> Bool) -> [a] -> ([a], [a])
02:12:14 <oerjan> also partition
02:12:32 <oerjan> @hoogle+
02:12:33 <lambdabot> Data.List span :: (a -> Bool) -> [a] -> ([a], [a])
02:12:33 <lambdabot> Data.List partition :: (a -> Bool) -> [a] -> ([a], [a])
02:12:33 <lambdabot> Prelude splitAt :: Int -> [a] -> ([a], [a])
02:12:37 <oerjan> @hoogle+
02:12:37 <lambdabot> Data.List splitAt :: Int -> [a] -> ([a], [a])
02:12:38 <lambdabot> Data.List genericSplitAt :: Integral i => i -> [b] -> ([b], [b])
02:12:38 <lambdabot> System.FilePath.Windows splitDrive :: FilePath -> (FilePath, FilePath)
02:13:05 -!- Sgeo has joined.
02:13:19 * Sgeo decides to use Conduit Sources as his primary model of events
02:13:55 <oerjan> lucky for you elliott is not around, eh?
02:15:46 * oerjan checks in the obvious place to see if he's alive
02:17:43 <monqy> so?
02:18:09 <oerjan> seen 4 hours ago
02:24:28 -!- zzo38 has left.
02:24:31 -!- zzo38 has joined.
02:27:43 <oerjan> although his rep was a lot lower yesterday than "usual"
02:28:03 <itidus21> type the devil's nick and his taskbar will alert him
02:28:15 <monqy> hi
02:28:42 <oerjan> itidus21: i did that 14 minutes ago, didn't i
02:29:31 <oerjan> i suspect he's asleep now, anyway
02:29:56 <itidus21> ahh.. hexham sleeps
02:30:52 <oerjan> i'm not sure whether the rest of hexham sleeps has much to do with it.
02:31:12 <oerjan> *whether whether
02:31:22 <kallisti> > break isSpace ""
02:31:23 <lambdabot> ("","")
02:31:46 <oerjan> > break undefined ""
02:31:47 <lambdabot> ("","")
02:32:36 <kallisti> oerjan: I'm trying to do something really simple
02:32:46 <kallisti> namely, remove all consecutive whitespace
02:32:47 <kallisti> and also
02:32:53 <kallisti> remove whitespace from both ends of the list
02:32:56 <kallisti> at the same time
02:33:02 <oerjan> kallisti: unwords . words hth
02:33:03 <monqy> unwords . words
02:33:05 <monqy> yes
02:33:05 <kallisti> while preserving the kind of whitespace (no unwords . words)
02:33:14 <oerjan> bah :D
02:33:27 <monqy> \v\t: which gets preserved???
02:33:35 <kallisti> neither
02:33:38 <monqy> :o
02:33:40 <kallisti> oh
02:33:41 <kallisti> yes
02:33:42 <kallisti> good question
02:33:50 <oerjan> and what about in \r\n
02:33:54 <monqy> ssshh
02:34:24 <monqy> worrying about \r\n is too sensible
02:34:46 <monqy> does anyone even use \v\t?
02:35:11 <augur> ok wheres my finnish speakers
02:35:22 <oerjan> sleeping
02:35:35 <augur> :(
02:35:44 <hagb4rd> päimavaar
02:35:50 <augur> fizzie! D:
02:35:54 <oerjan> you know perfectly well fizzie is the only op with a sane sleep schedule :P
02:35:59 <augur> @tell fizzie msg me plz
02:35:59 <lambdabot> Consider it noted.
02:36:19 <oerjan> although ais523's occasionally is
02:36:23 <augur> hagb4rd: you speak finnish?
02:36:26 <hagb4rd> no
02:36:30 <augur> o :(
02:36:37 <oerjan> `words --finnish 50
02:36:41 <HackEgo> astannettäviltämin eettamatto pallisilmällä autuvautuvistansa paimpänne havoliita kepeimuttelemme sfäärittämä kuolisimpana löyläpikalve takoskivamme uintaanne mustamme vaileviltanne aggressäästä nihatekemistä ryhmimpaa uneen lensa joutumastipa ologisempääsi samistanne tyyliltaan hämälleni soittu
02:36:49 <hagb4rd> the only word i knew was date
02:36:49 <oerjan> augur: HackEgo can help
02:36:56 <augur> no it cant :(
02:37:06 <oerjan> *gasp*
02:37:23 <oerjan> hagb4rd: i suspect you broke vowel harmony by using both ä and a
02:37:34 -!- yiyus has quit (Ping timeout: 255 seconds).
02:37:36 <hagb4rd> only once?
02:37:41 <hagb4rd> *phew
02:37:51 <hagb4rd> yea
02:37:52 <oerjan> also -r is probably not a common word ending in finnish
02:38:29 <hagb4rd> not common, but right
02:38:33 <hagb4rd> not?
02:39:02 <hagb4rd> you know a good dictionary?
02:39:04 -!- yiyus has joined.
02:39:10 <hagb4rd> for finnish
02:39:35 <oerjan> hagb4rd: you will note that every word HackEgo generated ends with a vowel or -n. i think -t also happens in some case.
02:39:50 <oerjan> no. i don't _actually_ know finnish.
02:40:07 <oerjan> tswett might know.
02:40:11 <hagb4rd> aw..bad luck then :Pp
02:40:26 <oerjan> (and be awake, unlike the finns)
02:40:29 <hagb4rd> i thought you were norwegian?
02:40:54 <hagb4rd> i must have been wrong
02:40:59 <oerjan> i am. norwegian is not related to finnish.
02:41:19 <hagb4rd> yes, thats y i wonder
02:41:30 <augur> wheres oklopol :(
02:41:34 -!- pir^2 has joined.
02:41:37 <oerjan> i'm just somewhat generally interested in linguistics
02:41:49 <augur> oerjan: well you're in luck! i'm a linguist!
02:41:56 <oerjan> there's also Deewiant
02:41:58 <pir^2> w00t
02:42:01 <pir^2> a linguist!
02:42:02 <oerjan> i said _somewhat_
02:42:03 <augur> Deewiant isnt a linguist
02:42:11 <oerjan> no, he's finnish
02:42:26 <oerjan> and atehwa
02:43:04 <oerjan> and ineiros
02:43:48 <oerjan> just to nickping all the ones i remember :P
02:44:57 <pir^2> Is there a word for people from Finnmark?
02:45:01 <pir^2> Finnmarkish?
02:45:05 <oerjan> finnmarking
02:45:11 <oerjan> (noun)
02:46:36 <oerjan> normally we'd make the adjective by adding -sk, but that gets awkward when the word already ends in -rk...
02:47:38 <pir^2> Do you live in Finnmark?
02:48:00 <pir^2> (no need to answer...)
02:48:05 <tswett> I might know!
02:48:29 <hagb4rd> paimaväär?
02:48:37 <oerjan> like "trøndersk" has 445000 google hits while "finnmarksk" only has 700 or so
02:48:45 <oerjan> no, i live in Trøndelag
02:48:52 <oerjan> (Trondheim)
02:49:22 <tswett> paimaväär looks like a plausible Finnish word, though, as has been said, I don't think Finnish words commonly end in r.
02:49:58 <tswett> On the other hand, the Finnish Wikipedia article "Koira" has no words at all ending in r, apart from words in other languages.
02:50:06 <tswett> So... no.
02:50:14 <oerjan> hm actually checking a couple other counties implies "trøndersk" might be the odd one out
02:50:15 <tswett> `words 50
02:50:20 <ineiros> Hilighting in the middle of the night.
02:50:21 <HackEgo> gen fnh ovepo ffervedransag aga isperi writtr ipnley sual late kossen dia copin lley camatt capple hysia care hem oile pitia ress cour whiteropolle come
02:50:38 <tswett> Are those supposed to be plausible English words, because... because...
02:50:54 <oerjan> tswett: yep.
02:50:56 <pir^2> umm
02:50:59 <oerjan> english is _weird_, man
02:51:00 <pir^2> `words 50
02:51:06 <HackEgo> pard mvl supe frenoy elmakener crealtic yrity seruntla tszew mastop nobwer whltcherline ret sphill ghen geffe coated smatrik orditry toight forgnific ath caffe minaniflb homodynin
02:51:11 <tswett> What languages can it do?
02:51:13 <tswett> All of them?
02:51:16 <tswett> `words --spanish 50
02:51:21 <HackEgo> molizaglia yntesione estron debíalen tentrotaliza penio náis jinéis alleión tkopiesestraguay consen cermi fcpcct her bastonj desma plictoria morizacionas evolu hoolimporte prado kosorbelila indisti antate retambell
02:51:32 <oerjan> *+s
02:51:44 <hagb4rd> `words -- sindarin 50
02:51:44 <pir^2> `words --french 50
02:51:53 <hagb4rd> `words --sindarin 50
02:51:57 <HackEgo> Unknown option: sindarin
02:51:59 <HackEgo> Argument "sindarin" isn't numeric in int at /hackenv/bin/words line 147. \
02:52:08 <pir^2> `words --french 50
02:52:09 -!- Mathnerd314 has quit (Ping timeout: 248 seconds).
02:52:12 <pir^2> ...
02:52:13 <HackEgo> burg concart traient albaction lutionstassi eluy massoix fufiel macation abinum aflad dof einetés logîa letaçoo trandas procb voh chus nac frigius trani fbcf mouchi ben
02:52:23 <pir^2> lulz
02:52:29 <pir^2> fbcf?
02:52:48 <HackEgo> crock suddi agustympos hydrio rodults shimi agolge appel orèze morosco milauto hidussor perfè charging sitibus aliti tima guère ebate aniershaneguyeri incripteradjes gnatter nappé confeld éluct
02:52:58 <tswett> Whelp. Some of those Spanish words are more likely than others.
02:53:23 <tswett> "morizacionas"? Yes, definitely. "fcpcct"? No.
02:54:08 <pir^2> éluct la plè des agustympos
02:54:11 <tswett> `words --german 50
02:54:15 <HackEgo> beschauf eriknm bewer spcne eleidiskaufbauer weibweizki geschachepur megassung folgepube erbaziffenerescher moden zuwachfarbe vollendessfei metaktorschi umredgingenblutur lottelle derin rollia krokalkonverhalthe pres stoff betheitsgestris drowerke türzeugeueren durcenssyrit
02:55:04 <hagb4rd> it might be improvable
02:56:03 <tswett> `words --scots 10
02:56:06 <HackEgo> Unknown option: scots
02:56:10 <tswett> }:(
02:58:02 <Sgeo> concart? Anything like concat?
02:58:38 <pir^2> `? concart
02:58:41 <HackEgo> concart? ¯\(°_o)/¯
02:59:53 <tswett> Let's see. Part, supe, mastop, nobwer, ret, sphill, coated, smatrik, orditry, forgnific, ath, late, capple, care, hem, ress, come...
03:00:27 <tswett> I just asked it for words and it said "guraul gei spokesfo pitte lausgen tbutylike unmiflex guan affympan cereaco vauli consalpa injr fair macaller sumab thrifog petero ghert wholog graz 942124.25 viilplant plum avelli"
03:00:32 <tswett> One of those words is not like the others.
03:00:43 <pir^2> Please note: In less than 27 hours,
03:00:44 <pir^2> the English Wikipedia will be blacked out globally in protest of SOPA and PIPA.
03:00:46 <pir^2> Learn more
03:01:06 <pir^2> tswett: 942124.25
03:01:18 <pir^2> XD
03:01:24 <tswett> That is correct!
03:01:44 <pir^2> unmiflex!
03:03:28 <hagb4rd> im sure there is no words in german ending with -knm or -ki.. there is also no german word with a 'standalone' c (only ck, or ch)
03:03:34 <hagb4rd> this tool is crap
03:04:38 <pir^2> no
03:04:52 <pir^2> In my opinion it's very traeusal
03:04:59 <hagb4rd> lol
03:05:32 <pir^2> It's also very imisreent
03:05:44 <pir^2> ...or is that a noun?
03:06:02 <tswett> Oh my god best word ever: "wapellessly"
03:06:15 <pir^2> :D
03:06:30 <tswett> It's an O:B-quality word.
03:06:47 <oerjan> hagb4rd: i won't be on the -ki, germans have some fearsome diminutives
03:06:51 <oerjan> *bet
03:07:50 <hagb4rd> its mostly -ei -er -ig -en
03:08:13 <hagb4rd> +ending with
03:09:08 <tswett> "mcgockeleof". That makes me imagine some guy named George McGockelEOF.
03:09:23 <oerjan> (see: Schnappi)
03:09:34 <hagb4rd> you know schnappi? :)
03:09:41 <hagb4rd> the crocodile?
03:09:56 <oerjan> and Heidi. i cannot actually recall any german name in -ki, though
03:10:03 <hagb4rd> oh yes and i
03:10:14 <oerjan> hagb4rd: how could i possibly have avoided Schnappi
03:10:28 <hagb4rd> hehe
03:10:36 <hagb4rd> amazing facts
03:11:15 <oerjan> there was a norwegian actor with nickname "Henki" though, is that a german name?
03:11:54 <oerjan> i guess it was short for henrik, though
03:11:59 <hagb4rd> the i ending is used in cases of belittlement
03:12:03 <hagb4rd> exactly
03:12:15 <hagb4rd> its like tom and tommy
03:12:30 <hagb4rd> know what i mean?
03:12:58 <oerjan> well in english i think tommy is short (um...) for tom, which is short for thomas.
03:13:16 * oerjan recalls there was a hilarious blackadder sketch about this
03:13:24 <hagb4rd> see also jennifer -> jenny
03:13:42 <hagb4rd> bob - > bobby
03:13:57 <hagb4rd> and so on
03:14:58 <oerjan> bob is short for robert
03:15:18 <hagb4rd> yea.. but you agree that tommy is not "short" for tom
03:15:19 <pir^2> bobby is long for bob
03:15:29 <pir^2> well
03:15:30 <hagb4rd> won't ya
03:17:20 <hagb4rd> i'm not sure 'belittlement' is the right translation.. my dict also says: minimization
03:19:49 <hagb4rd> schnappi would be the minimized form of 'schnapper'
03:20:16 <hagb4rd> schnappen means to snap
03:20:31 <kmc> the usual word in english for this sort of construct is "diminutive"
03:20:39 <hagb4rd> thx
03:20:48 <hagb4rd> consider it noted :)
03:21:30 <Sgeo> kmc, what do you think about exposing events as Sources?
03:21:36 <oerjan> hey i already said that :(
03:21:37 <kmc> what's a Source
03:21:59 <Sgeo> kmc, the Conduit equiv. of Enumerators
03:22:00 <oerjan> source of all evil
03:22:10 <hagb4rd> oh sorry oerjan
03:22:40 <kmc> i don't know much about Conduit yet
03:22:43 <kmc> did you ask #haskell
03:23:04 <oerjan> hask and you shall ell
03:23:13 <Sgeo> Yeah, but maybe too casually for anyone to take note?
03:23:46 <kmc> you have to start out by saying "HASKELL SUX CUZ I CANT IO Int -> Int"
03:23:57 <kmc> once you have their attention you can tell them what you're really trying to do
03:27:22 <hagb4rd> yep oerjan..in hindsight everything you said is right
03:29:32 <oerjan> AS ALWAYS
03:30:45 <oerjan> which can get quite embarassing. like that time i foolishly said that Stockholm is the capital of Sweden.
03:32:13 * Sgeo doesn't get it
03:32:32 <hagb4rd> its not?
03:32:40 <oerjan> hagb4rd: well _now_ it is.
03:33:09 <shachaf> ESOTERIC SUX CUZ I CANT IO Int -> Void
03:33:49 <pir^2> ...
03:39:47 <pir^2> BRAINFUCK SUX CUZ I CANT SOLVE THE HALTING PROBLEM
03:39:48 <zzo38> What do you mean by those things?
03:40:23 <pir^2> zzo38: what?
03:40:35 <zzo38> There is (IO Int -> Int) using unsafePerformIO but you shouldn't use that usually
03:40:53 <zzo38> pir^2: I was mentioning "ESOTERIC SUX CUZ I CANT IO Int -> Void"
03:41:26 <pir^2> http://i.imgur.com/YY3LI.png
03:41:28 <itidus21> if the halting problem is solved it might coincide with the end of the universe
03:41:42 <pir^2> yay
03:42:00 <itidus21> if the universe can end then the halting problem is solved :-?
03:42:40 <pir^2> only practically
03:42:50 <pir^2> Turing machines are theoretical
03:42:52 <itidus21> oh
03:42:56 <itidus21> bummer
03:43:00 <pir^2> well
03:43:03 <itidus21> :P
03:43:05 <pir^2> nobody will care
03:43:16 <pir^2> (unless they're from another universe)
03:43:44 <hagb4rd> singularity goes a long way
03:43:48 <itidus21> so what is the halting problem again? whether a program will halt?
03:44:33 <pir^2> Write a program to determine whether arbitrary Turing machines halt?
03:46:06 <pir^2> http://esoteric.voxelperfect.net/wiki/Weight_Loss_Clinic_Calgary ...
03:46:30 <pir^2> For more information, please follow me.. Lefebre Calgary Clinics - Medical Diet since 1998.. Welcome to the Lefebre clinic.. Call today.. The clinic is available ZERONA Dr.. Lefebre! .
03:46:30 -!- Zuu has quit (Ping timeout: 252 seconds).
03:46:33 <itidus21> the probelm of course is that if you could do that then you never needed the turing machine
03:46:46 -!- Zuu has joined.
03:48:00 <kmc> what
03:48:02 <itidus21> hmm
03:48:06 <itidus21> nevermind
03:48:24 <pir^2> ...
03:48:26 <pir^2> ????????????
03:48:36 <pir^2> "you never needed the turing machine"
03:48:38 <hagb4rd> finally im confused
03:48:54 <pir^2> lol
03:48:56 <itidus21> so, when programming a turing machine, does the programmer tend to know whether it will halt?
03:49:01 * pir^2 is laughing at "you never needed the turing machine"
03:49:04 <kmc> yes
03:49:16 <pir^2> XD
03:49:16 <itidus21> kmc: and so, how does he know?
03:49:28 <kmc> by writing a proof, in some sense
03:49:37 <kmc> you're asking "when you write a program, how do you know what it does"
03:49:47 <itidus21> yeah
03:49:47 <Sgeo> For some turing machines, it's possible for a turing machine to determine whether or not it halts. But no turing machine can say perfectly 100% of the time
03:49:49 <itidus21> i guess so
03:49:57 <itidus21> i am
03:50:03 <kmc> humans have some capacity to generate proofs
03:50:04 <Sgeo> Either it fails to answer sometimes, or gives false positives, or false negatives, or 2 or more of the above
03:50:05 <kmc> so do computers
03:50:27 <pir^2> all computer programs halt
03:50:36 <pir^2> *in practice
03:51:21 <kmc> "does it halt" is just one example of the general problem of predicting program behavior
03:51:55 <Sgeo> There exist programs for which humans are uncertain about whether they will halt
03:52:26 <kmc> yeah, like the program that finds counterexamples to <your favorite unsolved conjecture in mathematics>
03:53:06 <pir^2> Collatz conjecture? Goldbach conjecture? P vs NP? True?
03:53:18 <pir^2> I just solved True
03:53:28 <kmc> yeah collatz is a good example
03:54:55 * pir^2 -> HOTPO -> 1 -> 2 -> 1 -> 2...
03:57:45 <kmc> itidus21, it's easy to generate a proof that some machine halts on some specific input
03:57:52 <kmc> it's just a trace of the execution of that machine
03:58:09 <kmc> but if the machine doesn't halt, it's hard to prove that
03:58:54 <kmc> though in some cases it's easy, for example if it enters the exact same state twice
03:58:58 <kmc> it may also be hard to prove that a machine halts for *all* inputs
04:00:58 <pir^2> !finnmark bye
04:02:01 -!- pir^2 has quit (Quit: I have discovered a truly marvelous demonstration of this proposition that this quit message is too narrow to contain).
04:02:19 -!- MDude has changed nick to MSleep.
04:02:27 <pikhq_> All computer programs halt if your notion of "halting" includes heat death. :P
04:03:04 <kallisti> pikhq_: NOT IN THEORETICAL LAND DAWG
04:04:51 <pikhq_> itidus21: You seem utterly confused about the halting problem. :)
04:05:20 <hagb4rd> hm, so 4,2,1 would make an endless loop?
04:05:37 <hagb4rd> if not catched?
04:06:27 <hagb4rd> okay.
04:21:55 <hagb4rd> the 500 bucks are already mine..muahrhr
04:37:26 <itidus21> seems to me that several guys will solve the halting problem without knowing each other and be super famous for it 50 years later
04:44:43 <pikhq_> itidus21: Turing already proved it was impossible.
04:44:56 <pikhq_> Unless there's a glaring flaw in his proof, done.
04:45:13 <itidus21> i got confused by "<pir^2> BRAINFUCK SUX CUZ I CANT SOLVE THE HALTING PROBLEM"
04:45:21 <kmc> or unless we change to different definitions
04:45:26 <kmc> itidus21, it was an intentionally dumb statement
04:45:57 <itidus21> d'oh
04:46:09 <kmc> all caps, bad grammar and spelling
04:47:05 <itidus21> i understood that it was a mockery, but i didn't realize that the meaning of it was also wrong
04:47:49 <kmc> it's very easy to prove the halting problem is impossible
04:48:27 <kmc> suppose (by contradiction) that you have a function halts(f) = true if f(x) halts for all x, halts(f) = false if f(x) loops for some x
04:49:00 * oerjan swats kmc for misrepresenting the problem -----###
04:49:02 <kmc> now define the function g(x): if (halts(g)) then { loop forever } else { return }
04:49:13 <kmc> oh misrepresenting how?
04:49:15 <itidus21> all that matters to me is that it's solved :D
04:49:26 <oerjan> x is supposed to be an argument to halts as well
04:49:49 <itidus21> x is a free variable :P
04:49:58 <kmc> aren't both problems unsolvable, though
04:50:03 <oerjan> probably.
04:50:27 <kmc> anyway the only subtlety is that g needs a copy of its own description
04:50:36 <itidus21> by solved i probably mean that we realize it's unsolved
04:50:48 <kmc> and it's not obvious that you can do this
04:50:50 <itidus21> s/unsolved/unsolvable
04:50:53 <kmc> but you can
04:51:19 <kmc> in mathematics this is known as Kleene's recursion theorem
04:51:25 <kmc> in esoteric programming it is known as writing quines :)
04:51:52 <zzo38> If there are an infinite number of possible inputs, can you make a function that stops if and only if the program you are testing will stop for all inputs?
04:52:01 <oerjan> g(x) = if halts(x,x) then { loop forever } else { return }
04:52:39 <zzo38> Those g(x) stuff have been described in book Godel, Escher, Bach, although using Godel numbering instead of like that.
04:53:34 <oerjan> then ask if halts(g,g) is true or not
04:57:19 <kmc> yeah, that's better
05:00:22 <oerjan> your version can be reduced to this by defining myhalts(g,x) = yourhalts(\y -> g(x)), i think
05:01:31 <oerjan> (and of course if you want to be really precise, you should not confuse the notation for functions and the strings representing them)
05:02:37 <kmc> yeah
05:02:58 <kmc> that reminds me of C#, where lambda is also a quote
05:03:53 <Sgeo> "lambda is also a quote"?
05:05:40 <oerjan> istr old lisps also confused lambdas and their list representation; of course lisp is designed to make that almost harmless
05:06:01 <kmc> Sgeo, if you have a function value that came from a lambda, you can also inspect the syntax tree of its definition
05:06:11 <kmc> it should be noted that I haven't used C# and just read about this once
05:06:21 <oerjan> (the "almost" is because afaiu it essentially forces dynamical scoping)
05:07:01 <kmc> similarly if f is a function in CPython, you can use f.func_code to get its bytecode
05:07:02 <oerjan> or well, non-lexical
05:07:53 <kmc> i think there is other harm
05:08:02 <kmc> you lose the ability to treat functions as black boxes
05:08:18 <kmc> you lose abstraction
05:08:40 <kmc> if i pass a function to some library, that library can care about the implementation details of my function
05:09:06 <Sgeo> Picolisp has very not-black-box functions
05:09:10 <zzo38> If you have a newspaper, tell me what the "horoscope" section says (including the dates) and tell me your timezone. I wish to try an experiment with them
05:09:25 <kmc> "news... paper"?
05:09:40 <zzo38> Yes, a newspaper. Do you have one?
05:33:48 <zzo38> If the newspaper was published in a different timezone as your own, I would like their timezone as well as yours.
05:54:31 -!- NicePants has joined.
06:40:05 <zzo38> Are there any quad precision floating point in Haskell?
06:43:44 <hagb4rd> http://hackage.haskell.org/packages/archive/Decimal/0.1.0/doc/html/Data-Decimal.html
06:43:45 <hagb4rd> öfde
06:43:59 <hagb4rd> precise enough?
06:45:44 <kmc> that's... not floating point
06:45:52 <hagb4rd> nope
06:46:09 <kmc> there's a binding to mpfr but it has hella caveats
06:46:12 <kmc> http://hackage.haskell.org/package/hmpfr
06:46:16 <zzo38> No; I need logarithms and trigonometry
06:48:42 <zzo38> O, OK, yes hmpfr includes trigonometry. But it says there is errors on it
07:00:44 <zzo38> Do you know if there is any ephemeris softwares for Haskell, or how to make such a things?
07:00:47 -!- Klisz has quit (Quit: SLEEP, GLORIOUS SLEEP).
07:04:09 <shachaf> kmc: Sorry. :-(
07:04:18 <kmc> what did you do?
07:04:30 <kmc> or, is that the other kind of "sorry"
07:04:48 <zzo38> Not speaking English to the President.
07:05:02 <shachaf> Oh, I thought you left because of my kmc-blood-pressure joke.
07:05:20 <shachaf> Which I'll admit wasn't a particularly good one.
07:05:39 <kmc> no, i left because people were saying dumb things and I did not feel like correcting them
07:05:47 <kmc> which was also probably why you made the joke
07:05:49 <hagb4rd> i just wonder why there is such a discrepance in the terminology of quad precision between german and english sources. in german quad precision describes any format using 4 'units' of memory, while the english ones determines it to floats..strange
07:07:29 <shachaf> Ah. Fair enough.
07:07:31 <zzo38> bagb4rd: I did specify floating point, at least.
07:07:39 <hagb4rd> yes
07:14:29 -!- pikhq_ has quit (Ping timeout: 240 seconds).
07:14:31 -!- pikhq has joined.
07:24:06 <zzo38> Is there a way in Haskell to make a Double value with is large or infinite?
07:26:04 <kmc> > 1 / 0
07:26:04 <lambdabot> Infinity
07:28:50 <kallisti> wow SPJ's article on the STG is insane.
07:28:58 <kallisti> I'm afraid I only understand bits and pieces of it.
07:29:18 <kmc> which one?
07:29:31 <kallisti> the one that someone linked me.
07:29:48 <kallisti> Implementing lazy functional languages on stock hardware: the spineless tagless g-machine
07:29:53 <kmc> that's a cool paper
07:29:58 <kallisti> yes
07:30:11 <kmc> if you read that one and also "Typing Haskell in Haskell" then you will have most of the specific knowledge to write a decent Haskell compiler
07:30:22 <kallisti> I understand the general points, some of the implementation bits so far, and the actual STG language itself.
07:30:40 <kallisti> I don't fully understand the in-memory representation
07:30:51 <kmc> "How to make a fast curry" is another good paper that picks up from where the STG one ends
07:31:06 <kallisti> just that it's always a closure with free variables.
07:31:53 <kallisti> this is mainly because, as of late, my short term memory has been getting even worse than previously. :P
07:32:13 <kmc> the in-memory representation of closures (including data and thunks) is in "Figure 4: The layout of a closure" on page 46 in my copy
07:32:45 <kallisti> oh I haven't gotten there
07:32:48 <kallisti> I am all the way on page 29
07:33:04 <kmc> there's a pointer to an "info table", followed by whatever data fields (for constructors) or free variables (for thunks and function closures)
07:33:24 <kallisti> right
07:33:27 <kallisti> yes that's what I meant
07:33:29 <kmc> the info table is static data; roughly speaking there's one for each lambda in the source, and one for each ADT constructor
07:33:53 <kallisti> yes I was reading about how closures can be reused and such.
07:34:12 <kmc> and i guess one for each let binding, to implement that thunk
07:34:18 <kallisti> yes
07:34:30 <kallisti> it treats all the lets as "lambda forms" even if they have zero arguments
07:34:55 <kallisti> (which kind of brings some truth to the "zero argument function" claim... I guess at an operational level)
07:35:00 <kmc> heh
07:35:03 <kallisti> of course mathematically a zero-argument function is meaningless.
07:35:42 <kallisti> looool I love taking the easy way out on easy math homework.
07:36:16 <kmc> right, it's also meaningless at the level of haskell semantics
07:36:21 <kallisti> kmc: yes
07:36:31 <kmc> it might be a reasonable way to understand the implementation details of certain haskell compilers
07:36:33 <kallisti> not that I actually know anything about haskell semantics
07:36:41 <kallisti> I just... know that it wouldn't make any sense. intuitively.
07:37:00 <kallisti> we're starting the course with some set theory. One of the questions asks for a subset of the powerset of the integers. I answer with the empty set. :P
07:37:11 <kmc> likewise GHC implements multi-argument functions as multi-argument functions, even where the semantics say they are curried single-argument functions
07:37:24 <kmc> haha
07:37:26 <oerjan> of course those "zero argument functions", being thunks, will be overwritten after evaluation
07:37:32 <kmc> best subset ever
07:37:49 <kallisti> the subsetiest of all
07:37:54 <oerjan> hm i guess that's true of non-zero ones too
07:38:16 <kmc> a thunk wouldn't ever have arguments
07:38:22 <kallisti> now it wants an element from the powerset of integers
07:38:25 <kallisti> I think I'm gonna have to go with...
07:38:26 <kallisti> empty set.
07:38:28 <kmc> haha
07:39:00 <kallisti> AAAAAAUGH NOW THERE'S A CARDINALITY RESTRAINT?
07:39:02 <kallisti> WHAT IS THIS SHIT.
07:39:07 <kallisti> I HAVE TO ENUMERATE THINGS?
07:39:08 <kallisti> FUCK THIS
07:39:08 <oerjan> kmc: but if it closes over variables, those will be effectively the arguments to whatever function implements the thunk
07:39:09 * kallisti quites.
07:39:30 <kmc> oerjan, i guess you can look at it that way
07:39:43 <kmc> STG makes a distinction between free variables and arguments
07:39:56 <kallisti> ugh so many squiggly brackets on paper, and I'm so bad at writing them.
07:40:01 <kmc> the code finds them in different places, iirc
07:40:01 <kallisti> kmc: indeed
07:40:31 <kallisti> I found using the closures of data values to implement optimizations an interesting idea.
07:40:36 <kallisti> I'm guessing there's more detail later.
07:40:42 <kmc> what idea is that?
07:40:44 <kallisti> the paper covers quite a bit of the top-level in the first few pages.
07:41:18 <kallisti> kmc: the paper mentions that you could do things like copy values to registers in a value's closure.
07:41:21 <zzo38> In my program, the types used for floating point are given using type synonyms, so they can be changed later if necessary.
07:41:28 <kmc> mm
07:41:36 <kmc> an ADT value?
07:41:46 <kallisti> it didn't really specify very much.
07:42:00 <kmc> in current GHC you don't enter values in the fast case
07:42:15 <kallisti> oh I see.
07:42:34 <kallisti> I guess it could have just been an idea and not something that GHC actually attempts.
07:42:43 <kmc> ghc might also do that
07:43:12 <kallisti> in general, you could add any kind of code that you want to be associated with forcing that value, I believe.
07:43:23 <kmc> then you're not entering a value though
07:43:25 <kmc> you're entering a thunk
07:43:27 <kallisti> or well, not even forcing it right? just evaluating it.
07:43:41 <kallisti> er... entering it
07:43:41 <kallisti> yes.
07:43:44 <kmc> what's the distinction between "force" and "evaluate"
07:43:50 <kallisti> I meant enter
07:43:53 <kallisti> that's the terminology used in the paper.
07:44:15 <kallisti> I used "evaluate" incorrectly. :P
07:45:05 <kmc> i guess if you don't load the fields into registers, then you just return to the caller and they get the values at an offset from the original closure
07:45:12 <kmc> except they might have to follow an indirection too
07:45:52 <kmc> anyway current GHC uses the least significant bits to tag a pointer to a closure which is known to be in whnf
07:45:58 <kmc> so in the best case you don't have to enter it at all
07:45:58 <kallisti> yes it mentions that function arguments are accessed as offsets from the "environment register" which is the pointer to the closure code I believe.
07:46:05 <kmc> *nod*
07:46:08 <kallisti> I assume the same is true of ADTs?
07:46:18 <kmc> guess so
07:46:28 <kallisti> it wouldn't make sense for them to be free variables I think.
07:46:34 <kallisti> the fields, I mean.
07:46:45 <kallisti> I GUESS
07:46:45 <kmc> wait, no
07:46:46 <kallisti> I SHOULD LIKE
07:46:49 <kallisti> READ THIS PAPER
07:46:56 <kallisti> since it starts explaining the ADT part, exactly where I left off.
07:47:00 <kmc> i'm pretty sure the fields of an ADT value are like free variables
07:47:01 <kallisti> well actually it's explaining unboxed stuff.
07:47:08 <kmc> they are closed over when the ADT value is construcetd
07:47:16 <kmc> haha very well
07:47:37 <kallisti> but actually I'm going to write more squiggly brackets for my math class.
07:47:40 <kallisti> they demand more from me.
07:48:02 <kmc> haha
07:48:06 <kmc> these ones? {}
07:48:25 <kallisti> yes those are the ones
07:48:28 <kallisti> except mine never look like that.
07:48:39 <kmc> moustaches
07:48:39 <kallisti> I just make squiggly lines
07:48:54 <kmc> i had to learn how to write '&' for AP CS back in the day
07:48:55 <kmc> that was hard
07:49:09 <kallisti> oh yes
07:49:12 <kallisti> I never get that right.
07:49:22 <kallisti> writing Java with a pencil is so..... weird.
07:49:39 <kallisti> it's even more tedious than usual.
07:49:50 <kmc> hehe
07:49:52 * pikhq mutters
07:50:00 <pikhq> I'm having to take an intro to CS course.
07:50:10 <pikhq> I had somehow gotten exempted from it at a previous university.
07:50:13 <pikhq> Not so here.
07:50:17 <zzo38> I sometimes write computer codes by hand too; I often write Haskell codes by hand.
07:50:17 <kmc> :/
07:50:23 <kallisti> kmc: so the update flag has nothing to do with strictness right?
07:50:25 <pikhq> Guess I'm learning Java.
07:50:32 <kallisti> kmc: or do I misunderstand?
07:50:42 <kmc> kallisti, iirc only thunks are updatable
07:50:45 <kallisti> kmc: it seems like an optimization of lazy evaluation where sharing isn't required.
07:50:47 <kmc> so it has to do with non-strictness ;P
07:50:52 <kmc> hmm?
07:50:56 <kmc> you mean that sharing is not always required?
07:51:03 <kallisti> kmc: yes I haven't gotten to how it implements strict values yet.
07:51:13 <kmc> i'm not sure what you mean by "strict value"
07:51:25 <kallisti> not thunks.
07:51:27 <kallisti> >_>
07:51:35 <kmc> meaning algebraic data and functions in whnf?
07:51:42 <kmc> anyway you'd set the update flag to "no" if you can prove a given thunk is only entered once
07:51:48 <kallisti> yes
07:51:52 <kmc> that saves you the trouble of updating it
07:51:52 <kallisti> and you do this because
07:51:57 <kallisti> that value isn't being shared.
07:51:58 <kallisti> right?
07:52:03 <kmc> right
07:52:13 <kallisti> cool
07:52:20 * kallisti is understanding some things.
07:52:29 <kmc> well the /value/ might subsequently get shared
07:52:37 <kmc> value = a thing which has been evaluated
07:52:47 <kallisti> that particular lambda is not shared though
07:52:49 <kmc> but you use it if the thunk /before evaluation/ can't get to multiple places
07:52:55 <kallisti> ah
07:53:04 <kallisti> I see
07:53:52 <kallisti> the update flag is "part" of the sharing
07:53:56 <kallisti> er
07:53:57 <kallisti> I mean
07:54:02 <kallisti> updating the thunk is part of the sharing implementation
07:54:06 <kmc> yes
07:54:07 <kallisti> and turning it off is an optimization
07:54:37 <kallisti> but the value itself can still be shared by virtue of being a value addressed in memory. :P
07:54:43 <kallisti> >_>?
07:55:51 -!- augur has quit (Read error: Connection reset by peer).
07:56:06 <kallisti> hm
07:56:10 -!- augur has joined.
07:56:12 <kallisti> that's really rather vague though
07:56:27 <kmc> if you're at a point where you know something is a value (not a thunk), then you are free to duplicate pointers to it, regardless of what the update flag says
07:56:35 <kallisti> yes
07:56:50 <kallisti> is the update flag still there, even?
07:57:02 <kmc> in GHC i think it's implicit in the closure type
07:57:18 <kallisti> oh right everything has the same representation
07:57:22 <kmc> http://hackage.haskell.org/trac/ghc/wiki/Commentary/Rts/Storage/HeapObjects
07:57:24 <kallisti> or, so far... that's what I've learned.
07:58:45 <kmc> note that GHC these days is eval/apply rather than push/enter
07:58:49 <kallisti> oh I see.
07:58:59 <kmc> some of these closure types don't make sense in the context of the original STG paper you're reading
07:59:15 <kallisti> yes there's some new things.
07:59:29 <kmc> see "How to make a fast curry"
08:00:03 <kallisti> yes the paper was discussing that the advantages and disadvantages of eval/apply vs. push/enter, so I'm guessing eval/apply wins?
08:00:09 <kallisti> -that
08:00:32 <kmc> pretty much
08:02:07 <kallisti> so does the "tagless" qualifier also mean that sum types do not have tags on them? or is this simply referring to not having tags on the heap objects.
08:04:06 <kallisti> I'm not sure I can see how you would select on multiple constructors without some kind of tagged union representation.
08:06:12 <kallisti> yeah I guess it obviously does still retain that kind of "tag"
08:06:25 <kallisti> (apologies if I'm not making any sense I'm pretty tired I should probably sleep)
08:07:05 <oerjan> i think one would need to look at what the earlier G-machines were like to understand what that means. unless the paper does a comparison, i don't recall.
08:08:07 <kallisti> oh it explains it
08:08:20 <kallisti> I was asking if it has additional meaning beyond that.... but I guess not. silly question.
08:09:16 <oerjan> a have this vague idea that the spine and tag may have been connected to when these things were thought of as doing explicit reduction on graphs...
08:10:02 <kallisti> it's tagless in that it doesn't branch of a tag to determine what kind of memory representation is being used.
08:10:14 <oerjan> aha
08:10:35 <kallisti> at least in this paper it has a uniform layout. you access values by "entering" them (jumping to their closure code)
08:11:19 <kallisti> but apparently GHC does eval-apply now, not sure how that works in relation to entering date/code.
08:11:23 <oerjan> i think some things in ghc were later changed to _not_ use indirect jumps because it ruins branch prediction
08:11:52 <oerjan> or something like that
08:12:10 <kallisti> branch prediction sounds kind of magical.
08:12:53 <oerjan> well afaik it's something the CPU does
08:13:53 <kmc> right, i think the "tags" refers to using some bits of a pointer to tell you what's pointed to
08:13:55 <oerjan> guessing which way a branch will go so it can run the pipeline that way - but if it guesses wrong, it has to stop the pipeline
08:14:17 <kmc> which is something GHC does do now
08:14:22 <oerjan> (and i vaguely recall the guess is mainly "same as last time")
08:14:23 <kmc> but something they avoid in the original STG paper
08:14:47 <kmc> oerjan, another common heuristic is that forwards branches are not taken, and backwards branches are taken
08:14:52 <oerjan> aha
08:15:08 <kmc> the latter often represent loops, which run many times before exiting
08:15:21 <oerjan> makes sense
08:15:24 <kmc> it's said that common x86 chips correctly predict 99%+ of branches
08:15:29 <kmc> i don't have a reference on that number though
08:15:53 <oerjan> presumably common compilers do their best to assure they do that :P
08:16:06 <kmc> yeah
08:16:22 <kmc> also you can embed hints in the code
08:16:28 <kmc> and GCC supports this at source level
08:16:40 <kmc> Linux kernel code is full of stuff like if(unlikely(monkeys_have_escaped)) { ... }
08:17:40 <kmc> kallisti, for an example of a system using tag bits, see http://repetae.net/computer/jhc/manual.html#the-run-time-system
08:17:46 <oerjan> <kmc> right, i think the "tags" refers to using some bits of a pointer to tell you what's pointed to <-- um that's about ghc's modern tags, i wasn't sure the "tags" that indirectly named the STG were the same kind
08:17:55 <kmc> yeah i am not sure either
08:17:57 <kmc> but i think so
08:18:11 <kmc> the STG paper goes into some detail about how they know whether a given word is a pointer to a garbage collected object
08:18:18 <kallisti> kmc: so at this point GHC's STG is a bit of a misnomer.
08:18:29 -!- zzo38 has quit (Remote host closed the connection).
08:18:34 <oerjan> it would be ironic if ghc's STG has ended up being neither spineless nor tagless :D
08:18:53 <kmc> closures and update frames have a layout known from the info table, and the stack is split between a pointer stack and a primitive stack
08:18:56 <kallisti> fortunately the acronym is the same.
08:19:00 <kallisti> spined tagged g-machine
08:19:04 <kmc> this is all to avoid tagging gc pointers vs. primitives
08:19:06 <oerjan> yay
08:19:06 <pikhq> #define unlikely(x) __builtin_expect(x, 0)
08:19:07 <pikhq> BTW
08:19:11 -!- FireFly has quit (Changing host).
08:19:19 <oerjan> *...* i
08:19:21 <kmc> right so there are at least two things you can use pointer tagging for
08:19:32 <kmc> (a) to distinguish pointers the gc must follow from other values
08:19:41 <kmc> (b) to mark which things are already in whnf
08:19:47 <kmc> GHC does (b) now but still does not do (a)
08:20:36 <kmc> aiui, one of the innovations of the STG paper is the idea that even Int should be an algebraic type, with an unboxed value inside
08:20:42 <kmc> the latter being not a first-class Haskell value
08:21:14 <fizzie> BTW^2, __builtin_expect docs have a nice dig against programmers in general: "In general, you should prefer to use actual profile feedback for this (-fprofile-arcs), as programmers are notoriously bad at predicting how their programs actually perform."
08:21:14 <lambdabot> fizzie: You have 1 new message. '/msg lambdabot @messages' to read it.
08:21:15 <kmc> you push the burden of distinguishing heap pointers into the closure layout and calling convention
08:21:23 <kmc> haha
08:21:26 <kmc> it's true
08:22:17 <kmc> kallisti, this is why the Haskell Report only requires that Int support the range [-2^29 .. 2^29-1]
08:22:25 <kmc> to allow for 2 tag bits even on 32-bit machines
08:22:39 <kmc> in GHC this is not an issue because you can always tell Int from Int# statically
08:23:49 <pikhq> fizzie: So, "unless you're a Linux or x264 dev, don't". :P
08:24:37 <fizzie> GCC also has __attribute__ ((hot)) and s/hot/cold/ function attributes, which are completely ignored if you -fprofile-use like you should.
08:24:38 <oerjan> i don't see how they are exempted.
08:25:08 <pikhq> oerjan: They spend a lot of time measuring performance.
08:25:11 <pikhq> Especially x264.
08:27:13 <kmc> linux also moves supposedly cold functions into separate linker sections
08:28:15 <fizzie> Industry tip: a function flagged as 'cold' which actually is called often, and therefore should be warmer, is called 'hypothermic'. (Not true.)
08:28:31 <kmc> true facts
08:32:30 <monqy> is it true that it's true or is it true that it's untrue
08:32:30 <monqy> help
08:33:00 -!- augur has quit (Read error: Connection reset by peer).
08:33:17 <kallisti> monqy: is it true that help
08:33:27 -!- augur has joined.
08:33:36 <monqy> always and forever
08:34:13 <kmc>
08:34:40 <kallisti> > sequence . concatMap (\x -> if x `elem` "aeiou" then "aeiou" else [x]) $ "is it true that help"
08:34:41 <lambdabot> Couldn't match expected type `m a'
08:34:42 <lambdabot> against inferred type `GHC.Types...
08:35:12 <kallisti> > sequence . map (\x -> if x `elem` "aeiou" then "aeiou" else [x]) $ "is it true that help"
08:35:14 <lambdabot> ["as at traa that halp","as at traa that help","as at traa that hilp","as a...
08:35:33 <kallisti> > sequence . map (\x -> if x `elem` "aeiou" then "aeiou" else [x]) $ "help"
08:35:34 <lambdabot> ["halp","help","hilp","holp","hulp"]
08:35:46 <kmc> > mapM (\x -> if x `elem` "aeiou" then "aeiou" else [x]) $ "help"
08:35:47 <lambdabot> ["halp","help","hilp","holp","hulp"]
08:35:52 <kallisti> monqy: hulp
08:35:54 <kallisti> kmc: oh right
08:36:01 <monqy> you forgot hlep
08:36:01 <kallisti> that's the thing that M means
08:36:08 <monqy> , hepl
08:36:15 <kallisti> monqy: no wrong
08:36:16 <monqy> , ehlp
08:36:18 <kallisti> not forgotten
08:36:22 <kmc> (++"M") = (sequence .)
08:36:34 <kmc> i remember when somebody asked for a list function on haskell-cafe
08:36:38 <kmc> and they golfed it for a while
08:36:44 <kmc> and then someone realized it was just 'sequence'
08:36:47 <kmc> hole in one
08:36:53 <kallisti> sequence is the best always.
08:38:18 <oerjan> :t flip
08:38:18 <lambdabot> forall (f :: * -> *) a b. (Functor f) => f (a -> b) -> a -> f b
08:38:19 <shachaf> (++"M") = ("(sequence.)"++) only in the boring case.
08:38:31 <kallisti> sequence flips your ordered sequence of possibilities turnways.
08:38:32 <shachaf> Usually M functions have more information than the non-M functions.
08:38:39 <oerjan> sometimes lambdabot's flip is the same as sequence
08:39:13 <shachaf> > flip [succ,pred] 1
08:39:15 <lambdabot> [2,0]
08:39:16 <shachaf> > sequence [succ,pred] 1
08:39:17 <lambdabot> [2,0]
08:40:11 <oerjan> and that case is frequently useful in golfing
08:40:18 <monqy> > let (++"M") = (sequence.) in map (\ x -> if x `elem` "aeiou" then "aeiou" else [x]) ++ "M" $ "help"
08:40:19 <lambdabot> <no location info>: Parse error in pattern
08:40:27 <monqy> cries
08:40:52 <oerjan> kallisti: hint, sequence . map f = mapM f
08:41:16 <kmc> "Say, do you fellows enjoy the particular game of golf? I've got three lids out in the Hudson and enough Zig-Zag to wipe God's ass and the devil too."
08:41:31 <oerjan> oh wait
08:41:37 <shachaf> @ty sequence . filter ?f
08:41:38 <lambdabot> forall (m :: * -> *) a. (Monad m, ?f::m a -> Bool) => [m a] -> m [a]
08:41:39 * oerjan is so late
08:41:58 <kmc> maybe #esoteric is secretly the real #haskell-in-depth
08:41:59 <kallisti> oerjan: I... yes you're very late
08:42:03 <kallisti> oerjan: you're several months late.
08:42:15 <shachaf> Half the time #esoteric is #haskell-in-shallow
08:42:27 <kmc> that too
08:42:38 <monqy> #esoteric is really the secret #haskell-in-depth
08:42:38 <shachaf> And of course, there's @
08:42:45 <shachaf> But only when elliott is around.
08:42:52 <kmc> @-in-width
08:42:53 <lambdabot> Unknown command, try @list
08:42:55 <kallisti> no it's #haskell-not-lame-totally-awesome
08:43:01 <kmc> isn't there some way to have an IRC chan that starts with @
08:43:15 <monqy> be on a server that supports it
08:43:19 <shachaf> Yes, for values of "@" equal to "#@"
08:43:22 <kallisti> or #haskell-in-breadth
08:43:33 <monqy> I think I remember what + channels do
08:43:37 <monqy> but I forget what & channels do
08:43:45 <shachaf> #haskell-in-bread
08:43:46 <monqy> or did I get those confused
08:43:56 <shachaf> Mmm. Bread.
08:44:01 * shachaf should eat more regularly.
08:44:04 <monqy> breaded #haskell
08:44:37 <shachaf> https://plus.google.com/103943309878727777440/posts/DCdBqZX3bvQ
08:46:19 <kallisti> no I'd say #esoteric is more like #sometimes-haskell-and-without-human-tutorials
08:47:17 <kmc> cool now i know how to use google as a qr code generator
08:47:18 <monqy> what does the tutorialing then
08:47:19 <kmc> https://www.google.com/chart?cht=qr&chs=276x276&chl=http://example.com&chld=L%7C0
08:48:10 <shachaf> "While we have concluded this particular experiment, we constantly experiment with new and more secure authentication mechanisms."
08:48:14 <shachaf> It was working when I tried it before.
08:48:50 <kallisti> monqy: `?
08:48:58 <monqy> `? monad
08:49:03 <Patashu> Hahahahaha have you guys seen Colbert's Super PAC's videos http://www.colbertsuperpac.com/episodeiv-anewhope/
08:49:09 <HackEgo> Monads are just monoids in the category of endofunctors.
08:49:09 <Patashu> They're such hilarious parodies of the current primary/political state
08:49:09 <monqy> `? what is a monads
08:49:13 <monqy> `? help
08:49:14 <HackEgo> what is a monads? ¯\(°_o)/¯
08:49:25 <kallisti> Patashu: are you suddenly a spam bot?
08:49:27 <kmc> `? hjälp
08:49:31 <HackEgo> hjälp? ¯\(°_o)/¯
08:49:32 <shachaf> \m/ \m/
08:49:32 <myndzi> `\o/´
08:49:33 <lambdabot> myndzi: You have 1 new message. '/msg lambdabot @messages' to read it.
08:49:33 <myndzi> |
08:49:33 <myndzi> (_|¯'¯|_)
08:49:40 <shachaf> \m/ \m/ \m/ \m/
08:49:43 <monqy> `? \m/ \m/
08:49:44 <myndzi> `\o/´
08:49:44 <myndzi> |
08:49:44 <myndzi> /´\
08:49:44 <myndzi> (_| |_)
08:49:45 <kmc> 8===D
08:49:47 <HackEgo> ​\m/ \m/? ¯\(°_o)/¯
08:50:13 <HackEgo> help? ¯\(°_o)/¯
08:50:20 <Patashu> yeah I'm a spam bot WHAT UP
08:50:24 <Patashu> look at the videos I post :(
08:50:50 <shachaf> "episode IV" sounds like an unpleasant drug-related thing.
08:51:25 <kmc> achewood claims Hi-Five is slang for HIV
08:59:08 <myndzi> i have a message what
08:59:23 <myndzi> o nice
08:59:25 <oerjan> shachaf: erm it's the official title of a star wars movie
08:59:48 <oerjan> (namely the original one)
09:00:48 <kmc> i'm guessing shachaf knows that
09:00:59 <oerjan> POSBBILE
09:01:12 <kmc> also ahem it was originally released as just _Star Wars_
09:01:22 <oerjan> ASOL POBSSILE
09:02:16 <pikhq> Yeah, calling it Episode IV was the first of many edits.
09:02:47 <oerjan> the _first_?
09:05:49 -!- NicePants has quit (Ping timeout: 240 seconds).
09:06:16 <oerjan> "The opening crawl of the sequels disclosed that they were numbered as "Episode V" and "Episode VI" respectively, though the films were generally advertised solely under their subtitles."
09:06:20 <oerjan> huh.
09:06:36 -!- Zuu has quit (Ping timeout: 252 seconds).
09:06:42 <pikhq> Let me put it this way: the only way to get something even *approximating* the original theatrical release is a Laserdisc rip.
09:07:26 <oerjan> pikhq: yeah i just wasn't aware the prequels were included in the numbering before they were released
09:07:27 <pikhq> (approximating because it uses the somewhat strange stereo mix, not the original mono mix. Just like everything else.)
09:07:45 <pikhq> Ah. Yeah, the prequels were decades in the making.
09:07:53 <pikhq> Thus the disappointment from everyone.
09:08:56 <kmc> also means people who saw the original trilogy as children were seeing the prequels as jaded adults
09:09:29 <pikhq> I saw the prequels as a child, and even then they were kinda lame.
09:09:48 <pikhq> Much of the annoyance with it came only later, but even then "... Eh."
09:09:56 <kmc> i found them all to be entertaining enough
09:10:04 <kmc> but kinda pointless filler
09:10:12 <kmc> same for the matrix sequels
09:10:34 <pikhq> Yeah, that's just it. Essentially all they were was a couple of plot points, spread out between 3 films.
09:10:49 <kmc> like if you wanna have fun watching an action movie, you can do a lot worse than _The Matrix Reloaded_
09:11:02 <kmc> but it's not special the way the first one was
09:11:10 <shachaf> Why is the first one special?
09:11:30 <pikhq> shachaf: Much less detail gone into the psuedophilosophicalness.
09:11:36 <shachaf> Really?
09:11:49 <pikhq> It sets up an atmosphere very well.
09:11:52 <shachaf> "pseudophilosophy" is the word I was about to use to describe it.
09:11:53 <kmc> the plot was both more interesting and more sensical
09:12:13 <pikhq> shachaf: The whole series does pseudophilosphy.
09:12:15 <kmc> it's more fun to watch the scrawny hacker guy become a superhero
09:12:17 <pikhq> Just to varying extents.
09:12:23 <kmc> less fun to watch him flying around as a superhero
09:12:26 <shachaf> It seemed like it was primarily about violence/action/whatever, and not very interesting from most other perspectives I could think of.
09:12:49 <pikhq> Yeah, it was using that as a neat atmosphere for the fun violence/action.
09:13:15 <kmc> the philosophy in the first movie was pretty shallow but they didn't try to overextend it
09:13:19 <kmc> not nearly like the others
09:13:28 -!- Zuu has joined.
09:14:41 <pikhq> I'd say it's a little bit like Valve games. They're not usually huge on plot. (seriously, you can cover the plot of all of their games in 10 minutes, tops)
09:14:50 <kmc> i generally thought the first half of the movie was more interesting than the second
09:14:56 <pikhq> But they've got setting polished to a mirror shine.
09:15:49 * shachaf wonders what a good movie is.
09:16:05 <kmc> you want some recommendations for good movies?
09:16:29 <fizzie> "The only good movie is a dead movie." (Old saying of the jungle.)
09:16:29 <shachaf> I was wondering specifically among movies I've seen, but sure. :-)
09:16:45 <shachaf> I saw _Casablanca_ a few days ago. That was pretty well-done.
09:16:49 <kmc> i don't see enough movies these days
09:16:52 <pikhq> Shame the medium's considered so utterly important.
09:16:59 <pikhq> Honestly, the form is incredibly limited.
09:17:13 -!- myndzi\ has joined.
09:17:20 <kmc> i definitely have more opinions on which TV shows are good than which films
09:17:24 <pikhq> ~2 hours max? That's more analogous to a freaking short story or a novella.
09:17:38 <kmc> yeah
09:17:51 <shachaf> I have _Brazil_ on my list of movies to watch.
09:18:29 <kmc> _The Wire_ tells a novel-size story in about 13 hours
09:18:38 <kmc> even there, you could probably put multiple seasons into one novel
09:19:41 -!- myndzi has quit (Ping timeout: 240 seconds).
09:19:51 <kmc> i can't really imagine watching that show one episode per week
09:19:57 <kmc> but i don't really do that for any shows
09:36:47 -!- zzo38 has joined.
09:36:54 <zzo38> No!
09:37:01 <zzo38> Red!
09:37:21 <shachaf> Black!
09:37:51 <zzo38> Hay! That's *my* name!
09:38:18 -!- oerjan has set topic: No topic Wednesday! | Wait, it's not Friday?? Damn it! | Now in colors! | So, what is blegnian motion, anyway? | http://codu.org/logs/_esoteric/.
09:38:44 <shachaf> zzo38: What's your last name?
09:38:57 <zzo38> Black
09:39:06 <shachaf> Oh. I thought it was your first name.
09:39:12 <shachaf> What's your first name?
09:40:03 <zzo38> Will you figure it out if you look at my Haskell packages? They have my name on it because I uploaded them, and it always has the name of whoever uploaded them
09:41:16 <zzo38> But I don't really like the terms "first name" and "last name", because they are racist; and I don't like "Christian name" either because that is even more racist.
09:42:14 -!- GreaseMonkey has quit (Quit: The Other Game).
09:42:25 <shachaf> kmc: I think zzo38 just outdid you.
09:42:28 <oerjan> you shouldn't care about racism in name order unless you're a hung arian
09:42:52 <shachaf> How about "personal name" and "family name"?
09:43:15 <zzo38> shachaf: Yes I do prefer those.
09:43:35 <shachaf> I can't find any packages of yours on Hackage.
09:44:14 <zzo38> oerjan: I don't really care much; I still prefer freedom of speech. But I still generally prefer to be not racist
09:44:22 <zzo38> shachaf: My name is AaronBlack. Now can you find it?
09:44:42 <shachaf> Ah, yes.
09:45:12 -!- oerjan has quit (Quit: WHEEEEEEEEEEEEEEEEE).
09:46:43 <pikhq> shachaf: Not very culturally universal, sadly.
09:46:54 <pikhq> Not all cultures give surnames.
09:51:12 <shachaf> pikhq: Yes, I know.
09:53:05 -!- monqy has quit (Quit: hello).
09:55:09 <shachaf> Also, "family name" is ambiguous; it might refer to a "generation name".
10:12:29 -!- augur has quit (Ping timeout: 240 seconds).
10:14:29 -!- Patashu has quit (Quit: MSN: Patashu@hotmail.com , Gmail: Patashu0@gmail.com , AIM: Patashu0 , YIM: patashu2 , Skype: patashu0 .).
10:44:07 <itidus21> one might also say, group name vs individual name >:-)
10:45:14 -!- pikhq has quit (Ping timeout: 240 seconds).
10:45:19 -!- pikhq has joined.
11:29:02 -!- myndzi\ has quit (Ping timeout: 255 seconds).
11:33:53 -!- ais523 has joined.
11:36:55 -!- aloril has quit (Ping timeout: 248 seconds).
11:40:26 -!- aloril has joined.
11:43:22 -!- _Slereah has changed nick to Slereah.
11:45:26 -!- Frooxius_ has joined.
11:48:59 -!- Frooxius has quit (Ping timeout: 252 seconds).
11:49:08 -!- Frooxius_ has changed nick to Frooxius.
11:55:27 -!- myndzi has joined.
12:18:07 -!- Vorpal has joined.
12:20:57 -!- zzo38 has quit (Remote host closed the connection).
12:49:28 -!- Phantom_Hoover has joined.
12:54:27 <Phantom_Hoover> `? monoid
12:54:33 <HackEgo> Monoids are just categories with a single object.
12:54:58 <Phantom_Hoover> `? category
12:55:02 <HackEgo> Categories are just categories.
12:55:40 <fizzie> `? monad
12:55:44 <HackEgo> Monads are just monoids in the category of endofunctors.
12:55:45 <fizzie> `? endofunctor
12:55:49 <HackEgo> endofunctor? ¯\(°_o)/¯
12:55:51 <fizzie> ^ omission.
12:56:47 <Phantom_Hoover> Endofunctors are just arrows in the monoidal category?
12:56:55 <fizzie> `? arrow
12:56:58 <HackEgo> arrow? ¯\(°_o)/¯
12:57:34 <Phantom_Hoover> Arrows are just members of homsets.
12:57:48 <fizzie> Arrows are just bad hombres.
13:01:07 -!- Phantom_Hoover has left ("Leaving").
13:01:13 -!- Phantom_Hoover has joined.
13:01:22 <Phantom_Hoover> Wait why did nobody tell me elliott went nuts.
13:04:21 <fizzie> Also paimaväär sounds vaguely Estonian to me.
13:06:53 <fizzie> They tend to do that thing, where Finnish would have a wovel at the end. en:leg = fi:sääri = et:säär, en:ash (tree) = fi:saarni = et:saar.
13:09:09 <fizzie> Päivämäärä, though, is a Finnish word. (Date. As in, "time and date".)
13:09:28 <fizzie> `words --finnish 20
13:09:33 <HackEgo> mallenne elpoistäsi saansa urasvat autoviulosaansa lohdistelevaltani ilmästä luonipahoisti vaististamme ruoinne tartisuulet uusistasiatyynimista enneettävinansa epäislaista astaan taisemmalta uuvutta kouluminä ohjakinkö jahtavanisimeroksen
13:25:39 <ais523> Phantom_Hoover: weren't you there at the time?
13:25:47 <Phantom_Hoover> ais523, nope.
13:25:57 <ais523> I'm actually kind-of worried he hasn't returned since
13:26:57 <Phantom_Hoover> 1:38 on Monday morning. I definitely wasn't there.
13:28:42 <fizzie> Translated from your sillytimes, 3:38 on Monday morning; no wonder I wasn't there.
13:29:02 <Phantom_Hoover> Presumably this is why nobody mentioned it when I asked where he'd gone.
13:32:32 <fizzie> Also isn't that a Sunday?
13:33:13 <Phantom_Hoover> It... yes.
13:33:38 -!- Phantom__Hoover has joined.
13:39:20 -!- Phantom_Hoover has quit (Remote host closed the connection).
13:46:00 <hagb4rd> ah thats it fizzie..Päivämäärä
13:48:13 <hagb4rd> now tell me where is the relation to any other language spoken on this planet
13:48:24 <hagb4rd> if there is any
13:49:47 <fizzie> Estonian is a relative; "kuupäev" ('moon-day') is their corresponding word, I think.
13:49:51 <hagb4rd> hard to explain how language developes in such a different way..isnt it?
13:50:27 -!- Frooxius_ has joined.
13:51:24 <fizzie> Language people also always say Hungarian is related, but that's farther away.
13:52:44 -!- Frooxius has quit (Ping timeout: 272 seconds).
13:52:54 -!- Frooxius_ has changed nick to Frooxius.
13:54:54 <ais523> fizzie: I was in Hungary and they were talking about Hungarian a bit for the benefit of the large contingent of Brits there at the time, then they put a Finnish sentence on the board to see if any of the Hungarians there understood it
13:55:06 <ais523> and the answer was, no, but they all had "oh, right" moments when it was explained
13:55:19 <ais523> apparently Hungarian isn't really like any other language, except for Finnish
13:55:30 <ais523> vocab-wise
13:55:46 <hagb4rd> is there any historical relation between these counties?
13:56:13 <fizzie> "Linguistic roots common to both branches of the traditional Finno-Ugric language tree (Finno-Permic [i.e. Finnish, Estonian] and Ugric [i.e. Hungarian]) are extremely distant. -- According to philologist Mall Hellam there's only one mutual sentence: “the living fish swims in water.” (Finnish: Elävä kala ui veden alla), (Estonian: Elav kala ujub vee all), (Hungarian: az élő hal vízben úszik)."
13:57:21 <ais523> heh, the Hungarian only vaguely resembles the other two
13:58:06 <kmc> wikipedia has "Eleven hal úszik a víz alatt."
13:58:22 <hagb4rd> sounds like the linguists stuck there too
13:58:35 <kmc> http://en.wikipedia.org/wiki/Uralic_languages#Example_sentence
13:58:44 <fizzie> Yeah, "they" always mention the relatedness, but it's not really obvious to a "language muggle" (am I using this term right?).
13:59:19 <fizzie> kmc: Heh, the other Hungarian example was also from Wikipedia: http://en.wikipedia.org/wiki/Finno-Ugric (second paragraph).
13:59:27 <fizzie> Inconsistencies? In my Wikipedia?
13:59:50 <fizzie> I suppose it could be just an alternative way of saying it.
14:00:06 <fizzie> One that arranges the words more in the same order.
14:00:14 <fizzie> (I don't know anything about Hungarian at all.)
14:00:44 <hagb4rd> i wonder y the language did not mix up with the languages in the skandinavian neighbourhood in any way
14:01:02 <fizzie> Calling "Eleven hal úszik a víz alatt" "mutually intelligible" is going a bit far, though.
14:01:29 <hagb4rd> these people seem to prefer to be on their own in some way
14:01:42 <hagb4rd> do we have any finnish people here?
14:01:47 <hagb4rd> btw
14:01:48 <kmc> hagb4rd, what makes you think it didn't?
14:01:57 <kmc> "Over the course of many centuries, the Finnish language has borrowed many words from a wide variety of languages, most from neighboring Indo-European languages. Indeed, some estimates put the core Proto-Uralic vocabulary surviving in Finnish at only around 300 word roots."
14:02:23 <fizzie> We've got quite a few loans also from Russian.
14:02:52 <fizzie> Not sure if "borrow" is the right word, we're certainly not going to give any of them back.
14:03:07 <hagb4rd> <kmc>hagb4rd, what makes you think it didn't? <- obviously the language
14:03:30 <hagb4rd> hehe
14:04:30 <hagb4rd> so you
14:04:36 <hagb4rd> are a fin fizzieß
14:05:14 <hagb4rd> ?
14:08:52 <fizzie> Yes.
14:09:01 <fizzie> I am finished.
14:09:42 -!- ais523 has quit (Remote host closed the connection).
14:11:31 <hagb4rd> fizzie: okay.. one last question: what does this humppa mean? is just like unz unz unz unz? fun?
14:12:01 <fizzie> It's a genre of music.
14:12:11 <fizzie> And I guess also the associated dance.
14:12:19 <fizzie> But informally could be used to refer to any number of things.
14:12:51 <hagb4rd> like 'jump' ..maybe?
14:13:02 <fizzie> Well, any sort of bouncing around, maybe.
14:13:27 <hagb4rd> k.. thanks for the infos :)
14:13:53 <fizzie> Also see http://en.wikipedia.org/wiki/Humppa -- that looks to be more or less correct, except it only talks of the official meanings.
14:17:05 <hagb4rd> bounce? official meanings.. i see :P
14:17:52 <hagb4rd> do not bounce with my woman dude!
14:20:01 <Sgeo> @hoogle Chan a -> Chan a -> Chan a
14:20:02 <lambdabot> Control.Applicative (<|>) :: Alternative f => f a -> f a -> f a
14:20:02 <lambdabot> Language.Haskell.TH.Syntax qRecover :: Quasi m => m a -> m a -> m a
14:20:02 <lambdabot> Control.Monad mplus :: MonadPlus m => m a -> m a -> m a
14:53:36 -!- Phantom___Hoover has joined.
14:54:58 -!- Phantom__Hoover has quit (Ping timeout: 244 seconds).
14:58:00 -!- ais523 has joined.
15:41:30 -!- Phantom___Hoover has quit (Ping timeout: 240 seconds).
15:41:51 -!- Phantom___Hoover has joined.
15:57:11 -!- augur_ has joined.
16:05:06 -!- Mathnerd314 has joined.
16:08:34 -!- MSleep has changed nick to MDude.
16:11:50 -!- hagb4rd has quit (Ping timeout: 240 seconds).
16:22:44 -!- Ngevd has joined.
16:29:29 <Ngevd> Hello
16:32:25 <Ngevd> What is a comonad?
16:34:02 <Phantom___Hoover> The categorical dual of a monad.
16:34:13 <Phantom___Hoover> i.e. a monad with all the ->s swapped.
16:35:04 <Ngevd> (>>=) :: m a -> m b ->(a -> m b)?
16:35:22 -!- pikhq_ has joined.
16:35:44 -!- pikhq has quit (Ping timeout: 252 seconds).
16:35:45 <Phantom___Hoover> It's not that.
16:38:46 <Ngevd> Could you explain it better? I really have no idea, I'm afraid
16:40:54 <Phantom___Hoover> I'm not so hot on them myself.
16:41:02 <Ngevd> Hmm...
16:42:26 <Phantom___Hoover> Ngevd,
16:42:27 <Phantom___Hoover> http://hackage.haskell.org/package/comonad
16:44:09 -!- Gregor has changed nick to WhatsTheNickLeng.
16:44:27 -!- WhatsTheNickLeng has changed nick to Gregor.
16:44:31 <Gregor> Phantom___Hoover: Wow, you are actually at the limit.
16:44:41 <Phantom___Hoover> Yes.
16:45:14 <Ngevd> Ngevd___________
16:45:32 <Phantom___Hoover> Ngevd, extend (dual of bind) :: (w a -> b) -> w a -> b.
16:45:33 -!- Ngevd has changed nick to Ngevd___________.
16:45:39 <Gregor> I hate you all
16:45:40 <Ngevd___________> Hmm
16:45:42 <Phantom___Hoover> Erm, *w b for that last noe.
16:45:44 <Phantom___Hoover> *one
16:46:11 <Gregor> Hmmmmmmmmm, the nick 'Gr' hasn't been used in two years.
16:46:17 <Gregor> I could PROBABLY pick it up if I asked nice.
16:46:37 <Gregor> The only caveat being that I don't actually want it.
16:46:41 -!- Ngevd___________ has changed nick to __N__g__e__v__d_.
16:47:04 -!- __N__g__e__v__d_ has changed nick to Ngevdtanebngevd_.
16:51:14 -!- cheater has quit (Ping timeout: 240 seconds).
17:07:00 -!- augur_ has quit (Read error: Connection reset by peer).
17:07:18 -!- augur has joined.
17:26:20 -!- Mathnerd314 has quit (Ping timeout: 252 seconds).
17:42:50 -!- Phantom___Hoover has quit (Ping timeout: 240 seconds).
17:46:24 -!- Ngevdtanebngevd_ has changed nick to Ngevd.
17:55:57 -!- Phantom_Hoover has joined.
17:56:29 -!- Klisz has joined.
17:59:02 -!- Phantom___Hoover has joined.
18:01:13 -!- Phantom_Hoover has quit (Remote host closed the connection).
18:11:07 -!- Mathnerd314 has joined.
18:18:10 -!- Ngevd has quit (Ping timeout: 276 seconds).
18:29:16 <kallisti> C#++'s lambda syntax is strangely similar to STG's
18:29:48 <kallisti> [list of free variables](list of arguments) -> { expression }
18:30:31 -!- Ngevd has joined.
18:36:10 <Ngevd> Hello!
18:36:16 <ais523> hi
18:38:01 <Ngevd> @oeis 1, 5, 14, 30, 55
18:38:03 <lambdabot> Square pyramidal numbers: 0^2 + 1^2 + 2^2 +...+ n^2 = n*(n+1)*(2*n+1)/6.
18:38:03 <lambdabot> [0,1,5,14,30,55,91,140,204,285,385,506,650,819,1015,1240,1496,1785,2109,2470...
18:38:49 <ais523> kallisti: "C#++"?
18:38:58 <Ngevd> > map (sum . concat . tails . enumFromTo) [1..]
18:38:58 <lambdabot> Couldn't match expected type `[a]'
18:38:59 <lambdabot> against inferred type `a1 -> [a1]'
18:38:59 -!- monqy has joined.
18:39:06 <Ngevd> > map (sum . concat . tails . enumFromTo 1) [1..]
18:39:08 <lambdabot> [1,5,14,30,55,91,140,204,285,385,506,650,819,1015,1240,1496,1785,2109,2470,...
18:39:51 <Ngevd> What would be fun but doable for me to write a program for?
18:40:24 <kallisti> ais523: C++11 :P
18:40:38 <kallisti> I'm even more scatterbrained than usual when I've just woken up.
18:41:00 <Phantom___Hoover> Ngevd, of what
18:41:01 <Phantom___Hoover> *?
18:41:15 <Ngevd> ...
18:41:23 <Ngevd> I'll try rephrasing my question
18:41:32 <Ngevd> That was not a response I can parse
18:42:10 <Ngevd> Can anyone give me an idea for a program that is fun but doable for me to write?
18:43:23 <kallisti> portal chess server implemenetation
18:43:43 <Ngevd> Could you tell me the rules of portal chess?
18:43:49 <Ngevd> I assume it is a chess variatio
18:43:50 <Ngevd> n
18:43:51 <kallisti> not at the moment.
18:43:53 <kallisti> and yes.
18:43:57 <kallisti> just think of chess but awesome.
18:43:59 <kallisti> should be simple.
18:44:01 <kallisti> to figure out the rest.
18:44:02 <kallisti> :P
18:44:15 <kallisti> but seriously I do need to actually write down the rules
18:45:17 <kallisti> basically the objective is the same and the pieces are in the same positions
18:45:20 <kallisti> but they do different things
18:46:30 <kallisti> another difference is that the primary capturing pieces fire projectiles, that travel in one direction across the board.
18:47:43 <kallisti> another is that some pieces have a component of directionality. your portals for example, are the two bishops, who are facing a particular direction. During each move of a directional piece can choose to move both its direction and its position (either both or just one)
18:47:55 <kallisti> +you
18:48:28 <kallisti> oh look Wikipedia is going down in 11 hours.
18:48:48 <kallisti> I should probably mass-read everything I might want to know for that period of time.
18:49:22 <kallisti> Ngevd: but yeah enumerating all of the pieces will take some time... which I don't have at the moment
18:49:39 <kallisti> as soon as I finish my drink I'm going to be afk.
18:52:36 <kallisti> but to give you the rules for the eponymous piece: the portal has an opening that corresponds to the direction its facing. Any moving pieces or projectiles that attempt to occupy the same square as the portal from that direction will be relocated to the opening of the player's other portal, and will continue traveling as expected.
18:53:07 <kallisti> therefore, it's impossible to capture a portal from the direction it's facing.
18:53:43 <Ngevd> Do they face orthagonally or diagonally?
18:53:47 <kallisti> either.
18:53:51 <Ngevd> Okay
18:53:54 <Ngevd> And projectiles?
18:56:25 <kallisti> projectiles are made by the two rooks. One is called the D-cannon, and is the upside-down rook on the king's side, which can, as its full move, fire a projectile in any diagonal direction. The C-cannon, the normally oriented rook on the queen's side, can fire in cardinal directions.
18:57:49 <kallisti> once a projectile captures a piece it stops traveling forward.
18:57:57 <kallisti> (or once it reaches the end of the board, obviously)
18:58:41 <Ngevd> Is castling still possible?
18:58:52 <kallisti> it's not something I've considered. so no
18:58:59 <kallisti> really I haven't play tested it yet. :P
18:59:07 <kallisti> and yet I'm making the implementation.
18:59:15 <kallisti> I'll likely tweak rules as I go
19:00:05 <kallisti> one thing I have noticed
19:00:19 <kallisti> is that white can basically force black's first move
19:00:27 <kallisti> so I'm not sure how balanced it is in that regard.
19:00:34 <kallisti> but chess isn't balanced either.
19:00:42 <Ngevd> Hang on
19:00:50 <Ngevd> If a portal moves to a piece
19:01:01 <Ngevd> ...Nevermind
19:01:05 <kallisti> yes that's a thing
19:01:35 <kallisti> it will appear next to the other portal, on the one square adjacent to the direction it's facing.
19:01:49 <kallisti> portals cannot capture normally.
19:04:12 <kallisti> the portal itself can move to any space within a chebyshev distance of 3, ignoring pieces within its path ("hopping" like a knight)
19:04:30 <Ngevd> Which direction are the portals initially facing
19:04:37 <kallisti> I should probably draw a pretty little giagram like this one http://en.wikipedia.org/wiki/File:Chess_x4t45.svg
19:05:02 <kallisti> the opponent. assuming white is on the south side of the board, and black is on the north side.
19:05:08 <kallisti> as in a standard chess diagram.
19:05:37 <kallisti> but the starting direction isn't very important I think.
19:05:44 <kallisti> you'll likely move portals as one of your first moves
19:05:46 <kallisti> and thus reorient it.
19:05:57 <kallisti> oh
19:05:59 <kallisti> that
19:06:02 <kallisti> is a picture of a four
19:06:09 <kallisti> http://en.wikipedia.org/wiki/Chebyshev_distance
19:06:12 <Ngevd> Yes, I was wondering about that
19:06:55 <Ngevd> Can they move to a distance of three or less, or is it precisely 3?
19:07:16 <kallisti> 3 or less
19:07:22 <Ngevd> Okay
19:07:27 <kallisti> may adjust it to 2 dunno
19:07:31 <kallisti> that is quite ridiculously mobile.
19:07:47 <kallisti> but then, they need to be able to respond quickly to things that can capture all the way across the board without moving at all.
19:07:48 <Ngevd> Hmm
19:08:11 <kallisti> the cannons themselves move slowly however. one square in any direction per turn.
19:08:22 <Ngevd> Like Kings?
19:08:24 <kallisti> yes
19:08:32 <kallisti> kings are exactly the same in this game.
19:08:34 <kallisti> in every way.
19:08:45 <Ngevd> Except for castling
19:08:48 <kallisti> er, yes.
19:09:05 <kallisti> but I might have an optional castling rule. I want to try out many rule variations
19:09:11 <kallisti> I might tweak individual movement and capturing rules and stuff like that.
19:10:15 <kallisti> chebyshev distance of 3 movement will be interesting
19:10:37 <kallisti> but I think it fits the game well. everything is very extreme.
19:10:55 <kallisti> as far as I can tell the purpose of pawns (which are currently unchanged) is to be meatshields.
19:11:12 <Ngevd> What happens if a pawn is promoted to a portal
19:11:19 <kallisti> oh, hmmm.
19:11:28 <kallisti> well....
19:11:33 <kallisti> uh.....
19:11:37 <kallisti> uh.........
19:12:10 <kallisti> I hadn't really thought about promotion. which means IT'S NOT IN THE GAME YET.
19:12:19 <kallisti> also how the hell are you going to get to the other side of the board.
19:12:27 <Ngevd> Carefully placed portals
19:12:28 <kallisti> I guess it's pretty difficult in normal chess too...
19:12:32 <kallisti> oh, yes.
19:12:32 <kallisti> see
19:12:33 <kallisti> hmm
19:12:49 <kallisti> I don't know what effects that have.
19:12:52 <kallisti> *has
19:12:54 <kallisti> erjwejriwjiojweroijweiojtowiejr
19:13:01 <kallisti> currently the rule is
19:13:05 <kallisti> if you capture a portal
19:13:21 <kallisti> the other portal explodes and captures everything adjacent to it and itself.
19:13:33 <kallisti> which is kind of a shitty way to account for the fact that a portal doesn't really do anything if the other one is missing
19:13:36 <kallisti> however
19:13:39 <kallisti> with promotion rules you could get new portals.
19:13:41 <Ngevd> That makes saying "check" quite interesting
19:13:46 <kallisti> Ngevd: oh yes.
19:13:50 <Ngevd> ::::D
19:13:54 <kallisti> check is kind of ridiculous
19:13:56 <kallisti> in this game.
19:14:12 <kallisti> the same explosion rule exists if the two portals attempt to travel through each other.
19:14:16 <kallisti> which means
19:14:46 <kallisti> if two portals of the same color are within movement distance of one another, the opponents king cannot be adjacent to them
19:15:04 <Ngevd> This is crazy!
19:15:06 <kallisti> lol
19:15:25 <kallisti> considering that a portal can more or less move across the whole board in a minimum of 3 turns, and more than likely just 2
19:15:32 <kallisti> this is a pretty frequent state to be in.
19:16:06 <kallisti> but I feel the piece promotion thing would be kind of ridiculous and weird
19:16:15 <kallisti> because you would just shuttle pawns to the other side in the late game.
19:16:21 <kallisti> which I guess makes them more valuable.
19:16:42 <kallisti> that could be an interesting thing...
19:17:01 <kallisti> Ngevd: I suspect the rules as they stand are highly broken.
19:17:08 <Ngevd> Wow, you could get the enemy king into checkmate by putting a portal either side of it, both pointing towards it
19:17:10 <kallisti> I just took some elements are thought were interesting
19:17:12 <kallisti> and stuck them together
19:17:17 <kallisti> and then made rules for the consequences.
19:17:40 <kallisti> yes I may very well restrict the movement of portals somehow
19:17:44 <kallisti> perhaps no hopping like knights
19:18:03 <kallisti> still that doesn't change much
19:18:10 <kallisti> there are a shit ton of ways to get to the same square
19:18:14 <kallisti> when going by chevyshev distance
19:18:21 <kallisti> *cheby
19:19:25 <kallisti> Ngevd: you just made me realize another strange corner case.....
19:19:40 <kallisti> which makes me think
19:19:44 <kallisti> perhaps portals should be unable to capture
19:19:49 <kallisti> or rather
19:19:52 <kallisti> transport things by stepping on them.
19:20:12 <kallisti> as interesting as it would be
19:20:14 <Ngevd> Hmm, my checkmate scenario is rather a stalemate
19:20:30 <kallisti> imagine you have that same scenario
19:20:31 <kallisti> but with
19:20:32 <kallisti> a pawn
19:20:34 <kallisti> in the middle
19:20:49 <kallisti> now what happens when one of the portals attempts to capture the pawn, and thus transport it
19:20:57 <kallisti> when two portals are adjacent to each other, facing the same direction
19:21:11 <kallisti> it... kind of just disappears
19:21:19 <kallisti> in an infinite loop of rulez
19:21:43 <kallisti> PROBLEM SOLVED
19:21:47 <kallisti> this is how portals capture. :>
19:21:56 <kallisti> THIS VERY UNLIKELY SITUATION
19:21:59 <kallisti> IS HOW YOU CAPTURE THINGS WITH PORTALS.
19:22:02 <kallisti> done.
19:22:03 <kallisti> problem solved.
19:22:52 <Ngevd> Perhaps the pawn remains in the portal loop until it can exit the portal safely, at which point you flip a coin and it gets fired out of one of the portals at high speed?
19:23:05 <kallisti> lol
19:23:12 <kallisti> I'm trying to remove any element of chance as much as I can
19:23:19 <kallisti> though there is an existing rule variant that allows chance.
19:23:24 <kallisti> but I don't really like it.
19:24:00 <kallisti> it involves PROJECTILE LOOPS
19:24:06 <kallisti> THAT ARE /BIDIRECTIONAL/
19:24:07 <kallisti> yes
19:24:14 <kallisti> I've just dropped some Official Portal Chess Terminology.
19:25:23 <Ngevd> Possibly the player who controls the portals the piece is trapped in chooses which way the piece gets fired?
19:25:31 <kallisti> yes that's interesting
19:25:33 <kallisti> I may in fact
19:25:35 <kallisti> make this another case
19:25:38 <kallisti> where a number of rule variations can exist.
19:25:53 <kallisti> the other case is the bidirectional projectile loop thing, which I haven't really explained very well
19:26:04 <kallisti> man... this ruleset is going to need several helpful diagrams.
19:26:08 <Ngevd> And if one of the portals is destroyed, the piece is obviously destroyed
19:26:57 <kallisti> hm, yes you could go by:
19:27:25 <kallisti> a) chance b) portalling player's choice c) capturing portal ejects always d) moving portal ejects always
19:28:03 <kallisti> e) actually there's about 3 more I can think
19:28:05 <kallisti> of
19:28:07 <kallisti> TOO MANY
19:28:08 <kallisti> RULE
19:28:09 <kallisti> VARIATIONS
19:28:44 <kallisti> the rule variations are basically me not deciding what can happen here, and just picking one I like the best as the "standard" but allowing the other possibilities
19:29:04 <kallisti> I'm afraid by the end there will be so many strange rules that no one will want to play. :P
19:29:05 <Ngevd> You could do one by how many turns have taken place?
19:29:15 <kallisti> oh yes that's one
19:29:18 <kallisti> the oscillating rule
19:29:22 <kallisti> like the projectile loop one
19:29:23 <kallisti> that works like that.
19:29:32 <kallisti> that is one of the "3 more I can think of"
19:29:39 <Ngevd> The oscillating rule family- you can do many timings
19:29:45 <kallisti> lol, yes.
19:29:50 <kallisti> RULE FAMILIES
19:29:58 <kallisti> "chance" "oscillation" "meh fuck it"
19:30:06 <kallisti> the three rule families
19:30:15 <Ngevd> And choice
19:30:30 <kallisti> for those who like gambling, those who like strategic timing, and those who really don't give a fuck.
19:30:37 <kallisti> well the choice one is a bit difficult to work out
19:31:14 <kallisti> in projectile loops the choice for the looping player is, obviously, to capture an opponent's piece, but to allow friendly pieces to interact with the projectile in a way that prevents them from being captured
19:31:33 <kallisti> note that this is only bidirectional loops
19:32:02 <kallisti> for a projectile loop that travels in only one direction there is no ambiguity that needs to be settle by explicit rules.
19:32:40 <Ngevd> > let PortalChess == Weird in PortalChess == Weird
19:32:41 <lambdabot> <no location info>: parse error on input `in'
19:32:52 <Ngevd> > let "Portal Chess" == "Weird" in PortalChess == Weird
19:32:53 <lambdabot> <no location info>: parse error on input `in'
19:33:01 <Ngevd> > let "Portal Chess" == "Weird" = True in PortalChess == Weird
19:33:02 <lambdabot> Not in scope: data constructor `PortalChess'Not in scope: data constructor ...
19:33:12 <Ngevd> > let "Portal Chess" == "Weird" = True in "PortalChess" == "Weird"
19:33:13 <lambdabot> *Exception: <interactive>:3:4-35: Non-exhaustive patterns in function ==
19:33:17 <Ngevd> > let "Portal Chess" == "Weird" = True in "Portal Chess" == "Weird"
19:33:18 <lambdabot> True
19:33:18 <kallisti> yo dawg I heard you like pattern matching
19:33:23 <Ngevd> ...
19:34:08 <Ngevd> My Portal Chess program has 15 lines of code, not one of which contains pattern matching
19:34:09 <kallisti> http://sprunge.us/WdIC
19:34:13 <Ngevd> It doesn't do much, though
19:34:18 <kallisti> Ngevd: hm?
19:34:29 <kallisti> you've been writing portal chess code?
19:34:34 <Ngevd> Yes
19:34:38 <Ngevd> While you've been talking
19:34:40 <kallisti> oh
19:34:41 <kallisti> well
19:34:44 <kallisti> you should work on mine instead. :P
19:34:50 -!- jix_ has changed nick to jix.
19:35:29 <Ngevd> I'm doing mine a little different
19:35:39 <Ngevd> Yours is probably better
19:35:46 <Mathnerd314> Ngevd: I like yours better
19:35:47 <lifthrasiir> > let { infixr 3 <=>; "foo" <=> "bar" = "bar" <=> "foo" } in "foo" <=> "bar"
19:35:47 <lambdabot> *Exception: <interactive>:3:20-52: Non-exhaustive patterns in function <=>
19:35:53 <lifthrasiir> uhm. yeah.
19:36:29 <Mathnerd314> lifthrasiir: write a programming language where this works:
19:36:54 <Mathnerd314> > let { infixr 3 <=>; "foo" <=> "bar" = "bar" <=> "foo"; a <=> b = b <=> a } in "foo" <=> "bar"
19:36:58 <lambdabot> mueval-core: Time limit exceeded
19:37:24 <Sgeo> Uh, what were you expecting that to do?
19:37:35 <lifthrasiir> > let { infixr 3 <=>; "foo" <=> "bar" = True; a <=> b = b <=> a } in "bar" <=> "foo"
19:37:36 <lambdabot> True
19:37:36 <Sgeo> Print an error saying <<loop>>?
19:37:38 <Sgeo> Oh
19:37:49 <Sgeo> Wait, why am I saying oh?
19:38:00 <lifthrasiir> abuse of local fixity declaration?
19:38:23 <kallisti> Ngevd: what are you doing differently? :P
19:38:45 <Ngevd> I'm doing the board is an Array (Int, Char) Piece
19:38:50 <kallisti> oh
19:38:56 <Ngevd> Rather than a list of pieces with coords?
19:39:04 <kallisti> I'm using a Vector.
19:39:23 <kallisti> and I have a Storable instance that converts board squares to 16-bit unsigned integers.
19:41:20 <Ngevd> This took me a while:
19:41:23 <Ngevd> freshBoard = array ((1,'a')(8,'h')) [((1,'a'), CCannon White),((1,'b'), Knight White),((1,'c'), Portal White North),((1,'d'), King White),((1,'e'), Queen White),((1,'f'), Portal White North),((1,'g'), ((1,'h'), DCannon White)
19:41:23 <Ngevd> ,((2,'a'), Pawn White True),((2,'b'), Pawn White True),((2,'c'), Pawn White True),((2,'d'),Pawn White True),((2,'e'),Pawn White True),((2,'f'),Pawn White True),((2,'g'),Pawn White True),((2,'h'),Pawn White True)
19:41:23 <Ngevd> ,((3,'a'), Empty),((3,'b'), Empty),((3,'c'), Empty),((3,'d'), Empty),((3,'e'), Empty),((3,'f'), Empty),((3,'g'), Empty),((3,'h'),Empty)
19:41:24 <Ngevd> ,((4,'a'), Empty),((3,'b'), Empty),((4,'c'), Empty),((4,'d'), Empty),((4,'e'), Empty),((4,'f'), Empty),((4,'g'), Empty),((4,'h'),Empty)
19:41:26 <kallisti> lol
19:41:29 <Ngevd> ,((5,'a'), Empty),((5,'b'), Empty),((5,'c'), Empty),((5,'d'), Empty),((5,'e'), Empty),((5,'f'), Empty),((5,'g'), Empty),((5,'h'),Empty)
19:41:31 <Ngevd> ,((6,'a'), Empty),((6,'b'), Empty),((6,'c'), Empty),((6,'d'), Empty),((6,'e'), Empty),((6,'f'), Empty),((6,'g'), Empty),((6,'h'),Empty)
19:41:34 <Ngevd> ,((7,'a'), Pawn Black True),((7,'b'), Pawn Black True),((7,'c'), Pawn Black True),((7,'d'),Pawn Black True),((7,'e'),Pawn Black True),((7,'f'),Pawn Black True),((7,'g'),Pawn Black True),((7,'h'),Pawn Black True)
19:41:41 <kallisti> I wrote mine a bit less... tediously.
19:41:43 <Ngevd> ,((8,'a'), DCannon Black),((8,'b'), Knight Black),((8,'c'), Portal Black South),((8,'d'), Queen Black),((8,'e'), King Black),((8,'f'), Portal Black South),((8,'g'), ((8,'h'), CCannon Black)
19:41:46 <Ngevd> ]
19:41:50 <Ngevd> Almost certainly
19:42:10 <Mathnerd314> Sgeo: I was expecting it to change the universe in very subtle ways :p
19:42:22 <kallisti> http://sprunge.us/DfHI
19:42:30 <kallisti> storable instance and some basic functions
19:46:57 <kallisti> hmmm if I took loops out of the board representation I could knock it down to a Word8 representation.
19:47:01 <Mathnerd314> my desktop: http://min.us/mvFG2GySl#1o
19:47:24 <kallisti> since loops are expected to be not very common anyway.
19:47:34 <kallisti> I dunno I'll see how the algorithms work.
19:47:42 <kallisti> and change accordingly
19:47:47 <Ngevd> Mathnerd314, you can delete the install file for Skype
19:49:30 -!- Phantom___Hoover has quit (Ping timeout: 240 seconds).
19:50:04 <Mathnerd314> yeah...
19:50:06 <kallisti> Ngevd: so are you ready to implement the most exciting chess variant ever created? :P
19:50:20 <Ngevd> Probably not!
19:50:25 <Ngevd> But I'll give it a go
19:51:17 -!- Vorpal has quit (Ping timeout: 248 seconds).
19:52:59 -!- Phantom___Hoover has joined.
19:53:30 <kallisti> Ngevd: I think I did a pretty good job structure the "new board" code.
19:53:39 <kallisti> but maybe there's a way to make it better.
19:58:17 <kallisti> kmc: hmm, so as a general, when micro-optimizing, is it better to have many function arguments or many free variables?
19:58:35 <kallisti> when I was optimizing a (rather dumb) factoring algorithm I noticed that arguments seemed to be faster.
20:01:43 <kallisti> based on the way the STG presents its memory model I think function arguments would have slightly faster access times, which could be important for arguments that are accessed rapidly in a tight loop.
20:02:08 <kallisti> but it's likely a minor difference.
20:03:20 <Ngevd> Hmm
20:03:37 <Ngevd> Would it be possible to do the board as Coord -> Maybe Piece?
20:07:07 <kallisti> I think it would still have to look something up within an array or other structure
20:07:21 <kallisti> hm, well maybe not
20:07:33 -!- Labbekak has joined.
20:08:15 <kallisti> Ngevd: yes that would be possible but probably not very efficient.
20:08:57 <kallisti> each modification of the board would add an additional branch point that has to be executed in order to access anything on the board.
20:09:18 <kallisti> as you continue to layer either guards pattern matches
20:09:40 <kallisti> +or
20:11:35 <kallisti> essentially my at function produces a Coord -> Maybe Piece sort of function
20:11:43 <kallisti> at :: Board -> (File, Rank) -> Square
20:11:47 <kallisti> given the board it produces such a function
20:11:57 <kallisti> where data Square = Square (Maybe Piece) (Maybe Loop)
20:12:43 -!- MDude has quit (Ping timeout: 244 seconds).
20:26:53 <Ngevd> kallisti, what are Arrows and Prisms?
20:32:40 <Phantom___Hoover> Arrows are just members of homsets.
20:33:01 <Ngevd> In the context of Portal Chess
20:34:03 <kallisti> Ngevd: arrows are the pieces symbolized by the knight. They have a direction. they're immune to normal projectiles and will redirect the path of a projectile that comes into contact with them, regardless of which player initiated the projectile.
20:34:36 <kallisti> they move like bishops but are unable to capture like bishops, and may also move one space and capture one space in any cardinal direction
20:34:51 <kallisti> (I think. maybe. we'll see)
20:34:52 <Ngevd> And how do projectiles work?
20:35:06 <kallisti> well I kind of already explained most of it...
20:35:15 <kallisti> they just travel in the direction they're fired.
20:35:21 <Ngevd> Are they coloured?
20:35:24 <kallisti> hm
20:35:28 <kallisti> well, no.
20:35:38 <kallisti> they can capture any piece.
20:35:52 <kallisti> this makes arrows rather valuable defensively.
20:36:09 <kallisti> to block and redirect projectile paths, thus preventing cannons from firing
20:36:25 <kallisti> and also offensively
20:36:42 <kallisti> as an extension to the slow-moving cannons offensive capability.
20:36:47 <Ngevd> And how quickly do projectiles move
20:36:52 <kallisti> erm, instantly.
20:37:15 <kallisti> they go away when they've either captured a piece or touch the edge of the board.
20:37:15 <Ngevd> If they're slower, you can do taking the bullet?
20:37:27 <kallisti> I have no idea what that mean-- oh yes you could do that.
20:37:32 <kallisti> if they were slower
20:37:38 <kallisti> it would also make them kind of pointless I think
20:37:52 <Ngevd> Hmm, yeah
20:37:59 <kallisti> the fact that you can capture things from across the board without moving is kind of what makes portal chess interesting. :P
20:38:21 <Ngevd> Can cannons fire through portals?
20:38:23 <kallisti> yes.
20:38:27 <kallisti> they can also capture portals.
20:38:33 <kallisti> based on the rules of how capturing portals works.
20:38:53 <kallisti> cannons cannot capture arrows
20:38:57 <kallisti> however, with the help of a prism, they can.
20:39:17 <ais523> is anyone actually going to /play/ this
20:39:25 <kallisti> who knows.
20:39:28 <ais523> also, what if an arrow gets into an infinite loop through portals
20:39:29 <Ngevd> Probably just me and kallisti
20:39:36 <kallisti> ais523: yes this is a thing.
20:39:45 <kallisti> I have rules for it. they're slightly complicated. :P
20:40:06 <kallisti> but the basic idea is that it produces a loop, which is a persistent element of the board.
20:40:24 <kallisti> it's just a consequence of the "projectiles disappear when they leave the edge of the board or capture a piece" a rule.
20:40:37 <Ngevd> How can a projectile get stuck in a portal?
20:40:48 <kallisti> well, it doesn't get stuck /in/ the portal
20:40:52 <kallisti> it gets stuck in an infinite loop
20:40:55 <Ngevd> How?
20:40:56 <kallisti> either by arrows or portals.
20:41:02 <kallisti> so the simplest one is
20:41:04 <kallisti> two arrows facing each other
20:41:13 <kallisti> a cannon fires and the projectile touches one of the arrows
20:41:23 <Ngevd> Oooh
20:41:24 <Ngevd> I see
20:41:30 <quintopia> then any piece that ever moves through that zone dies?
20:41:34 <kallisti> this is a bidirectional loop. it's not entirely clear which direction the projectile is going. intuitively it goes back and forth between the two arrows.
20:41:39 <kallisti> quintopia: yes, and the projectile goes away.
20:41:48 <kallisti> also
20:42:24 <kallisti> if one of the components of the loop breaks the loop, the projectile will either a) fly off the board b) capture something c) get stuck in a different loop
20:42:25 <Ngevd> I was imagining it bouncing off the arrow rather than turning
20:42:35 <kallisti> Ngevd: it just goes in whatever direction the arrow is pointing
20:42:39 <Ngevd> Yeah
20:42:55 <quintopia> meh, i think projectiles should move at a finite speed. say eight squares a turn. then the prjectile can cover that area without preventing motion through it
20:43:33 <kallisti> that's difficult to represent on a chess board. admittedly so are several other things (loops, and a specific variation of the loop rules where bidirectional loops oscillate each round of turns)
20:43:34 <quintopia> and bullet dodging is possible
20:43:38 <quintopia> which could be fun
20:43:47 <kallisti> quintopia: eh.
20:43:55 <quintopia> its easy to represent...bullets become pieces
20:44:14 <kallisti> yes that's possible, but the idea was to require only a chess board and a little bit of imagination (in regard to keeping track of loops)
20:44:26 <kallisti> however, I guess a coin or something could be used
20:44:28 <kallisti> something easy to find.
20:44:32 <Ngevd> A loop can be: Data Loop = Directedloop [Coord] | Bidirectedloop [Coord]?
20:44:34 <quintopia> already requires too much imagination
20:44:44 <kallisti> Ngevd: I just use a direction
20:44:52 <kallisti> Ngevd: data Loop = Loop LoopKind Direction
20:45:02 <kallisti> data LoopKind = Unidirectional | Bidirectional
20:45:06 <kallisti> but I like your names better
20:45:16 <Ngevd> You could use strings if you want to play for real
20:46:13 <Ngevd> I don't see how your kind of loop actually represent loops
20:46:25 <Ngevd> Unless it's on the board?
20:46:32 <Ngevd> Ah yes
20:48:20 <quintopia> kallisti: if you want to make this even more complicated, you could have both cannons and laser cannons. the laser cannons are instantaneous, but arrows act as mirrors for them rather than "go this way"
20:48:37 <quintopia> let the arrow point in the directionof the normal vector to the mirror plane
20:49:10 <kallisti> quintopia: nah my pieces are already pretty filled.
20:49:21 <quintopia> ah well
20:49:58 <quintopia> i was just thinking how amusing itd be if you could reflect a shot straight back at its source. "i will die if i fire right now"
20:50:02 <kallisti> the rules are probably broken anyway
20:50:09 <kallisti> quintopia: yes that's possible.
20:50:10 <quintopia> but i guess its still possible with arrows
20:50:13 <quintopia> so
20:50:16 <quintopia> whaev
20:50:29 <kallisti> one of the possible opening moves involves such a scenario in fact.
20:50:35 <kallisti> which is what I was saying earlier
20:50:41 <kallisti> that white can easily force blacks first move
20:50:52 <kallisti> because white's first move can put black's pieces in danger
20:51:01 <quintopia> that sounds annoying
20:51:03 <kallisti> yes
20:51:07 <kallisti> these are things that need to be fixed.
20:51:19 <kallisti> or not fixed, but improved.
20:51:39 <kallisti> perhaps by giving cannons a finite range.
20:51:48 <kallisti> but this leads to other problems.
20:52:05 <shachaf> Has elliott given up on IRC?
20:52:18 <Ngevd> He may be blocked
20:52:23 <Ngevd> Banned
20:52:38 <Ngevd> Of course, now I've said that, he's going to join and say "No I'm not!"
20:52:46 <shachaf> Oh, huh, he's online.
20:52:52 <Ngevd> Or, more likely, "Yes I am"
20:53:12 <Ngevd> shachaf, which channels?
20:53:18 <shachaf> No idea.
20:53:54 <kallisti> rearranging the starting positions of pieces could possibly improve the game.
20:55:43 <kallisti> or hmmm
20:56:32 <kallisti> I think the situation could be amended by giving black an extra turn at the beginning of the game.
20:57:31 <Ngevd> Just seen an ad for "Megashark vs Crocasaurus"
20:58:43 <kallisti> http://gameknot.com/img/cd/Hs4OjMqrdSD_Tek0dz6AGg.gif
20:58:44 <kallisti> okay so
20:59:11 <kallisti> the best opening move for white is to move g2 to g3
20:59:17 <kallisti> because next turn he would be guaranteed a free capture
20:59:25 -!- Phantom___Hoover has quit (Quit: Leaving).
20:59:48 <kallisti> however, if black is given two moves after white's first move
20:59:56 <kallisti> this negates that opening for white.
21:00:25 <kallisti> however, it's likely just an indication that the game is fundamentally flawed in some way and needs to be revised. :P
21:00:48 <Ngevd> Love it for its flaws
21:01:31 <kallisti> but no that doesn't fix anything. :P
21:02:12 <kallisti> it just gives black that opportunity
21:02:14 <kallisti> to take a free piece
21:02:25 <kallisti> aha, I know.
21:02:29 <Ngevd> That's what they said to Raul Gomila!
21:02:38 <kallisti> you can give arrows an additional rule
21:02:50 <kallisti> they may push friendly pieces with them, in the direction they're facing.
21:03:20 <kallisti> this gives black the potential to defend white's opening by simply pushing his pawn out of the way and putting his arrow in position to block the projectile.
21:03:50 <kallisti> and also means that if black does the same sort of manuever
21:03:55 <kallisti> white can reply the same way.
21:04:03 <kallisti> and now the beginning of the game is somewhat sane.
21:04:12 <kallisti> can't say that about the rest of the game. :P
21:05:13 <Sgeo> kallisti, Ngevd update
21:05:28 <kallisti> Ngevd: could you make sense of my solution?
21:05:41 <kallisti> or even the initial problem?
21:08:03 <kallisti> so in fact a potential opening scenario is this.
21:09:16 <kallisti> white moves g1 to g2, thereby pushing g2 to g3. black can respond by mirroring the move on his side.
21:10:15 <kallisti> and... immediately there's a stripe of "do not enter" going across the main diagonal of the board. :P
21:10:19 <Ngevd> Sgeo, ooh
21:11:41 <Ngevd> I still think Roxy is an esoteric programmer
21:12:51 <kallisti> this game is so wonky. :P
21:13:20 <Sgeo> Is ~ATH an esolang?
21:13:22 <kallisti> I think just having the first move gives you a ridicuous edge over your opponent
21:13:24 <Sgeo> Is ^CAKE?
21:13:38 <Ngevd> They are fictional languages
21:13:55 <Ngevd> ~ATH could make a good esolang
21:13:55 <Sgeo> We should unfictionalize them
21:14:05 <Ngevd> We haven't seen enough of ^CAKE or DIS*
21:14:16 <Sgeo> I forgot about DIS*
21:14:38 <kallisti> for example in the diagonal stripe of death scenario, with the new rules I just creating, white can move b1 to the center of the board, pushing the pawn along with him, and cut the diagonal stripe in half and thereby gain control of it
21:14:44 <kallisti> black can then respond by doing the exact same thing
21:14:55 <kallisti> so I think.... in this scenario, stalemate is very possible
21:15:04 <kallisti> if black just mirrors white.
21:25:05 <kallisti> well, maybe not
21:25:12 <kallisti> there's no way to know except by playing a bunch of games. :P
21:26:59 -!- Labbekak has quit (Quit: Page closed).
21:27:30 <kallisti> does GHC do something more efficient than branch a lot when it encountered a case statement?
21:27:42 <kallisti> eh, premature optimization
21:28:03 <kallisti> basically I've got backward :: Direction -> Direction
21:28:20 <kallisti> and I was wondering if an explicit case statement would be slower or faster than using (to|from)Enum tricks.
21:29:03 <Ngevd> Couldn't you do pattern matching? I don't know how that compiles, though
21:29:10 <kallisti> as a case statement
21:29:21 <kallisti> case statements are the pattern matching primitive in Haskell
21:29:32 <kallisti> all the other pattern matching syntax translates to cases.
21:30:16 <kallisti> I'll use Enum tricks for now because it's less tedious
21:32:22 <kallisti> backward d = toEnum . condApp even succ pred . fromEnum $ d
21:32:22 <kallisti> where
21:32:23 <kallisti> condApp p t f x = if p x then t x else f x
21:32:31 <kallisti> condApp seems like it should be something that already exists
21:34:00 <Ngevd> @hoogle (a -> Bool) -> (a -> b) -> (a -> b) -> a ->b
21:34:00 <lambdabot> No results found
21:34:22 <kallisti> really there's no need for special syntax for if
21:34:28 <kallisti> I think an if function would look better.
21:35:00 -!- Ngevd has quit (Quit: goodnight).
21:38:22 -!- Phantom_Hoover has joined.
21:46:14 <kallisti> presumably GHC has some kind of special case for enumeration types to make them faster.
21:46:59 -!- Patashu has joined.
21:50:38 * kallisti is experimenting with the hundreds of ways to write the same thing. :P
21:52:26 <kallisti> backward :: Direction -> Direction
21:52:26 <kallisti> backward d = let i = fromEnum d
21:52:26 <kallisti> in toEnum $ if even i
21:52:26 <kallisti> then i+1
21:52:27 <kallisti> else i-1
21:52:36 <kallisti> I think I prefer this one over the equivalent where/guard version
21:56:25 <kallisti> I think where is better when longer descriptive names are used
21:57:02 <kallisti> if you've got a long where clause that assigns a bunch of single-letter variable names then you benefit very much from the top-to-bottom presentation
21:57:09 <kallisti> *don't benefit
21:59:18 <kallisti> newBoard = imapBoard fillBoard emptyBoard
21:59:21 <kallisti> where
21:59:23 <kallisti> ...
21:59:39 <kallisti> compare with this: you have long descriptive names, which gives you an idea of the structure of the function beforehand
22:00:24 <kallisti> this is a trivial case that would be readable regardless of format, but when single-letter variables are referred to multiple times you basically are better off skipping to where clause and reading it first.
22:01:33 -!- azaq23 has joined.
22:01:49 -!- azaq23 has quit (Client Quit).
22:07:37 -!- MDude has joined.
22:07:53 -!- Jafet has quit (Quit: Leaving.).
22:25:38 -!- Jafet has joined.
22:28:32 -!- CHeReP has joined.
22:45:07 -!- Mathnerd314_ has joined.
22:49:13 -!- Mathnerd314 has quit (Ping timeout: 276 seconds).
22:50:50 -!- Phantom_Hoover has quit (Ping timeout: 240 seconds).
22:51:30 -!- Mathnerd314_ has quit (Ping timeout: 240 seconds).
22:56:08 <Sgeo> kallisti, Nisstyre update
23:03:06 <Nisstyre> Sgeo: hi
23:03:20 <Sgeo> Hi, that was a misupdate
23:03:26 <Nisstyre> ok
23:03:45 <Nisstyre> kallisti: I dislike if...else in Haskell
23:03:50 <Nisstyre> feels all wrong
23:04:49 <kallisti> Nisstyre: eh
23:04:55 <kallisti> I'd prefer an if function, yes.
23:05:42 <Nisstyre> kallisti: I just use guards or case expressions
23:05:53 <Nisstyre> or pattern matching when it applies
23:12:03 <kallisti> Nisstyre: I use guards sometimes.
23:12:22 <kallisti> but in this case I thought the usage was clearer than the equivalent guard/where notation
23:52:24 -!- pikhq has joined.
23:54:51 -!- pikhq_ has quit (Ping timeout: 245 seconds).
23:56:45 -!- ais523 has quit (Remote host closed the connection).
←2012-01-16 2012-01-17 2012-01-18→ ↑2012 ↑all