00:04:14 -!- copumpkin has joined. 00:15:04 -!- olsner has quit (Ping timeout: 260 seconds). 00:18:21 robots----> 00:18:57 IT HAS BEGUN? 00:19:06 -!- NihilistDandy has joined. 00:21:06 In man against machine, machine will conquer all 00:21:15 -!- elliott has quit (Remote host closed the connection). 00:21:32 Until the Butlerian Jihad, that is 00:21:45 -!- elliott has joined. 00:22:33 dune is kinda hegelian dialectic 00:22:36 23:41:56: if i have n regexes, is it possible to compile them all into one optimized thing that will match if either one had matched? 00:22:37 23:42:03: like a big or operator 00:22:39 a|b|c|d 00:23:05 thesis: machines rule, antithesis: humans rule, synthesis: they coexist 00:23:13 -!- jcp has quit (Ping timeout: 260 seconds). 00:23:41 MARX IN SPACE 00:23:52 -!- variable has joined. 00:23:56 Zwaarddijk: Except for the part where they don't really coexist and instead enslave and destroy one another most of the time 00:23:56 00:43:32: hmmm, so doesn't the fact that humans are reasonably effective at solving the halting problem for a given language suggest that it's impossible to replicate human intelligence via Turing-complete computation? 00:24:13 CakeProphet: we are terrible at solving the halting problem, and obviously turing machines can solve a subset of the halting problem 00:24:16 NihilistDandy: read the sequel the son of Herbert's wrote? 00:24:28 00:44:34: well, I suppose since we're not perfect at it, and we can't solve it for languages that are unknown to us.. 00:24:29 "not perfect" -- you're way too kind to human intelligence :P 00:24:43 Zwaarddijk: Not yet. Still getting through those. Just doesn't feel the same. 00:25:21 yeah I know. 00:25:26 they do suck 00:25:51 -!- jcp|other has quit (Ping timeout: 276 seconds). 00:25:53 and they kinda change feeling, and the end plot changes are kind of orthogonal in story space to any good endings 00:26:02 er, well, you get what I'm trying to say 00:26:07 Yes. Yes I do 00:26:14 I am a bit disappointed at how it turns out 00:26:21 I liked the rabbis-in-space, though 00:26:34 :D 00:26:49 those were kind of a wtf moment 00:27:14 this bene gesserit thingy where they go and say something like 'oh, we collaborate at times with an even older conspiracy' 00:27:14 04:12:03: So what' are "true but unprovable" statements for a system of axioms? 00:27:15 04:12:10: Or does that not apply to CH? 00:27:16 04:12:51: there is no such thing, truth only applies _inside_ a model of the axioms, unless it holds for _all_ models, in which case its provable. 00:27:27 oerjan: well a lot of people natter about "true but unprovable" things, perhaps even people with skill, decades back, I presume... 00:27:36 it is bandied about casually quite a bit 00:28:00 04:24:20: and i'm not entirely sure if there are some systems weaker than peano arithmetic (weak enough not to allow godel's proof) but still expressive enough to talk about their own consistency, and then maybe prove it. 00:28:01 oerjan: yes IIRC 00:28:03 oerjan: it doesn't have induction, I think 00:28:07 Zwaarddijk: olawd 00:28:50 elliott: Jesus, hitting your backlog hard enough? 00:29:05 NihilistDandy: you realise i do complete logreads, right :D 00:29:17 oerjan even does a lot of the time, though he replies rather less :P 00:29:27 > elliott sleep 00:29:27 Not in scope: `elliott'Not in scope: `sleep' 00:29:33 Ah, that explains it 00:29:38 actually it's more of a complete logbrowse at best 00:29:49 oerjan: you're dead to me 00:30:24 Also, I missed a lot of good conversation 00:30:39 start logreading 00:30:42 it's fun + educational 00:30:44 unless idiots were talking 00:31:00 -unless 00:31:00 speaking of which, Gregor really needs to add ignores to the codu log formatter 00:31:03 Oh, snap 00:31:33 08:00:42: ais: nowadays people need to commute, it's a requirement of our way of life. it takes a special dedication for someone not to commute at all. 00:31:35 cheater lives in a world consisting only of himself 00:31:40 hmm, that's not funny, it's just accurate-looking :( 00:31:54 * elliott scrolls faster 00:32:37 08:06:03: OTOH the tube makes you ill and deaf, so i don't like it. 00:32:39 damn that illifying tube gas 00:32:39 Also, DeJaVu Sans Mono is the best monospaced font, period 00:32:44 hahahaha 00:32:46 yeah sure 00:32:50 also you misspelled its name 00:32:54 well miscapitalised. 00:33:04 Did I? I never remember where the damn caps go 00:33:15 Ah 00:33:18 DejaVu 00:33:22 There we go 00:33:35 How many monospaced fonts have you used? :p 00:33:49 A dozen regularly 00:33:53 More experimentally 00:33:53 De Javu 00:36:09 Inconsolata just doesn't have the Unicode coverage I want :D 00:37:01 Inconsolata only renders nicely on OS X, which is odd since it wasn't created on OS X. I want to try Pragmata, but it costs a lot of money and I can't find it pirated anywhere. 00:37:09 But I'm using DejaVu because it's the default. :p 00:37:19 I have it 00:37:25 Pragmata, that is 00:37:25 (Anyway how much Unicode does your code have?) 00:37:25 haha fonts that cost money 00:37:40 NihilistDandy: Huh, where'd you get it? Don't tell me you paid for it. :p 00:37:47 elliott: Hell no. I know a place 00:37:59 elliott: I use Haskell fontlock in Emacs, and some of the characters are in obscure spaces 00:38:11 Haskell fontlock =/= Haskell unicodeifying stuff 00:38:24 No, but it displays stuff in pretty unicode ways 00:38:27 NihilistDandy: A place just for fonts? That must be like the driest pirate cove in the universe. 00:38:32 No 00:38:41 It does not 00:38:41 That is a separate thing 00:38:41 haskell-mode does nothing of the sort 00:38:44 elliott: It's actually for music. The fonts are just coincidental 00:38:55 Hipsters like fonts, I guess 00:39:12 NihilistDandy: Amazing. (I don't suppose it's one of the "famous" places.) 00:39:19 Kinda famous, I guess 00:39:26 I can dropbox you the font if you want 00:40:02 That would be nice. (By famous I meant the few OiNK (did I get my hipster capitalisation right?) replacements.) 00:40:24 Also, I'm not really sure how what the file haskell-font-lock.el is doing anything but what I said it does 00:40:31 *other than 00:40:39 10:06:09: It's also quite common. Doesn't the Windows-bundled FreeCell also allow it? (With the old one having 32000 possible games, of which all but one are solvable, or something like that.) 00:40:44 fizzie: There are like five unsolvable games, I think. 00:40:52 Some of the negative numbers. 00:41:01 NihilistDandy: Well, it is certainly not haskell-mode. 00:41:12 There is an Emacs Unicode thing on the Haskell wiki. 00:41:22 I don't know why it'd call itself haskell-font-lock. 00:41:35 elliott: You can read it yourself. It's bundled with haskell-mode 00:42:06 Hmm, it is? 00:42:10 Yup 00:42:25 You have to turn it on or hook it, but it's there 00:43:08 Oh, actually I guess I just setq'd 00:43:08 Oh, seems so. 00:43:11 NihilistDandy: Well, it is a bad idea anyway. 00:43:16 (setq haskell-font-lock-symbols t) 00:43:17 NihilistDandy: It breaks indentation. 00:43:17 Why? 00:43:22 And alignment. 00:43:27 Not noticeably, except in very few cases 00:43:31 Doesn't matter 00:43:36 It's a deal breaker 00:43:40 Also using Unicode is a total hack for this. 00:43:53 What you really want is some sort of realtime LaTeX-esque code rendering. 00:43:57 Well, if you wanna do it better, I'm sure they'd love the effort 00:43:59 :D 00:44:05 But eh; this hack isn't even enough to fix the <*> operators. 00:44:21 NihilistDandy: IF U CRITICISE FILM......... THEN WHY DONT U MAKE A BETTER FILM????/// CHECKMATE EBERT 00:44:25 lol 00:44:42 I didn't say you shouldn't criticize 00:44:46 You just seem passionate about it :D 00:45:00 I'm not passionate about it :P 00:45:08 I'm just relatively certain it's a bad idea 00:45:21 I could be more apathetic, if you'd like? 00:45:29 And I'm relatively certain that if you're not braindead it is a non-issue :D 00:45:41 I've had zero indentation issues 00:45:53 :P 00:45:53 It has demonstrable flaws, I'm allowed to point them out :p 00:48:01 Heh, Pragmata is only legible at fourteen pt 00:48:12 I feel like I'm blind 00:51:08 I could be more apathetic, if you'd like? <-- so you say you could care less? 00:52:12 I could care in one of several directions. 00:52:30 -!- FireFly has quit (Quit: swatted to death). 00:52:40 oerjan: :D 00:52:49 i only care in spirals 00:53:06 The Mandelbrot Sigh 00:53:59 im too subhuman to care in fractals. spiral sigh. 00:58:54 to care in fractals is simple. just care in fractals, then care in fractals. 00:59:20 You forgot the most important step 00:59:22 I think that's an infinite loop. 00:59:39 You need to say "just care in fractals, while caring in fractals at the same time" 00:59:47 sorry, s/then/and/ 01:00:11 NihilistDandy: what step 01:00:27 Care in fractals, of course 01:00:53 let care = care in fractals 01:01:45 > takeWhile (>4) [1,2,3] 01:01:46 [] 01:01:48 Anyway, off to work. 01:02:48 -!- NihilistDandy has quit (Quit: Workin'). 01:04:48 -!- elliott has quit (Remote host closed the connection). 01:05:09 -!- elliott has joined. 01:05:16 rip bats 01:06:57 that's animal abuse! 01:07:03 also, you might catch rabies 01:12:00 :{ 01:18:40 > let x = let y = y in x in 5 01:18:40 5 01:19:14 fancy 01:20:04 :t let y = y in y 01:20:05 forall t. t 01:22:21 imagine if Haskell had only runtime errors and lazy evaluation 01:22:39 let y = ha ha ha ha ha ha ha in 4 01:22:52 what no scoping? 01:23:18 yes but the scoping errors only arise when the code executes 01:24:08 as it does in Python and Perl without strict. 01:24:54 though I guess syntax errors couldn't be runtime errors... 01:25:08 sure they could :D 01:25:29 this would lead to some ambiguous parsing.. 01:25:37 because EVERYTHING would have to parse correctly. 01:25:41 to be run 01:25:46 and then give a syntax error. 01:26:06 -!- itidus20 has quit (Ping timeout: 258 seconds). 01:26:08 unless you include parsing as part of "runtime"... 01:26:10 elliott: the problem is how late to detect them i guess. if you have a function definition it needs to be parsed before you can use it. 01:26:34 at least up to the point of finding out where it _ends_ 01:26:45 oerjan: sure but you can delay finding the values it _references_ 01:26:52 yeah you just need to be able to discern the boundaries of things. 01:26:56 unless you include parsing as part of "runtime"... 01:26:57 yep 01:27:00 of course lisp makes this easy with the parens 01:27:08 nope 01:27:12 and in haskell, layout can help 01:27:13 you can modify the readtable 01:27:17 oh hm 01:27:39 in some lisps, at least. 01:27:48 still, the readtable isn't modified until after the command which modifies it, i presume. 01:29:04 of course in haskell the insensitivity to declaration order makes it harder again... 01:31:20 :) 01:32:38 A copy of Canada's ruleset from 2008/4/28 has been recovered 01:33:02 Which Canada? 01:33:15 The nomic 01:33:25 ^^(still ambiguous, kind of) 01:33:47 "I'm pretty sure you aren't allowed to have a T rating with that many stabbed children." 01:33:48 Which nomic. :) 01:33:49 The one whose players would call it a "nomic" 01:33:51 Sgeo: How amazing 01:33:53 Which nomic. :) 01:33:58 Which nomic. :) 01:33:59 Which nomic. :) 01:33:59 Which nomic. :) 01:34:11 But there are two nomics called Canada Sgeo it's true 01:34:21 One lasted about ten messages. 01:34:33 o.O 01:35:12 "I'm pretty sure you aren't allowed to have a T rating with that many stabbed children." 01:35:13 Wait 01:35:15 I already quoted that >_< 01:51:40 Do you ever argue about relativity when playing D&D game? 01:52:00 relatively rarely. 01:52:48 Not much relativity. 01:52:55 Classical mechanics, fairly often. 01:53:20 Though the peasant railgun has elicited discussion of relativity. 01:58:28 alias ls 'echo ls: .: Permission denied' 02:06:52 I was arguing about relativity having to do with "Time Hop" power. 02:10:58 woo, this is broken 02:15:55 zzo38: Oh dear, what happened. 02:16:29 IamA The New Old Spices Man Fabio AMA (Internet keywords Romance, Fabio, Old Spice, Italian Supermodel, Italian, Motorcycle) (self.IAmA) 02:16:30 internet keywords 02:17:38 italiam supermodel motorcycle romance eh 02:17:49 thanks internet keywords 02:18:02 i could never have done it 02:18:02 "Did anyone read The Silmarillion? That book explains everything. The entire Lord of the Rings is actually just the epilogue to incredibly epic saga that is The Silmarillion." 02:18:04 without you 02:18:07 isn't The Silmarillion like in encyclopedia form 02:18:10 driest saga ever 02:18:57 probably oerjan knows because i think he read all of the tolkein shit 02:19:02 maybe 02:20:30 nah, i only read it until about the part where they created the sun and moon, i think 02:21:06 i, too, hate the sun and the moon 02:21:21 "SO the one ring is saurons horcrux? ya?" 02:21:22 then you, melkor and sauron have something in common. 02:21:36 oerjan: i haven't read the bible, explain 02:21:37 02:21:45 :P 02:22:37 elliott: melkor/morgoth is the main evil guy, he destroyed the light sources they had previously on two occasions 02:22:53 oh is that the satan guy 02:22:56 also lol, moon's light source 02:23:00 more or less. 02:23:01 I WILL SMASH THE LIGHTBULB IN THE MOON 02:23:23 "If Tom Bombadil wore the ring it would be as if Melkor returned. If i remember correctly, Bombadil is the most powerful character in the trilogy, similar or exactly like the gods created by illumitar. Therefore he has the most to lose if he was to wear the One Ring, because he had the such immense power that was corrupted for evil" 02:23:23 "Tom Bombadil did wear the ring. It had absolutely no effect on him." 02:23:33 although after he is exiled from the world entirely, sauron takes over. 02:23:48 where's he exiled to 02:23:51 azkaban? 02:23:59 i can't tell my religions apart 02:24:02 nah i think it was sort of outer space 02:26:21 oerjan: so i take it tom bombadil's a pretty minor character 02:26:21 i think morgoth may have attacked the sun and moon at one point too, but failed in destroying them. 02:26:27 i'm reading all about how he's like the most powerful thing in the universe 02:26:29 and nature itself 02:26:32 and im imagining this bit part 02:26:59 how can the most powerful thing in the universe have the name tom 02:27:00 elliott: well the thing about him is that he is the only character in LoTR who is entirely unaffected by the ring, so it's easy to start speculating... 02:27:01 how does that work 02:27:07 oerjan: right :D 02:27:12 oerjan: but he is minor yes 02:27:22 yes, he only show up briefly 02:27:25 *shos 02:27:28 *shows 02:28:18 -!- cheater_ has quit (Ping timeout: 255 seconds). 02:28:58 elliott: i have this weird vague idea that maybe morgoth's attack was how the moon got phases, or something like that. 02:29:22 this was around the point i stopped reading. 02:29:28 lol 02:37:25 Maybe I should read LOTR 02:37:38 Got bored last time I started. But that was probably over a decade ago 02:38:08 Sgeo: Perhaps not. 02:38:13 LotR is not well-written. 02:38:31 In fact, it's fairly poorly written. 02:38:39 Brilliant setting, decent narrative, poor writing. 02:41:38 -!- cheater_ has joined. 02:43:58 -!- itidus20 has joined. 02:55:39 yeah 03:02:05 elliott, did you ever finish Dot Action 2? 03:02:23 Sgeo: I don't think so :P 03:02:28 But I tried all the levels at least 03:02:33 The bonus ones were impossible 03:02:38 (As in difficult) 03:02:56 I remember one of the bonus ones being easy 03:05:53 "First of all, I like Haskell a lot. I’m the Thompson in “Thompson-Wheeler Logo.” That cute shape that cleverly combines the lambda and monad bind shapes? My idea. The irony is not lost on me. That Haskell logo of mine is used all over the world, and yet I’m barely a mediocre Haskell programmer." 03:05:55 UR SO FAMOUS 03:06:01 THE NAME THOMPSON-WHEELER LOG OIS KNOWN WORLD WIDE 03:06:17 The thing with Time Hop power, is, I was trying to remove a device someone was wearing. I said they would still be wearing the device when it reappeared. The DM and other player thought not. However, I still knew a way to remove the device regardless, by putting a rock in the way. 03:06:44 "Perhaps you formalists know handwaving over the details as the “Axiom of Choice,” no? I hearby invoke it." 03:06:48 oh my god you're a shithead i'm not reading this post 03:08:08 this is honestly the worst written thing ever 03:08:19 im going to use another haskell logo because of how annoying this guy is 03:08:37 elliott, linky? 03:08:45 Sgeo: http://willowbend.cx/2011/07/22/whats-wrong-with-learning-haskell/, bring your shithead filter 03:09:15 this guy is really, REALLY annoying and bad at writing and also has no good point 03:09:25 oh the post is over already 03:11:23 Confessions of a Wannabe Capitalist 03:11:26 what does this mean 03:11:35 oh my god that is his subtitle what 03:11:52 wow this post 03:11:56 is so bad 03:11:58 it is 03:12:03 he really hates DAMN FORMALISTS 03:12:18 So he's not good at math, and wants resources to help him learn Haskell 03:12:30 basically he wants people to put big warnings on their blog 03:12:32 IF UR DUM DONT READ 03:12:34 READ LYAH INSTEAD 03:12:35 Although he keeps using "axiom of choice" randomly, I don't see what's wro.. oh 03:12:45 because irc isn't good enough or i guess because he just didn't bother joining irc 03:12:55 Sgeo: he knows there are resources 03:12:59 he just wants people to tell him what not to read 03:13:02 without him doing anything 03:13:11 also AXIOM OF CHOICE AXIOM OF CHOICE IT'S "HANDWAVING" HAHA THEORISTS IM A SHITHEAD 03:13:15 NOTE: I KNOW NOTHING 03:23:49 "It worked when I was learning Ruby. Not here. This was a bad idea. I learned nothing and it made me feel bad. Yeah, poor me." -- same effect as lurking in a japanese chatroom to learn japanese 03:24:11 ++ 03:24:27 well, assuming it was a japanese chatroom about japanese. :p 03:25:22 it wasn't 03:25:42 well it was a japan-themed english chatroom 03:28:54 elliott: i am actually learning a lot from this article 03:29:06 :( 03:30:28 doesn't mean i back the guy up but the idea of using haskell to prove things is good to know 03:32:04 itidus20: not a good idea (Haskell's type system is an inconsistent logic) 03:32:08 and it also has no facilities for the purpose 03:32:11 nobody does that beyond a toy :P 03:32:16 see Coq, Agda for this idea fully fleshed out 03:32:18 (and safely) 03:32:19 I think someone used Haskell to prove Haskell 03:32:21 more Coq 03:32:29 zzo38: Haskell is too powerful for that... 03:32:29 but i actually got a damned good resource for people like me 03:32:36 (Gödel) 03:32:38 zzo38: Impossible 03:33:18 one thing I encountered when learning about compilers is a mysterious misconception that I had carried. 03:33:24 I know about Godel, although I did read somewhere, someone used to prove Haskell or at least part of it. 03:33:43 I'm not sure if it's analagous to a fractional component left over after a division. 03:34:04 But, Suppose you have a tower of blocks on the ground. 03:34:16 They stand together. 03:34:35 And yet, there is no glue. 03:34:44 what 03:35:51 Gravity??? 03:36:35 wat 03:36:52 coppro: not impossible, it just means that Haskell's type system is inconsistent, which it is :-P 03:37:08 you can prove it already, it just won't be a very good proof 03:37:27 http://www.eleves.ens.fr/home/amarilli/falso/ 03:37:40 mmmm falso 03:37:56 http://www.eleves.ens.fr/home/amarilli/falso/axioms.png nice coq screenshot 03:38:46 Maybe the proof is its own counterexample 03:42:11 elliott: Well, it depends on the semantics you assign to Haskell - if you use its type system, then yes 03:42:37 coppro: the topic was proving things curry-howard-wise. 03:42:51 so that's the only interpretation, proving Haskell's consistency with the proposition as a type and the proof as a value 03:43:39 one thing the layfolk like me tend to do is underestimate the spectrum of formally provable things 03:44:29 hmm 03:44:53 i was impressed by reading on wiki about the jordan curve proof i think it was called 03:45:16 http://static.reddit.com/ads/takemymoney.jpeg no 03:51:20 So, looking at atoms or molecules vs looking at things the same relative size as us. I think this idea could become something cool in programming 03:51:49 (oh wait thats exactly what happens ;_; ) 03:52:45 however 03:52:58 I have yet to see a high level game of life 03:54:09 When the level is so much higher than the baseline of live and dead cells that you couldn't recognize it anymore 04:00:17 I am very bad at not being vaporware 04:02:06 im vapourware irl 04:03:14 you both seem quite implemented to me 04:06:40 monqy, how perverted. 04:06:40 <: 04:06:42 :< 04:07:46 what 04:08:01 its perfectly normal for subhumans like me 04:08:15 monqy: dont worry evolution will turn u into a human soon 04:08:18 i know from pokemons 04:08:53 god this mcmap code isso raciest to me 04:09:08 Fuck politics 04:09:09 http://www.politifact.com/truth-o-meter/statements/2011/apr/29/barack-obama/obama-regrets-2006-vote-against-raising-debt-limit/ 04:09:12 i HATE raciests,, they make me sick,.; 04:09:17 Fuck politics 04:09:20 then sgeo talked about politics 04:09:22 pro 04:11:33 * Sgeo wonders if SLIME works with Emacs 23.1 04:17:15 -!- elliott has quit (Remote host closed the connection). 04:17:22 -!- elliott has joined. 04:38:43 pojdoijerioenoinefoinefoineoinef 04:43:20 -!- azaq23 has joined. 04:52:25 -!- copumpkin has quit (Ping timeout: 250 seconds). 04:52:50 -!- copumpkin has joined. 05:14:48 that's not a very readable presentation, randall. 05:15:14 wow that is the stupidest thing 05:15:19 has he finally given up 05:15:30 It's not readable, but pretty awesome 05:15:36 how's it awesome 05:15:41 "i took some data BUT NOW IT IS POLAR........" 05:15:59 @hoogle findIndex 05:15:59 Data.ByteString findIndex :: (Word8 -> Bool) -> ByteString -> Maybe Int 05:15:59 Data.List findIndex :: (a -> Bool) -> [a] -> Maybe Int 05:15:59 Data.Map findIndex :: Ord k => k -> Map k a -> Int 05:17:34 -!- elliott has quit (Remote host closed the connection). 05:17:37 -!- elliott_ has joined. 05:17:59 -!- TeruFSX has quit (Ping timeout: 250 seconds). 05:18:36 i went to wiktionary a few times and now chromium won't stop autocompleting to wiktionary i want it to autocomplete to wikipedia so i can hit tab to make it search wikipedia this is the dumbest thing help 05:18:51 @pl \z -> (magnitude z) > 2 05:18:51 (> 2) . magnitude 05:19:00 monqy: ok 05:19:00 monqy: add a keyword for wikipedia 05:19:07 coppro: gross 05:19:13 elliott_: no u 05:19:14 monqy: delete from history? 05:19:16 how do i do that i am not good at this 05:19:23 the keyword thing 05:19:24 erase,,,, the LIE 05:19:25 unless keyword is bad 05:19:31 i dont even think chrome has those 05:19:39 also how do i erase the lie 05:19:44 oh there's a button 05:19:45 thanks 05:19:47 monqy: chrome:history -> edit items 05:19:52 yeah i hit it 05:19:59 then purge,,, 05:20:09 I forget exactly how you do it in chrome 05:20:51 seems that http://www.google.com/support/chrome/bin/answer.py?answer=95653 is the only thing 05:20:52 but gross 05:20:53 if i hit clear all browsing data will it clear all the wiktionary results but not the rest of my precious history which isn't lies 05:21:04 monqy: yes 05:21:08 monqy: obviously 05:21:09 can't you read 05:21:42 oh no it's not doing what i want it to do 05:21:51 monqy: you could just use the search history 05:22:08 what's that how do i do that 05:22:12 oh you mean that thing 05:22:17 yeah I tried 05:22:31 that's what i was talking about when i hit clear all browsing data i guess it actually meant all browsing data though 05:22:36 and I can't find a select all 05:22:51 oh well 05:22:53 -!- MDude has quit (Read error: Operation timed out). 05:22:55 now u have less baggage 05:22:56 its zen 05:23:12 enjoy zen, 05:23:31 You can delete search engnes 05:23:39 I did that ages ago 05:23:45 it still autocompleted to it 05:23:48 * oerjan deletes google MWAHAHAHAHA 05:24:08 * oerjan also deletes bing, to keep a sort of good/evil balance 05:24:10 Right click address bar, edit search engines, removing, doesn't help? 05:24:10 monqy: purgaernces →manage searchkjnl; engines ---\→ delet wiktiaonry 05:24:18 Sgeo: poop u i do better 05:24:45 elliott_: you could hurt someone with those typos 05:24:53 →→→ 05:24:53 oerjan: yeah,,,like YUOU, DIE FUCKK 05:25:13 -!- derrik has joined. 05:25:13 hurt inside ,_ 05:25:17 elliott_, did you sleep anytime within the past 14 days? 05:25:22 ive never a slep 05:25:38 sometimes i a slep......like every night..... 05:25:56 Got it. So, we're conversing with the sleep-deprived ghost of elliott_ 05:26:02 except on nights i dont a slep 05:26:08 slep-deprived 05:26:27 feels bad, imnever a god person, probably offended elliott_ (best guy), criticise typelexia............................................ but remoserful + planning to become better 05:26:30 now our hero......... 05:26:49 *bizarro_oerjan 05:26:57 👍 05:27:19 oerjan: in an alternate universe............................................................................ you are a good person 05:27:45 bizarro universe: a good place???? 05:28:13 the BEST place. everyone got to kill people, fun! 05:32:26 -!- pikhq_ has joined. 05:35:43 -!- pikhq has quit (Ping timeout: 260 seconds). 05:42:33 oerjan: this reminds me of the Radiohead song Fitter, Happier 05:43:25 oerjan: have you ever read the gentle introduction 05:43:32 i kind of want to just so i can say it was easy 05:43:46 to... Haskell? 05:43:50 i kind of want to just so i can say it was gentle 05:43:53 i cannot recall 05:44:11 to category theory is it right 05:44:26 i assumed haskell... 05:44:30 I could be confusing it with something else gentle though 05:44:35 oh it could be haskell 05:44:44 i am bad at gentle things 05:44:47 :'( 05:45:21 so is gentle introduction supposed not to be gentle 05:45:34 -!- myndzi\ has joined. 05:45:36 its mlgentle 05:45:45 help whjat does thsi mean help 05:45:50 SML or OCaml or what? 05:45:54 Our purpose in writing this tutorial is not to teach programming, nor even to teach functional programming. Rather, it is intended to serve as a supplement to the Haskell Report [4], which is otherwise a rather dense technical exposition. Our goal is to provide a gentle introduction to Haskell for someone who has experience with at least one other language, preferably a functional language (even if only an "almost-functional" language such as ML or Sc 05:45:55 heme). If the reader wishes to learn more about the functional programming style, we highly recommend Bird's text Introduction to Functional Programming [1] or Davie's An Introduction to Functional Programming Systems Using Haskell [2]. For a useful survey of functional programming languages and techniques, including some of the language design principles used in Haskell, see [3]. 05:46:28 Oh, you weren't saying that the title was "mlgentle" 05:47:03 i dunno this looks pretty gentle 05:47:04 [stuff] 05:47:14 monqy: i gather it becomes rough very soon 05:47:45 im afraid i already know haskell 05:47:49 judging this may be difficult 05:47:58 it mentions hindley milner on page two, gseveral times 05:48:01 a+ 05:48:05 i do not have formal education education............ 05:48:24 Similarly, we could define Int (fixed precision integers) and Integer by: 05:48:24 data Int = -65532 | ... | -1 | 0 | 1 | ... | 65532 -- more pseudo-code 05:48:24 data Integer = ... -2 | -1 | 0 | 1 | 2 ... 05:48:24 no 05:48:26 not valid tutorial 05:48:28 notvalid int 05:48:30 needsmor,e unumbers 05:48:48 -- This is not valid 05:48:50 -- Haskell code! 05:48:54 good coments⇧ 05:48:59 -!- myndzi has quit (Ping timeout: 264 seconds). 05:49:08 sections on page three 05:49:09 im lol 05:49:34 monqy, never know when an idiot is reading and thinks "Oh, I need to copy/paste this code for this assignment" or something 05:49:55 the joke is that they put the code in there at all 05:50:07 http://www.haskell.org/tutorial/fig1.gif 05:50:12 @pl \x -> color $ mandelbrot iters x 05:50:12 color . mandelbrot iters 05:50:18 i like this daiagarm 05:50:25 it makes 05:50:26 Lymee: you should learn to do simple pls like that in your head... 05:50:27 snese 05:50:30 doesn't the Haskell spec mention Int being defined in that way kind of? 05:50:30 @src [] 05:50:30 data [] a = [] | a : [a] 05:50:36 monqy: ^ :P 05:50:47 Eh. 05:50:47 even the haskell report does it 05:50:47 Wait. 05:50:56 x.y = (x).(y), doesn't it. 05:51:01 um what 05:51:06 that's not a helpful question 05:51:08 Lymee: what? 05:51:16 are yuou asking about its precedence 05:51:19 (\x -> f (g x)) -> (f . g); f=color, g=mandelbrot iters 05:51:24 the joke is that the haskell report does bad things :( 05:51:24 that's the easy way to reduce the above function 05:51:26 and is a bad person 05:51:34 i am not inviting the haksell report tyo my 05:51:34 party 05:51:42 can i come to party 05:51:56 do you do bad things are you a bad peeron 05:52:04 no 05:52:06 ok 05:52:34 elliott_ almost never kills anyone 05:52:40 do you want to hear a joke monqy 05:52:46 i like good jokes 05:52:51 bad jokes too 05:52:54 c can't do any kind of parametric polymorphism at all 05:52:56 hahahaha 05:52:56 mediocre jokes die in hell 05:52:58 hahahahaha 05:52:59 (without macro abuse) 05:53:06 one time i abuxsed macros 05:53:13 so I'm thinking it would be interesting to have a list type of sorts that basically puts a wrapper around the element type so that you can put "tags" and "sections" into the list. 05:53:18 and pretended i could do paramatrec pomylorphism in c 05:53:26 good 05:53:26 times 05:53:40 CakeProphet: so um 05:53:44 ListWrap t a = [t a]? 05:53:45 What is parametric polymorphism? 05:53:46 good 05:53:51 both sections and tags are given unique identifiers. sections apply to every element of the list from when they start and finish, and tags are given to individual datums. 05:53:54 elliott_: yes. 05:53:54 zzo38: any sort of generic types 05:53:59 except it's more like... 05:54:03 zzo38: in C, you must define a separate type for a list of each element type 05:54:08 also a tuple of each element type, etc. etc. etc. 05:54:19 ListWrap t a = [Wrapper t a] 05:54:19 this means that you can't write generic algorithms of pretty much any sort without ugly (void *) hacks. 05:54:38 i did ugly (void *) hacks 05:54:57 and swept them under the proverbial carpet with 05:54:57 anyways, the end result is that you can define higher-order functions that allow you to manipulate only elements under a specific section or tag. 05:54:58 macro abuse 05:55:00 You can, however, use macros in many ways, to define and to call with sizeof and so on 05:55:15 WHICH, would be useful, for example, in writing combinators to compose rhythmic patterns in a song. :) 05:55:31 CakeProphet: so um 05:55:43 map (\(t,x) -> if t==goodT then f x else x) 05:55:47 elliott_: no 05:55:56 mapTag t f = map (\(g,x) -> if t == g then f x else x) 05:55:57 hard 05:56:10 because that does not allow the sections, or untagged elements. 05:56:33 yes, what I'm doing is an abstraction for something else. Good job. 05:56:39 why do you need another type 05:57:17 data Wrapper t a = Tagged t a | Section t | EndSection t | Untagged a 05:57:23 Maybe you can even use it for checking signed/unsigned, checking with macros, somehow. Would this work? ((~(x&1 05:57:31 Maybe you can even use it for checking signed/unsigned, checking with macros, somehow. Would this work? ((~(x&1))<0) 05:57:46 elliott_: if you can find an easier way I'm all ears. 05:58:07 CakeProphet: i dunno, what you're doing seems really ugly?? especially that Section stuff where the list has to be of a certain structure but you're not enforcing it in the types 05:58:10 why do you need sections what do they do 05:58:18 also 05:58:30 Section/EndSection 05:58:31 is 05:58:32 really 05:58:32 ugly 05:58:33 in C if you do "void f(int n, char data[n])" is data passed like n parameters or as a pointer 05:58:59 they mark the beginning and end of.... sections in the list. I suppose you could just tag every element in the section or something... 05:59:14 better to have something like Section [Wrapper t a] or if you odn't want nested sections split the datatype up[ 05:59:26 marking beginning and end is hell 05:59:29 they could nest. 05:59:48 I think I'll just stick to the tag approach, which would reduce it to a tuple ([t],a) 05:59:53 to allow for multiple tags or none. 06:00:04 ok 06:00:15 and then a "section" is just a tag across every element in a certain point of the list. 06:00:35 ok 06:01:19 I might encounter a problem where I have a lot of simultaneous events occur at the same time.. since I'll be using a list to represent a rhythmic pattern. 06:01:35 and then they won't be simultaneous because list doesn't work that way... 06:01:39 or something of that nature. 06:01:58 ok 06:02:09 bah, assholes. :P 06:02:32 sorry we'll never say anything bad about ideas again 06:02:36 especially not "ok" 06:03:03 it's that the criticism is vague and not helpful, in the case of ok. 06:03:18 ok was criticism? 06:03:20 fuck 06:03:47 nevermind. 06:04:21 ok keep reading into things 06:04:34 as a human, I will read subtexts, yes. 06:04:46 will you hate me if i smile 06:04:46 cuz 06:04:48 im smilen 06:04:53 noep. 06:04:53 "ok": 9/eleven of words, 06:04:57 in C if you do "void f(int n, char data[n])" is data passed like n parameters or as a pointer 06:04:58 does anyone no, 06:05:00 does Vorpal no 06:05:15 elliott_: ....pointer 06:05:18 isw that even legal synraxt 06:05:21 elliott_, I don't "no" but maybe I "know" 06:05:36 elliott_, and definitely pointer 06:05:40 if its legal its pointer 06:05:42 what do you think this is, Perl? lol 06:05:47 lol 06:05:50 CakeProphet: its already weird c99 shit 06:05:52 elliott_, wait is n there even legal? 06:05:56 Vorpal: yes. c99 shit 06:06:09 elliott_, okay then I have no clue how that is passed 06:06:10 c99 what did you do 06:06:15 elliott_, *probably* pointer 06:06:20 Vorpal: thanks that's not helpful :( 06:06:23 elliott_, I don't use VLAs much 06:06:28 elliott_, go test it. 06:06:33 Lymee: how 06:06:39 i guess i could print out addrs but 06:06:40 fuck that shit 06:06:48 data[0]=1 06:06:52 elliott_, examine the registers of course in an __asm__ __volatile__ at the start! 06:06:57 it would seem to me that the [n] is meaningless, because it couldn't enforce a size because C is stupid and doesn't keep track of array size along with the array. 06:06:59 Lymee: it could be COW................. 06:07:15 CakeProphet: obviously C knows array size of arrays 06:07:18 you can sizeof them 06:07:24 COW? 06:07:29 elliott_, I think it is equivalent of f(int n, char *data) 06:07:32 afaik CakeProphet is right, only char data[static n] has a meaning. 06:07:40 elliott_: that will return the size of the pointer, yes. 06:07:47 lifthrasiir: "static n"? like that literally? 06:07:47 elliott_, if it is even valid 06:07:53 CakeProphet: we are talking about arrays, not pointers. 06:07:57 elliott_, no, like "fixed value of n" 06:07:57 Lymee: coppy on write 06:08:03 ....we are talking about C, where they are the same thing. 06:08:04 Ah. 06:08:05 Vorpal: i asked lifthrasiir 06:08:07 CakeProphet: hahaha nope 06:08:07 elliott_, I don't think VLA extends to function prototypes 06:08:12 but I could be wrong 06:08:16 arrays are not the same thing as pointers and anyone who says so is lying 06:08:38 umm, wait, [static ] is definitely allowed but [static n] is not sure 06:08:41 elliott_, in function prototypes they tend to be. char *foo is passed the same as char foo[] 06:08:53 Vorpal: so you were wrong, it does not mean "fixed value of n"... 06:08:57 and that's not the point. 06:08:59 i was takling about sizeof. 06:09:11 elliott_, what, you lost me 06:09:20 k 06:09:21 in C if you do "void f(int n, char data[n])" is data passed like n parameters or as a pointer 06:09:27 I'm pretty sure the only difference is allocation. The actual value of an array is the pointer to the first element, always. sizeof will yield the size of that pointer. 06:09:29 elliott_, I thought that was what we were talking about? 06:09:30 C99 probably allows thing like that, I think it is an unnecessary feature of C99 though, C99 has a few good features 06:09:40 CakeProphet: you are wrong. 06:09:46 sizeof(x)/sizeof(x[0]) will yield the length of an array. 06:09:53 also see http://www.lysator.liu.se/c/c-faq/c-2.html for more information. 06:09:55 yeah 06:10:47 c hurts 06:10:49 my head 06:11:15 Yes, for purpose of sizeof, the array type is the entire array, but when just using a value by itself it is a pointer instead. 06:11:26 in C if you do "void f(int n, char data[n])" is data passed like n parameters or as a pointer <-- I think http://www.lysator.liu.se/c/c-faq/c-2.html 2.4 applies here 06:11:43 i don't even know that that page is updated for c99 06:11:45 i googled it up 06:11:47 elliott_: ah okay, I see. 06:11:58 its even the old version of the c-faq 06:12:02 hm 06:12:08 This article is Copyright 1988, 1990-1995 by Steve Summit. It may be freely redistributed so long as the author's name, and this notice, are retained. 06:12:09 that's a pretty common misconception then. 06:12:23 at least in online literature about C. 06:12:29 CakeProphet: yes. mostly among people who don't know/never use C (and then sometimes try to teach it) 06:12:38 or the people who use C without actually knowing a single thing about C, which is most people who use C 06:12:39 hmm, seems gcc ignores "static" completely in this case? 06:12:58 basically I want the array passed as values here, though. :/ 06:12:59 Maybe LLVM is a bit better designed, although, it would still work far better with having macros preprocessor and that stuff. 06:13:16 i.e. I wish "size_t size, char head[size]" passed the same as `size` parameters. 06:13:31 lifthrasiir, what would "static" there even do 06:14:17 passed by values? 06:14:25 elliott_: so does the pointer decay occur when the array is passed to a function? as this would make the utility of being able to use sizeof to get the length of an array very small. 06:14:27 I think a structure can be passed as value in C 06:14:29 monqy: yes 06:14:30 Vorpal, void f(int n, char data[static 256]) (for example) requires the caller to supply an actual char array with at least 256 elements to data 06:14:33 would memcpy work or is that dumb and for dumb people 06:14:34 CakeProphet: yes. but it is not a small utility at all. 06:14:42 it is a widely used idiom 06:14:44 lifthrasiir, and plain data[256] means? 06:14:46 elliott@katia:~/Code/mcmap$ grep -r NELEMS . 06:14:46 ./cmd.c:for (int i = 0; i < NELEMS(commands); i++) 06:14:46 ./world.c:for (int i = 0; i < NELEMS(region->chunks); i++) 06:14:46 ./world.c:for (int j = 0; j < NELEMS(region->chunks[i]); j++) 06:14:46 ./world.c:for (int i = 0; i < NELEMS(region->chunks); i++) 06:14:47 ./world.c:for (int j = 0; j < NELEMS(region->chunks[i]); j++) 06:14:48 nothing. 06:14:49 ./map.c:for (int i = 0; i < NELEMS(region->dirty_chunk); i++) 06:14:51 ./common.h:#define NELEMS(array) (sizeof(array) / sizeof((array)[0])) 06:14:53 lifthrasiir, huh 06:14:55 that's just like data[] or *data. 06:14:56 and that's a small-ish codebase. 06:15:00 (afaik) 06:15:10 CakeProphet: you can use it for statically-sized global arrays, or statically-sized arrays in structures. 06:15:16 lifthrasiir, so it is basically like causing a warning or error if not large enough? 06:15:17 which is many arrays. perhaps even most. 06:15:19 elliott_: so then this code doesn't receive array as a parameter? 06:15:22 ah. 06:15:30 CakeProphet: of course you can pass a structure with an array. 06:15:34 right. 06:15:34 that works fine and doesn't decay. 06:15:38 (rhymes) 06:15:39 Vorpal, in principle, yes, but gcc seems ignoring this even in the C99 mode. 06:15:45 c :( 06:15:48 lifthrasiir, heh 06:16:11 * CakeProphet wonders what else he does not know about C. probably many things. 06:16:24 i found at least one example of this declaration from Google code search: http://google.com/codesearch#1IKf2ZWr9OM/deps/third_party/xz/src/liblzma/check/sha256.c&l=83 06:17:06 maybe that's the intended use of that kind of declarations. 06:17:23 elliott_: so when I write code outside of functions to deal with arrays I should really be declaring with type type[] instead of type* 06:17:38 er, well, using static variables, not outside of functions. :P 06:17:42 um why 06:17:47 that makes no difference 06:17:52 and is more misleading really 06:17:52 because they are different, according to this thing you linked me. 06:18:08 well you probably mean to use a pointer. 06:19:29 but wouldn't assigning the array to a pointer destroy the sizeof property? 06:20:01 yes, that IS a problem. 06:20:40 CakeProphet: of course it does. 06:21:12 so what I'm saying is that if I want to use that property then I should declare as type[] instead... 06:21:41 * CakeProphet is going to troll some of his C programmer friends now.... 06:21:52 I have used interpreted C codes in a prepreprocessor to do some things related to types, and combined with macros and include files, to make initialization for different structures, copied, without duplication, indicated as a type, and so on. Maybe a bit like using "" style codes in C++ but different and with less stupid syntax 06:22:33 as in templates or...? 06:22:35 CakeProphet: Are you sure you understand it enough? 06:22:54 zzo38: I understand the difference between arrays and pointers now, which means I can troll that specifically. 06:23:27 CakeProphet: Yes, I think < > is used for templates syntax in C++, which is dumb since it is also less than/greater than 06:24:30 OK, now you understand difference. There is many difference, but "I should really be declaring with type type[] instead of type*" I don'r know. 06:25:16 type[], not type type[]... the first type is part of my sentence or whatever. :P 06:25:45 Yes I understood that much. 06:25:56 I didn't mean that I should declare like that ALL the time, just in those situations where the sizeof an array is valuable. 06:26:01 is there still something wrong with that? 06:26:05 But, the C syntax for comments is also a bit dumb since /* even with no comments is not a syntax error, while // is a syntax error otherwise so it would be better idea using it as comments. 06:26:15 if your declaration is allocating room for the array, you should use [] obviously? 06:26:40 ..yes, I would say this is preferred. 06:26:48 Yes using [ ] in declaration declares its space is the point. 06:26:53 zzo38: you would not like Perl. :) 06:27:02 because * only allocates the pointer. 06:27:29 So don't expect to assign directly to a [ ] type because that is not how array work in C. 06:27:44 ah okay, right. 06:27:59 I was thinking of a malloc, but that is already a pointer anyways... 06:28:59 so technically a dynamically allocated array is not a "real" C array. 06:29:06 Yes. 06:31:53 Declarations such as char *p; fine OK to me, it make sense. However, thing such as char *p=q+1; is stupid is make no sense wirh the space in that position. 06:32:46 (I omit the space in both cases however) 06:33:25 hmmm, okay so is a dynamically allocated array a pointer to an array or a pointer to the first element? second case, right? 06:34:06 Yes. 06:34:21 There are no arrays involved here; calling it "dynamically allocated memory" might answer some questions. 06:34:32 well, right. 06:34:55 but that becomes awkward to talk about. I think it still makes sense to talk about it as an array. 06:35:08 even though it's... not one in the way that C defines it. 06:36:25 "loop through the dynamically allocated memory" instead of "loop through the array". But yeah, I see that calling it that is good to highlight the difference for educational purposes. 06:38:16 hmmm, okay, so another consequence of this is that dynamically allocated 2-dimensional "arrays" have to be manually subscripted via arithmetic instead of using the [][] notation. 06:38:31 um 06:38:34 not if you do them as pointers to pointers 06:39:22 oh, right. Instead of one malloc you have 1 + ncolumns mallocs. 06:40:09 * Sgeo considers reading My Immortal 06:40:24 I tried once before 06:40:36 did you like it legitimately 06:41:06 the only C programming I have done involved a MUD codebase. So I suppose I could afford to skip knowing this distinction and still get away with it. 06:41:23 for... several years, actually. :P 06:42:11 elliott_, do you think my taste is that atrocious? 06:42:16 Sgeo: Yes. 06:42:25 list.c:45: error: incompatible types when assigning to type ‘struct ’ from type ‘struct ’ 06:42:37 ....hahaha 06:43:15 also, C has anonymous structs? 06:44:14 struct { ... } 06:45:18 how are you assigning to type struct 06:45:30 list = ((struct { typeof((list).empty[0]) empty[0]; GenericList *generic_list; }){ .empty = {}, .generic_list = generic_list_tail((list).generic_list) }); 06:45:31 struct { int x; } s; 06:45:32 s.x = 0; 06:45:33 any questions 06:45:50 seems that C doesn't unify anonymous structures with identical fields 06:45:51 sigh 06:45:51 oh that's.... interesting. 06:45:57 this makes this ten times harder than i expected :D 06:46:12 oh wait 06:46:14 you can't just de-anonymize it? 06:46:16 is (typeof foo){ ... } a valid struct literal 06:46:16 CakeProphet: no 06:46:57 elliott_: void pointers maybe? 06:47:17 no 06:47:58 woah, so you write .field = ...? 06:48:04 I have never seen this before, ever. 06:48:42 starting to wonder how much C you've used, tbh 06:48:45 this is C99 06:49:34 not as much as I thought, apparently. 06:50:28 so why can't you use named structs again? 06:50:33 macro shit 06:50:38 ah... yes. 06:51:15 haha wow that actually works hmm 06:51:30 (I mean, I don't really understand why that restricts you from naming the structs) 06:51:30 Correct, C doesn't unify structures. LLVM does, however. 06:51:39 Not any more it doesn't. 06:51:39 but sure, I'll accept "macro shit" as a valid reason. 06:51:47 -!- derrik has quit (Quit: :(). 06:52:24 (But fields of structures in LLVM cannot have names anyways) 06:53:19 structs are almost like heterogenous arrays. Is this a valid characterization? 06:53:57 the only thing that really breaks that idea is that structs can't be subscripted.. 06:54:31 but in memory it's the same structure as an array, except with heterogenous types. 06:54:52 struct { int empty[0]; GenericList *generic_list; } list = ({ typeof((list).empty[0]) _list_cons_head_1 = (0); (typeof(list)){ .empty = {}, .generic_list = generic_list_cons(sizeof(_list_cons_head_1), (char *) &_list_cons_head_1, (({ typeof((list).empty[0]) _list_cons_head_0 = (9); (typeof(list)){ .empty = {}, .generic_list = generic_list_cons(sizeof(_list_cons_head_0), (char *) &_list_cons_head_0, (((typeof(list)){ .empty = {}, .generic_list = gener 06:54:52 ic_list_empty })).generic_list) }; })).generic_list) }; }); 06:54:52 return (*((typeof((((typeof(list)){ .empty = {}, .generic_list = generic_list_tail((list).generic_list) })).empty[0]) *) generic_list_head((((typeof(list)){ .empty = {}, .generic_list = generic_list_tail((list).generic_list) })).generic_list))); 06:55:18 elliott_: what is wrong with you. 06:55:22 macro shit 06:55:54 he's shitting macros 06:55:54 int empty[0];???? 06:56:06 CakeProphet: for typeof. 06:56:09 and sizeof. 06:56:09 hi guys im back from being away did bad stuff happen 06:56:11 int is T 06:56:27 -!- olsner has joined. 06:56:51 Zero-element arrays can be very useful sometimes. 06:56:52 elliott_: you can't just say... typeof(1)? 06:57:16 elliott_: you can't just say... typeof((int)1)? :P 06:57:21 CakeProphet: int is T. 06:58:12 I don't really know what that means, then. You mean it's the type parameter in your macro shit? 06:58:15 yep 07:00:06 why not just write T then? 07:00:06 Maybe in LLVM, you could ensure different types having something like a last element of a structure of a type [0 x [1 x i8]], [0 x [2 x i8]], [0 x [3 x i8]], and so on, to make then unique if you wanted them different. 07:00:17 CakeProphet: thats totally not the cpp output. 07:00:20 nope. 07:00:36 Correct, C doesn't unify structures. LLVM does, however. 07:00:36 Not any more it doesn't. 07:00:37 howso btw 07:00:42 gimme details about this thing i know nothing about 07:00:55 Since I don't know, a week ago, when Chris's patch landed for LLVM 3.0 07:01:54 I'm just not entirely sure why you have to do all of this typeof expansion stuff when you could just substitute T where you need the type T... 07:02:15 What patch is this? I like the feature of LLVM unifying structures, it is a useful feature 07:02:45 being generic is for losers 07:02:51 CakeProphet: because i dont know t 07:02:58 #define List(T) struct { T empty[0]; GenericList *generic_list; } 07:02:58 #define list_create(name) ((typeof(name)){ .empty = {}, .generic_list = generic_list_empty }) 07:02:58 #define list_cons(head, tail) list_cons_(head, tail, __COUNTER__) 07:02:58 #define list_cons_(head, tail, id) list_cons__(head, tail, id) 07:02:58 #define list_cons__(head, tail, id) \ 07:02:58 ({ \ 07:03:00 typeof((list).empty[0]) _list_cons_head_##id = (head); \ 07:03:01 l o s e r 07:03:02 (typeof(list)){ \ 07:03:04 .empty = {}, \ 07:03:06 .generic_list = generic_list_cons(sizeof(_list_cons_head_##id), (char *) &_list_cons_head_##id, (tail).generic_list) \ 07:03:09 }; \ 07:03:13 }) 07:03:15 #define list_head(list) (*((typeof((list).empty[0]) *) generic_list_head((list).generic_list))) 07:03:17 #define list_tail(list) ((typeof(list)){ .empty = {}, .generic_list = generic_list_tail((list).generic_list) }) 07:03:20 feel free to make better and also make working 07:03:33 Okay, so it was more than a week ago 07:03:35 http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20110704/123705.html 07:03:40 that looks like the sort of stuff i wrote two years ago before i got sick of it 07:03:40 oh I see. You use the zero-width array to carry the type information beyond the macro body. 07:04:27 zzo38: caret to Deewiant 07:05:22 Deewiant: is there a discussion thread for that commit 07:05:34 Maybe 07:05:34 Does that only apply to named types? Or to anonymous types too? 07:05:49 Deewiant: Thx 07:06:11 elliott_: It's something that's been on his todo list for a long time now 07:06:46 zzo38: Anonymous types are uniqued by their contents 07:07:10 elliott: void pointers. everywhere. 07:07:12 Deewiant: That makes sense, now. 07:07:29 elliott_: terrible casts, everywhere. 07:08:25 So, an anonymous structure with the same types of elements should be considered to be same types, otherwise not? 07:08:46 same types in the same order, I would think. 07:08:48 Yes, otherwise the name is part of the identity 07:09:33 OK, it does make sense, now, then. 07:09:54 CakeProphet: Yes it is what I meant 07:09:58 elliott_: you could cast the anonymous structs to a named struct within each macro maybe? 07:10:12 using... magic unique naming skills? 07:10:28 #define macro(x, y, keysmash) 07:11:07 so everytime someone has to use your macros they must angrily smash alphanumeric characters into the last field to provide a unique name for the struct. 07:11:27 :'( 07:12:18 CakeProphet: The typical trick is just __LINE__. 07:13:34 no hygenic macros and no way to generate unique names? 07:13:37 that won't work if you must do it more than once in the same line, no? 07:13:56 well, it wouldn't work if the cast was on a different line than the struct definition. 07:14:41 are there any better preprocessors 07:14:50 monqy: m4? 07:15:06 C? No. never. No one would ever write a C preprocessor. 07:15:34 template C. 07:16:08 you could write a macros that play waiting music as your code compiles. 07:16:41 eine kleine nachtmakro 07:17:21 I suppose you could also write macro compilers or something. 07:17:38 assuming it was basically like TH but for C, and without the strict typing. 07:17:45 #playsound 07:18:16 :o 07:19:34 you could have #playnotes ABCBCBA 07:20:00 and that would... play them all in equally spaced intervals? 07:20:12 or uhmm.. a compilation visualizer? 07:20:39 this would be pretty cool. 07:20:42 like a music visualizer 07:20:54 except maybe it could have the token stream fed into it 07:21:48 I was imagining more of like an animation of the code text compiling into intermediate representations and then machine code. 07:22:06 pikhq_: m4 is not for C. 07:22:55 it can work with C 07:23:02 and was defined for a C-like language 07:23:05 Perl is probably a pretty good C preprocessor. 07:23:12 :) 07:23:14 monqy: What about... Enhanced CWEB? It also includes a C interpreter, among other things. The C interpreter can send codes to the C compiler. And the program can even be printed out. 07:23:39 CakeProphet: I suppose you can do so, if you wanted to 07:23:41 ooh 07:23:51 or you could do a 3d visualization as like a factory 07:24:40 I think m4 is not very good for C, though. But I maybe it will work if configured correctly for use with C. 07:24:42 * pikhq_ declares Bourne the best C preprocessor. 07:25:34 it's the only C preprocessor that allows you to compile C code. 07:25:46 .... (blatantly not true, shhhhh) 07:25:49 Or any other code. 07:26:14 I am interested in data re-representations.. i don't know a better words 07:26:18 ^word 07:26:27 perhaps interpretations is a better word 07:26:38 Well, at least I prefer CWEB, for writing my C codes 07:26:44 sounds like converting one data structure to another, yes? 07:26:54 (Even if you hate it instead) 07:27:01 * CakeProphet knows all of the codes. 07:27:10 one example being converting music into visualizations. 07:27:42 its a niche area 07:28:21 itidus20: try running aplay on a pdf or /dev/urandom 07:28:24 -!- oerjan has quit (Quit: leaving). 07:28:30 * itidus20 opens up my personal wiki 07:28:46 itidus20: go write about it on your blag. 07:28:52 i have a winxp box. i've never had any form of *nix installed :-s 07:29:09 im that kind of person 07:29:30 * CakeProphet types "aplay /dev/urandom" and listens to delicious pseudo white noise 07:29:46 hmm.. i called the page bit field encoding 07:30:36 You can get a continuous tone by playing output of "yes" command, in Linux. 07:30:44 itidus20: Wow, the only OS worse than *nix. 07:30:48 (still in common use) 07:30:53 elliott_: what's the best way to seed random without using IO? 07:30:55 yes is a good command 07:30:56 is there even such a way? 07:31:19 zzo38: Wow, sure enough. 07:31:24 -!- elliott_ has quit (Ping timeout: 246 seconds). 07:31:31 The "yes" command can have many uses. 07:31:34 CakeProphet: what do you mean IO? 07:31:40 do you mean like in space invaders? :D 07:31:41 aplay <(yes) actually does that. 07:31:47 pikhq_: Surely it is obvious? 07:31:54 er, no I was referring to 07:31:57 Haskell actually. 07:32:02 zzo38: Well, yes, it's obvious how it would do that. 07:32:05 ahh ok IO monad 07:32:23 zzo38: It's an oscillation between y and \n, which would, of course, produce a constant tone. 07:32:32 zzo38: it's a very high frequency sin tone right? 07:32:39 Of very high frequency. 07:32:48 ooooh, I forgot about the \n 07:32:58 I wonder if it aliases. 07:33:00 Half the sample rate. 07:33:07 ...ah. 07:33:31 so it is the nyquist frequency, interesting. 07:33:36 aplay defaults to 8000 Hz sample rate, so it's a 4 kHz tone. 07:34:06 Now use a 5200 Hz sample rate........ 07:34:38 Which, of course, does a 2.6 kHz tone. 07:34:50 CakeProphet: this is a pic of the page in my private wiki: http://oi52.tinypic.com/wqsorr.jpg 07:34:53 Yes. 07:36:28 I once wrote a program in Linux that generates many kinds of telephone signals. Including DTMF, silver box, red box, blue box, dial tone, busy signal, reorder, SIT, etc. 07:37:16 Including both American and Commonwealth ringback tones! And red box for many countries. 07:38:26 If you live in North America, program your computer to play the Commonwealth ringback tone when someone calls you............ 07:41:08 changing the string that yes outputs leads to fun things. 07:41:22 yes `echo -ne "\255"` gives you the max amplitude signal. 07:41:53 and then adding more characters adds more spectral qualities and lowers the frequency. 07:42:19 yes `printf "\x255"` does so on POSIX systems. 07:42:24 -!- Taneb has joined. 07:42:29 Hello 07:42:36 Erm, '\x255' 07:43:06 by default it's a triangle wave. 07:43:15 but I bet you could get a sine tone. 07:44:25 well, hmmm.. I think you might need floating point numbers for that. 07:44:55 No. 07:45:39 If you want a perfect sine tone, what you need is infinite-bit sampling. 07:45:53 that's obviously not what I mean though. 07:46:21 And there will be no notable benefit to floating point over integer samples if both are bounded. 07:46:54 > map (toEnum.(+10).(*245).sin) [1..] 07:46:55 No instance for (GHC.Float.Floating GHC.Types.Int) 07:46:55 arising from a use of... 07:47:07 > map (toEnum.(+10).(*245).round.sin) [1..] 07:47:08 [*Exception: Prelude.Enum.().toEnum: bad argument 07:47:29 ...lol 07:47:32 -!- zzo38 has quit (Remote host closed the connection). 07:47:37 I am trying to get the sequence of characters to generate a sine tone. 07:47:54 a sequence of characters, anyways. 07:48:11 > map (toEnum.(+10).(*245).round.sin) [1..] :: [Char] 07:48:13 "\255\255\n*Exception: Prelude.chr: bad argument: (-235) 07:48:28 ah. 07:48:32 has to be unsigned. 07:49:49 > map (toEnum.abs.round.(+10).(*245).sin) [1..] :: [Char] 07:49:50 "\216\233-\175\225:\171\252o{\235yq\253\169=\226\174/\234\215\b\197\212\SYN... 07:49:56 that's not going to be right though. 07:53:18 > map (toEnum.abs.round.(+10).(*245).sin.(/(25*pi))) [1..] :: [Char] 07:53:19 "\r\DLE\DC3\SYN\SUB\GS #&),/259 Well, Binary Variety Pack now has functional, imperative, and string rewriting. 07:54:13 also abs != convert signed to unsigned. 07:54:37 -!- GuestIceKovu has joined. 07:55:20 Now I need a fourth paradigm to add to BVP 07:55:34 you probably want aspect-oriented. 07:56:20 -!- Slereah has quit (Ping timeout: 240 seconds). 07:56:39 Okay 07:57:49 or modular, or template-based (aka macros), or unstructured, or logic-oriented 07:58:51 I might go for a cellular automaton 08:00:07 why settle for only one? 08:00:22 a cellular automaton of cellular automatons. 08:00:47 I was going for a cellular automaton definition 08:01:00 Which is then run with the starting state of the input 08:01:13 For a defined number of steps 08:01:16 humm cellular automatons... 08:01:21 do cells exist? 08:01:29 what? 08:01:50 does a cell exist? :P 08:01:55 what kind of cell. 08:02:02 a game of life cell 08:02:09 uh, sure. 08:02:18 well, do infinite cells exist? 08:02:28 in the game of life, yes. 08:02:37 Only in the abstraction of the cellular automaton 08:02:58 if noone is capable of perceiving infinite cells then how can it be proven that they exist :D 08:03:19 It's an abstraction. They exist by definition 08:03:20 sorry im being dumb, and then being dumber 08:03:30 its overcompensation for not being a math guy 08:03:36 ahh 08:04:09 where i was going with this was: if something exists by definition... do you ever need to actually calculate all the cells in order to use all the cells? 08:04:30 No 08:04:47 Pedantic people would say it's unbounded rather than infinite 08:05:02 well you can have infinite dead cells 08:05:03 data CA t = CA {left :: [t], right :: [t], up :: [t], down :: [t], current :: t} 08:05:04 :D 08:05:39 data GoLState = Alive | Dead 08:05:39 you can speak with accuracy about an infinte plane of dead cells 8-> 08:05:57 GameOfLifeInitialState = CA (repeat Dead) (repeat Dead) (repeat Dead) (repeat Dead) Dead 08:06:25 If you were a live cell on infinite n-dimensional planes of dead cells, it'd be kinda creepy 08:06:28 er... no. 08:06:29 what am I doing. 08:06:38 lol that just makes a cross-shaped automaton. 08:06:52 Taneb: maybe you are.. thats why its creepy 08:07:28 O dee mee! 08:07:32 I'm not entirely sure how to represent a zipper in 2D 08:07:41 a zipper of zippers? 08:07:57 its elegant looking code you have there anyway 08:08:03 I'm suspecting recursion is the answer 08:08:24 well, yes. repeat is how I generate the infinite list, and repeat is recursive. 08:08:24 i must remember to not forget about studying haskell 08:08:50 repeat x = x : repeat x 08:09:19 or fix (x:) :P 08:11:33 okay so I'd have data Zipper t = Zipper {left :: [t], right :: [t], current :: t} 08:11:55 and then type CA t = Zipper (Zipper t) 08:12:49 then I could define shiftLeft, shiftRight, shiftUp, shiftDown. 08:15:22 brb 08:16:16 I think I've seen a zipper in 2d before 08:16:20 I may be misremembering though 08:17:24 the problem with defining it as a zipper of zippers is that each sub-zipper has its own cursor or whatever its called. 08:17:30 which is not quite what I want. 08:20:13 I indeed misremembered. oops. 08:20:45 I suppose you could map the shift operation to each sub-zipper whenever you move left/right 08:21:04 but that seems pretty inefficient. 08:21:19 just a little bit 08:23:53 -!- monqy has quit (Quit: hello). 08:24:00 Back 08:43:47 -!- Taneb has quit (Ping timeout: 252 seconds). 08:45:59 !perl print 2 >> 1 08:46:01 1 08:46:08 !perl print 3 >> 1 08:46:08 1 08:49:37 oh hey I've found a use for bitwise shift. 08:51:53 you would use it when constructing a hidden message from the least significant bits of some other data. 08:55:51 -!- azaq231 has joined. 08:57:25 -!- azaq23 has quit (Ping timeout: 276 seconds). 08:58:46 That sounds a bit unlikely, given that you don't need a bitshift to set, clear or extract the least significant bit. 08:59:19 (Assuming you have bitwise ands and ors and the other usual fluff.) 09:00:10 Oh, you meant for putting the bits together, I guess. 09:07:48 The fact that Java is one of the most popular languages out there 09:07:56 and has absolutely no support for higher-order functions 09:07:58 baffles me. 09:08:43 fizzie: and right, putting them together with and requires shifting the bits to the right location. 09:08:57 well... with or actually. 09:09:16 extracting with and. 09:09:53 * CakeProphet should implement class-based versions of map and filter in Java. 09:09:58 Lambdas are coming in Java 8. 09:10:03 you have to use an anonymous class everytime. 09:10:33 fizzie: so I'm assuming support for lambdas also includes support for function types? 09:10:41 Nno, of course not. :p 09:10:56 It's mostly just a syntactic thing to make the anonymous-class solution less verbose. 09:10:56 otherwise you'd just define the lambda and it would uh... sit there and do nothing. 09:11:02 ..oh, really? damnit. 09:11:18 at least C# has delegates, I mean really. 09:11:18 The lambda types are "convertible" to any class with a single public method that has a compatible parameter list, approximately. 09:11:23 (Glossing over the details here.) 09:11:27 that's so stupid. 09:11:45 they should just steal delegates and call it something else. 09:12:09 I would suppose it's so that you can actually use the lambdas in all the existing APIs that have been written to take objects implementing single-method interfaces. 09:12:20 Runnable and such. 09:12:32 well right, but they could also just add new constructors for those methods that take lambda parameters. 09:12:37 *for those classes 09:13:12 But you can't add to Java interfaces. 09:13:29 Existing ones, I mean. Because otherwise all existing implementations would start complaining about missing methods. 09:13:53 So you can't put anything new in the Collection interface for example, without ruining everyone else's collections. 09:14:10 so lame. 09:14:25 C# actually has a pretty well-thought out standard API. 09:15:02 That's I think why the have the Collections class with all those static methods, because you can easily stick stuff in there. (Except of course you can't then override that stuff in custom-built containers or anything.) 09:15:30 (There's also a proposal for "extension methods" that would work around the above thing up to some degree, not sure if that's planned for Java 8 too.) 09:15:42 Func<> for example... which has a bunch of overloads. Func, Func, Func. 09:15:50 And then you use Action<> if the return type is void. 09:17:35 basically it's just an alternative to writing your own delegate types. 09:18:35 delegate int FrameWorkManagerCallBackEnterpriseyCruft(int a, int b) 09:19:01 and then you can declare variables of type FrameWorkManagerCallBackEnterpriseyCruft, and assign any method that matches that signature. 09:19:15 variables/method parameters 09:20:29 also += will append methods to a list that is executed when the delegate variable is called. Which I'm sure makes writing event-based code ridiculously simple. 09:21:02 But you need to explicitly test against an empty delegate list when calling, IIRC. 09:21:19 oh you do? 09:22:01 ah yes 09:22:06 Yes. It's always "if (blah != null) blah();" in all code that wants to call all the blah-handlers. 09:22:27 you have to test for null. Though some people on Stack Overflow recommend adding an empty method to remove that check. 09:23:00 Stack Overflow = reliable community of programming masters. 09:23:45 you could also use the poorly named "null-coalescing operator" and write blah?? blah() 09:25:27 but yeah "you have to test for null a lot" is a common annoyance of many languages that have nullable types. 09:25:34 That's what confused-looking operator. 09:26:09 yes I prefer Perl's //, but that's because I'm a Perl fanboy. 09:26:23 it does the exact same thing. 09:27:26 erkwerjwejr 09:27:34 // is probably Perl's most important contribution to the future of OO programming. :P 09:27:54 but C# will get all of the credit. :( 09:28:28 all the former Java programmers switching to C# will be like "woah that's probably the best idea for an operator ever, C# designers." 09:28:29 // is also a bit silly-looking. What, it's the || except on a windy day? (Still, I suppose they're running out of sensible operators.) 09:29:01 yeah I'm not really sure about the choice of symbol. I suppose ?? actually kind of makes some sense. 09:29:45 still, an operator is just a sequence of symbols. They're not really suggestive by themselves. Only through convention do you associate || with or in the first place. 09:29:46 I vaguely recall that some drafts of Perl 6 made the ternary operator be "$a ?? $b :: $c", doubling the ? and : for some reason. 09:30:01 that's weird. 09:30:16 Perl 6 is destroying Perl's golfability. :P 09:31:07 too many characters to do things. 09:31:46 more than 4 characters for a function/method name or 2 characters for a symbolic operator is unacceptable. 09:32:33 So <=> is unacceptable?-) 09:32:43 totally. 09:33:07 however, cmp is acceptable. 09:33:09 make sense? 09:33:21 "Sure, whatev." 09:34:25 I should rewrite Haskell's Prelude for golfing. 09:34:42 have everything with very short names, and any two-argument functions as operators. 09:35:16 > id 09:35:17 Overlapping instances for GHC.Show.Show (a -> a) 09:35:17 arising from a use of `... 09:35:20 > id + id 09:35:21 Overlapping instances for GHC.Show.Show (a -> a) 09:35:21 arising from a use of `... 09:35:33 caleskell is interesting. 09:35:51 :t id - id 09:35:52 forall a. (Num a) => a -> a 09:36:01 what does that even do. 09:37:10 > id - id $ 42 09:37:10 0 09:37:16 Verily. 09:37:57 > id - id $ True 09:37:57 No instance for (GHC.Num.Num GHC.Bool.Bool) 09:37:57 arising from a use of `GHC.N... 09:38:06 I suppose it does the other "intuitive" thing when summing. 09:38:10 > id + id $ 42 09:38:10 yes. 09:38:12 84 09:38:14 Right. 09:38:43 makes writing pointlessly easy. 09:38:59 > map ((*2) + (*4)) [1..] 09:39:00 [6,12,18,24,30,36,42,48,54,60,66,72,78,84,90,96,102,108,114,120,126,132,138... 09:39:39 > 2*sin 09:39:39 Overlapping instances for GHC.Show.Show (a -> a) 09:39:39 arising from a use of `... 09:39:40 lol 09:39:52 > const 2*sin 4 09:39:53 Overlapping instances for GHC.Show.Show (b -> t) 09:39:53 arising from a use of `... 09:40:08 > (const 2*sin) 4 09:40:09 -1.5136049906158564 09:40:20 awww yeah signal processing. 09:45:48 okay so I'm wondering if it would be bad to use the same seed value everytime I want to generate white noise... 09:46:05 because otherwise I would have to use IO to generate a white noise signal. 09:46:32 I guess I could just pass the seed parameter to the generator... 09:48:42 I'm pretty sure using the same seed everytime would not degrade the quality of the white noise produced, at least to the human ear. 09:49:20 so I'll have one with a seed parameter, one without, and one that is in IO 09:50:08 and by "write" I mostly mean "use the ones that are already there" 10:01:22 @hoogle a -> [a] 10:01:22 Prelude repeat :: a -> [a] 10:01:22 Data.List repeat :: a -> [a] 10:01:22 Prelude iterate :: (a -> a) -> a -> [a] 10:02:56 > iterate succ >=> iterate pred $ 1 10:02:57 [1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20... 10:03:17 > iterate succ >=> take 3 . iterate pred $ 1 10:03:19 [1,0,-1,2,1,0,3,2,1,4,3,2,5,4,3,6,5,4,7,6,5,8,7,6,9,8,7,10,9,8,11,10,9,12,1... 10:29:47 -!- itidus20 has quit (Ping timeout: 264 seconds). 10:32:50 -!- itidus20 has joined. 10:32:55 -!- Wamanuz has quit (Remote host closed the connection). 10:36:37 -!- Wamanuz has joined. 10:59:00 -!- augur has quit (Remote host closed the connection). 10:59:11 -!- augur has joined. 11:17:34 -!- FireFly has joined. 11:58:08 -!- ais523 has joined. 12:08:21 -!- benuphoenix has joined. 12:08:58 anyone have the ruleset for the irc-based nomic called Canada? 12:10:11 I don't, and the other two people who might plausibly have it (elliott and Vorpal) aren't here right now 12:11:01 comex_ wouldn't plausibly have it? 12:12:21 hmm, I can't remember if he was around back then 12:15:00 comex was there 12:41:19 i wonder if a wireless network messaging protocol would be a slightly good thing, or a very very bad thing 12:42:59 nvm 13:45:35 hey, does Befunge-98 have any libraries/fingerprints for doing object-oriented programming yet? 13:47:12 the topic came up in another channel 13:54:44 There's FOBJ in the RC/Funge, it's sort-of like that. 13:54:47 http://www.rcfunge98.com/rcfunge2_manual.html#FOBJ 13:55:09 :t shiftL 13:55:09 forall a. (Bits a) => a -> Int -> a 13:55:26 fizzie: ah, that's what I was looking for 13:55:31 MoL yeah.. MoL yeah.. 13:55:47 :t (|) 13:55:47 parse error on input `|' 13:56:06 er whats bitwise or? 13:59:36 -!- benuphoenix has quit (Quit: leaving). 14:00:07 @hoogle Bits 14:00:07 module Data.Bits 14:00:07 Data.Bits class Num a => Bits a 14:00:07 Data.Bits bitSize :: Bits a => a -> Int 14:00:11 .|., isn't it? 14:00:15 ah 14:00:18 :t (.|.) 14:00:19 forall a. (Bits a) => a -> a -> a 14:00:24 :t (.&.) 14:00:25 Ambiguous occurrence `.&.' 14:00:25 It could refer to either `Data.Bits..&.', imported from Data.Bits 14:00:25 or `Test.QuickCheck..&.', imported from Test.QuickCheck 14:00:32 Looks like a middle finger. 14:00:36 (o Y o) 14:00:55 :t (Data.Bits.(.&.)) 14:00:55 Couldn't find qualified module. 14:01:10 :t (Data.Bits..&.) 14:01:11 forall a. (Bits a) => a -> a -> a 14:01:19 that syntax is weird to me. 14:01:39 > 3 Data.Bits..&. 4 14:01:39 Ambiguous type variable `a' in the constraint: 14:01:39 `Data.Bits.Bits a' 14:01:39 a... 14:01:50 > 3 Data.Bits..&. 4 :: Int 14:01:51 0 14:03:11 Prettiest thing since sliced bread. 14:04:25 :t (.^.) 14:04:25 Not in scope: `.^.' 14:04:29 er, what's xor? 14:04:39 @hoogle (Bits a) => a -> a -> a 14:04:39 Data.Bits (.&.) :: Bits a => a -> a -> a 14:04:39 Data.Bits (.|.) :: Bits a => a -> a -> a 14:04:39 Data.Bits xor :: Bits a => a -> a -> a 14:05:52 > let mul a b = if a == 0 then b else let c = b Data.Bits..&. a in mul (c `shiftL` 1) (b `xor` a) in mul 8 8 14:05:52 Ambiguous type variable `a' in the constraint: 14:05:52 `Data.Bits.Bits a' 14:05:53 a... 14:06:11 > let mul :: Int -> Int -> Int; mul a b = if a == 0 then b else let c = b Data.Bits..&. a in mul (c `shiftL` 1) (b `xor` a) in mul 8 8 14:06:11 16 14:06:18 ..not quite. 14:07:51 oh wait I think I defined addition actually. 14:07:59 > let mul :: Int -> Int -> Int; mul a b = if a == 0 then b else let c = b Data.Bits..&. a in mul (c `shiftL` 1) (b `xor` a) in add 2 2 14:08:00 Not in scope: `add' 14:08:14 > let add :: Int -> Int -> Int; add a b = if a == 0 then b else let c = b Data.Bits..&. a in add (c `shiftL` 1) (b `xor` a) in add 2 2 14:08:14 4 14:08:18 yep 14:09:13 now to make it look better. 14:12:12 > let add :: Int -> Int -> Int; add 0 b = b; add a b = let c = b Data.Bits..&. a in add ((`shiftL` 1) . b Data.Bits..&. a) (b `xor` a) in foldl1 add [1..100] 14:12:13 Couldn't match expected type `f a' 14:12:13 against inferred type `GHC.Types... 14:12:34 > let add :: Int -> Int -> Int; add 0 b = b; add a b = let c = b Data.Bits..&. a in add ((`shiftL` 1) . (b Data.Bits..&. a)) (b `xor` a) in foldl1 add [1..100] 14:12:35 Couldn't match expected type `f a' 14:12:35 against inferred type `GHC.Types... 14:13:36 oh right 14:14:15 > let add :: Int -> Int -> Int; add 0 b = b; add a b = let c = b Data.Bits..&. a in add ((b Data.Bits..&. a) `shiftL` 1) (b `xor` a) in foldl1 add [1..100] 14:14:15 5050 14:18:50 > let add :: Int -> Int -> Int; add 0 b = b; add a b = add ((b Data.Bits..&. a) `shiftL` 1) (b `xor` a) in foldl1 add [1..100] 14:18:51 5050 14:18:55 forgot to remove the let. 14:28:03 -!- copumpkin has quit (Quit: Computer has gone to sleep.). 14:34:49 The wurst multiplier: 14:34:52 > let mul :: Int -> Int -> Int; mul a b = let i = [0 .. (bitSize a - 1)] in sum $ map (\i -> if testBit a i then b `shiftL` i else 0) i in mul 17 19 14:34:52 323 14:46:33 My score playing Barbu: -289. Supposedly, this is good for someone playing for the first time 15:00:29 -!- copumpkin has joined. 15:22:31 Dear website: Rejecting an email address due to capital letters is pants-on-head retarded. 15:24:06 wow, that's stupid 15:24:12 is your email provider case-insensitive? 15:24:27 the bit after the @ is, the bit before the @ is up to the provider but the vast majority interpret it as case-insensitive 15:24:29 Well, it was my dad trying to use the website 15:25:28 It autocompletes with a capital in the first part. Before I proved to myself that that was the issue, I suggested it to him, but the... form thingy replaced the lower-case with the capital 15:25:33 cpap.com 15:32:15 -!- chickenzilla has joined. 15:40:57 anyone have the ruleset for the irc-based nomic called Canada? 15:40:57 I don't, and the other two people who might plausibly have it (elliott and Vorpal) aren't here right now 15:41:00 uh... 15:41:01 hm 15:41:07 nope I don't think so 15:41:25 I have no clue where to look even 15:58:05 -!- pikhq has joined. 15:58:19 -!- pikhq_ has quit (Ping timeout: 255 seconds). 16:06:31 -!- derrik has joined. 16:16:16 -!- oklopol has joined. 16:17:05 well what problem? 16:19:23 i mean the dynamic one 17:01:00 -!- copumpkin has quit (Quit: Leaving...). 17:01:25 -!- copumpkin has joined. 17:46:00 -!- copumpkin has quit (Ping timeout: 240 seconds). 17:46:46 -!- copumpkin has joined. 17:53:22 -!- copumpkin has quit (Ping timeout: 258 seconds). 18:06:47 -!- monqy has joined. 18:08:28 -!- copumpkin has joined. 18:16:35 yeah 18:34:14 things I hate about eating chicken: the parts of the chicken consisting of mystery meat instead of chicken 18:36:53 Sounds like you're eating wyngz. 18:37:30 i hate mystery meat 18:40:18 unsure if all of it even counts as meat, but that's part of the mystery I guess 18:41:09 eating causes cancer 18:41:48 cancer causes eating 18:42:16 work kills.. everybody who has some some work has died 18:42:25 *done some 18:42:38 working causes cancer 18:46:40 -!- derrik has left. 18:52:22 -!- GuestIceKovu has changed nick to Slereah. 19:12:02 -!- ais523 has quit (Remote host closed the connection). 19:44:43 -!- Taneb has joined. 19:44:56 Hello 19:46:12 Actually, change of plan 19:46:14 brb 19:46:56 -!- Sgeo has quit (Ping timeout: 255 seconds). 19:47:12 -!- zzo38 has joined. 19:51:38 -!- azaq231 has quit (Quit: Leaving.). 19:59:56 -!- Taneb has quit (Ping timeout: 252 seconds). 20:01:20 Does anyone remember kilgame? I think it was created by pikhq or oklopol or lament or a similar person. 20:02:37 -!- Taneb has joined. 20:02:41 Hello 20:03:50 "Hello" 20:06:13 Well, things are happening in the world 20:09:16 no, nothing is happening "in the world" 20:10:35 Yes they are 20:10:54 Convection currents are flowing around in the mantle 20:13:11 Also, it's happened again 20:15:23 I'm freakin' insane 20:31:33 -!- Sgeo has joined. 21:22:00 -!- Taneb has quit (Quit: Page closed). 21:38:32 -!- TeruFSX has joined. 21:42:09 -!- oerjan has joined. 21:45:51 hi oerjan 21:46:07 hi *hides behind rock* 21:46:17 you still don't remember my name? 21:46:48 det ville vært rart 21:47:07 i fucking tattooed it between my angle brackets just so people would remember it 21:47:48 well you've dropped one of them, i can see clearly there is no < 21:48:32 lemme check my mirror 21:48:44 [00:48:43] hi 21:48:44 [00:48:43] hi 21:48:45 [00:48:45] checking 21:48:45 [00:48:45] checking 21:48:46 no it's there 21:49:04 you must be going blind in one eye 21:49:46 AAAAAAAAAAAAAAAAA 21:55:20 i think i'll go blind in both eyes for a few hours now, see you tomorrow if it's temporary -> 21:57:18 O KAY 22:01:03 I'm not entirely sure how to represent a zipper in 2D 22:01:16 obviously he wants to start with a quadtree. 22:01:35 but now he'll NEVER know *MWAHAHAHA* 22:18:33 -!- MDude has joined. 22:19:25 -!- Nisstyre has quit (Ping timeout: 258 seconds). 22:20:19 -!- iamcal has quit (Remote host closed the connection). 22:45:33 that recent post on godel's lost letter seems to have brought up many quips in the comments... 22:46:13 'In a discussion on Google+ on why it is superior to Twitter someone commented: “I would go so far as to say that almost any idea that can be expressed in 140 characters is too trivial, and not worth expressing."' 22:47:17 (the subject being "Self-defeating sentences") 22:48:33 -!- TeruFSX has quit (Ping timeout: 258 seconds). 22:49:29 -!- iamcal has joined. 22:52:06 -!- elliott has joined. 22:55:18 suppe, 22:57:23 pannekaker med ertesuppe 22:57:36 (og bacon) 23:00:20 09:13:12: But you can't add to Java interfaces. 23:00:20 09:13:29: Existing ones, I mean. Because otherwise all existing implementations would start complaining about missing methods. 23:00:20 09:13:53: So you can't put anything new in the Collection interface for example, without ruining everyone else's collections. 23:00:20 09:15:02: That's I think why the have the Collections class with all those static methods, because you can easily stick stuff in there. (Except of course you can't then override that stuff in custom-built containers or anything.) 23:00:27 fizzie: see expression problem 23:01:07 java doesn't even _try_ to have a solution to it, i think. 23:01:47 oerjan: um the expression problem was originally formulated and solved for GJ by its creators 23:01:53 GJ = Generic Java, which was merged into Java in the fifth version 23:02:06 the solution isn't how any Java code or libraries are structured, mind you 23:02:17 ok 23:02:45 09:45:48: okay so I'm wondering if it would be bad to use the same seed value everytime I want to generate white noise... 23:02:46 this is what RandomR is for 23:02:47 ?hoogle random 23:02:47 package random 23:02:47 System.Random random :: (Random a, RandomGen g) => g -> (a, g) 23:02:47 module System.Random 23:02:51 well RandomGen 23:03:04 12:08:58: anyone have the ruleset for the irc-based nomic called Canada? 23:03:04 wow what 23:03:08 -!- iamcal has quit (Ping timeout: 255 seconds). 23:04:13 20:01:20: Does anyone remember kilgame? I think it was created by pikhq or oklopol or lament or a similar person. 23:04:14 yes; lament 23:04:17 tswett: 23:04:55 -!- subleq has joined. 23:05:05 -!- subleq has left. 23:05:46 hi subleq bye subleq 23:09:36 -!- subleq has joined. 23:09:41 fine, i'll say hi 23:09:58 hello 23:12:20 -!- copumpkin has quit (Quit: Computer has gone to sleep.). 23:14:50 -!- CakeProphet has quit (Read error: Connection reset by peer). 23:15:14 -!- CakeProphet has joined. 23:16:24 Do you have idea what I (and my brother) might try next in D&D game I was playing? 23:20:03 > fix (\xs -> flip concatMap xs (\x -> ' ' : case x of ' ' -> 'space'; _ -> x)) 23:20:03 : 23:20:03 lexical error in string/character literal at chara... 23:20:15 > fix (\xs -> flip concatMap xs (\x -> ' ' : case x of ' ' -> "space"; _ -> [x])) 23:20:18 mueval-core: Time limit exceeded 23:28:04 -!- subleq has quit (Quit: leaving). 23:30:16 > fix (\xs -> ' ' : flip concatMap xs ((++" ").(\x -> ' ' : case x of ' ' -> "space"; _ -> [x]))) 23:30:18 " space space s p a c e space space s p a c e space space ... 23:30:31 oops 23:30:43 > fix (\xs -> ' ' : flip concatMap xs ((++" ").(\x -> case x of ' ' -> "space"; _ -> [x]))) 23:30:44 " space s p a c e space s space p space a space c space e space s p a c e s... 23:32:02 tswett: ^ that what you wanted out? 23:32:06 -!- TeruFSX has joined. 23:32:16 spaces of paces 23:32:17 Yep. 23:33:12 > fix (\xs -> ' ' : unwords (flip concatMap xs (\x -> case x of ' ' -> "space"; _ -> [x]))) 23:33:13 Couldn't match expected type `[GHC.Types.Char]' 23:33:13 against inferred ty... 23:33:16 oops 23:33:34 > fix (\xs -> ' ' : unwords (flip map xs (\x -> case x of ' ' -> "space"; _ -> [x]))) 23:33:38 mueval-core: Time limit exceeded 23:33:41 wat 23:34:16 why would that be different 23:34:50 > take 1 . unwords $ ('x':undefined) : undefined 23:34:51 "*Exception: Prelude.undefined 23:34:54 oerjan: you realise eval is non-deterministic? 23:34:58 it could just be slow 23:35:02 > take 1 . unwords $ "x" : undefined 23:35:03 "*Exception: Prelude.undefined 23:35:20 yes but i more suspect unwords is insufficiently lazy 23:35:25 @src unwords 23:35:25 unwords [] = "" 23:35:25 unwords ws = foldr1 (\w s -> w ++ ' ':s) ws 23:35:53 hm that doesn't look strict 23:37:51 > unwords $ "x" : undefined 23:37:52 "*Exception: Prelude.undefined 23:38:21 -!- copumpkin has joined. 23:38:35 > let unwords [] = ""; unwords ws = foldr1 (\w s -> w ++ ' ':s) ws in unwords $ "x" : undefined 23:38:37 "*Exception: Prelude.undefined 23:38:45 oh hm 23:39:29 > "x" ++ undefined 23:39:30 "x*Exception: Prelude.undefined 23:39:41 > 'x' ++ undefined 23:39:41 No instance for (Data.Monoid.Monoid GHC.Types.Char) 23:39:41 arising from a use o... 23:39:46 oops 23:40:03 > "x" ++ ' ':undefined 23:40:05 "x *Exception: Prelude.undefined 23:40:43 > let unwords ws = foldr1 (\w s -> w ++ ' ':s) ws in unwords $ "x" : undefined 23:40:45 "*Exception: Prelude.undefined 23:41:31 > foldr1 (\w s -> w ++ ' ':s) $ "x" : undefined 23:41:33 "*Exception: Prelude.undefined 23:41:53 > foldr1 (\w s -> w ++ b:s) $ [a] : undefined 23:41:54 *Exception: Prelude.undefined 23:42:02 @src foldr1 23:42:02 foldr1 _ [x] = x 23:42:02 foldr1 f (x:xs) = f x (foldr1 f xs) 23:42:02 foldr1 _ [] = undefined 23:42:18 ooh it's foldr1 which is not lazy of course 23:42:33 it needs to handle the exact [x] case specially 23:43:43 and by writing in terms of that, unwords becomes a tiny bit less lazy than necessary. 23:43:45 world.c: In function ‘T.167’: 23:43:45 world.c:246: error: ‘current_chunk$z’ may be used uninitialized in this function 23:43:45 world.c:246: error: ‘current_chunk$x’ may be used uninitialized in this function 23:43:45 world.c: In function ‘world_handle_chunk’: 23:43:45 world.c:246: error: ‘current_chunk.z’ may be used uninitialized in this function 23:43:46 world.c:246: error: ‘current_chunk.x’ may be used uninitialized in this function 23:43:50 wow what 23:44:14 -!- iamcal has joined. 23:44:49 your shitty macros? 23:45:12 or wait, chunks, that's mc isn't it 23:47:26 I am trying to think of the next session of my D&D game. Maybe we should kick the stunned kuo-toas off of the ship, but maybe the wall is too high. Maybe we should ask them try to figure out where the ship is going and stuff, but maybe now they think we are crazy and won't tell us; we just have to wait. Maybe they need the uniform back, but the old clothes have been burned. 23:47:34 It is difficult. 23:50:36 oerjan: mcmap, yes 23:50:42 the dollar sign stuff was what wow'd me 23:50:46 and the T.167. 23:56:19 -!- Taneb has joined. 23:56:24 Hello 23:57:12 hi 23:58:19 * oerjan cackles evilly 23:58:21 i mean, hi