00:03:12 -!- kwertii has joined.
00:12:10 <Gregor> Well, my muxer works perfectly, with the small caveat that it doesn't work.
00:12:20 <elliott> What was wrong with mine again? :-P
00:12:31 <Gregor> elliott: Yours just didn't send shit anywhere :P
00:12:39 <Gregor> Mine works, it just gets all wonky after a few K.
00:12:46 <elliott> Oh well that's far better :P
00:12:49 <elliott> At least mine fails predictably
00:13:00 <Gregor> I think I'm doing something wrong with nonblocking I/O.
00:13:20 <elliott> Gregor: Can I sell @ Enterprise Solutions to you?
00:13:25 <elliott> They make non-blocking I/O... a CINCH
00:13:43 <monqy> @ enterprise solutions
00:15:14 <elliott> Gregor will have none of this @ in his redneck computer system o-tron.
00:20:04 -!- botte has joined.
00:20:21 <elliott> Why is it buffering like that
00:20:29 -!- botte has quit (Remote host closed the connection).
00:20:41 -!- botte has joined.
00:25:49 -!- botte has quit (Ping timeout: 276 seconds).
00:27:45 <monqy> what does/did botte do
00:28:23 <monqy> what should it do...
00:42:38 <Gregor> I suck at nonblocking I/O though :P
00:43:11 <Gregor> Just fixed a read that should have been blocking.
00:45:49 -!- sllide has quit (Ping timeout: 250 seconds).
00:49:06 <Gregor> `killall linux` feels like a really bad command.
00:49:08 <HackEgo> /home/hackbot/hackbot.hg/multibot_cmds/lib/limits: line 5: exec: killall: not found
00:50:05 <Gregor> Hm ... this may or may not be working ...
00:50:13 <Gregor> If it is working, it's supaslow.
00:53:35 <Gregor> (That is, working via tty redirection)
00:56:49 <Sgeo> I feel sick for being unable to think of a nice functional solution to a problem that looks like it ought to have one
00:58:08 <elliott> Gregor doesn't want to implement mudem in @ I WNODER WHY
00:58:47 <Sgeo> This code is so imperative ;(
01:00:14 <elliott> Sgeo: what languagea e you using
01:00:43 <Sgeo> I'd like to know what a nice Haskell solution looks like though
01:00:50 <monqy> what's the problem
01:02:16 <Sgeo> http://pastie.org/2394254
01:02:36 <elliott> http://pastie.org/pastes/2394254/text
01:03:46 <elliott> Sgeo: the ordering doesn't matter, right?
01:03:51 <elliott> i.e. it's five numbers in arbitrary order
01:04:20 <elliott> the problem is way too ambiguous as specified if I don't know that
01:04:24 <elliott> doe "set of three ones" mean "three consecutive ones"
01:04:27 <elliott> or "three ones in any order"
01:04:38 <Sgeo> assert_equal 250, score([2,5,2,2,3])
01:04:55 <elliott> that doesn't answer my question
01:05:02 <monqy> Sgeo,.......................
01:05:09 <Sgeo> Any order. Which I thought it wasn't, so oops
01:05:27 <elliott> http://en.wikipedia.org/wiki/Greed_(dice_game)#Scoring
01:06:10 <Sgeo> I shouldn't be asking for this now, it feels like asking for homework help
01:06:26 <Sgeo> But that's one of the test cases given, so...
01:07:12 <elliott> Sgeo: i'm donig it in haskell
01:07:21 <elliott> how about giving me the actual link to whatever it is
01:07:27 <elliott> so i can see all the test cases
01:07:30 <monqy> this wikiped does not agree with this what sgeo pasted...
01:08:14 <Sgeo> https://github.com/edgecase/ruby_koans/blob/master/koans/about_scoring_project.rb
01:08:22 <elliott> # * A one (that is not part of a set of three) is worth 100 points.
01:08:23 <elliott> # * A five (that is not part of a set of three) is worth 50 points.
01:08:26 <elliott> this is the stupidest fucking game ever
01:08:31 <Patashu> I'm not sure I understand the game of Greed
01:08:39 <Patashu> if your turn ends when you don't score points, how do you ever get a straight?
01:08:41 <elliott> Sgeo: wait, score takes an arbitrary-length list?
01:09:35 <Sgeo> Well, my problem here is with thinking, not the language
01:09:44 <Sgeo> But unordered should be much easier
01:13:40 -!- CakeProphet has joined.
01:13:40 -!- CakeProphet has quit (Changing host).
01:13:40 -!- CakeProphet has joined.
01:14:51 <Sgeo> It shouldn't be cheating to use pry to explore things like Hash's methods, right?
01:15:08 <Sgeo> (Looked for a way to set a default value in a hash, and found it)
01:16:33 <elliott> Sgeo: I almost have a nice-ish solution
01:16:44 <monqy> I almost have something nice-ish too
01:17:15 <Sgeo> I like the way my solution is turning out. Still a little imperative, but still
01:17:43 <Gregor> *sob* WHY IT NO WORKY :(
01:19:00 <elliott> Sgeo: http://sprunge.us/TRiI
01:19:09 <elliott> Sgeo: This is mine... triples is fairly ugly, but it could be a lot worse.
01:19:13 <elliott> monqy: What's yours look like?
01:19:32 <monqy> im not done im learning the split package :(
01:21:35 -!- elliott_ has joined.
01:21:54 <Sgeo> elliott_, I haven't tested or anything
01:22:10 -!- elliott has quit (Read error: Connection reset by peer).
01:22:21 <monqy> if the link was 18:20:55 < elliott> Sgeo: http://sprunge.us/TRiI
01:23:37 <elliott_> monqy: If you clean up triples let me know ;-)
01:23:56 <monqy> i'm multitasking so much right now
01:24:14 <monqy> recently i have also been putting food in my mouth
01:26:06 <Gregor> Bleh, I have no idea why this isn't working ...
01:26:16 <elliott_> Sgeo: monqy: http://sprunge.us/SVcQ
01:26:29 <monqy> it ineed looks better
01:29:18 -!- evincar has joined.
01:29:43 <Sgeo> http://pastie.org/2394371 is what it currently looks like though
01:31:09 <elliott_> Oh, hmm, I could simplify mine a lot.
01:33:14 <Sgeo> I should probably clone before deleting from a Hash while looping through a hash
01:34:11 -!- zzo38 has joined.
01:34:34 <Sgeo> Darn, I suck at variable names
01:35:25 <augur> didnt someone in here used to have "lament" as their username? :|
01:36:36 <shachaf> augur: lament used to be in #haskell, at least.
01:36:53 <elliott_> He only comes to try and irritate us lamely nowadays.
01:37:01 <elliott_> Also he hates Haskell. And programming. :p
01:37:10 <lambdabot> Prelude divMod :: Integral a => a -> a -> (a, a)
01:37:10 <lambdabot> Data.Fixed divMod' :: (Real a, Integral b) => a -> a -> (b, a)
01:37:11 <lambdabot> Prelude quotRem :: Integral a => a -> a -> (a, a)
01:37:39 <augur> well theres a lament in #math who says he has no idea what #esoteric is
01:37:42 <augur> maybe hes lying :D
01:37:50 <elliott_> * [lament] (~lament@S0106002312fa554a.vc.shawcable.net): Nikita
01:39:28 -!- moses_ has joined.
01:40:46 <moses_> elliott_, you were once my hampster!!!
01:41:06 <elliott_> I'm still with you in spirit, moses_.
01:41:31 <moses_> actually you got lost in my house
01:41:47 <elliott_> ok no but seriously what is it with lament??
01:43:10 <monqy> is it true that he doesn't come here anymore specifically because of elliott_ specifically
01:43:25 <moses_> he hates someone in this channel
01:43:27 <elliott_> moses_: what's your point, and why are you coming here to make it
01:43:29 <moses_> so what is this channel?
01:43:35 <elliott_> it's about esoteric programming languages
01:43:55 <elliott_> brainfuck, intercal, unlambda :P
01:44:01 <elliott_> (but nobody likes brainfuck much.)
01:44:26 <elliott_> moses_: does lament going around telling people how much he hates this one guy in #esoteric or something
01:44:41 <moses_> someone called him out on it
01:45:58 -!- dbelange has joined.
01:46:12 <moses_> they told me to ask you about brainfuck
01:46:26 <elliott_> coppro: someone let dbelange out of the cage again
01:47:10 <monqy> ok my score looks worky
01:47:21 <elliott_> monqy: I just did it in a nice way except sprunge is down oops
01:47:25 <monqy> I don't really like how the layout turned out, but other than that, I'm pleased with it
01:47:41 <monqy> I'll hpaste mine I guess??
01:48:23 <elliott_> dbelange: a beautiful snowflake
01:48:27 <elliott_> monqy: Sgeo: here we go: http://hpaste.org/50453
01:48:38 <dbelange> I want to learn erlang but nobody uses it because it's useless
01:48:40 <monqy> elliott_: Sgeo: http://hpaste.org/50454
01:49:05 <Sgeo> dbelange, Erlang isn't considered "esoteric"
01:49:13 <elliott_> Sgeo: dude dbelange has been in here before
01:49:16 <Sgeo> But there may be people here who know some ... oh
01:50:11 <elliott_> monqy: yours requires language extensions :(
01:50:16 <elliott_> you probably want a newline before the | anyway
01:50:38 <dbelange> elliott_: What did I do last time that was so memorable?
01:50:53 <elliott_> dbelange: I think I primarily remember coppro shooing you away
01:50:54 <monqy> elliott_: I guess my thing got scrolled down so the {-# LANGUAGE PatternGuards #-} got cut off
01:51:03 <monqy> elliott_: anyway I can't live without pattern guards
01:51:09 <monqy> I wish guards could nest
01:51:10 <monqy> that would be nice
01:51:33 <elliott_> monqy: yours doesn't scale very well if your dice miraculously grows a few thousand extra sides, just sayin'
01:51:47 <monqy> it was my first try
01:51:58 <elliott_> hmm, I wonder if fusion eliminates the map altogether
01:52:05 <elliott_> it's a pretty simple "fold . map . construct" pipeline
01:54:48 <monqy> also i gues the thing i import requires extensions too but i forgive it because i can't live without extensions either
01:54:58 <augur> elliott_: fold fusion??
01:55:57 <elliott_> monqy: it does not look like it's eliminating the map entirely HMMmmmmmMMMMmmmmmmmmmmmmmMMMMmmmmmmmMMMmmmmMMmmmmMMmmMMMmmmMMmmmMMmmmMMMmmMMmmmMmmmmmmmmmmmmmm
01:56:06 * elliott_ tries to make it use a list COUNTERINTUITIVE BUT WILL IT WORK???
01:56:11 <Sgeo> http://pastie.org/2394478
01:56:16 <augur> well, map-fold fusion certainly eliminates the map altogether
01:56:26 <augur> but because of identification
01:56:27 <monqy> elliott_: you could manually put the thing in the fold?????????
01:56:33 <lambdabot> forall a b. (a -> b -> a) -> a -> [b] -> a
01:56:44 <elliott_> augur: map as in Data.Map in this case
01:56:49 <augur> foldr f z . map g = foldr (f . g) z
01:57:09 <lambdabot> forall a b k. (a -> b -> b) -> b -> M.Map k a -> b
01:57:45 <elliott_> meh, this is almost certainly the best solution
01:59:27 <monqy> sgeos solution is too much mutation for me :(
02:00:39 <CakeProphet> > let feels = fmap (>>= (const Nothing)); batman = Just (Just False) in feels batman
02:00:51 <elliott_> Some assumptions in this area that there won't be more than 5 dice. Otherwise, multiple triplets may be
02:01:01 <elliott_> mine handles an arbitrary number of triples
02:01:26 <monqy> i think mine handles multiple triplets as well
02:01:49 <monqy> sure fine whatever
02:01:58 <monqy> mine should also handle dice of any size, lists of any size???
02:02:06 <elliott_> i wouldnt know i cant read it its too wide
02:02:26 <CakeProphet> > let feels = fmap (>>= (const Nothing)); batman = Just (Just (Just (Just (Just (Just Nothing))))) in feels batman
02:03:50 * Sgeo ponders porting the Haskell prelude to Ruby
02:04:56 <monqy> why would you ever
02:05:24 <monqy> the useful functions?
02:05:31 <monqy> or is it for the learning rubey experience
02:05:43 <Sgeo> Why not for both?
02:06:09 <monqy> both are useless because ruby sucks
02:07:56 <CakeProphet> is it, for instance, more sucky than Python?
02:08:17 <elliott_> yes and also no, but it's on the same tier as python
02:08:23 <elliott_> so it's in the region of unacceptably afwul
02:08:24 <kwertii> any language with syntactically significant whitespace automatically gains 550 suck points, just for that.
02:08:25 <CakeProphet> what exactly are you looking for in your language.
02:08:29 <monqy> some of its flaws are different than python's
02:08:59 <monqy> syntactically significant whitespace is pretty okay. (thumbs up)
02:09:17 <evincar> Some people just don't like being told what to do.
02:09:24 <evincar> Even if they were going to do that very thing anyway.
02:09:26 * CakeProphet sees nothing wrong with significant whitespace as long as it's done properly
02:09:49 <Sgeo> How is Python's improper?
02:10:47 <evincar> Well, to be fair, at least it's intentional in Python.
02:10:55 <evincar> "There should be ONE TRUE WAY."
02:11:06 <evincar> It's an idealistic language. :P
02:11:09 <CakeProphet> that means it's an ideological fuck up and not just a fuck up of negligence.
02:11:30 <evincar> So long as we know where the problem is.
02:11:59 <CakeProphet> and maybe Perl ranks up there somewhere in "programming languages turned into philosophies gone wrong"
02:12:17 <CakeProphet> it's not a freakin' religion, okay? it's a programming language.
02:12:20 <Patashu> does any language have a good philosophy?
02:12:33 <monqy> isn't perl's philosophy that there's multiple ways to do things
02:12:51 <monqy> x86 has a philosophy?
02:12:58 <Sgeo> What's wrong with Only One Obvious Way To Do It?
02:13:15 <monqy> if x86 has a philosophy, it's godawful, ok.
02:13:16 <evincar> The one thing I don't like about Perl6 is changing the meanings of $, @, and % based on context.
02:13:23 <elliott_> heres my philosophy THE LANGUAGE IS PERFECT AND DOES WHAT YOU MEAN
02:13:28 <elliott_> it is about as achievable as only one obvious way to do it
02:13:29 <evincar> Rather than "$ always gets me a scalar".
02:13:30 <monqy> evincar: rest in peace hilariously bad misfeatures
02:13:44 <evincar> I liked typed dereferencing operators. :(
02:13:49 <CakeProphet> because there's usually more than one way to do something?
02:14:14 <elliott_> and because you cant make everything obvious
02:14:17 <elliott_> unless everything you do is trivial
02:14:22 <elliott_> which is true for most pyhton programmers i guess
02:15:25 <CakeProphet> I think Perl's philosophy is a better approach, honestly. Though it may not be the best language.
02:16:15 <monqy> "do what I mean" is pretty bad
02:16:37 <Sgeo> monqy, like Javascript implied semicolon?
02:16:46 <CakeProphet> there's also "make the easy things easy and the hard things possible"
02:17:16 <monqy> Sgeo: I hate that sort of thing
02:17:34 <monqy> "you can put semicolons here if you want them, but it's fine if you leave them out" is just ugh
02:17:53 <Sgeo> I remember reading about a Javascript quirk that's exactly due to implied semicolon
02:18:12 <elliott_> you can put braces here if you want them [...]
02:18:38 <monqy> elliott_: i indeed dislike that,,,haskell isnt perfect,,,
02:18:58 <CakeProphet> that's an incredibly trivial thing to dislike, though...
02:19:10 <monqy> I never said it made me want to kill people or anything
02:19:12 <elliott_> CakeProphet: js' implied semicolons cause shit
02:19:15 <CakeProphet> hatred of JS implied semicolon is sensible though.
02:19:19 <monqy> I mildly dislike it
02:19:34 <monqy> CakeProphet: I was too
02:19:44 <monqy> CakeProphet: the javascript one is more dislikeable
02:20:50 <CakeProphet> because with let..in it's completely disambiguous where it starts and ends.
02:24:11 <CakeProphet> I find the Python design goals to be insulting really.
02:24:30 <CakeProphet> very conservative inclusion of features so that our feeble minds aren't overloaded.
02:25:06 <CakeProphet> we can't add that it makes it possible to write unreadable code!
02:27:15 -!- variable has joined.
02:28:12 <CakeProphet> ...you don't even declare variables in Python. really I don't want to know what testing a large Python application is like.
02:28:28 <CakeProphet> it must be something like what I imagine hell to be.
02:30:21 <elliott_> Almost as bad as testing a large Perl application
02:30:41 <CakeProphet> hey at least Perl has some compile-time errors that aren't syntax errors.
02:31:48 <CakeProphet> "hey you didn't declare this variable" "uh, hey this is an array reference but I want an array"
02:32:11 <CakeProphet> but yes, not much better, with more room to fuck up due to complicated syntax.
02:32:44 <CakeProphet> I'd imagine using subroutine prototyping would greatly improve compile-time errors.
02:34:15 <elliott_> <CakeProphet> "hey you didn't declare this variable" "uh, hey this is an array reference but I want an array"
02:34:37 <CakeProphet> who in their right mind would not use strict/warnings when writing a Perl application.
02:35:00 <Sgeo> Option Explicit
02:35:54 <CakeProphet> 's -e option to write a short command line thing
02:36:02 <CakeProphet> pretty much every program needs a use strict; use warnings line
02:38:32 <CakeProphet> like, it's that big of a deal that I write use strict; use warnings;
02:38:57 <CakeProphet> man that newline character makes such a different
02:42:14 -!- jcp|other has joined.
02:43:31 -!- jcp has joined.
02:43:48 <CakeProphet> I thought you didn't care about superficial syntax differences?
02:46:40 * Sgeo kind of wants to play with Heroku >.>
02:48:14 <elliott_> the Heroku guys seem nice, but they also support non-Ruby languages
02:48:47 <elliott_> so it's hardly a reason to torture yourself
02:49:03 <Sgeo> I'm not really finding this torture yet
02:51:57 <Sgeo> Besides Ruby, they support... Node.js, I don't see what else they support.
02:52:09 <Sgeo> Unless you'd say Javascript is actually better than Ruby
02:53:42 <elliott_> Clojure too, but also anything statically linked.
02:54:31 -!- derrik has joined.
03:11:29 -!- MSleep has joined.
03:14:29 -!- MDude has quit (Ping timeout: 252 seconds).
03:21:46 <Sgeo> range.first + rand (range.last + (range.include_end? ? 1 : 0))
03:22:16 <Sgeo> oops, wrong thing
03:22:20 <Sgeo> That's _my_ code
03:22:25 <Sgeo> http://www.ruby-forum.com/topic/93106#187674
03:25:00 -!- GreaseMonkey has joined.
03:31:23 -!- derrik has quit (Quit: all work and no play).
03:38:26 <elliott_> pikhq: You know, with a decent union FS, writing a purely-functional package manager is really trivial.
03:40:39 <pikhq> Modulo dependencies, which have no general solution, due to recursive build-time dependencies.
03:41:35 <elliott_> pikhq: How on earth can you say those have no general solution? There's more than one way to get the package [name-version-hash] than following the build script.
03:41:50 <elliott_> For instance, downloading an archive from a known binary source and verifying its checksum, thus giving bit-identical results.
03:42:07 <pikhq> This is what you have to encode.
03:42:13 <elliott_> pikhq: There are no unsatisfiably cyclic _dependencies_, only methods of getting these dependencies.
03:42:29 <elliott_> Rather than "build GHC -> build GHC -> ...", you want "build GHC -> download GHC".
03:42:32 <elliott_> <elliott_> pikhq: How on earth can you say those have no general solution? There's more than one way to get the package [name-version-hash] than following the build script.
03:42:32 <elliott_> <elliott_> For instance, downloading an archive from a known binary source and verifying its checksum, thus giving bit-identical results.
03:42:42 <elliott_> Building from source is just one way to get the same bit-for-bit result.
03:44:06 <elliott_> pikhq: And if your package manager only supports one way of getting a package, it's pretty lame. Rebuilding is a waste of time unless you want abnormal flags.
03:44:24 <elliott_> And, of course, if you want abnormal flags, that doesn't change GHC's dependencies; GHC compiles with a stock GHC, no matter what flags you're giving it.
03:47:17 <pikhq> GHC foo built with GHC foo != GHC foo built with GHC bar. What you want for cyclic dependencies like that is the fixed point...
03:47:27 <Sgeo> I don't think this thing is teaching best practices
03:47:43 <elliott_> pikhq: GHC is parameterised on its flags; it depends on GHC(stock-flags).
03:47:57 <Sgeo> It taught how to access and modify instance variables from within a module, but didn't say "Don't do that"
03:48:06 <elliott_> pikhq: A GHC parameterised on flags =/= stock-flags might not even be able to build a useful GHC -- for instance, if you want a GHC that compiles for ARM.
03:48:18 <elliott_> Sgeo: Because that's not bad practice in Ruby.
03:48:29 <Sgeo> So what if there's a conflict?
03:48:30 <elliott_> Sgeo: Shit language, shitter idioms, shittest community.
03:48:51 <pikhq> elliott_: Does GHC(stock-flags) depend on GHC(stock-flags) or GHC(version--, stock-flags)?
03:49:02 <Patashu> I think the only language I've never seen smacktalked in here is haskell
03:49:15 <elliott_> Patashu: I could smacktalk Haskell all day if you'd like
03:49:26 <elliott_> pikhq: The latter will probably work, but I'd specify the dependency as the former.
03:49:43 <elliott_> pikhq: Yes, it's a cyclic dependency, but that doesn't mean its unresolvable; it only is with a naive method of package-finding.
03:49:51 <pikhq> elliott_: Then you're going to be finding the fixed point of package building.
03:50:02 <elliott_> pikhq: You keep saying that, but it's not true.
03:50:14 <elliott_> <elliott_> pikhq: Yes, it's a cyclic dependency, but that doesn't mean its unresolvable; it only is with a naive method of package-finding.
03:50:19 <elliott_> _Building is not the only way to install a package._
03:50:37 <pikhq> Building is the only way to install a package if the package does not already exist.
03:50:45 <elliott_> Patashu: Module system should be more like ML's, record system sucks, IO monad sucks should be more like FRP (but this leads to an entire operating system, well... see @), ...
03:50:53 <elliott_> pikhq: Sure, if you own the only computer in the world.
03:50:57 <elliott_> pikhq: You could also get the package from someone else.
03:51:17 <elliott_> pikhq: How exactly does wgetting the package from a package repository fail to produce the package?
03:51:18 <pikhq> Well, rather, in a form at all usable on your system.
03:51:30 <pikhq> elliott_: Where does the package repository get it from?
03:52:08 <Sgeo> Surely there's a nice clean idiom for having modules store state that doesn't interfere with the instance variables of the class
03:52:16 <elliott_> pikhq: Building it locally. To start with, you'd simply make an initial binary package of the current version by building it on another machine or downloading the provided haskell.org/ghc/ binary distribution, extracting that tree, and packaging it up.
03:52:37 <elliott_> pikhq: That package can then be used to satisfy the dependency.
03:52:59 <elliott_> Patashu: I could go on, but those are pretty big problems.
03:53:31 <pikhq> And now you're either going to be building GHC with the same configuration of GHC, eventually getting the fixed point of building GHC, or you're going to have one funky build dependency chain.
03:53:43 <pikhq> Now are we done confusing each other?
03:54:16 <elliott_> pikhq: I don't see how branding the obvious thing to do as a "funky dependency chain" makes it not the obvious thing to do.
03:54:23 <Patashu> 'module system should be more like ML's' what is ML?
03:54:43 <elliott_> Patashu: Um, one of the oldest functional languages in existence? http://en.wikipedia.org/wiki/ML_(programming_language)
03:55:04 <elliott_> http://en.wikipedia.org/wiki/Standard_ML#Module_system is relevant.
03:55:28 <pikhq> elliott_: ghc7->ghc6->ghc5->ghc4->ghc3->ghc2->ghc-non-bootstrapped is a funky thing to specify as your dependency chain.
03:55:44 <pikhq> Especially if you don't want anything earlier than ghc7 still around.
04:13:00 <Gregor> "HEY YOU HAVE INPUT! READ IT! READ IT NOW! Oh it's zero bytes."
04:20:17 <elliott_> Gregor: doesn't read returning 0 = eof or error
04:20:53 <Gregor> Not if you're nonblocking.
04:21:09 <Gregor> Sorry, I didn't explain properly :P
04:21:28 <pikhq> Gregor: Um, that still applies.
04:21:32 <Gregor> read() returned -1, I just meant it was select()ing and then giving me no bytes.
04:21:43 <pikhq> Gregor: It's just that one of the errors you get is "There's no data here right now".
04:21:56 <elliott_> Gregor: that means error, i think
04:21:57 <Sgeo> I'm starting to consider C# favorably in relation to Ruby
04:22:08 -!- sebbu has quit (Ping timeout: 246 seconds).
04:22:09 <Gregor> Indeed, it is errors :P
04:22:15 <Gregor> For some reason my connection is unidirectional.
04:22:22 <Sgeo> At least I'm blind to any masive C# warts, even if it's not quite as smoothly powerful
04:22:23 <elliott_> Gregor: but yeah why nonblocking
04:22:34 <Gregor> elliott_: That was just a bit of overgeneralization *shrugs*
04:22:36 <Gregor> I have since fixed it.
04:22:38 <pikhq> elliott_: EAGAIN, telling you that there's no data pending right now, is an error. :)
04:22:38 <elliott_> its just more painful and iirc doesnt work on sockets
04:29:27 <Sgeo> Ugh, this is painful. Someone please freeze me until Newspeak or similar language with decent modularity overtakes the world.
04:31:21 -!- augur has quit (Remote host closed the connection).
04:31:24 <Sgeo> Does vanilla Smalltalk not have this kind of stupidity?
04:31:59 <Sgeo> ...Oh, right, it does, kind of
04:34:53 -!- evincar has quit (Quit: Sleemp.).
04:36:17 -!- sebbu has joined.
04:39:26 -!- augur has joined.
04:40:04 <monqy> Sgeo: about what are you so upset
04:40:27 <Sgeo> modules with instance variables that can conflict with eachother
04:40:37 <Sgeo> When included into a class
04:40:50 <Sgeo> Suggestions by one person include long variable names
04:40:50 -!- augur has quit (Remote host closed the connection).
04:41:33 <monqy> and there's no way to handle it?
04:41:51 -!- oerjan has joined.
04:42:21 <Sgeo> There probably is a way, but certainly not built-in or anything. Supposedly, Ruby 2.0 will make a lot of these things much better
04:43:32 <oerjan> hah you want to make me believe in that stupid time zone theory
04:44:15 <Sgeo> At least there is a way to deal with conflicting method names
04:45:11 <Sgeo> But, hmm, static typing makes more sense than duck-typing for that purpose
04:45:49 <Sgeo> Since with duck-typing, a rename means something that just expects a class that conforms to the API of one of the modules that tries to simply use an instance of the class breaks
04:48:33 <Sgeo> Ugh, I made a patch to Newspeak a while ago
04:48:39 <Sgeo> I should have submitted it somewhere
04:48:46 <Sgeo> The lack of it is now bothering me
05:04:57 -!- myndzi has quit (Read error: Connection reset by peer).
05:07:44 -!- zzo38 has left.
05:13:31 <Patashu> wow. in C# you can write 'sql' http://msdn.microsoft.com/en-us/library/bb311045.aspx
05:14:32 -!- myndzi has joined.
05:21:45 <pikhq> Patashu: AKA monad comprehensions.
05:23:42 <oerjan> pikhq: you need to cackle evilly when you say that.
05:27:11 <Patashu> a ha! C# is functional after all
05:58:16 <elliott_> `addquote <fizzie> That's the stupidest thing I've heard all morning. (Though I did wake up five minutes ago, so I haven't had a chance to hear very much.) <fizzie> The "Why are you still asleep? I told the cat to wake you up." comment does come pretty close, though.
05:58:17 <HackEgo> 600) <fizzie> That's the stupidest thing I've heard all morning. (Though I did wake up five minutes ago, so I haven't had a chance to hear very much.) <fizzie> The "Why are you still asleep? I told the cat to wake you up." comment does come pretty close, though.
05:59:13 <oerjan> elliott_: NOW YOU CANNOT DELETE ANY OF THE PREVIOUS ONES *MWAHAHAHA*
06:01:07 <Sgeo> I can only assume the Mr_Grim in #ruby is not the MrGrim on Reddit.
06:01:11 <quintopia> unless he manually moves later ones to before it
06:01:19 <Sgeo> I assume MrGrim on Reddit has an IQ of above 50
06:01:29 <quintopia> or he could move that one to position 100, since 100 is more auspicious than 600
06:02:02 <elliott_> Sgeo: #ruby-lang is the official channel (I forget whether it's better or worse...)
06:02:09 <elliott_> zenspider is an op in #ruby-lang
06:07:21 <elliott_> oerjan: quintopia: monqy: if you guess the question i ask i turn into god......
06:09:04 <quintopia> because as unlikely as it is, i might be right
06:12:09 -!- Taneb has joined.
06:12:33 <Taneb> I have no idea what you were on about last night.
06:12:55 <oerjan> Taneb: i think i commented on your Cab = a or b question while you were away
06:13:04 <elliott_> Taneb: i like being incoherent its great
06:13:54 <oerjan> anyway, any combinator such that Cab = a must as a lambda expression be eta-equivalent to \x y -> x, and similarly for b
06:14:34 <Taneb> elliott_, I read "IM TAB" as "Go to the IM tab"
06:14:36 -!- Pianoo has joined.
06:14:52 <elliott_> i was just identifying with tabness
06:15:14 <Taneb> Hence my private message
06:17:13 <oerjan> Taneb: also, system F (explicitly typed polymorphic LC) explores the idea of defining booleans as the type forall t. t -> t -> t, which in that system has only those two solutions.
06:17:33 -!- Pianoo has quit (Remote host closed the connection).
06:17:34 <oerjan> well irreducible solutions
06:17:58 <Taneb> I was thinking in terms of MIBBLLII output
06:18:03 -!- Pianoo has joined.
06:18:36 <monqy> bye pianoo hi pianoo
06:18:54 <Taneb> ...Only in terms of IO?
06:18:56 <oerjan> system F can define other data types in that way too, e.g. church numerals are forall t. (t -> t) -> (t -> t)
06:19:22 -!- Pianoo has quit (Remote host closed the connection).
06:19:44 <Taneb> I still don't quite get language purity
06:20:45 -!- Pianoo has joined.
06:21:15 <elliott_> - Evaluating an expression cannot cause any side-effects to happen;
06:21:22 <elliott_> - A function's return value cannot depend on anything but its argument.
06:22:01 <oerjan> - Values don't change.
06:22:22 <elliott_> oerjan: That's inherent in the definition of value :-)
06:22:38 <oerjan> elliott_: well i mean in the context of your function arguments
06:22:41 <Sgeo> I still need to make my Scumbag Ola Bini pic
06:23:21 <Taneb> So, pure languages cannot have interactive IO?
06:23:24 <oerjan> otherwise that _could_ be interpreted as the function's return value depending on just what its argument _currently_ is.
06:23:34 <oerjan> Taneb: not as part of their evaluation
06:23:41 <elliott_> Taneb: That's true in some ways, and untrue in others.
06:23:58 <elliott_> Consider Haskell; all Haskell code is pure, except for that code inside the IO monad.
06:24:24 <oerjan> Taneb: original haskell managed, in a convoluted way, to have the main program be a pure function without any monads.
06:24:44 <Sgeo> elliott_, how is the IO monad not pure?
06:24:49 <elliott_> oerjan: you can define a simple IO type that has PutChar and GetChar
06:24:54 <elliott_> but code inside it still isn't pure
06:24:54 <Sgeo> It's only main that's treated, at execution, in an impure way
06:24:58 <elliott_> It is internally, but not externally
06:25:27 <elliott_> Sgeo: Would you be offended if I said that I didn't think you had a good enough understanding of Haskell to give a satisfactory answer?
06:25:32 <elliott_> The fact is that you can perform impure operations from within IO.
06:25:50 <elliott_> That you can contain these effects is nice, but does not make the IO monad itself impure.
06:25:55 <elliott_> Haskell is pure, but the IO monad isn't.
06:26:08 <Sgeo> I think you mistyped
06:26:11 <Taneb> MIBBLLII's about as pure as Haskell, if I'm understanding this correctly
06:26:20 <Sgeo> <elliott_> That you can contain these effects is nice, but does not make the IO monad itself impure.
06:26:33 <Sgeo> (no pun intended)
06:26:37 <elliott_> > takes the next bit from the I/O stream, and then evaluates it in the following format:
06:26:37 <elliott_> < a prints whatever a 1 0 evaluates to, and returns null.
06:26:38 <lambdabot> <no location info>: parse error on input `,'
06:26:44 <elliott_> MIBBLLII is an impure language.
06:27:01 <elliott_> Evaluation of an expression could cause things to be printed or read from the input stream.
06:27:13 <elliott_> The latter is a dependency of a function on something other than its argument; the former is causing a side-effect.
06:28:13 <elliott_> (You can mostly ignore everything I said about the IO monad, it's a sticky corner-case.)
06:28:22 <Sgeo> "The behaviour when you override if should still work as expected, but will make the global performance of that program slower for the rest of the execution."
06:28:25 <Taneb> Tell me how I could do interactive IO without becoming impure
06:28:43 <Sgeo> "Seph has mutable lexical scopes."
06:28:46 <Sgeo> I don't like that
06:28:47 <elliott_> Taneb: Model a program as a function from input stream to output stream; read all input up-front.
06:29:22 <elliott_> oerjan: hmm, what's your opinion on Lazy K's pureness? IMO, the fact that IO can be interactive in the Haskell interact style makes me consider it impure, because by causing expressions to be evaluated you can cause input to be read
06:29:27 <Taneb> That would give me space to have S and I combinators
06:29:31 <Taneb> While still looking a lot like brainfuck
06:29:51 <elliott_> Taneb: Obviously you need to encode the input and output stream somehow -- a Church list of Church numerals is the obvious representation.
06:30:08 <elliott_> I assume you know how Church numerals go
06:30:19 <oerjan> elliott_: it depends on exact lazy evaluation order for I/O ordering doesn't it
06:30:20 <elliott_> Then just model input as "cons inputchr (cons inputchr (cons ..."
06:30:28 <elliott_> And terminate it on some too-large character
06:30:48 <elliott_> Taneb: or terminate on 0, to give it the same IO weakness as brainfuck :)
06:30:56 <elliott_> oerjan: which I would consider impure
06:31:05 <oerjan> elliott_: it's pure if you think of it as a batch program pipe, but not for interactive use
06:31:26 <elliott_> oerjan: well, doing benign rearrangements on it when considering the program as a pure function can change its interactive behaviour
06:31:37 <pikhq> elliott_: Actually, at EOF you have fix (256:), not just 256. :)
06:31:38 <elliott_> oerjan: I agree that reading all input up-front would solve the problem which is why I suggested it to Taneb
06:31:54 <elliott_> oerjan: But IMO as far as interactive use goes, Lazy K is definitely impure
06:32:00 <elliott_> Which is ironic considering its goals
06:32:23 <Taneb> MIBBLLII isn't brainfuck. EOF is an infinite stream of 256s
06:32:41 <elliott_> Taneb: What, don't want to advertise Unicode support? :-)
06:32:46 <elliott_> I suppose that gives you binary processing
06:32:53 <elliott_> You can just write your own UTF decoding routines :D
06:33:09 <Taneb> Or possibly EOF is an infite stream of threes
06:33:10 <elliott_> oerjan: hmm, I wonder what the simplest model of stdio that retains purity _and_ interactivity
06:33:11 <oerjan> elliott_: although actually when you consider bottom, it's not that obvious, because that reduces the amount of rearrangement you can do - reading an extra character could give I/O error as bottom, and so rearrangement is not equivalent even purely. but there are probably corner cases.
06:33:20 <elliott_> well, purity in the technical sense, allowing "cheating" like Haskell's IO monad
06:33:34 <elliott_> oerjan: I/O error as bottom is not standard Lazy K afaik
06:34:15 <oerjan> elliott_: well alternatively think of it as lazy K having to act equivalent even if its input is not correctly formatted
06:34:41 <elliott_> oerjan: hmm, what do you mean?
06:34:59 <Taneb> I could define 1 as \l a b -> a and 0 as \l a b -> b and EOF as... \l a b -> \l a b -> b
06:35:32 <oerjan> elliott_: if you can only do rearrangements that give the exact same LC function up to eta equivalence, then i don't think you can read an extra character.
06:35:41 <elliott_> Taneb: well the data-type you want is
06:35:50 <elliott_> data Input = EOF | Cons Bool Input
06:35:54 <elliott_> I'll let oerjan church-encode that :P
06:35:56 -!- Pianoo has quit (Quit: Rooms • iPhone IRC Client • http://www.roomsapp.mobi).
06:36:06 <elliott_> I always forget the church-encoding of lists
06:36:47 <elliott_> hmm, what's (:) with that representation?
06:37:02 <elliott_> \in. in (:) [] would be your cat program, obviously
06:37:06 <elliott_> <oerjan> elliott_: if you can only do rearrangements that give the exact same LC function up to eta equivalence, then i don't think you can read an extra character.
06:37:12 <elliott_> no, but surely you can mix up input and output in the wrong order
06:38:40 <elliott_> oerjan: i take it you were too scraed to answer <elliott_> oerjan: hmm, I wonder what the simplest model of stdio that retains purity _and_ interactivity >:)
06:41:04 <elliott_> "In practice, however, interactive Lazy K programs tend not to exhibit these problems. The first case cannot arise if the "H" of "Hello" depends in some way on the end of the user's input. The most obvious way of writing this particular program is to cons together the "Hello, [name]!" string in an expression which is conditioned on receipt of a newline. If you do this you are safe, because there's no way for any evaluator to prove in advance that the u
06:41:04 <elliott_> The second case does not occur as long as the prompt ("What is your name?") is consed together irrespective of the input — again the obvious thing to do. The reason this works is that the Lazy K interpreter uses lazy evaluation, which by definition tries to produce output as early as possible and do everything else (including input) as late as possible.
06:41:07 <elliott_> So there's no practical problem with interactive software. Nevertheless, there's something unpleasant about the way the second case is prevented. A referentially transparent program should not have to rely on lazy evaluation in order to work properly."
06:41:11 <elliott_> oerjan: it seems clear to me that Lazy K is definitely impure in this manner
06:41:37 <oerjan> elliott_: a simple (G)ADT for IO?
06:42:11 <elliott_> oerjan: that's rather vague -- if you do
06:42:30 <elliott_> data IO where Stop :: IO; GetChar :: (Char -> IO) -> IO; PutChar :: Char -> IO -> IO
06:42:44 <elliott_> then you can mechanically transform that into the monadic form
06:43:04 <elliott_> it seems like calling that the simple ADT for IO is misleading, in that it's presupposing monadic IO
06:43:14 <elliott_> I suppose you inevitably need _some_ sort of ugly ordering, though
06:43:26 <oerjan> um no it doesn't, there's no return. it's CPS style isn't it.
06:43:26 * elliott_ wonders what the church encoding of _that_ is
06:43:39 <elliott_> but it's "close" in the sense that the transformation is very simple
06:43:55 <elliott_> data IO = Stop | GetChar (Char -> IO) | PutChar Char IO
06:44:00 <elliott_> i should really remember how to church-encode things :(
06:44:46 <oerjan> you don't have to use foldr when it's untyped anyway, just use pairs for conses
06:45:28 <oerjan> A | B | C encodes as forall t. (A -> t) -> (B -> t) -> (C -> t) -> t
06:45:50 <lambdabot> forall a b. (a -> b -> b) -> b -> [a] -> b
06:45:58 <elliott_> always forget the way round the a/bs are
06:46:21 <oerjan> *data X = A a | B b | C c endodes as forall t. (a -> t) -> (b -> t) -> (c -> t) -> t
06:46:43 <elliott_> io :: b -> ((Char -> b) -> b) -> (Char -> b -> b) -> IO -> b
06:49:54 <oerjan> um drop the -> IO i think
06:51:06 <elliott_> oerjan: I was doing it as foldr, but right
06:51:11 -!- augur has joined.
06:51:25 <Taneb> Changed MIBBLLII spec
06:51:37 <oerjan> um list foldr only applies to lists afaik
06:51:41 <elliott_> \stop get put. put 'a' (put 'b' stop)
06:51:55 <elliott_> \stop get put. put 'a' (put 'b' (get (\c. put c stop)))
06:51:59 <elliott_> heh, that's actually quite nice
06:52:29 <elliott_> cat might be a bit difficult :/
06:52:51 <oerjan> some haskell version did have a CPS IO style
06:52:57 <elliott_> \stop get put. fix (\r. get (\c. eof? c stop r))
06:52:58 <Sgeo> Yay, Ruby has a Parsec
06:53:05 <elliott_> \stop get put. fix (\r. get (\c. eof? c stop (put c r)))
06:53:14 <monqy> Sgeo: but is it any good
06:53:21 <Sgeo> monqy, no idea
06:53:28 <elliott_> expressed as a church list of church booleans corresponding to the bits of the input, ending with an infinite stream of church trues
06:53:33 <elliott_> Taneb: um there is no way to detect EOF with this scheme
06:53:41 <elliott_> the user might have typed in a million ones, or it might be EOF
06:54:03 <oerjan> EOF by universe heat death
06:54:38 <elliott_> Sgeo: guess what other language has parsec
06:55:35 <Sgeo> A language in whch I struggle to do simple tasks?
06:55:39 <Taneb> Thing is, they don't type in 1s or 0s, they type in characters
06:55:49 <Taneb> Which are converted into 1s and 0s
06:56:00 <elliott_> Sgeo: Maybe because you haven't learned it yet
06:56:06 <elliott_> Taneb: there is no way to detect EOF with your IO scheme.
06:56:33 <Taneb> You just need to know what encoding it uses
06:56:52 <Taneb> And check for a number of consecutive ones that is too many for a valid character in that encoding
06:57:13 <elliott_> um, if the encoding is bytes, then no.
06:57:18 <elliott_> an infinite stream of ones is valid.
06:57:21 <Sgeo> ....why is this blank http://rubydoc.info/gems/rparsec/1.0/frames
06:57:31 <elliott_> Sgeo: rubydoc sucks, get used to it
06:57:36 <Taneb> If it's in ASCII, then yes
06:57:50 <elliott_> Taneb: well you'd better specify an encoding then...
06:58:03 <Taneb> I'm keeping that implementation dependent.
06:58:03 <elliott_> Taneb: wait, no, you are totally wrong
06:58:20 <elliott_> That's only true if you pad out the encoding with at least one bit
06:58:28 <Taneb> Because I don't want to think about it right now.
06:58:30 <elliott_> If you use the minimal number of bits then infinite ones will _always_ be valid
06:58:42 <elliott_> You can't leave it implementation-dependent because it changes whether your language can do all the IO it needs to be able to or not
06:58:59 <itidus20> the benefit of a repeating series is you don't need as much information to communicate it
06:59:43 <Taneb> Okay, the encoding is to be decided by whomever makes the first implementation with a sensible encoding.
07:00:35 <elliott_> btw your wikipedia link is broken :P
07:01:20 <Taneb> Because I really do not want to think about it
07:01:45 <Sgeo> rparsec (on github) looks unmaintained. Does something like rparsec need maintainance even?
07:03:03 <elliott_> "Do libraries need maintenance?" --Sgeo
07:03:08 <olsner> probably, I can't imagine any ruby coder getting it right for the first time
07:03:25 <olsner> besides, even the Haskell version has maintenance
07:07:19 <Taneb> Help me, elliott_, you're my only home!
07:07:51 <elliott_> quintopia: thats a question i ask myself a lot
07:08:20 <Taneb> quintopia: because being asleep is for the weak.
07:08:27 <olsner> you are only. home is bone.
07:09:06 <oerjan> Taneb has moved in with elliott_? that was quick.
07:09:44 <Taneb> oerjan: I've moved in/to/ elliott_.
07:10:16 <quintopia> and then if elliott moves into me, the cycle will be complete
07:10:41 <elliott_> quintopia: ok my answer is usually
07:10:50 <elliott_> says something about not being a slep doctor
07:10:55 <elliott_> but then i coerce him to tell him to go to sleep
07:11:12 <elliott_> im... you could try asking monqy???
07:11:15 <elliott_> im not a slep doctor either help :(
07:11:48 <monqy> elliott_: im still noit a slep e doctor
07:11:52 <Taneb> Try asking good ol' fungy
07:12:01 <fungot> quintopia: and no macros), so it worked nicely, although builds took a long time since i saw scheme i wanted to choose fnord, but don't
07:12:11 <monqy> fungot is not a slepe doctor...
07:12:12 <fungot> monqy: i'm in a fnord style for the operator. i know marc consider the interpreter as root, device files are your biggest foe.
07:12:14 <quintopia> ew fungot, mind matching brackets?
07:12:15 <fungot> quintopia: but you still shouldn't do that
07:12:26 <fungot> quintopia: eval ( string-ref " n" are for
07:12:27 <elliott_> > map (flip testBit) [0..] 'a'
07:12:28 <lambdabot> Couldn't match expected type `GHC.Types.Char -> t'
07:12:41 <lambdabot> Control.Applicative (<*>) :: Applicative f => f (a -> b) -> f a -> f b
07:12:41 <lambdabot> Control.Monad ap :: Monad m => m (a -> b) -> m a -> m b
07:12:41 <lambdabot> Control.Applicative (<**>) :: Applicative f => f a -> f (a -> b) -> f b
07:12:49 <elliott_> > map (flip testBit) [0..] <**> 'a'
07:12:49 <lambdabot> Couldn't match expected type `[(a -> GHC.Bool.Bool) -> b]'
07:12:56 <elliott_> > map (flip testBit) [0..] <*> 'a'
07:12:57 <lambdabot> Couldn't match expected type `[a]'
07:12:57 <lambdabot> against inferred type `GHC.Types...
07:13:02 -!- kwertii has quit (Quit: bye).
07:13:05 <quintopia> should i sleep or code or write or what fungot?
07:13:06 <fungot> quintopia: i expect whoever made the plt-file. dunno about the r6rs progress report' is probably save.
07:13:08 <NihilistDandy> elliott_: Recommendations for books on the lambda calculus. Go.
07:13:14 <elliott_> quintopia: how long have you been awake??
07:13:30 <elliott_> NihilistDandy: i dont read books books are lame
07:13:45 <elliott_> i guess people like to mock a mockingbird?? is that close enough
07:13:47 <lambdabot> forall (m :: * -> *) a. (Monad m) => [m a] -> m [a]
07:14:08 <elliott_> > mapM (flip testBit) [0..] 'a'
07:14:08 <lambdabot> No instance for (Data.Bits.Bits GHC.Types.Char)
07:14:23 <elliott_> :t \a -> mapM (flip testBit) [0..bitSize a] a
07:14:28 <elliott_> > (\a -> mapM (flip testBit) [0..bitSize a] a) (99::Int)
07:14:30 <lambdabot> [True,True,False,False,False,True,True,False,False,False,False,False,False,...
07:14:40 <elliott_> > (\a -> mapM (flip testBit) [0..bitSize a] a) (99::Word8)
07:14:41 <lambdabot> [True,True,False,False,False,True,True,False,False]
07:15:07 <elliott_> > length ((\a -> mapM (flip testBit) [0..bitSize a] a) (99::Word8))
07:15:15 <itidus20> NihilistDandy: are you like me and do not know lambda calc or do you need a method to teach someone else lambda calc?
07:15:40 <shachaf> NihilistDandy: Why are you asking?
07:15:47 <NihilistDandy> shachaf: itidus20: I'm sort of familiar with it, but I'd like something more rigorous
07:15:57 <itidus20> shachaf: oh your question asking method is so elegant
07:16:15 <quintopia> i used to know lambda calculus. i even evaluated THREE PLUS ONE in standard lambda calc once. i don't remember the substitutions anymore.
07:16:42 <Taneb> What's a good 3D thing for making a craft game easily?
07:17:12 <elliott_> Taneb: if it were easy, it would be easy.
07:17:34 <elliott_> yeah if you are wanting a painless experience
07:17:36 <elliott_> write something two dimensional
07:17:39 <elliott_> fromBits = foldl (.|.) 0 . map (\(i,b) -> if b then bit i else 0) . zip [0..]
07:17:52 <itidus20> quintopia: i eat and shit games... so such questions are elementary to me hahahahhaa
07:18:08 <itidus20> i dont know the answer but i mean the meaning of "craft game"
07:18:16 <NihilistDandy> elliott_: fromBits = foldl (.|.) 0 . zipWith (flip flip 0 . flip if' . bit) [0..]
07:18:23 <oerjan> elliott_: what's that supposed to do
07:18:29 <quintopia> if you actually shit games, you are the answer to taneb's prayers
07:18:29 <elliott_> oerjan: (Bits a) => [Bool] -> a
07:18:44 <elliott_> itidus20: do you play minecraft
07:18:50 <itidus20> quintopia: there is a genre of japanese absurd games.
07:18:56 <quintopia> taneb: find the right combination of games to feed itidus, and you shall have your painless creation of a craft game
07:19:04 <itidus20> elliott_: no. if i did i would have at least asked about the esolang minecraft server
07:19:12 <oerjan> elliott_: are you _sure_ it's not easier to use Num a?
07:19:28 <elliott_> oerjan: um how would that help
07:19:39 <elliott_> itidus20: we have one of those :P
07:19:49 <lambdabot> forall a. (Num a) => a -> (Char -> Bool) -> (Char -> Int) -> String -> [(a, String)]
07:20:07 <elliott_> fromBits = foldl (\n b -> (n `shiftR` 1) .|. fromEnum b) 0
07:20:34 <oerjan> oh hm it requires Char. that's actually a stupid restriction...
07:21:08 <Taneb> itidus20: would you kindly eat Minecraft, Team Fortress 2, the FunOrb version of Chess, and also VVVVVV?
07:21:28 <itidus20> NihilistDandy: while lambda can't be understood by analogy or such.. it seems the weakness is that lambda is a method of symbolic manipulation
07:21:56 <NihilistDandy> itidus20: How is that a weakness? Symbolic manipulation is like 80% of my daily life :D
07:21:58 <elliott_> Taneb: my mibbllii interpreter is almost done.
07:22:13 <elliott_> Taneb: and yes I'm doing this just to give it a good IO model :)
07:22:22 <itidus20> NihilistDandy: it is a gap in lambda calc's armor where we might attack him
07:22:39 <elliott_> Taneb: one guess as to the language
07:23:07 <fizzie> Aw, I was *just* about to guess Visual Basic for Applications.
07:23:11 <Taneb> Because I would have done it in Python
07:23:15 <elliott_> fizzie: WHO TOLD YOU LALL MY SECRETS..............
07:23:20 <itidus20> NihilistDandy: i mean it is a weakness of lambda calc's attempts to hide its understanding
07:24:04 <itidus20> the notation is clearly bollocks
07:24:16 <itidus20> it doesn't lend itself to being understood
07:24:56 <NihilistDandy> itidus20: It doesn't seem that opaque, really, I just enjoy the books that people that are more educated than I am write about subjects about which I have some small knowledge
07:25:09 <NihilistDandy> I'd never have known about LC unless I'd stumbled on Haskell :D
07:25:51 <elliott_> can someone say an asterisk plz
07:25:57 <itidus20> NihilistDandy: i mean to be both friendly and confronting
07:26:04 <Taneb> It's a hell of a lot easier to understand than SKI
07:26:19 <elliott_> itidus20: you assume that the lambda calculus is deliberately trying to be obscure.
07:26:23 <itidus20> i can see now what is eventually coming
07:26:35 <itidus20> elliott_: you are merely the next generation of machine coders
07:27:20 <oerjan> itidus20: lambda calculus is older than any machine code. except possibly babbage's...
07:27:48 <itidus20> noone has yet had the tenacity to abstract it
07:27:49 <Taneb> It's a method of describing functions of functions
07:28:27 <itidus20> well one could compile to lc right?
07:28:32 <oerjan> they may lack a little something on the turing-completeness front
07:29:04 <NihilistDandy> oerjan: We shall see. When my BF loom is complete, ye shall have your comeuppance~
07:29:37 <oerjan> my comeuppance, and perhaps a new carpet.
07:29:46 <Taneb> I've never seen a turing complete computer.
07:29:48 <itidus20> in other words, LC could be a compile target right?
07:29:54 <Taneb> I've read about them, but not seen them
07:29:55 <elliott_> itidus20: it kind of is (GHC Core)
07:30:15 <elliott_> <itidus20> noone has yet had the tenacity to abstract it
07:30:20 <elliott_> itidus20: this is called functional programming languages.
07:30:20 <Taneb> itidus20: I got reasonably far with a brainfuck to lambda calculus translator
07:30:28 <NihilistDandy> elliott_: I hate reading Core. It makes me feel insane.
07:31:11 <itidus20> is there any actual benefit to abstract it to a point where you can't see the lambda happening?
07:31:35 <itidus20> my conception here is probably getting out of alignemnt with reality
07:32:19 <elliott_> *Main> parse (expr <* eof) "" "+--"
07:32:27 <elliott_> itidus20: you can "see the lambda happening" in haskell.
07:33:09 <itidus20> i guess the point is that i don't understand lambda calc... and that fact is not something which should be escaped by building a layer on top of it
07:33:14 <elliott_> oerjan: how does write parser :(
07:33:26 <oerjan> elliott_: wat hepl, it seemed to work ...
07:33:34 <elliott_> oerjan: no, that should be App (B C) C
07:34:09 <lambdabot> forall t t1 t2 t3. (t2 -> t3) -> (t -> t1 -> t2) -> t -> t1 -> t3
07:34:21 <oerjan> elliott_: ah you want it left recursive, which is problematic directly.
07:34:22 <lambdabot> parse error (possibly incorrect indentation)
07:34:25 <lambdabot> Text.Parsec.Combinator chainl :: Stream s m t => ParsecT s u m a -> ParsecT s u m (a -> a -> a) -> a -> ParsecT s u m a
07:34:25 <lambdabot> Text.ParserCombinators.ReadP chainl :: ReadP a -> ReadP (a -> a -> a) -> a -> ReadP a
07:34:25 <lambdabot> Text.ParserCombinators.Parsec.Combinator chainl :: Stream s m t => ParsecT s u m a -> ParsecT s u m (a -> a -> a) -> a -> ParsecT s u m a
07:34:25 <lambdabot> forall (f :: * -> *) (f1 :: * -> *) a b (f2 :: * -> *). (Functor f, Functor f1, Functor f2) => (a -> b) -> f (f1 (f2 a)) -> f (f1 (f2 b))
07:35:08 <elliott_> oerjan: I don't know what that final a is meant to be though
07:35:35 <Taneb> :t \x y z -> x z (y z
07:35:36 <lambdabot> parse error (possibly incorrect indentation)
07:35:55 <Taneb> :t \x y z -> x z (y z)
07:35:56 <lambdabot> forall t t1 t2. (t -> t1 -> t2) -> (t -> t1) -> t -> t2
07:36:12 <elliott_> oerjan: it works if I specify undefiend for the last parameter and then it gives undefined on empty input
07:36:19 <elliott_> there must be a way to make it fail from within
07:36:24 <lambdabot> Text.Parsec.Combinator chainl1 :: Stream s m t => ParsecT s u m a -> ParsecT s u m (a -> a -> a) -> ParsecT s u m a
07:36:25 <lambdabot> Text.ParserCombinators.ReadP chainl1 :: ReadP a -> ReadP (a -> a -> a) -> ReadP a
07:36:25 <lambdabot> Text.ParserCombinators.Parsec.Combinator chainl1 :: Stream s m t => ParsecT s u m a -> ParsecT s u m (a -> a -> a) -> ParsecT s u m a
07:36:53 <elliott_> oerjan: now the question is, how do you do parens :/
07:37:20 <oerjan> elliott_: between is nice
07:37:49 <oerjan> although with the newfangled applicatives you can do it directly, i think
07:38:02 <elliott_> oerjan: argh yes but the problem is that if I do "chainl1 op (pure App)", there's no recursion at _all_
07:38:07 <elliott_> which means I can't just simply insert a paren alternative
07:38:18 <elliott_> I need chainl1 (op <|> withparens) (pure App) I think
07:38:23 <itidus20> so the secret to unobscuring LC seems to be in exploiting the fact it is about symbolic manipulation..
07:38:49 <itidus20> and the standard LC notation seems to strain itself to become intuitive
07:39:21 <oerjan> itidus20: the math standard is very compact
07:39:34 <oerjan> and haskell only slightly less
07:39:54 <itidus20> how many symbols need to be recognized in the most primal form of LC?
07:40:27 <oerjan> oh. you need variable representations, so in _principle_ infinite but you can choose something more efficient.
07:40:39 <elliott_> Taneb: I take it whitespace is ignored
07:41:17 <oerjan> alpha conversion means you sometimes must introduce new variable names on the fly
07:41:42 <itidus20> oerjan: suppose that we introduced a metasymbol called an identifier for such situations
07:41:54 <oerjan> which implementations do under the hood, probably
07:42:06 <itidus20> perhaps metasymbol is not a real world
07:42:27 <itidus20> well.. supposing we took care of such things in a way like that
07:42:41 <oerjan> \() and variables are all you need in the most primitive form
07:42:54 <itidus20> how many glyphs or symbols basically is it made up of
07:43:21 <itidus20> and does every ( need a corresponding ) ?
07:43:50 <oerjan> however it's very convenient to be able to list several variables in a row after the \, which needs another symbol, customarily .
07:44:00 <oerjan> itidus20: well in the orginal syntax yes.
07:44:03 <lambdabot> forall a. Int -> [a] -> ([a], [a])
07:44:13 <lambdabot> ([0,1,2,3,4,5,6,7,8],[9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,...
07:44:25 <oerjan> itidus20: if you change the syntax rampantly you could go for unlambda syntax, just `sk
07:44:50 <oerjan> but then it's combinator calculus, not lambda, really
07:46:15 <itidus20> ok so with 2 bits a symbol could be differentiated as being a \, a, ( a, ) or a variable
07:47:07 <quintopia> in what insane world should shift-backspace be mapped to delete??????
07:47:08 <itidus20> then being a variable it could be followed by n bits to say which variable
07:48:05 <oerjan> itidus20: what's the a
07:48:34 <itidus20> should have used an 'an' perhaps
07:48:46 <itidus20> i.e. 00 = \ 01 = ( 10 = ) 11 = variable
07:49:00 <oerjan> no i think those start with consonants if pronounced
07:49:23 <itidus20> i knew it was trouble when typing it
07:49:40 <oerjan> itidus20: well everything can be encoded as 0 and 1, that's basic information theory :P
07:49:52 <NihilistDandy> quintopia: Isn't that fairly standard on keyboards that don't have a discrete delete key?
07:50:07 <elliott_> NihilistDandy: no, fn+backspace is
07:50:18 <itidus20> then suppose you had 4 variables... you could follow a "11" with another 2 bits to indicate which variable is being referred to
07:50:56 <quintopia> NihilistDandy: it is default and unchangeable in this application. and it is annoying, since sometimes i yell in my comments and also make typos and also i dont ccaps lock
07:51:06 <itidus20> so 00 01 11 10 would mean \(a)
07:52:12 -!- oerjan has quit (Quit: leaving).
07:53:18 <NihilistDandy> itidus20: You're getting dangerously close to Gödel numbering now
07:53:43 <elliott_> Taneb: hmm, indeed, all invalid characters are ignored, I presume...
07:57:35 <elliott_> The IO scheme is: takes a stream, outputs a stream. A stream is of the form (\end zero one. end), (\end zero one. zero restofstream), or (\end zero one. one restofstream).
08:17:28 * Sgeo wants to play with Shoes >.>
08:18:06 <monqy> imagining sgeo playing with shoes now
08:18:23 <monqy> oh a ruby gui thing
08:18:47 <elliott_> http://shoesrb.com/ oh man what they made the webpage boring :(
08:19:02 <elliott_> it used to look like the nobody knows shoes book
08:19:10 <elliott_> with a bunch of pencil illustrations
08:19:49 <elliott_> I wonder if anyone ever managed to archive all of hackety
08:20:09 <elliott_> I guess http://viewsourcecode.org/why/hackety.org/ has all of it
08:22:08 <elliott_> that thing's missing a lot of the images
08:24:39 <elliott_> "Rubyists love life. Boy, I tell you. They love humans. They love cars!! They looooooove dishes of real, actual food. You don’t even know. Airplanes in mid-air, refueling? They love that!" --Sgeo
08:25:13 <elliott_> Sgeo: http://viewsourcecode.org/why/hackety.org/2008/11/21/aCostlyParade.html
08:25:40 <Sgeo> I am not _why.
08:25:57 <elliott_> monqy: Can we all agree on that?
08:26:08 -!- Vorpal has joined.
08:26:17 <elliott_> "Let me put it this way. Suppose you’ve got Zed Shaw. No, wait, say you’ve got “a person.” (We’ll call this person “Hannah Montana” for the sake of this exercise.) And you look outside and this young teen sensation is yelling, throwing darts at your house and peeing in your mailbox. For reals. You can see it all. Your mailbox is soaked. Defiled. The flag is up."
08:26:17 <elliott_> help im laughing and i cant stop
08:28:19 <Vorpal> elliott_, where is that from
08:28:56 <elliott_> Vorpal: http://viewsourcecode.org/why/hackety.org/2008/11/21/aCostlyParade.html (enjoyable without a single bit of knowledge of the Ruby community and its drama, in fact better without it)
08:29:05 <elliott_> "It’s like Jesus. Except Jesus never had the forthrightness and temerity to actually kick a guy in the jugular if he had to."
08:29:30 <Vorpal> elliott_, oh they are people known in the ruby community?
08:29:43 <elliott_> Vorpal: Uh... you mean Hannah Montana?
08:30:04 <Vorpal> elliott_, yeah. And Zed Shaw. Either they are that or they come from popular culture.
08:30:22 <elliott_> They're from the hit US TV show "Zed Shaw and Hannah Montana".
08:30:55 <itidus20> elliott_: that hello world thing reminds me of something i said yesterday (whistles non-chalantly)
08:31:24 <Vorpal> elliott_, wait, the latter is a TV show. But Zed Shaw is not. Right.
08:32:10 <monqy> me too. it killed me. dead.
08:32:12 <Vorpal> itidus20, move all zig
08:32:21 <monqy> (killed is a bad thing) ((not a good thing))
08:32:58 <Vorpal> (if that came in the correct place, lucky, I completely forgot the order)
08:33:38 <Vorpal> NihilistDandy, eth0teric?
08:34:00 <Vorpal> NihilistDandy, so no ifconfig then
08:34:22 <itidus20> I think that all your base deserves to be included in a poetry compendium some day
08:34:30 <itidus20> i wonder if they need rights from the company
08:34:35 <monqy> I think something broke and I switched to eth1 because I was too lazy to figure out what happened
08:34:58 <Vorpal> itidus20, copyrights do expire. Though hm not sure what happens if a company owns a copyright
08:35:36 <itidus20> how do i make a bot search for something i said yesterday?
08:35:44 <itidus20> perhaps it needs to be quoted?
08:36:19 <itidus20> well i said something about hello world's
08:36:37 <elliott_> "At last, open source works as it should. Certainly, patching is cool. Branching is cool. But nothing beats intruding in my repo and just finishing the whole thing." everything on this blog is gold
08:36:37 <Vorpal> try the logs, and grep them
08:37:12 <monqy> good stuff, that topic
08:37:27 <monqy> you could also do !logs or whatever it is
08:37:33 <monqy> and rsync them good
08:37:42 <monqy> but if you know the date, it may be easier not to bother
08:41:04 <elliott_> http://viewsourcecode.org/why/hackety.org/2008/05/16/blimlimb.html <-- me
08:41:31 <elliott_> (https://github.com/bterlson/blimlimb/tree/master/logs for those links)
08:42:53 <itidus20> am i still here? i think my connection on this network is just about over
08:43:06 <Vorpal> itidus20, you are not here
08:43:45 <itidus20> i am on one network burning up bandwidth because it is due to soon be disconnected and for me to jump onto another when my brother returns
08:44:28 <Vorpal> how can irc ever burn up bandwidth. It is low bandwidth. I mean I used it on plain GSM ffs!
08:45:50 <itidus20> <itidus20> ok heres a topic <itidus20> has hello world worn out it's welcome? <oerjan> yeah the world is starting to get pissed
08:46:13 <Taneb> People who read Homestuck: update
08:46:34 <Patashu> When was the last time homestuck actually took a command?
08:46:39 <itidus20> <elliott_> 02:44:49: <itidus20> ok heres a topic <elliott_> 02:45:05: <itidus20> has hello world worn out it's welcome? <elliott_> Meanwhile, from the worst member of the channel to the best...
08:46:44 <NihilistDandy> Taneb: Is that what all your other cryptic things for the last weeks have been?
08:46:56 <elliott_> NihilistDandy: It's Sgeo who does the cryptic things.
08:47:07 <elliott_> Oh, I see a "SNOP". This will be good. I take my leave.
08:47:27 <itidus20> now today being the 19th of august, i clicked on elliott's hackety.org link.. and i see "What makes a good Hello World program? Because Hello World itself is a terrible Hello World."
08:48:49 <elliott_> Taneb: Sgeo: I HAVE BEEN WAITING FOR THIS EVER SINCE THE SCRATCHING BEGAN
08:48:57 <elliott_> Proof that I am right always, naturally.
08:50:06 <itidus20> elliott_: well that is exactly what i was thinking re: hello world. it should be an application which takes advantage of multimedia capabilities of a prorgamming lang and it's standard library
08:50:18 <elliott_> itidus20: Most languages don't have much of that
08:50:37 <elliott_> But the purpose of a hello world program is usually to get the user accustomed with how to actually run a program
08:50:48 <elliott_> The more non-trivial it is, the more that focus is lost
08:51:18 <itidus20> that Max/MSP looked vaguely fun.
08:51:57 <elliott_> Hope you've got the cash to fork over for it
08:52:25 <elliott_> itidus20: You probably aren't in the target market :-P
08:52:45 <itidus20> i just don't have any products developed
08:53:29 <itidus20> oh i am using words which would make stallman upset
08:54:38 <elliott_> itidus20: What words would make Stallman upset
08:55:07 <itidus20> "developed" is probably borderline
08:55:20 <itidus20> i think he would prefer if i said
08:55:35 <itidus20> I just haven't authored any software of that kind yet.
08:55:52 <elliott_> Who cares what Stallman thinks
08:56:10 <itidus20> oh. ha ha. ha ha. certainly not me.
08:56:36 <elliott_> itidus20 also known as richard stallman
08:56:57 <itidus20> also known as richard matthew stallman?
08:57:14 <Taneb> Also known as Ricky
08:58:39 <itidus20> one of very few real life celebrities to feature in XKCD
09:00:13 <monqy> so i read that bot troupe thing and it was great
09:00:46 <elliott_> monqy: did you read the logs they're beautiful trainwrecks
09:01:10 <monqy> i read most of one of them
09:01:23 <monqy> I forget why I stopped
09:01:28 <elliott_> prin and whitely is the better one
09:01:36 <elliott_> he said as as a connosiaoruower
09:01:36 <monqy> yes it was that one which I read
09:05:59 <elliott_> "People, Ruby isn’t a game. It isn’t a hobby. It’s certainly not a very good food source and it’s not an article of clothing. You can’t just put Ruby in the wash with a load of whites. Nice try, but no. No. Jeez, grow a brain. Ruby isn’t a tambourine you can bang loudly in my ear. I’m trying to use my iPhone here, guy.
09:05:59 <elliott_> And Ruby is not some bachelor’s party with a foxy lady in a sherlock holmes hat. Hardly: Ruby is all dads. Put a petticoat on, woman. Pop those balloons. We’re all getting paid here and we’re all having kids here. Get with the program."
09:06:11 <elliott_> maybe why disappeared to become a beat poet
09:06:47 <monqy> oh no i am the can't think sort of tired without being the feel like slep tired i prefer it the other way around :'(
09:07:05 <monqy> at least i am not the horrible sick die tired. i dislike that tired..
09:07:53 <elliott_> http://viewsourcecode.org/why/hackety.org/2007/11/14/rubyIsMoney.html for posterity
09:07:58 <monqy> I forget what it feels like aprat from frealing bad
09:10:03 <monqy> why seems like a good person
09:10:10 <monqy> for how long has he been mysteriously disappeared now
09:11:49 <elliott_> stop making me believe in synchronicity
09:12:38 <monqy> http://upload.wikimedia.org/wikipedia/commons/e/e2/Sch%C3%A9ma_synchronicit%C3%A9_in_English.png synchronicity
09:13:04 <monqy> why do i find this diagram hilarious help
09:14:43 <monqy> draw it everywhere
09:15:22 <elliott_> just add random lines going at different angles
09:15:30 <elliott_> "Political-industrial complex"
09:16:02 -!- moses_ has quit (Read error: Connection reset by peer).
09:16:11 <elliott_> Supermarket Lineage: band name
09:17:21 <monqy> for some reason i thought of stock music stores and their awful stock music collections for tasteful play in markets and elevators and held phone lines
09:17:26 <monqy> or whatever they are
09:17:38 <monqy> http://www.muzak.com/ like this thing
09:18:08 <monqy> muzak sells smells?
09:19:48 <elliott_> i'm going to start the first smell band
09:19:58 <elliott_> http://www.muzak.com/products/scent
09:20:04 <elliott_> im going to elevate this to an art form
09:20:22 <elliott_> edgy experimental release that basically just smells like human excrement for an hour
09:20:40 <elliott_> pop scents that smell lightly fragrant but not really of much anything at all
09:20:45 <elliott_> yessssssss i will corner this market
09:21:32 <monqy> mmm these music samples are still so tasteful
09:21:43 <elliott_> `addquote <monqy> mmm these music samples are still so tasteful
09:21:47 <HackEgo> 601) <monqy> mmm these music samples are still so tasteful
09:21:56 <monqy> im sampling ultra hip holiday
09:22:38 <monqy> hes the boogie woogie santa clause
09:22:48 <monqy> switching to oktoberfest
09:23:16 <monqy> yes i would love to shop to this
09:24:27 <elliott_> `addquote <monqy> im sampling ultra hip holiday <monqy> hes the boogie woogie santa clause <monqy> switching to oktoberfest <monqy> yes i would love to shop to this
09:24:29 <HackEgo> 602) <monqy> im sampling ultra hip holiday <monqy> hes the boogie woogie santa clause <monqy> switching to oktoberfest <monqy> yes i would love to shop to this
09:24:34 <monqy> "beer-drinken beer-drinken" - good song
09:25:13 <monqy> the ultra hip holiday description is so good
09:25:23 <monqy> Hey Santa Daddy-O, only the coolest of the cool get to play here. Timelessly hip and ever relevant, this program celebrates the holidays with swing, style and panache! Vocals and instrumentals combine to give a special musical sophistication to the season. Artists like Louis Prima, Frank Sinatra, Ella Fitzgerald and Louis Armstrong ring in the holiday with timeless style.
09:25:39 <monqy> http://www.muzak.com/samples/music_programs/category/holiday their holiday themed selection
09:25:47 <monqy> holiday best genre
09:26:33 <monqy> holiday remix is so tasteful too
09:27:04 <monqy> how did that happen
09:27:22 <monqy> what sort of hotkey would
09:28:20 <elliott_> fizzie: what is the "proper" way to go from r g b to the packed pixel for a surface (the surface is the screen)
09:28:26 <elliott_> or can i just pack it in the obvious way if it's the screen??? help
09:28:47 <monqy> I used to know how to do that
09:29:33 <fizzie> You can look at surface->format, I'm not sure if there was a function for it already.
09:30:08 <monqy> ugh I forget how I knew how to do it
09:30:09 <elliott_> fizzie: hSDL miiight not offer a function for that.
09:30:13 <elliott_> How the fuck are you even meant to poke pixels with SDL.
09:30:32 <fizzie> SDL_MapRGB(SDL_PixelFormat *format, Uint8 r, Uint8 g, Uint8 b).
09:30:55 <elliott_> I have to get the PixelFormat, though.
09:32:14 <fizzie> surfaceGetPixelFormat :: Surface -> PixelFormatSource
09:32:29 <fizzie> Disregard the "Source" bit, that got miscopied too.
09:32:49 <elliott_> surfaceGetPixels :: Surface -> IO Pixels
09:32:57 <fizzie> Also surfaceGetPixels :: Surface -> IO Pixels.
09:32:57 <fizzie> I'm not sure what "Pixels" are, though.
09:33:01 <elliott_> And there's that too, although it returns a pointer to an opaque type, so it'll be "fun" to use.
09:33:18 <elliott_> In fact Pixels isn't even exported, so lol.
09:33:29 <itidus20> since when do esolangers have the right to render individual pixels?
09:33:33 <elliott_> I also like: that mapRGB returns in IO.
09:33:49 <monqy> elliott_: would it be safe to unsafeperformio?
09:34:05 <monqy> or was there a reason to make it io
09:34:19 <fizzie> It seems to return in IO because it has to do a withForeignPtr to access the thing.
09:34:28 <fizzie> PixelFormat being a ForeignPtr Something.
09:34:38 <elliott_> I guess the PixelFormat _could_ be mutated from underneath you.
09:34:43 <elliott_> That sounds pretty rude though.
09:34:56 <elliott_> http://sdl.beuc.net/sdl.wiki/SDL_PixelFormat
09:35:03 <elliott_> I thought they were meant to have read/readwrite information.
09:37:38 -!- fungot has quit (Ping timeout: 260 seconds).
09:39:40 <Vorpal> elliott_, why are you doing SDL?
09:40:02 <Vorpal> elliott_, I don't know. I'm asking for the context here.
09:40:21 <elliott_> Fiddling about with some Haskell thing. It's as vague as it sounds.
09:41:02 <Vorpal> elliott_, anyway if you want alternatives: allegro. opengl. direct frambuffer access.
09:41:06 <monqy> thanks now im curious
09:41:14 <elliott_> data RGB = RGB Word8 Word8 Word8
09:41:26 <elliott_> Vorpal: Allegro is lolretro and there aren't any Haskell bindings that I know of.
09:41:37 <elliott_> Vorpal: OpenGL still needs a windowing library, i.e. SDL, and for what I'm doing that makes it overkill.
09:41:43 <elliott_> Vorpal: Direct framebuffer yes definitely.
09:41:44 <monqy> http://wiki.allegro.cc/index.php?title=Allegro_languages#Haskell
09:42:10 <Vorpal> elliott_, seem to remember there was a windowing library for opengl. Was it glut or was that something else
09:42:20 <elliott_> Vorpal: Yes, and GLUT sucks massively.
09:42:26 <monqy> yes im sure elliott wants to use opengl and glut
09:42:32 <monqy> this is a thing elliott wants to do
09:42:34 <Vorpal> elliott_, ah okay. I never used it
09:42:36 <fizzie> I don't think anything in PixelFormat is supposed to be writable, and I also don't think it is supposed to ever change in the lifetime of a "normal" surface; not sure even for the screen, since after SetVideoMode probably the old pointer is something you shouldn't use.
09:42:40 <monqy> whatever happened to glfwpipe anyway
09:43:15 <Vorpal> monqy, what is/was that?
09:43:29 <elliott_> monqy: I'm ostensibly going to patch GPipe to be windowing system independent instead
09:43:35 <Vorpal> fizzie, what if the user goes to the screen settings in the OS and changes the bit depth?
09:43:43 <itidus20> do you want i should mail mahogny?
09:43:50 <monqy> elliott_: sounds good; whatever happened to that, then
09:44:03 <monqy> i thought it had been weeks
09:44:08 <monqy> im out of so much loop
09:44:22 <fizzie> Vorpal: Not sure SDL handles that gracefully, really. But I guess it *could* change the screen's pixelformat. I suppose the only real guarantee is that it won't change in-between a LockSurface/UnlockSurface pair.
09:44:39 <monqy> Vorpal: gpipe but glfw or windowing system independednt instead of depending on glut
09:44:44 <fizzie> "Not all surfaces require locking. If SDL_MUSTLOCK(surface) evaluates to 0, then you can read and write to the surface at any time, and the pixel format of the surface will not change."
09:44:53 <fizzie> Yeah, I guess for hardware surfaces it might change.
09:44:58 <itidus20> im amazed you guys all know how to do graphics
09:45:19 <monqy> whats a grahpics elhp
09:46:05 <Patashu> oh oh I know how to do graphics too
09:47:14 <monqy> did we frighten you
09:47:23 <Patashu> if you want to learn how to a graphic read http://fly.cc.fer.hr/~unreal/theredbook/
09:47:50 <elliott_> Patashu: does that thing even cover shaders
09:48:02 <Vorpal> Patashu, that is the old stateful opengl stuff which is deprecated isn't it
09:48:11 <Vorpal> (not that I got a clue about how you do the new modern stuff)
09:49:00 <Vorpal> elliott_, so how do you load the vertices and textures into the graphics card?
09:49:05 <itidus20> i learned c++, winapi, first few chapters of opengl redbook in a certain autodidactic period... which however got cut short by i forget what
09:49:15 <Vorpal> I hope it isn't a loading shader
09:49:20 <fizzie> "Oh - shader, shader, shader / I made it out of clay / and when it's compiled and link'd / with shader I shall play!"
09:49:43 <fizzie> Vorpal: Vertex buffer objects, I believe.
09:49:58 <elliott_> A Vertex Buffer Object (VBO) is an OpenGL extension that provides methods for uploading data (vertex, normal vector, color, etc.) to the video device for non-immediate-mode rendering. VBOs offer substantial performance gains over immediate mode rendering primarily because the data resides in the video device memory rather than the system memory and so it can be rendered directly by the video device.
09:50:30 <Vorpal> from what I heard, directx has a less annoying API. Hm.
09:50:35 <monqy> itidus20: do you know any languages other than c++? I dislike c++.
09:50:45 <monqy> itidus20: I've heard bad things about winapi as well, but never used it myself
09:50:48 <elliott_> i once killed a person because they used c++.
09:51:02 <itidus20> i don't know c++, winapi or opengl
09:51:20 <Vorpal> fizzie, so does the GPU do translation? As in, you upload a model and then give an offset to define where in the world it should be and so on?
09:51:24 <elliott_> but you said that before fizzie sunge.s..
09:51:37 <Patashu> but you said you learned it
09:51:45 <cheater> phew, good luck i don't use c++, otherwise elliott_ might want to kill me
09:51:46 <fizzie> Vorpal: You do that within the geometry shaders.
09:52:01 <itidus20> but i didnt complete the learning
09:52:18 <fizzie> Vorpal: Or, well, maybe in a vertex shader. Anyhow.
09:52:21 <itidus20> i had several projects i tried to make at that time.. but then i burned out
09:52:41 <itidus20> and well fundamentally i wasn't really ready as a coder for such things
09:52:53 <Vorpal> fizzie, so you upload a new shader each time you want to move an object!?
09:53:09 <fizzie> Vorpal: They can have parameters, you know.
09:53:35 <Vorpal> fizzie, is it one shader per program or do you use different shaders for different objects or such
09:53:44 <Patashu> can I use shaders to mine bitcoins?
09:53:45 <fizzie> You use whatever you want, I suppose.
09:53:58 <Vorpal> fizzie, so having multiple vertex shaders is possible?
09:54:15 <elliott_> Patashu: The GPU miners use shaders, yes. Or, well, OpenCL, which is basically the same thing.
09:54:26 <elliott_> Patashu: ...but there are better uses of your GPU.
09:54:39 <Vorpal> Patashu, stitching panoramas
09:54:55 <fizzie> Vorpal: It's still stateful in that there's the currently active "program" (a collection of shaders).
09:55:01 <Patashu> elliottcraft should use left over gpu time to make bitcoins for you
09:55:53 <cheater> in fact he's a namibian princess, it's just a decoy.
09:56:05 <fizzie> And I have a feeling the "global" modelview and projection matrices still exist too, and the shader can utilize their product, but I'm not entirely certain about that. Went through our OpenGL course before it had been updated to all this programmable-pipeline fluff.
09:56:08 <Vorpal> fizzie, well there is the state of loaded vertex buffer objects too
09:56:49 <Vorpal> fizzie, well I have an opengl course this autumn. I hope it is updated
09:56:56 <Patashu> I kind of wish my opengl class wasn't the stateful kind now
09:57:05 <Patashu> b/c it looks like everything I'll use from now on will be shaders shaders shaders
09:57:28 <elliott_> Patashu: use gpipe and have fun
09:57:34 <Vorpal> Patashu, and texture buffer objects I think
09:57:49 <elliott_> Patashu: compiles functional haskell into efficient shader code ON TEH FLY....
09:57:51 <fizzie> And FBOs, for fancy render-to-texture stuff.
09:58:40 <Vorpal> fizzie, I guess that would be useful in order to create portal or screens in-game?
09:58:51 <Patashu> gpus are suited for functional programming anyway? because they're highly parallelized
09:59:54 <Taneb> Why did no-one tell me how fun children's train toys were?
10:00:24 -!- myndzi has quit (Ping timeout: 252 seconds).
10:00:49 <itidus20> Oh that train has a toilet which empties onto the tracks
10:01:22 <HackEgo> 147) <oerjan> alise: mainly it's the fact it blows so hard i cannot avoid hitting the walls of the thing, which completely goes against my basic public toilet hygiene principles \ 488) * Sgeo mutters about broken toilets <Sgeo> #toilet is useless <monqy> is #toilet even a thing <Sgeo> I'm looking for help with toilets \ 489)
10:01:35 <monqy> `pastequotes toilet
10:01:37 <HackEgo> http://codu.org/projects/hackbot/fshg/index.cgi/raw-file/tip/paste/paste.4134
10:01:38 <monqy> valuable information
10:01:44 -!- atehwa has quit (Ping timeout: 276 seconds).
10:02:12 <elliott_> monqy: im ehird and tusho and estoppel and alise btw.................................... just realised that you may not know my alternate nicks......................
10:02:46 <monqy> i knew ehird, i knew about tusho but forgot the exact name, forgot or never knew about estoppel and alise
10:03:02 <monqy> im hungary too...but cnnot eat until hours
10:03:02 -!- atehwa has joined.
10:03:35 <Sgeo> I do not recognize estoppel
10:04:12 <HackEgo> 128) <alise> use "grep --crazy" \ 129) * augur rubs alise's bum [...] <augur> what? she said square ped <augur> :| \ 131) <fungot> alise: why internet is like wtf \ 135) <alise> like, just like I'd mark "Bob knob hobs deathly poop violation EXCREMENT unto;" as English <ais523> alise: that's great filler <alise> ais523: well it
10:04:37 <fizzie> Vorpal: Those, and (not the render-to-texture thing, FBOs in general) general post-processing of the final render, by a fragment shader or something.
10:04:37 <monqy> elliott_: im geting centepides help
10:04:39 <augur> elliott_: helloooooooo
10:05:01 <elliott_> `addquote <monqy> im hungary too...but cnnot eat until hours
10:05:02 <HackEgo> 603) <monqy> im hungary too...but cnnot eat until hours
10:05:18 <monqy> that was intentional
10:05:21 <elliott_> but you cannot eat until hours...
10:05:23 <Taneb> DMM knows who I am...
10:05:56 <elliott_> itidus20: is DMM what passes for a celebrity in your country
10:06:23 <itidus20> What passes for a celebrity in my country is as follows:
10:06:25 <Taneb> Well, he mananged to connect forum me to IRC me
10:06:47 <monqy> I don't know if anyone knows me
10:06:50 <elliott_> Taneb: hard feat what with them having exactly the same name
10:07:24 <itidus20> Players of cricket. Players of aussie rules football. Actors starring in the soap opera home and away. Actors starring in the soap opera neighbours. Politicians.
10:07:53 <elliott_> do you guys even have more than two soap operas
10:07:53 <itidus20> Also certain musicians of course.
10:08:17 <monqy> I dont; know what counts as famouse...i am bad at fame
10:08:18 <Taneb> Seachange was good but didn't last very long
10:08:21 -!- fungot has joined.
10:08:34 <elliott_> im glad this is a channel where people have opinions on australian soap operas
10:08:35 <monqy> i am out of all the fame loops
10:08:44 <elliott_> im just sitting here grinning likean idiot
10:08:48 <monqy> and the australien soap opera loops
10:08:57 <monqy> so much loop / s omcuh
10:09:01 <elliott_> `addquote <monqy> i am out of all the fame loops <monqy> and the australien soap opera loops <monqy> so much loop / s omcuh
10:09:02 <HackEgo> 604) <monqy> i am out of all the fame loops <monqy> and the australien soap opera loops <monqy> so much loop / s omcuh
10:09:09 <itidus20> i have sort of met toadfish once in a nightclub
10:09:41 <itidus20> my friend who used to boss me around asked me to offer him a beer. he was kinda creeped out by me.
10:10:15 <monqy> don't know who that is
10:10:19 <itidus20> a fictional character in neighbours
10:10:20 <monqy> I thought you said "a toadfish"
10:10:31 <monqy> whoa what's a toadsish
10:10:35 <elliott_> toadfish was kinda creeped out by itidus20
10:10:39 <elliott_> http://en.wikipedia.org/wiki/Toadfish
10:10:46 <elliott_> itidus20 met one once in a nightclub
10:10:50 <elliott_> http://upload.wikimedia.org/wikipedia/commons/2/29/Neophrynichthys_latus_%28Dark_toadfish%29.gif
10:10:58 <elliott_> <friend> hey iti offer to buy a beer for that guy
10:11:02 <monqy> that is actually how i imagine itidus20
10:11:06 <elliott_> <iti> hey toadfish i buy beer???
10:11:09 <elliott_> <toadfish> http://upload.wikimedia.org/wikipedia/commons/2/29/Neophrynichthys_latus_%28Dark_toadfish%29.gif
10:11:16 <monqy> that toadfish picture describes my mental image of itidus20 perfectly
10:11:18 <Taneb> I once visited the set of Home and Away, I think
10:11:20 <itidus20> "For the television character, see Toadfish Rebecchi."
10:11:35 <elliott_> http://upload.wikimedia.org/wikipedia/en/5/55/Toadie_Rebecchi.jpg
10:11:36 <elliott_> http://upload.wikimedia.org/wikipedia/commons/2/29/Neophrynichthys_latus_%28Dark_toadfish%29.gif
10:11:39 -!- Taneb has left ("I am outta here").
10:11:47 -!- Taneb has joined.
10:11:57 <elliott_> the heat being comparisons of soap opera actors to fish
10:11:58 <Taneb> I didn't know I could do that
10:11:58 <monqy> http://upload.wikimedia.org/wikipedia/commons/9/91/OysterToadfish.jpeg helo
10:12:06 <elliott_> monqy: http://upload.wikimedia.org/wikipedia/en/5/55/Toadie_Rebecchi.jpg same person??
10:12:48 <itidus20> his brother in the tv show is named stonefish :P
10:13:13 <monqy> stonefish does not jive with my mental itidus20 image
10:13:21 <monqy> who is stonefish....
10:13:32 <elliott_> http://en.wikipedia.org/wiki/Stonefish_stings_in_Australia
10:13:33 <itidus20> another character in that tv show
10:13:45 <monqy> stonefish is not sgeo either
10:13:48 <elliott_> http://upload.wikimedia.org/wikipedia/commons/e/e2/Sch%C3%A9ma_synchronicit%C3%A9_in_English.png <-- soap operas
10:13:49 <monqy> what is a good sgeo fish
10:14:23 <monqy> No results found for "sgeo fish".
10:14:54 <monqy> trying +sego +fish
10:15:05 <monqy> http://www.charlesgilchrist.com/SGEO/Gal1101.html
10:16:14 <monqy> C.G. "Yes. As I am sure you remember, Leslie, and as I have told you many times before: Sacred Geometry is the architecture of the universe. You can observe these proportions everywhere; in fish and shells, birds and beasts of all kinds, many forms of insects, it's in plants and trees; God's Golden Mean is to be found everywhere in nature."
10:16:25 <elliott_> C.G. "I have no idea, Leslie, and I don't believe anyone knows that for sure. The Golden Mean Rectangle and the related Phi Ratio have been perceived in numerous cultures dating back to the roots of recorded history, especially in the Middle East and the Far East. But the information was a guarded part of esoteric wisdom and was not shared with anyone but the most privileged initiates of very obscure and secret societies."
10:16:30 <elliott_> But the information was a guarded part of esoteric wisdom and was not shared with anyone but the most privileged
10:16:35 <elliott_> part of esoteric wisdom and was not
10:16:58 <monqy> http://upload.wikimedia.org/wikipedia/commons/e/e2/Sch%C3%A9ma_synchronicit%C3%A9_in_English.png
10:20:17 <monqy> http://upload.wikimedia.org/wikipedia/en/8/84/Sgeoct.wav helpful audio clip from sgeo wikipedia userpage
10:20:30 <fizzie> That second-to-latest reminded me of this guy: http://upload.wikimedia.org/wikipedia/commons/3/3e/Kauko_Nieminen.jpg
10:21:33 <fizzie> He's written 15 "books" about his "aether whirlpool theory".
10:21:56 <monqy> and i thought: vortex math
10:22:04 <elliott_> Kauko Armas Nieminen (born 15 February 1929 in Kuopio, Finland) is a Finnish self-taught physicist. His work is pseudoscience.[citation needed]
10:22:04 <elliott_> Although Nieminen is most known for his works in physics, he does not have any academic training or degree in physics, but is entirely self-taught. He has a bachelor's degree in law from the University of Helsinki.
10:22:31 <elliott_> Kauko Nieminen was a deputy member of the city council of Helsinki from 2001 to 2004.
10:22:38 <itidus20> His work is pseudoscience.[citation needed]
10:22:47 <fizzie> "Nieminen's research and theories in physics are unusual.[citation needed]"
10:23:21 <fizzie> elliott_: Maybe he wanted to concentrate on his real work instead of politics? (I don't know.)
10:23:22 <monqy> http://sgeo.deviantart.com/ is this sgeo i have a suspicion it isnt
10:23:39 <elliott_> fizzie: i mean how did he... get in
10:24:16 <fizzie> elliott_: Well, by being elected, I would suppose.
10:26:33 <monqy> http://www.helsinki.fi/~pvalimak/sitaatit/nieminen.htm what does this mean
10:26:48 <monqy> wikipedia said it's an interview with crazyman but I can't read
10:27:19 <elliott_> chrome askes me too, you should, get that
10:27:22 <elliott_> "Many of us think they know what is to be a bohemian scientist or spend a carefree university life - beer, an old Kuppila and stuff. But the absent-minded scientist, or a bohemian being is like other things. Others are amateurs, and some charismatic individuals you're verissä: they will become professionals who are leaving other in the shade. The latter caste is vice Notari Far Nieminen.
10:27:30 <elliott_> Are you going to continue the political uraanne?
10:27:30 <elliott_> "I will continue, if I find the party, which is not only selfish bourgeois juntteja reindeer. Has gone low. "
10:27:44 <elliott_> not only selfish bourgeois juntteja reindeer
10:28:00 <elliott_> fizzie: is he complaining about the bourgeois reindeer, say yes
10:29:20 <monqy> I am vice Notari Far Nieminen, I have published reach much further than Jesus. At their chapter The overall co-benefit and other places it occurs. After all, I witnessed OF CREATION, which is achieved eternal life in the broadest sense ETHERS ETERNAL POWER OF.
10:29:23 <fizzie> elliott_: It seems he got 221 votes (out of 230k) in the 2000 muncipal elections. But do note that that he was just a deputy member; got the second-most votes from the independents, but the independents in total got one seat out of 85, so...
10:29:24 <monqy> ROAD READY ON, CAN find it!
10:29:26 <monqy> REMOTE RECORD Nieminen AIKAJA SUBSTANCE NOT BUY bookstores, HELSINKI EDULLISEMMAT Second-hand bookshop. "
10:29:38 <elliott_> <elliott_> fizzie: is he complaining about the bourgeois reindeer, say yes
10:29:56 <monqy> that's what happens when (whatever you did here)
10:30:24 <elliott_> fizzie: um help how do i know what memory format the plixes is in.......
10:30:37 <monqy> wasn't there a function for that
10:30:45 <fizzie> elliott_: I... I don't want to lie; no, he's not. The source word "poroporvarillinen" translates to "really bourgeois", even though "poro" as a stand-alone word means reindeer.
10:31:16 <monqy> is surfacegetpixelformat a function which you want
10:31:29 <fizzie> elliott_: The pixels is in the format specified by the PixelFormat, of course. (And each line is separated by surfaceGetPitch bytes.
10:32:50 <itidus20> fizzie: could you translate the entire line which says "I will continue, if I find the party, which is not only selfish bourgeois juntteja reindeer. Has gone low. " ?
10:32:57 <elliott_> fizzie: What if I assumed the format..................... what then
10:33:05 <itidus20> this is a big ask.. i have no obvious means of thanks
10:33:13 <monqy> i think http://sdl.beuc.net/sdl.wiki/Pixel_Access is how i learned how to do pixel stuff with sdl,,,,,it was years ago.
10:33:20 <fizzie> Basically I suppose what you need to do is to run your RGB values through mapRGB (because the Haskell binding doesn't seem to expose the fields of the PixelFormat struct) and then use the pixelFormatGetBytesPerPixel and surfaceGetPitch values to calculate the offset in surfaceGetPixels, and stick pixelFormatGetBytesPerPixel bytes of the mapRGB-returned Word32 there.
10:33:52 <elliott_> monqy: were you even born years ago......
10:34:00 <monqy> a few of them,,,,,,,,
10:34:03 <elliott_> fizzie: what if i just assumed it was how it is...........
10:34:32 <Vorpal> elliott_, yes very gross
10:34:39 <itidus20> aether way it is no skin of my nose
10:35:22 <monqy> Neurological Emergencies Treatment Trials
10:35:51 <elliott_> Haberdashery Exegesis LARPers Purdue
10:35:56 <fizzie> elliott_: Well, you could draw to a createRGBSurface you constructed yourself, with the right format, and then just blit that into the screen, then SDL will take care of the conversion. (Possibly disable double-buffering in that case, since it's already double-buffered in software.)
10:36:24 <elliott_> fizzie: oh i forgot to ask for doubline ufbfuerring or anything...
10:36:28 <fizzie> itidus20: Roughly translated... "I will continue [my political career], if I can find a party that consists of not just ur-bourgeois selfish rednecks. It's gone low." (I don't really know what that last part means. I guess it's just a lamentation of how bad things are.)
10:36:32 <elliott_> surface <- SDL.setVideoMode w h 32 []
10:38:47 <itidus20> The selfish bourgeois juntteja reindeer has gone low.
10:38:48 <fizzie> elliott_: I think the slowness could be because each fillRect call will do an internal lockSurface ... unlockSurface pair, and if the surface you're drawing to is a in-video-memory hardware surface, that may involve a round-trip to the display card memory. You could easily try that by sticking a SWSurface in your setVideoMode call. Though I guess it could also easily be something else wrong in the fillRect way.
10:39:42 <elliott_> fizzie: Well, I'm doing it via poking now, and it works (wow, first time!), but... it's still not fast.
10:39:49 <elliott_> fizzie: I have a feeling my representation is just non-ideal.
10:40:07 <Vorpal> <itidus20> The selfish bourgeois juntteja reindeer has gone low. <-- I'll assume low is a logical 1 in this case.
10:40:09 <elliott_> I'm calling mapRGB all the time, that's gotta be slow.
10:40:34 <elliott_> Is b normally least-significant, or r?
10:41:15 <Vorpal> elliott_, why not just cache the mapRGB results?
10:41:33 <elliott_> Vorpal: because the rgb differs each time...
10:42:14 <monqy> what is even doing
10:42:21 <Vorpal> elliott_, anyway what are you doing really. Maybe I can suggest a better way
10:42:25 <Vorpal> I used SDL quite a bit
10:42:49 <fizzie> The RGBA/ARGB/BGRA/ABGR is often anyone's guess, really, thanks to sometimes it being sensibly "RGBARGBA..." in memory, but in some other times they've wanted to put it so that it looks like 0xRRGGBBAA when viewed from a little-endian CPU.
10:43:16 <itidus20> Vorpal: did it do anything amusing?
10:43:16 <elliott_> Vorpal: Rendering pictures. Later animations.
10:43:25 <elliott_> data RGB = RGB Word8 Word8 Word8
10:43:35 <elliott_> Picture RGB is the relevant type.
10:43:44 <elliott_> Just doing a 500x500 checkerboard, it's slow.
10:43:49 <elliott_> And no, s/Rational/Double/ doesn't help much.
10:43:51 <monqy> why do you need pixel manipualtion to do this....
10:43:52 <Vorpal> elliott_, if you render a picture why not just blit the textures or whatever?
10:43:55 <elliott_> Takes multiple sconds to render.
10:44:14 <monqy> why not draw big boxes
10:44:19 <elliott_> Vorpal: The pictures are continuous.
10:44:20 <Vorpal> indeed what monqy said
10:44:28 <elliott_> And the animations will then depend on input factors.
10:44:44 <monqy> or is this a fine-grained checkerboard
10:44:46 <elliott_> "don't write your program in the first place" isn't terribly helpful advice.
10:44:50 <Vorpal> elliott_, if you are drawing a checkerboard, just use the box drawing primitives
10:45:04 <elliott_> Shut up, you have no idea what I'm trying to do.
10:45:07 <elliott_> <elliott_> "don't write your program in the first place" isn't terribly helpful advice.
10:45:16 <Vorpal> <elliott_> Shut up, you have no idea what I'm trying to do. <-- because you aren't explaining
10:45:18 <elliott_> The representation isn't up for discussion; how to render it is.
10:45:28 <itidus20> elliott_: i hope you are not using some variation on putpixel
10:45:38 <Vorpal> elliott_, I say the representation is wrong.
10:46:14 <itidus20> elliot.. also.. try making it 512x512?
10:46:24 <Vorpal> elliott_, at least try profile it.
10:46:35 <itidus20> im just throwing silly ideas out there
10:46:47 <fizzie> If you want to avoid mapRGB, you *could* perhaps use a hardcoded format of your own, an in-memory byte-buffer done however that sort of thing gets done in Haskell, and then the oh-there's-no-documentation createRGBSurfaceFrom :: Ptr a -> Int -> Int -> Int -> Int -> Word32 -> Word32 -> Word32 -> Word32 -> IO Surface. That should avoid any nonsense in the SDL binding, maybe.
10:46:50 <elliott_> Vorpal: There are about five calls in the loop that takes the time. Trial and error is faster than profiling.
10:49:07 <elliott_> fizzie: In-memory byte buffers look pretty much the same in Haskell as C. :p
10:49:55 <monqy> i think im shoudl probably slep soon
10:50:24 <elliott_> monqy: what tmie is it...........
10:50:48 <monqy> i was about to type almost 0400
10:51:47 <fizzie> elliott_: Coincidentally, I was wondering what the difference between tryCreateRGBSurface and tryCreateRGBSurfaceEndian is in the bindings. Source -> "tryCreateRGBSurfaceEndian flags width height bpp = tryCreateRGBSurface flags width height bpp"
10:52:29 -!- myndzi has joined.
10:52:52 <elliott_> fizzie: Nice. Probably for backwards compatibility.
10:53:08 <monqy> i'm not particularly tired but i have other reasons for sleep desire
10:53:45 <monqy> avoiding bad consequences of not slep, such as yelled at
10:54:04 <elliott_> in an utopia not slep would be as unto slep but with les slep
10:54:18 <monqy> my choice is either yelled at for slep deprivation, or yelled at for slep too late
10:54:42 <elliott_> what if you slep deprive hide................................. like a SLEUTH...............
10:54:55 <monqy> alternatively, preemptively yelled at if anyone wakes up and hears me not slepeing
10:55:00 <fizzie> Ohhhh, it *continues* three lines later with "{-# LINE 412 "Graphics/UI/SDL/Video.hsc" #-} 0x000000FF 0x0000FF00 0x00FF0000 0xFF000000" which are of course additional arguments to that tryCreateRGBSurface call. Well, that makes sense. Also, pretty formatting.
10:55:13 <monqy> i'm spooked out by noises i may or may not be hearing
10:55:24 -!- monqy has quit (Quit: hello).
10:58:19 <elliott_> fizzie: Well, it _is_ generated code.
11:01:01 <elliott_> let rgb = (fromIntegral r `shiftR` 16) .|. (fromIntegral g `shiftR` 8) .|. fromIntegral b
11:01:06 <elliott_> What does it mean if this produces blue for black. :p
11:01:14 <elliott_> Not pure blue, either. I think.
11:01:22 <elliott_> Might be wrong about that one.
11:02:05 <fizzie> If r, g, b are all 0 and you get blue out, that's quite impressive.
11:04:06 <fizzie> It's still quite interesting. But the needed shifts are pretty much always one out of (16, 8, 0), (24, 16, 8), (0, 8, 16) or (8, 16, 24); that's just four alternatives to try.
11:04:09 <Deewiant> It means you're using that as an 8-bit value?
11:04:23 <Deewiant> And later fromIntegral'ing it again to get something bigger
11:04:23 <fizzie> Oh, I guess it could be that too.
11:04:33 <elliott_> let RGB r g b = picture (fromIntegral x, fromIntegral y)
11:04:33 <elliott_> -- SDL.Pixel rgb <- SDL.mapRGB fmt r g b
11:04:33 <elliott_> let rgb = (fromIntegral r `shiftR` 16) .|. (fromIntegral g `shiftR` 8) .|. fromIntegral b
11:04:33 <elliott_> pokeElemOff pixels (x*w + y) rgb
11:04:36 <Deewiant> AFAICT what you've got there is Bits a => a
11:04:37 <elliott_> let pixels = castPtr pxs :: Ptr Word32
11:07:09 <Deewiant> print $ peekElemOff pixels (x*w +y)
11:09:35 <elliott_> Deewiant: =<<, not $... but yeah okay.
11:09:51 <elliott_> But that makes literally no sense.
11:09:57 <Deewiant> I wrote that as traceShow . unsafePerformIO originally but then I realized it was in IO
11:10:07 <elliott_> I mean, pokeElemOff _takes a wordthirtytwo_ here.
11:10:18 <elliott_> So rgb being eight-bit just doesn't work.
11:11:07 <elliott_> Deewiant: Doesn't work, ha, world still makes sense
11:11:19 <elliott_> So I guess I might have my alignment wrong or something??
11:11:23 <elliott_> Deewiant: As in, works, produces same results
11:11:30 <Deewiant> Oh, I thought you meant it doesn't compile :-P
11:13:51 <HackEgo> 26) <ehird> so i can only conclude that it is flawed, or the world is utterly bonkers \ 27) IN EINEM ALTERNATIVEN UNIVERSUM (WO DIE NAZIS WON): <ehird> So kann ich nur schliessen, dass es falsch ist, oder die Welt ist vollig BONKERS. Gegrusset seist du der Fuhrer Hitler! \ 29) PA ET ANNET UNIVERSET DER DE ENESTE PERSONEN OERJAN:
11:15:10 <Deewiant> Right, you probably want shiftL
11:15:36 <elliott_> Now it works, and it's a whole imperceptible faster than the pure version!
11:15:43 <elliott_> Deewiant: I suggest "bigger" and "smaller"
11:16:17 <Deewiant> Since that's what they did for the |^&
11:16:56 <elliott_> Some sort of pack :: (Bits a, Bits b) => [a] -> b would have been a nice addition
11:19:19 <fizzie> Deewiant: Did they do that for ^? I thought Data.Bits did only the middle-finger (.|.) and the (.&.) and then "xor".
11:19:49 <Patashu> I didn't know haskell had the boobies operator
11:21:40 <fizzie> Though (..|.) would be the true middle-finger operator. (Left hand, seen from the front.)
11:22:32 <Patashu> the middle finger should crash haskell
11:27:50 <Deewiant> elliott_: pack ys = go 0 (reverse ys) where go _ [] = 0; go s (x:xs) = fromIntegral x `shiftL` s .|. go (s + bitSize x) xs
11:27:59 <elliott_> Really annoying that this can't be made ...
11:28:03 <elliott_> Deewiant: Yes, I'm aware it can be implemented. :p
11:28:07 <Deewiant> pack :: (Integral a, Bits a, Bits b) => [a] -> b
11:31:08 <elliott_> Deewiant: You can do it with "bit", I think
11:31:09 <Deewiant> pack ys = go 0 (reverse ys) where go _ [] = 0; go s (x:xs) = f x `shiftL` s .|. go (s + size) xs; f x = foldl1' (.|.) [bit i | i <- [0..size-1], x `testBit` i]; size = bitSize $ head ys
11:31:12 <elliott_> To avoid the Integral constr- yeah.
11:31:18 <Deewiant> pack :: (Bits a, Bits b) => [a] -> b
11:31:41 <elliott_> Deewiant: Well, you really want it in the (Bits a) class.
11:31:54 <elliott_> That could just be the deafult.
11:32:10 <Deewiant> Why would you want this in the class
11:32:26 <elliott_> Deewiant: So that it can have the right signature (Bits a, Bits b) => [a] -> b while still being performant
11:32:36 <elliott_> By specialising the implementation to various specific a types
11:32:47 <elliott_> Same reason Bits isn't just like two functions
11:33:14 -!- cheater has quit (Ping timeout: 250 seconds).
11:33:14 <Deewiant> I don't see how this would be specialized
11:33:31 <elliott_> Deewiant: <Deewiant> elliott_: pack ys = go 0 (reverse ys) where go _ [] = 0; go s (x:xs) = fromIntegral x `shiftL` s .|. go (s + bitSize x) xs
11:33:37 <elliott_> There's a fast implementation for any a with Integral
11:33:59 <Deewiant> I'd just make that a separate function :-P
11:34:13 <elliott_> Deewiant: You have no sense of elegance :-(
11:34:42 <elliott_> pack is obviously possible for every (Bits a, Bits b), and so that's the signature it should have; the fact that it's much more efficient with (Integral a) is a reason to put it in the class so that each a can implement it ideally.
11:34:53 <Deewiant> If elegance is big classes look no further than Data.ListTrie.Base.Map
11:35:09 <elliott_> Deewiant: Under the constraints of the language as it is :-)
11:35:22 <elliott_> If I was in charge of things Bits would look like this:
11:35:27 <Deewiant> I'd think that pack isn't the appropriate function to put in the class
11:35:33 <Deewiant> Rather, (Bits a, Bits b) => a -> b is
11:39:51 <Deewiant> bits2bits :: (Bits a, Bits b) => a -> b is sufficiently simple that it could be in the class IMO, but pack isn't
11:45:08 -!- cheater has joined.
11:47:25 -!- Phantom_Hoover has joined.
11:54:22 -!- GreaseMonkey has quit (Quit: The Other Game).
12:02:33 -!- BeholdMyGlory has joined.
12:08:20 -!- Taneb has quit (Ping timeout: 250 seconds).
12:11:39 -!- boily has joined.
12:12:14 -!- Taneb has joined.
12:17:37 <elliott_> `addquote <Phantom_Hoover> The only happy dorf has a compassion stat of 0. <Phantom_Hoover> Well, 20, but it amounts to the same.
12:17:40 <HackEgo> 605) <Phantom_Hoover> The only happy dorf has a compassion stat of 0. <Phantom_Hoover> Well, 20, but it amounts to the same.
12:28:50 -!- hiato has joined.
12:28:50 -!- hiato has quit (Client Quit).
12:30:26 <elliott_> fizzie: Ooh, ooh, what if I parallalemalised my draw loop???
12:30:35 <elliott_> Why poke to one memory location in sequence when you can poke to a HUNDRED?
12:32:18 -!- Taneb has left ("I am outta here").
12:34:41 <lambdabot> Phantom_Hoover: You have 2 new messages. '/msg lambdabot @messages' to read them.
12:34:58 -!- myndzi has quit (Ping timeout: 260 seconds).
12:35:00 <elliott_> Phantom_Hoover: Welcome to, like, four years ago.
12:38:15 -!- guardian has joined.
12:38:34 -!- guardian has left.
12:50:45 <Gregor> elliott_: X11 forwarding accomplished.
12:50:56 <Gregor> (For no good reason 8-D )
12:51:03 <elliott_> Gregor: Well aren't you a shithead I MEAN CONGRATULATIONS
12:51:33 <elliott_> Gregor: Now I need to one-up you :P
12:51:43 <elliott_> Man that's a lot of lines of code.
12:55:46 <Gregor> Oh piffle, it's not even 1,000.
13:11:01 <Gregor> Also mine is more generalizable :P
13:11:45 -!- sllide has joined.
13:12:21 <elliott_> Gregor: And what do you plan to generalise it to? :P
13:13:01 <Gregor> I change the protocol only insofar as it's a push-only protocol now.
13:13:04 <elliott_> Sweet, now you support all three IPv6 hosts :P
13:13:15 <Gregor> No, I just have the ability to support them :P
13:13:52 -!- MSleep has changed nick to MDude.
13:14:08 <fizzie> IPX networking is the best form of networking. (Disclaimer: a context-free comment.)
13:16:37 <elliott_> Gregor: You should switch to epoll for SCALABILITY.
13:17:47 <CakeProphet> why not switch to Scala for SCALAbility. :3
13:18:31 <fizzie> Wait, is it in fact C already?
13:18:36 <fizzie> I don't even know what it's all about.
13:18:50 <elliott_> fizzie: Arbitrary socket multiplexer over tty.
13:19:01 <elliott_> fizzie: The only outside-world communication UML offers is via ttys, so... yeah.
13:19:35 <CakeProphet> "every value is an object!" such a deep paradigm.
13:21:25 <elliott_> Does anyone even like OOP any more? I haven't been keeping track.
13:21:34 <fizzie> That's not strictly speaking true for "UML", though of course I don't know the scenario. (For example, the TUN/TAP uml_net thing requires some root privileges for setting it up.)
13:21:50 <elliott_> fizzie: Well, talk to Gregor; ISTR tun/tap was ruled out for various reasons. slirp too.
13:22:02 <elliott_> Maybe the needing-root + ugliness outruled it. :p
13:22:17 <elliott_> Not that doing it over a tty isn't ugly, but it's also cute.
13:22:23 <CakeProphet> in my second intro to programming class that spent like, a lecture going over recursion.
13:22:24 <fizzie> Needing-root sounds like a reasonable reason not to play with taps.
13:22:28 <Gregor> `run curl http://www.google.com/ 2> /dev/null
13:22:31 <HackEgo> <!doctype html><html><head><meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><meta name="description" content="Search the world's information, including webpages, images, videos and more. Google has many special features
13:22:50 <HackEgo> You get NOTHING! You LOSE! Good DAY sir!
13:22:56 <HackEgo> You get NOTHING! You LOSE! Good DAY sir!
13:22:57 <HackEgo> You get NOTHING! You LOSE! Good DAY sir!
13:23:19 <CakeProphet> whatever problem you're having could be fixed by Perl.
13:23:42 <HackEgo> http://codu.org/projects/hackbot/fshg/index.cgi/raw-file/tip/bin/wl
13:24:00 <HackEgo> You get NOTHING! You LOSE! Good DAY sir!
13:24:04 <elliott_> CakeProphet: Help available at http://codu.org/projects/hackbot/fshg/index.cgi/raw-file/tip/bin/wl
13:24:12 <elliott_> Knowing that wl stands for Wiki-Late might help
13:24:22 <elliott_> It's translation via interwiki
13:24:38 <elliott_> <Vorpal> blah blah blah hägrar
13:24:56 <elliott_> It's good at terms, terrible at sentences :P
13:25:11 <Gregor> I can't get `translate to work ...
13:25:17 -!- Taneb has joined.
13:25:21 <elliott_> proxy_handler = urllib2.ProxyHandler({'http': os.environ['http_proxy']})
13:25:21 <elliott_> opener = urllib2.build_opener(proxy_handler)
13:25:21 <elliott_> urllib2.install_opener(opener)
13:25:29 <HackEgo> http://codu.org/projects/hackbot/fshg/index.cgi/raw-file/tip/bin/translate
13:25:29 <CakeProphet> oh so it takes a language and an article and translates it.
13:25:37 <HackEgo> http://codu.org/projects/hackbot/fshg/index.cgi/raw-file/tip/bin/translatefromto
13:25:46 <CakeProphet> that's actually not a bad translation scheme.
13:25:47 <elliott_> Gregor: Did translate ever work really >_>
13:26:00 <elliott_> Gregor: Does the API even still exist
13:27:09 <Gregor> curl: (52) Empty reply from server >_>
13:27:35 <elliott_> I think that's the headers option anyway
13:27:40 <fizzie> "Important: The APIs included in this family have all been deprecated. Please see each API for details." http://code.google.com/apis/language/
13:27:46 <HackEgo> http://codu.org/projects/hackbot/fshg/index.cgi/raw-file/tip/jp penis
13:27:52 <fizzie> They should still exist, though.
13:27:56 <HackEgo> Traceback (most recent call last): \ File "/hackenv/bin/wl", line 52, in <module> \ q = query(continue_id) \ File "/hackenv/bin/wl", line 44, in query \ response = urllib2.urlopen(url).read() \ File "/opt/python27/lib/python2.7/urllib2.py", line 126, in urlopen \ return _opener.open(url, data,
13:28:13 <elliott_> I... don't know what happened there.
13:28:26 <HackEgo> Traceback (most recent call last): \ File "/hackenv/bin/wl", line 52, in <module> \ q = query(continue_id) \ File "/hackenv/bin/wl", line 46, in query \ print e.reason \ AttributeError: 'HTTPError' object has no attribute 'reason'
13:28:37 <HackEgo> Traceback (most recent call last): \ File "/hackenv/bin/wl", line 52, in <module> \ q = query(continue_id) \ File "/hackenv/bin/wl", line 44, in query \ response = urllib2.urlopen(url).read() \ File "/opt/python27/lib/python2.7/urllib2.py", line 126, in urlopen \ return _opener.open(url, data,
13:28:58 <HackEgo> http://codu.org/projects/hackbot/fshg/index.cgi/raw-file/tip/paste/paste.12766
13:29:11 <Gregor> Weird, it seems that Google Translate's "auto" doesn't work anymore ...
13:29:21 <Gregor> And the rest of the service is ... intermittent.
13:29:22 <Gregor> `translatefromto es en Hola
13:29:26 <HackEgo> Traceback (most recent call last): \ File "/hackenv/bin/json", line 4, in <module> \ data = json.loads(sys.stdin.read().decode('utf-8')) \ File "/opt/python27/lib/python2.7/json/__init__.py", line 310, in loads \ return _default_decoder.decode(s) \ File "/opt/python27/lib/python2.7/json/decoder.py", line 346,
13:29:35 <Gregor> <Gregor> `translatefromto es en Hola
13:29:55 <elliott_> Gregor: I suspect your proxy is crapping out somehow :P
13:30:01 <elliott_> Because "" is not an HTTP header line, yo.
13:30:28 <Gregor> `run curl http://www.google.com/ 2> /dev/null
13:30:30 <HackEgo> <!doctype html><html><head><meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><meta name="description" content="Search the world's information, including webpages, images, videos and more. Google has many special features to
13:30:31 <Gregor> `run curl http://www.google.com/ 2> /dev/null
13:30:33 <HackEgo> <!doctype html><html><head><meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><meta name="description" content="Search the world's information, including webpages, images, videos and more. Google has many special features to
13:30:34 <Gregor> `run curl http://www.google.com/ 2> /dev/null
13:30:36 <HackEgo> <!doctype html><html><head><meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><meta name="description" content="Search the world's information, including webpages, images, videos and more. Google has many special features to
13:30:38 <Gregor> Idonno, I don't think it is.
13:30:40 <fizzie> Manually curling that URL seems to work pretty reliably.
13:30:42 <fizzie> $ curl -e http://codu.org/ http://ajax.googleapis.com/ajax/services/language/translate --data-urlencode v=1.0 --data-urlencode q=Hola --data-urlencode langpair='es|en' ; echo
13:30:42 <fizzie> {"responseData": {"translatedText":"Hello"}, "responseDetails": null, "responseStatus": 200}
13:30:51 <Gregor> fizzie: Not from Codu >_>
13:30:55 <fizzie> See how I used your ajax-site name too.
13:31:30 <elliott_> <elliott_> Gregor: I suspect your proxy is crapping out somehow :P
13:31:30 <elliott_> <elliott_> Because "" is not an HTTP header line, yo.
13:31:40 <Gregor> Oh, I didn't see that ...
13:31:43 <fizzie> I'd like to know how many queries they get from "http://www.my-ajax-site.com" literally, because that's in the curl examples of the API doc.
13:31:56 <Gregor> fizzie: They may very well reject that.
13:31:58 <elliott_> http://www.my-ajax-site.com/ <-- nice
13:32:05 <elliott_> Gregor: But what about the owners of http://www.my-ajax-site.com/? :P
13:32:15 <elliott_> You'd think Google would just snap up that domain for example purposes.
13:33:28 <Gregor> OK OK, so obviously something can go wrong here X-D
13:34:11 <Gregor> But I'm not fixing it now! So foo 2 u!
13:35:12 <HackEgo> /home/hackbot/hackbot.hg/multibot_cmds/lib/limits: line 5: exec: ghc: not found
13:35:20 <elliott_> Gregor: Hey, can I build GHC in HackEgo?
13:35:21 <Gregor> <elliott_> BAD WORK GREGOR
13:35:29 <Gregor> elliott_: Doubtful, it has a 30sec timeout :P
13:35:42 <elliott_> Gregor: I'm sure that's circumventable... cronjob?
13:35:57 <Gregor> elliott_: If you can configure in <30sec, you could do the rest in successive makes 8-D
13:36:15 <elliott_> Sweeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeet
13:36:23 <elliott_> There's only like a billion make invocations to do
13:36:35 <elliott_> Gregor: OK, I'll do the reasonable thing and install a binary build :P
13:36:47 <elliott_> Gregor: Is there any way for me to change the PATH, or do you have to do that?
13:36:54 <elliott_> I guess there might be a .profile or sth I could edit
13:37:04 <elliott_> (I don't want to clutter bin so I'm thinking about creating local/)
13:37:10 <elliott_> Gregor: Meh, I can just symlink local/bin
13:37:17 <Gregor> That'd be good *shrugs*
13:37:18 <HackEgo> /home/hackbot/hackbot.hg/multibot_cmds/lib/limits: line 5: exec: arch: not found
13:37:28 <HackEgo> Linux (none) 3.0.1-umlbox #5 Fri Aug 19 13:17:44 UTC 2011 x86_64 GNU/Linux
13:37:34 <Gregor> Incidentally, enjoy the 10MB file limit.
13:37:40 <elliott_> Gregor: Does `fetch have... right.
13:37:52 <elliott_> Gregor: What would you say about increasing that by, say, 99 megabytes?
13:38:10 <elliott_> I got 99 megabytes but GHC ain't one.
13:38:20 <Gregor> No, it appears to be ~12
13:38:46 <HackEgo> \ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html><head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>ERROR: The requested URL could not be retrieved</title> <style type="text/css"><!-- %l body :lang(fa) { direction: rtl; font-size: 100%;
13:38:48 <Gregor> Hm, come to think of it, did I ever bother to make fetch honor the size limit? X-D
13:38:59 <Gregor> `fetch http://www.haskell.org/ghc/dist/6.2.2/ghc-6.2.2-i386-unknown-linux.tar.bz2
13:38:59 <elliott_> `fetch http://haskell.org/ghc/dist/7.2.1/ghc-7.2.1-x86_64-unknown-linux.tar.bz2
13:39:23 <Gregor> elliott_: I just typed "GHC binaries" into Google 8-D
13:39:25 <elliott_> Like, really really really ancient.
13:40:01 <elliott_> Gregor: Well this will be fun :P
13:40:07 <HackEgo> -rw-r--r-- 1 5000 0 10485760 Aug 19 13:40 ghc-6.2.2-i386-unknown-linux.tar.bz2 \ -rw-r--r-- 1 5000 0 10485760 Aug 19 13:40 ghc-7.2.1-x86_64-unknown-linux.tar.bz2
13:40:09 <elliott_> At least yours is probably smaller :P
13:40:13 <elliott_> `run rm ghc-6.2.2-i386-unknown-linux.tar.bz2
13:40:17 <Gregor> Note questionable file size.
13:40:38 <elliott_> Well, I could split it up into multiple files and upload them, or you could add haskell.org to the proxy whitelist :-D
13:40:48 <Gregor> I'll do the latter, you can just pipe into tar.
13:41:07 <elliott_> Gregor: Come to think of it, what's the quota?
13:41:27 <Gregor> There is no full quota, I just made an immediate filesize limit to prevent stupid abuse.
13:41:37 <Gregor> Clever abuse is allowed :P
13:41:42 <elliott_> So I don't actually have to pipe into tar. :p
13:41:49 <elliott_> I've always been scared of doing that.
13:41:56 -!- Taneb has quit (Ping timeout: 250 seconds).
13:42:00 <Gregor> elliott_: The filesize limit is enforced by ulimit, not me.
13:42:06 <Gregor> So you do have to pipe into tar.
13:42:25 <elliott_> Gregor: Umm, so, wait, a filesize limit of twelve megs?
13:42:37 <elliott_> Gregor: I'm fairly sure that the resulting GHC binary is bigger than that
13:42:48 <elliott_> -rwxr-xr-x 1 root root 41M 2011-06-27 10:38 /usr/local/lib/ghc-7.0.4/ghc
13:43:23 <elliott_> Gregor sure likes me right now :P
13:44:06 <Gregor> Maybe I'll just install GHC :P
13:44:13 <elliott_> Gregor: You really don't want the distro package.
13:44:25 <elliott_> Not only will it be ancient in GHC terms, the packages tend to be really bad :P
13:44:43 <elliott_> But hey, let's try and untar this thing.
13:44:55 <elliott_> `run curl http://haskell.org/ghc/dist/7.2.1/ghc-7.2.1-x86_64-unknown-linux.tar.bz2 | tar xj
13:45:12 <HackEgo> % Total % Received % Xferd Average Speed Time Time Time Current \ Dload Upload Total Spent Left Speed \ . 0 108M 0 3630 0 0 9799 0 3:14:14 --:--:-- 3:14:14 9799. 0 108M 0 29208 0 0 30234 0 1:02:57 --:--:-- 1:02:57 42916. 0 108M
13:45:12 <elliott_> Gregor: Is your connection fast enough to download that in thirty seconds
13:45:39 <HackEgo> 1 \ babies \ bin \ bluhbluh \ canary \ env \ foo \ ghc-7.2.1 \ paste \ ps \ quine.pl \ quine2.pl \ quine3.pl \ quotes \ quotese \ tekst \ test.c \ tmp.tmp \ warez \ тэкст
13:45:46 <HackEgo> INSTALL \ LICENSE \ Makefile \ README \ config.guess \ config.sub \ configure \ driver \ ghc \ inplace \ install-sh \ libraries \ mk \ packages \ settings.in \ utils
13:46:06 <elliott_> Gregor: Wouldn't a quota be simpler than a filesize limit :P
13:46:19 <Gregor> elliott_: The quota would have to be enormous X_X
13:46:25 <Gregor> Everything slows down when the FS is too full y'know.
13:46:52 <elliott_> Gregor: I could try and use the fancy Haskell dynamic linking stuff if you want
13:47:48 <Gregor> elliott_: wtf is in this binary package.
13:47:51 <Gregor> I can't find any binaries.
13:48:06 * elliott_ SIGHS, says something about luddites.
13:48:11 * elliott_ downloads it himself to check.
13:48:27 <elliott_> Gregor: The filesize limit will have got them
13:48:36 <Gregor> elliott_: I just downloaded it here.
13:48:56 <elliott_> Gregor: You can find the ghc shell script though, right?
13:48:59 <Gregor> # find . -name ghc | xargs file
13:49:00 <Gregor> ./driver/ghc: directory
13:49:00 <Gregor> ./compiler/stage2/doc/html/ghc: directory
13:49:20 * elliott_ waits for the binary distribution to download here.
13:49:24 <CakeProphet> can someone explain what is going on here: http://images.4chan.org/b/src/1313761772927.jpg
13:49:25 <elliott_> Gregor: Why are you doing that as root
13:49:53 <Patashu> CakeProphet that picture is...really attractive for some reason
13:50:03 <Gregor> CakeProphet: The world is becoming a better place.
13:51:16 <elliott_> Gregor: So what if you multiplied the filesize limit by ten, WHAT IF :P
13:51:19 <CakeProphet> I kind of want a large framed version of this picture: http://images.4chan.org/b/src/1313761741129.jpg
13:53:04 <elliott_> Gregor: You will have your answer in FIVE SECONDS
13:54:29 <elliott_> Gregor: compiler/stage[two]/build/ has a bunch of object files.
13:54:47 <Gregor> Yeah ... OBJECT FILES.
13:54:50 <elliott_> ghc-7.2.1/ghc/stage2/build/tmp/ghc-stage2 is ONE GHC :P
13:55:05 <Gregor> This is the worst binary distribution EVER.
13:55:24 <elliott_> Gregor: That might be the one and only GHC :P
13:55:34 <elliott_> Gregor: It's not that bad, it just uses the same directory structure as the build does
13:55:41 <Gregor> WTF, you have to configure-make-install!
13:55:43 <elliott_> Which happens to be poorly-fitted
13:55:50 <elliott_> Which lets it support different bindirs etc.
13:55:51 <Gregor> What sort of binary distribution requires a make-install???
13:55:56 <elliott_> <elliott_> Which lets it support different bindirs etc.
13:56:08 <Gregor> What sort of a binary distribution ISN'T PREFIX INDEPENDENT?
13:56:14 <elliott_> Or do you want to write two pieces of install code, one for source and one for binary builds
13:56:22 <elliott_> Gregor: GHC has a bunch of spec files that aren't quite, IIRC
13:56:43 <elliott_> Gregor: The Unix binary builds are for bootstrapping your own build, nothing else :P
13:56:43 <Gregor> OK, now to install it properly :P
13:57:02 <elliott_> Gregor: You're going to cheat me out of the opportunity to show off my leet HackEgo skillz?
13:57:06 <elliott_> Well, I guess I still get to do cabal-install.
13:57:28 <HackEgo> ghc: no input files \ Usage: For basic information, try the `--help' option.
13:57:29 <HackEgo> The Glorious Glasgow Haskell Compilation System, version 7.2.1
13:57:45 <HackEgo> <command line>: can't load .so/.DLL for: libgmp.so (libgmp.so: cannot open shared object file: No such file or directory)
13:57:49 <elliott_> <HackEgo> <command line>: can't load .so/.DLL for: libgmp.so (libgmp.so: cannot open shared object file: No such file or directory)
13:58:04 <elliott_> Gregor: Dude, just --prefix=/hackenv/local
13:58:11 -!- Patashu has quit (Quit: MSN: Patashu@hotmail.com , Gmail: Patashu0@gmail.com , AIM: Patashu0 , YIM: patashu2 .).
13:58:29 <CakeProphet> what do you think the command "choad" should do?
13:58:36 <Gregor> elliott_: The problem is that the environment is cloned per `-command.
13:58:40 <elliott_> CakeProphet: Change a file's oad.
13:58:43 <Gregor> elliott_: Cloning an 800MB environment = lol.
13:59:02 <elliott_> Gregor: 832M/home/elliott/.cabal
13:59:06 <elliott_> Gregor: That might happen anyway :P
13:59:11 <Gregor> Welp, I'm not fixing this, I'm already on my way away so BAHEE
14:01:12 <CakeProphet> elliott_: that just means you can use your hackego skillz
14:11:18 <CakeProphet> hmm, the set of floating point numbers is countable isn't it?
14:13:02 <CakeProphet> and the difference between floating point numbers and real numbers is the infinite precision numbers such as 0.333.. and pi
14:15:09 <elliott_> <CakeProphet> hmm, the set of floating point numbers is countable isn't it?
14:15:12 <elliott_> they fit in the universe, so yes.
14:15:28 <elliott_> the set of floating point numbers of a certain bit width is of course finite.
14:17:03 <CakeProphet> so there's no one-to-one mapping of a physical quantity to the real numbers either.
14:20:14 <CakeProphet> aka the real numbers dont "fit in the universe"
14:21:05 -!- derrik has joined.
14:24:20 <CakeProphet> I need to install this: http://www.nuget.org/List/Packages/Selenium.RC
14:24:27 <CakeProphet> which apparently requires the nuget package manager
14:24:34 <CakeProphet> which apparently requires... visual fucking studio
14:27:59 <CakeProphet> I swear this is the last time I try to port .NET stuff to linux.
14:36:39 <lambdabot> forall a (m :: * -> *) b. (Monad m) => [a] -> (a -> m b) -> m ()
14:36:49 <lambdabot> Control.Concurrent forkIO :: IO () -> IO ThreadId
14:37:38 <CakeProphet> elliott_: if you lost ghci on your system a good way to find would be to open your terminal and type sudo find / -name ghci
14:37:56 <elliott_> CakeProphet: my ghc doesn't have hoogle.
14:37:58 <CakeProphet> you may be asked to provide an administrator password. This is because sudo runs the command as root.
14:40:09 <CakeProphet> elliott_: well yeah, but you wouldn't need it if you were just looking up the type of forkIO
14:40:17 <elliott_> CakeProphet: I'd have to remember the module it was in
14:40:57 <CakeProphet> by the way you should probably use STM as well
14:42:58 <CakeProphet> I wonder why STM doesn't have a MonadIO instance..
14:43:10 <CakeProphet> I guess since it would be kind of terrible?
14:44:24 <elliott_> atomically does not have the right type for liftIO.
14:44:33 <elliott_> STM is not in IO, and of course it would break completely with an IO instance.
14:44:34 <lambdabot> It could refer to either `Control.Monad.Error.liftIO', imported from Control.Monad.Error
14:44:34 <lambdabot> or `Control.Monad.Logic.liftIO', imported from Control.Monad.Logic
14:44:46 <elliott_> liftIO :: (MonadIO m) => IO a -> m a
14:45:24 -!- copumpkin has quit (Remote host closed the connection).
14:45:49 -!- copumpkin has joined.
14:52:19 -!- zzo38 has joined.
14:56:11 -!- CakeProphet has quit (Ping timeout: 276 seconds).
14:57:45 -!- CakeProphet has joined.
14:57:45 -!- CakeProphet has quit (Changing host).
14:57:45 -!- CakeProphet has joined.
15:04:45 <elliott_> forM_ rendered $ \((x,y), rgb) -> do
15:04:45 <elliott_> pokeElemOff pixels (truncate (x*fromIntegral w) * w + truncate (y*fromIntegral h)) rgb
15:04:49 <elliott_> How can that take any appreciable time at ALL X_X
15:08:56 <Gregor> <elliott_> I hate you.
15:09:32 <CakeProphet> what's great is that you just quote that at any point in a conversation with elliott
15:12:13 <Gregor> I was merely predicting (incorrectly) a response :P
15:14:30 <CakeProphet> <CakeProphet> am happy to join with you today in what will go down in history as the greatest demonstration for freedom in the history of our nation.
15:14:59 <CakeProphet> <CakeProphet> Five score years ago, a great American, in whose symbolic shadow we stand today, signed the Emancipation Proclamation. This momentous decree came as a great beacon light of hope to millions of Negro slaves who had been seared in the flames of withering injustice. It came as a joyous daybreak to end the long night of their captivity.
15:16:11 <HackEgo> 155) <CakeProphet> how does a "DNA computer" work. <CakeProphet> von neumann machines? <Phantom_Hoover> CakeProphet, that's boring in the context of DNA. <Phantom_Hoover> It's just stealing the universe's work and passing it off as our own. \ 156) <fungot> CakeProphet: reading herbert might be enlightening in one hand he held
15:19:47 -!- pingveno has quit (Ping timeout: 246 seconds).
15:41:49 <Gregor> NYAN NYAN NYANNYAN NYAN NYANNYANNYANNYAN NYANNYAN NYAN NYAN NYANNYAN NYAN NYANYANYANYANYANYANYANYAN
15:43:33 -!- Taneb has joined.
15:47:37 -!- derrik has left.
16:08:14 -!- sllide has quit (Read error: Connection reset by peer).
16:13:18 -!- Taneb has quit (Ping timeout: 268 seconds).
16:14:53 -!- sllide has joined.
16:28:38 * CakeProphet loves trying to explain why they're not going to get what they want.
16:29:14 <sllide> is it possible to access ring 0 in windows?
16:29:29 <sllide> even if it is a exploit
16:33:19 -!- oerjan has joined.
16:34:48 <CakeProphet> I wonder if this guy realizes that cacheing completely eliminates the problem he's inventing for himself.
16:34:53 <elliott_> CakeProphet: dude did you do my idea
16:34:58 <elliott_> just download to a /tmp file with http lib
16:35:12 <CakeProphet> yes, but it's not complete because of things he didn't specify until after I started working on it.
16:35:31 <CakeProphet> specifically he wants to be able to get canvas data
16:35:39 <elliott_> "I'm sure those stories on The Daily WTF aren't representative," they say
16:35:51 <elliott_> "And I'm good at programming, so it sounds like easy money!"
16:36:14 <CakeProphet> which requires javascript I believe, and a sensible DOM model
16:37:16 <elliott_> i cant think of anything nicer
16:37:21 <elliott_> CakeProphet: but why not just bind to mshtml directly
16:37:27 <elliott_> if you're going down that route
16:37:37 <elliott_> oh hmm looks like selenium might not be ie-only nowadays
16:37:42 <fizzie> Try using that proprietaryish Awesomium thing. Though at least the open-source AwesomiumSharp bit didn't seem to have any sort of DOM access either.
16:38:02 <CakeProphet> selenium is a browser automation thing, I don't think it's IE-specific..
16:50:11 <oerjan> `addquote <Vorpal> elliott_, oh they are people known in the ruby community? <elliott_> Vorpal: Uh... you mean Hannah Montana? <Vorpal> elliott_, yeah. And Zed Shaw. Either they are that or they come from popular culture.
16:50:14 <HackEgo> 606) <Vorpal> elliott_, oh they are people known in the ruby community? <elliott_> Vorpal: Uh... you mean Hannah Montana? <Vorpal> elliott_, yeah. And Zed Shaw. Either they are that or they come from popular culture.
16:52:22 <oerjan> i should _maybe_ disclose that i have just the barest clue who hannah montana is, myself. now to wikipedia.
16:52:46 <elliott_> oerjan: famous ruby programmer from the show Hannah Montana and Zed Shaw
16:53:13 <oerjan> by "barest" i mean enough to know she's not a ruby programmer.
16:53:17 <elliott_> Zed Shaw is just an ordinary schoolkid... OR IS HE??? Secretly he performs as the hit singer ZED SHAW (in capitals). Hannah Montana saves the day by programming all his stage effects.
16:53:33 <elliott_> One day this show will become reality and humanity will have justified its existence.
16:54:34 <HackEgo> 601) <monqy> mmm these music samples are still so tasteful
16:54:41 <HackEgo> 602) <monqy> im sampling ultra hip holiday <monqy> hes the boogie woogie santa clause <monqy> switching to oktoberfest <monqy> yes i would love to shop to this
16:54:49 <HackEgo> 603) <monqy> im hungary too...but cnnot eat until hours
16:54:52 <HackEgo> 604) <monqy> i am out of all the fame loops <monqy> and the australien soap opera loops <monqy> so much loop / s omcuh
16:54:58 <HackEgo> 605) <Phantom_Hoover> The only happy dorf has a compassion stat of 0. <Phantom_Hoover> Well, 20, but it amounts to the same.
16:55:02 <elliott_> monqy was funny this morning and also i was tired
16:56:44 <elliott_> oerjan: so wait do you logread quotes now
16:59:05 <oerjan> um no it's just that we were only at 600 yesterday or so
16:59:08 <elliott_> oerjan: also my haskell program is really slow help thanks
16:59:31 <oerjan> ah performance, a thing i know little about.
17:00:06 <elliott_> oerjan: but i think its something to do with laziness??? or maybe just calling a function 250,000 times inherently takes multiple seconds in haskell??
17:01:01 <oerjan> maybe you are recomputing something
17:01:08 <CakeProphet> I wonder if C# allows optional arguments to also be out arguments.
17:01:17 <elliott_> checkerboard :: Double -> Picture RGB
17:01:17 <elliott_> | even (floor x') /= even (floor y') = white
17:01:18 <elliott_> is the function for what it's worth (pre-applied to n)
17:02:48 <elliott_> rotate :: Double -> Picture a -> Picture a
17:02:49 <elliott_> rotate r p (x,y) = p (x * cos r - y * sin r, x * sin r + y * cos r)
17:02:52 <elliott_> but it takes multiple seconds even without that
17:03:13 <elliott_> oerjan: i even... optimised my rendering loop after it calculates all the pixels... and that still takes like a second or two :(
17:03:16 <elliott_> forM_ rendered $ \((x,y), rgb) -> do
17:03:17 <elliott_> pokeElemOff pixels (truncate (x*fromIntegral w) * w + truncate (y*fromIntegral h)) rgb
17:03:18 -!- myndzi has joined.
17:03:32 <oerjan> ah rotate, otherwise i'd have suggested caching either x or y
17:03:36 <CakeProphet> "Can't specify a default value for the out parameter" baaaah
17:03:47 <elliott_> oerjan: well the idea is to be able to draw any Picture generically, so :D
17:04:03 <elliott_> oerjan: in fact the _idea_ is to draw like, at least thirty per second as an animation.
17:04:04 <Deewiant> checkerBoard n (x,y) = if ((==) `on` (even.floor.(/n))) x y then black else white
17:04:11 <elliott_> as opposed to one per every five years
17:04:27 <oerjan> elliott_: btw you can optimize it to odd (floor x' - floor y'), i think
17:04:31 <elliott_> Deewiant: Awesome, now it's harder to read and isn't even point-free; thanks
17:04:41 <Deewiant> I find that much easier to read
17:04:47 <elliott_> oerjan: I have my doubts that optimisation will do barely anything
17:05:47 <oerjan> what happens if you inline the x' and y' definitions
17:05:48 <elliott_> Hmm, I could try and make it symbolic somehow and compile the images to a more efficient representation, but I refuse to believe that generating a 500x500 image from function calls has to take this long in Haskell
17:06:11 <Deewiant> And I assumed you wouldn't want the if' version anyway, and if' is needed to make it point-free
17:08:45 <elliott_> Hmph, RebindableSyntax doesn't affect guards
17:08:46 <oerjan> elliott_: i am somewhat suspicious of the way you pattern match into a tuple. that certainly makes things lazy, perhaps ghc doesn't even recognize x' is x/n
17:09:04 <CakeProphet> I just tried to do a perl-style one-line if in C#.....
17:09:20 <oerjan> you _can_ say where x' = x/n; y' = y/n you know
17:09:43 <elliott_> oerjan: ok, let me be more explicit: even the picture (const black) renders at a similar speed
17:10:30 <elliott_> coords :: (Int, Int) -> [Point]
17:10:30 <elliott_> coords (w,h) = [ (fromIntegral x / (fromIntegral w - 1)
17:10:30 <elliott_> ,fromIntegral y / (fromIntegral h - 1))
17:10:30 <elliott_> | x <- [0..w-1], y <- [0..h-1] ]
17:10:30 <elliott_> render :: Picture RGB -> (Int, Int) -> [(Point,Word32)]
17:10:31 <elliott_> render pic = parMap rseq (\p -> (p, process (pic p))) . coords
17:10:33 <elliott_> where process (RGB r g b) = (fromIntegral r `shiftL` 16) .|. (fromIntegral g `shiftL` 8) .|. fromIntegral b
17:10:42 <elliott_> I don't know if the parMap helps, but it doesn't seem to hurt much :)
17:11:47 <CakeProphet> cannot implicitly convert System.Diagnostics.Process to void
17:11:50 <elliott_> I'm secretly waiting for Deewiant to point to my obvious call to goSlow
17:12:07 -!- calamari has joined.
17:12:41 <oerjan> way over my head i think
17:13:06 <CakeProphet> elliott_: it probably has something to do with that goSlow call.
17:13:13 <CakeProphet> ...how would one implement goSlow in Haskell?
17:14:06 <oerjan> > let goSlow x = repeat x !! 10000000 in goSlow "test"
17:14:17 <oerjan> > let goSlow x = repeat x !! 100000000 in goSlow "test"
17:14:22 <oerjan> > let goSlow x = repeat x !! 1000000000 in goSlow "test"
17:15:01 <CakeProphet> I guess there are infinitely many ways to write a slow id function.
17:15:27 <CakeProphet> you could even use unsafePerformIO to throw in some sleep calls, allowing program-specified waits.
17:17:31 <elliott_> can i have an exclamation mark
17:18:08 <elliott_> !haskell {-# LANGUAGE RebindableSyntax #-}
17:18:17 <EgoBot> /tmp/input.24616.hs:1:13: unsupported extension: RebindableSyntax
17:18:18 <elliott_> !haskell {-# LANGUAGE RebindableSyntax #-} main = print "help"
17:18:22 <elliott_> nooooooooooooooooOOOoooooooOOOOoooooOOooooOOoooooo
17:18:22 <EgoBot> /tmp/input.24674.hs:1:13: unsupported extension: RebindableSyntax
17:18:40 <oerjan> elliott_: EgoBot's ghc is too old
17:18:51 <HackEgo> ghc: no input files \ Usage: For basic information, try the `--help' option.
17:19:16 -!- myndzi has quit (Read error: Operation timed out).
17:19:23 <oerjan> (didn't elliott_ teach me this just the other day?)
17:20:02 <elliott_> i think so but i doubt it can do what i want
17:20:09 <oerjan> oh HackEgo also has ghc now?
17:20:17 <HackEgo> The Glorious Glasgow Haskell Compilation System, version 7.2.1
17:20:30 <elliott_> i'm planning on getting cabal-install set up once gmp is in
17:20:48 <elliott_> /home/elliott/Code/airy/foo.hs:7:7:
17:20:48 <elliott_> GHC internal error: `ifThenElse' is not in scope during type checking, but it passed the renamer
17:20:48 <elliott_> tcg_type_env of environment: []
17:20:48 <elliott_> In the expression: if False then 9 else 0
17:20:49 <elliott_> In an equation for `foo': foo = if False then 9 else 0
17:21:20 <elliott_> oh I need to give ifThenElse a type sig
17:23:23 <elliott_> /home/elliott/Code/airy/foo.hs:11:5: Not in scope: `>>'
17:23:23 <elliott_> /home/elliott/Code/airy/foo.hs:12:5: Not in scope: `otherwise'
17:23:23 <elliott_> /home/elliott/Code/airy/foo.hs:12:5: Not in scope: `>>'
17:23:58 <oerjan> do syntax desugars to it
17:24:37 <oerjan> well that's where i'd expect >> from
17:24:57 <oerjan> you can use True instead of otherwise
17:25:13 <oerjan> although wouldn't that also be out of scope...
17:25:39 <elliott_> oerjan: um how would any of that use >>?
17:25:44 <elliott_> oh desugaring to calls to guard?
17:26:08 <elliott_> but I don't see how guards would use >>?
17:26:09 <oerjan> er can you change the meaning of guards?
17:26:20 <elliott_> that is what i am trying to do
17:26:21 <oerjan> elliott_: er are you sure that's all you're compiling?
17:26:31 <elliott_> its telling me about (>>) missing on those lines
17:26:50 <oerjan> is that the whole file?
17:26:57 <elliott_> -# LANGUAGE RebindableSyntax #-}
17:26:58 <elliott_> import Prelude (Bool(..), fromInteger)
17:26:58 <elliott_> ifThenElse :: b -> a -> a -> a
17:27:04 <elliott_> without bar, all compiles fine
17:27:07 <elliott_> lines about missing (>>) are on the two guard lines of bar
17:28:39 <oklopol> elliott_ are you in a university yet
17:28:40 <oerjan> maybe it does desugar to something with >>. what if you remove the False line?
17:29:41 <elliott_> oerjan: same error, just on the one guard line
17:30:15 <oklopol> elliott_: why aren't you in a university yet
17:31:29 <oklopol> could you tell me the least relevant of those
17:31:30 <Gregor> Transact-SQL, Ada, and some crazy IBM language called RPG (dating from 1959) are all in Tiobe's top 20 programming languages list.
17:32:19 -!- Taneb has joined.
17:32:30 -!- Vorpal has quit (Quit: ZNC - http://znc.sourceforge.net).
17:32:45 <Taneb> Ada Byron, Countess of Lovelace?
17:32:47 <Gregor> I didn't mention that Pascal's there, because I can believe it :P
17:35:16 -!- Vorpal has joined.
17:35:16 <oerjan> as far as you can throw her
17:35:32 <oerjan> also, throwing ladies is not advisable
17:36:16 <oklopol> was that a pun on trust vs thrust?
17:36:53 <oklopol> because i totally don't get it
17:36:54 -!- calamari has quit (Quit: Leaving).
17:37:08 <oerjan> it was a pun on a known phrase.
17:37:16 <Gregor> Not known to oklopol, obviously.
17:37:38 <Gregor> But then, I couldn't throw oklopol particularly far anyway *shrugs*
17:39:05 <oerjan> yeah oklopol is so untrustable
17:40:19 <Gregor> oklopol: That is our intent :P
17:40:50 <oklopol> i'm so confused i'm having a question mark shaped erection
17:40:52 <elliott_> oklopol's such a famous bisexual
17:40:57 <elliott_> that's why we shouldn't throw him far.
17:41:53 <oerjan> http://idioms.thefreedictionary.com/I+wouldn't+trust+as+far+as+I+could+throw
17:42:35 <oerjan> i'm such a euronous person
17:42:52 <oklopol> i think i've heard that, and i totally get it
17:48:29 <elliott_> MAIN MAIN 1 0 0.0 0.0 100.0 100.0
17:48:31 <elliott_> main Main 340 2 5.3 0.0 100.0 100.0
17:48:31 <elliott_> draw Main 341 1 5.3 0.0 94.7 100.0
17:48:31 <elliott_> render Main 342 1 63.2 67.9 89.5 100.0
17:48:32 <elliott_> picture Main 345 250000 0.0 0.0 0.0 0.0
17:48:35 <elliott_> coords Main 343 1 26.3 32.1 26.3 32.1
17:48:42 <elliott_> oerjan: looks like coords isn't doing me much good
17:50:33 <CakeProphet> man this guy sure does waste a lot of time with proof of concepts.
17:50:45 <CakeProphet> oh well, as long as I get paid for them. :P
17:51:32 <elliott_> oerjan: meanwhile, turns out that turning on optimisation makes things a lot better :D
17:52:07 <elliott_> picture Main 344 250000 5.7 2.3 88.6 83.8
17:52:07 <elliott_> checkerboard Main 349 249999 57.1 71.7 57.1 71.7
17:52:08 <elliott_> rotate Main 345 250000 25.7 9.8 25.7 9.8
17:52:21 <elliott_> render Main 342 1 5.7 16.2 94.3 100.0
17:58:50 <oklopol> he could still be finland's youngest phd ever
17:59:04 <oklopol> but no, he's haskellbating
18:01:50 <Taneb> Who are we talking about?
18:02:30 <Taneb> I don't haskellbate
18:02:35 <Taneb> I pretend to to look cool
18:03:50 <oklopol> falsely admit they pretend to to look cool so that they'd not seem cool but actually do it but are ashamed of being cool.
18:04:06 <elliott_> oklopol: aren't you going to be finland's youngest phd ever first
18:04:45 <oklopol> probably i won't even be the youngest phd in our department
18:04:45 <Phantom_Hoover> You can't be Finland's youngest PhD, I'm Finland's youngest PhD.
18:05:26 <oklopol> break the record i mean, i certainly will be the youngest until mister x phd's up
18:06:16 <oklopol> if i wanted to, i guess i could make a low quality phd thesis with the results i have now and possibly break the record for math
18:06:33 <oklopol> the 21yo guy was in philosophy, so it doesn't really count
18:07:49 <oerjan> philosophers don't count, that's far too concrete for them
18:09:50 <oerjan> except bertrand russell, who managed to get to 1+1=2
18:10:25 <elliott_> oerjan: well it is now fast enough to dispaly a very choppy rotating checkerboard
18:10:42 <elliott_> interestingly the pointer manipulation seems to be taking all the time rather than the renderin
18:11:02 <oklopol> some guy just did a math phd at 20
18:12:41 <elliott_> oerjan: awesome, my program segfaults when I ctrl+C it _only_ when profiling is turned on
18:13:17 <oklopol> if only i'd met a single person in my life that wasn't an idiot, i could've skipped elementary and high school and made something of myself
18:13:44 <elliott_> oerjan: wait you said odd (floor x' - floor y') would be an optimisation right?
18:13:52 <elliott_> oerjan: I have this hunch that truncate is faster than floor
18:14:12 <elliott_> ...but I shouldn't try to optimise the image itself, because if it can't handle a slightly imperfect checkerboard... :D
18:15:32 <oerjan> > [truncate, floor, round, ceiling] <*> [-2.7, -2.2, 1.3, 3.8]
18:15:33 <lambdabot> [-2,-2,1,3,-3,-3,1,3,-3,-2,1,4,-2,-2,2,4]
18:16:42 <oerjan> i dunno, probably CPU dependent?
18:17:09 <oerjan> or wait truncate should be just a bitshift
18:18:10 <oerjan> but it's the same for positives
18:20:20 <oerjan> interestingly odd (truncate x) could probably be calculated directly from the bit pattern of x
18:20:37 <oerjan> without actually doing a full conversion
18:22:58 <elliott_> running out of optimisation opportunities, here...
18:23:09 <elliott_> render :: Picture RGB -> (Int, Int) -> [Word32]
18:23:09 <elliott_> withStrategy (parListChunk 128 rseq)
18:23:14 <elliott_> where !w' = fromIntegral w - 1 :: Double
18:23:16 <elliott_> !h' = fromIntegral h - 1 :: Double
18:23:20 <elliott_> let loop _ [] = SDL.flip surface
18:23:22 <elliott_> loop p (x:xs) = poke p x >> loop (p `plusPtr` sizeOf x) xs
18:23:30 <elliott_> if GHC isn't smart enough to avoid consing the list up in the first place, then I could save by folding render into draw
18:24:22 <oerjan> i somehow doubt you can avoid consing a list and parallelizing its evaluation simultaneously
18:24:59 <elliott_> oerjan: otoh you can still chunk that stuff trivially
18:25:09 <elliott_> because it's just chunking over the range of coordinates, essentially
18:26:07 <elliott_> oerjan: of course the fact that I'm managing about four frames per second should be a clue that there is _no_ way this is going to work as a smooth animation solution
18:26:17 -!- myndzi has joined.
18:26:23 <elliott_> since i'm running out of tuning :P
18:26:59 <elliott_> oerjan: looking at my standard Blatantly Ignored But Almost Directly Identical Prior Work, looks like Conal's Pan takes the symbolic route and compiles things to a less stupid representation for a procedural image than a haskell function
18:27:22 <oerjan> isn't one supposed to send polygons or something for OpenGL to handle these days, anyway
18:28:43 -!- Sgeo_ has joined.
18:28:49 <oerjan> if you s/Work/Opus/, you get a nifty acronym.
18:29:04 -!- augur_ has joined.
18:29:27 -!- shachaf_ has joined.
18:30:04 -!- sebbu2 has joined.
18:30:04 -!- sebbu2 has quit (Changing host).
18:30:05 -!- sebbu2 has joined.
18:30:15 -!- augur has quit (Disconnected by services).
18:30:21 -!- augur_ has changed nick to augur.
18:31:20 -!- Phantom__Hoover has joined.
18:31:42 -!- elliott__ has joined.
18:32:38 -!- sllide has quit (Read error: Connection reset by peer).
18:32:55 -!- jix_ has joined.
18:35:58 -!- atehwa_ has joined.
18:37:17 -!- boily has quit (*.net *.split).
18:37:17 -!- Phantom_Hoover has quit (*.net *.split).
18:37:17 -!- atehwa has quit (*.net *.split).
18:37:23 -!- sebbu has quit (*.net *.split).
18:37:23 -!- MDude has quit (*.net *.split).
18:37:23 -!- variable has quit (*.net *.split).
18:37:23 -!- elliott_ has quit (*.net *.split).
18:37:23 -!- jix has quit (*.net *.split).
18:37:23 -!- Sgeo has quit (*.net *.split).
18:37:23 -!- rodgort has quit (*.net *.split).
18:37:23 -!- shachaf has quit (*.net *.split).
18:37:23 -!- sebbu2 has changed nick to sebbu.
18:38:34 -!- oerjan has quit (Quit: leaving).
18:40:41 -!- rodgort has joined.
18:45:48 <elliott__> hmm... I wonder what I should actuall ycompile it t o
18:54:46 -!- Taneb has quit (Ping timeout: 264 seconds).
19:03:30 -!- boily has joined.
19:04:00 <elliott__> finally I have micro-optimised everything to the point where the simple iteration takes up all the time :)
19:05:08 <elliott__> copumpkin: a Haskell program isn't truly optimised until defocusing your eyes produces a sea of #, right? I gather you're the expert
19:06:26 -!- Taneb has joined.
19:08:37 <elliott__> fizzie: The pixels pointer in an SDL surface can change, right?
19:08:42 <elliott__> (Not what it points to; the pointer itself.)
19:10:15 <fizzie> Though if it's a software surface, I'd say it's very unlikely to.
19:10:25 <elliott__> draw surface (w,h) = unsafePerformIO $ do
19:10:25 <elliott__> pxs <- SDL.surfaceGetPixels surface
19:10:25 <elliott__> let pixels = castPtr pxs :: Ptr Word32
19:10:50 <elliott__> copumpkin: I CAN turn my super-micro-optimised six frames per second into thirty, dammit!
19:10:55 <fizzie> If it's a hardware one, it might easily be a different pointer between each Lock/UnlockSurface.
19:11:11 <elliott__> fizzie: A software surface is going to be more speedy with regards to poking excessively at its pointers, right?
19:11:29 <fizzie> Also you don't need to lock it.
19:11:53 <elliott__> Hmm, I might actually be getting something like eight frames a second.
19:12:03 <elliott__> copumpkin: You wouldn't even BELIEVE the kind of rotating checkerboards I'm stylin'.
19:13:53 <elliott__> copumpkin: There's only ONE weird inaccuracy causing a duplicated column of some sort!
19:14:05 <elliott__> And it's only INCREDIBLY UGLY AND ALIASED!
19:15:54 -!- ais523 has joined.
19:16:56 <elliott__> im breaking new barriers in animation, pushing a whole eight frames per second in PURE SOFTWARE
19:18:26 <ais523> hmm, it seems that half of my work in TAEB is running it through a profiler and optimising the inner loop until it isn't the inner loop any more
19:18:40 <ais523> and then replacing the whole algorithm once the inner loop seems to be perfectly written but is still taking too long anyway
19:20:48 <Vorpal> elliott__, still doing that SDL thingy btw?
19:21:29 <Vorpal> ais523, how can TAEB take too long? It is turn based. As long as it isn't taking like several minutes per move it is acceptable!
19:21:41 <ais523> Vorpal: it gets boring waiting for it
19:21:51 <elliott__> `addquote <Vorpal> ais523, how can TAEB take too long? It is turn based. As long as it isn't taking like several minutes per move it is acceptable! <ais523> Vorpal: it gets boring waiting for it
19:21:53 <HackEgo> 607) <Vorpal> ais523, how can TAEB take too long? It is turn based. As long as it isn't taking like several minutes per move it is acceptable! <ais523> Vorpal: it gets boring waiting for it
19:22:00 <ais523> TAEB::AI::Planar seems to range between 3 move/s and 3 s/move at the moment
19:22:03 <Vorpal> elliott__, how is that funny?
19:22:10 <ais523> with the occasional move taking something like 12 seconds because it's flushing caches
19:22:16 <elliott__> Vorpal: basing your entire development methodology around getting a bit bored debugging is hilarious
19:22:28 <elliott__> You're just not high-class enough to appreciate the fine,subtle humour
19:22:31 <ais523> elliott__: well, /someone/ has to develop TAEB, and nobody else is
19:22:51 <Vorpal> ais523, anyway throw better hardware at it.
19:23:31 <elliott__> hmm... I think I can avoid making the entire infrasturcture symbolic, which is nice
19:23:37 <elliott__> only the _time_ parameter has to be symbolic
19:23:40 <Vorpal> ais523, you are the only developer of it?
19:23:51 <ais523> Vorpal: the only active developer of it
19:23:53 <elliott__> they just need to be pictures of _symbolic_ colours
19:23:57 <Vorpal> elliott__, so any luck with the SDL thing? Managed to make it fast yet?
19:24:02 <elliott__> so an animation is TimeE -> Picture (RGBE)
19:24:03 <ais523> something like ten people have worked on it at some point or other
19:24:22 <elliott__> Vorpal: Well, it gets eight frames per second where previously it got something like five seconds per frame.
19:24:34 <Vorpal> elliott__, what is it exactly anyway
19:24:37 <elliott__> I think I can short-circuit all the performance issues with this simple symbolic change.
19:24:48 <Vorpal> elliott__, some sort of generate-random images?
19:25:02 -!- invariable has joined.
19:25:05 <elliott__> Vorpal: Well, the end goal is simple functional two-dimensional games programming.
19:25:25 <elliott__> It's... going to take some work. But animations are a good start; they're just games with a very simple input scheme.
19:25:36 <Vorpal> elliott__, you mean, you are writing an abstraction on top of the SDL bindings on top of SDL?
19:25:51 <Vorpal> elliott__, it sounded like you were making a library?
19:25:51 <elliott__> Not everything using something is an abstraction on top of it.
19:26:03 <elliott__> Vorpal: It's more ... dainty than that.
19:26:22 <Vorpal> elliott__, sounds grandiose.
19:26:54 <Vorpal> elliott__, so will it be a game in itself, or something for games to use?
19:27:10 <elliott__> Neither, really. I don't expect it to scale beyond Tetris.
19:28:05 <Vorpal> elliott__, nothing that Crysis 3: Flatland will use then? ;)
19:28:51 <elliott__> If I'm not careful, I might even learn something.
19:29:40 <elliott__> Hmm, I fear my thoughts about containing the symbolicness may be right -- it's going to infect every part that you actually want to depend on the time, which will end up being more or less everything.
19:29:56 <elliott__> For instance if you want a rotation based on time then the thing you're rotating must take symbolic coordinates.
19:30:43 -!- invariable has changed nick to variable.
19:32:34 <elliott__> And anyway even if I do make it symbolic it's not at all clear what to compile it to.
19:32:56 <elliott__> I suppose I could speed up the checkerboard by doing some sort of RLE to draw boxes :-)
19:34:31 <ais523> are you drawing a pixel at a time at the moment?
19:34:49 <ais523> see, a sensible abstraction should probably map onto operations that the hardware knows how to optimise
19:34:56 <elliott__> ais523: there's not many other options when your semantic model of an image is (Point -> RGB)
19:35:14 <elliott__> If I did it symbolically I could be much smarter
19:35:27 <elliott__> But then it'd start looking like an actual compiler.
19:35:31 <elliott__> Micro-optimisation is much more fun than that.
19:35:39 <elliott__> Hey, it got me from five seconds per frame to eight frames per second.
19:35:53 <ais523> the usual method is to use a mutable memory array, and just blit it onto the screen when necessary
19:36:15 <elliott__> ais523: I'm doing things in a nice functional manner:
19:36:19 -!- boily has quit (Ping timeout: 246 seconds).
19:36:22 <elliott__> checkerboard :: Double -> Picture RGB
19:36:25 <elliott__> rotate :: Double -> Picture a -> Picture a
19:36:27 <elliott__> rotate r p = \(x :@ y) -> p (x*c - y*s :@ x*s + y*c)
19:36:36 <ais523> oh, your problem is probably on the Haskell side
19:36:43 <ais523> where you have to call the function for every pixel
19:36:56 <elliott__> ais523: Well, it seems to actually get completely inlined
19:37:15 <elliott__> GHC is apparently producing a program specialised entirely for drawing stupid rotated checkerboards with a certain screen width and height
19:37:27 <elliott__> there's basically one thing I can actually optimise left
19:37:30 <elliott__> render :: Picture RGB -> (Int, Int) -> [Word32]
19:37:30 <elliott__> withStrategy (parListChunk 128 rseq)
19:37:30 <elliott__> [ pic (x :@ y) | x <- [0, 1/w' .. 1], y <- [0, 1/h' .. 1] ]
19:37:30 <elliott__> where !w' = fromIntegral w - 1 :: Double
19:37:30 <elliott__> !h' = fromIntegral h - 1 :: Double
19:37:42 <elliott__> whether by rolling it into the pointer-poking loop, or fiddling with the parallelisation, or I don't even know
19:52:24 -!- boily has joined.
19:58:05 <elliott__> ais523: I was thinking I'd implement scapegoat sometime, although I've been thinking about that a lot of things recently, I think I might be exponentially exploding in number of projects before most of them collapse, oops
19:58:30 <ais523> elliott__: something like that's been happening to me too
19:58:40 <ais523> the solution is to put your projects on a queue, that way they all get done eventually
19:58:47 <ais523> as opposed to a stack where they typically don't
19:58:54 <elliott__> ais523: that only works if you can force yourself to work on A rather than B at any given moment
19:59:03 <ais523> well, you work on what you want to work on
19:59:09 <elliott__> this is also known as "basic time management", or "a completely vital skill for doing anything in life"
19:59:15 <ais523> but if you're not sure what you want to work on, you work on whatever people are bugging you most to work on
19:59:33 <elliott__> usually when I'm not sure what I want to work on I don't feel like coding at all
20:00:21 <elliott__> I could have the thing blocking Elliottcraft (the GPipe patch) probably done within a few hours, but it hasn't popped up as something that sounds like fun for a while, so it hasn't been done yet, oops
20:00:37 <elliott__> meanwhile I sit here microoptimising this stupid thing
20:01:33 <elliott__> ais523: It's kind of worrying that I seem to have invented scapegoat twice in quick succession and neither time as a version control system within the past few days, though
20:01:42 <ais523> that just shows it's a good idea
20:02:06 <ais523> I think the people behind darcs had the same idea, but didn't go all the way
20:02:31 <elliott__> ais523: but version control systems aren't supposed to be package managers, service managers and build systems!
20:02:35 <elliott__> wait, that's _three_ times! aieeeeeeeeeeeeeeeee
20:03:01 * elliott__ starts ripping off chunks of skin in a rabid attempt to get the Featheroid off him
20:03:18 <ais523> I think it's a sign that shows that something's well-designed if it's usable in a range of contexts, apart from those it was designed for
20:03:38 <elliott__> ais523: the question is, can you do it with only one implementation:)
20:03:54 <elliott__> [asterisk]you do [asterisk]implementation :)
20:03:57 <augur> i wonder if there is a dual to CAs
20:04:08 <elliott__> augur: continuous non-local systems? :P
20:04:42 <augur> see i was thinking
20:04:58 -!- Taneb has quit (Ping timeout: 240 seconds).
20:05:02 <augur> CAs have the odd property that they have a uniquely determined future, branching past, and no real reversability
20:05:15 <elliott__> ais523: hmm, a good version control system is what I value most out of those four things, but unfortunately is the thing that causes the most interaction problems
20:05:25 <augur> the physical word is the opposite: a uniquely determined past, branching future, and full reversability
20:05:40 <augur> and so im curious if there is a dual to CAs that's like this
20:05:46 <elliott__> i.e. you can use whatever service manager you want and nobody gives a shit, if you use your own package manager then nobody else has to care, if you use your own build system I guess it'll inconvenience people who want to use or work on your stuff but it's not insurmountable
20:05:59 <elliott__> but using a completely new VCS wipes out a whole common toolchain
20:06:10 <Vorpal> <augur> and so im curious if there is a dual to CAs that's like this <-- a physics simulator?
20:06:31 <augur> Vorpal: except i dont mean that, obviously :|
20:06:40 <augur> dual to CAs not just conceptually dual in those respects
20:07:00 <augur> like, if you could have a definition of CAs which, when the dual is taken, gives you something with those properties
20:07:13 <augur> or are those properties emergent and not easily reified
20:07:18 <elliott__> ais523: on the other hand, that does present the wonderful opportunity to redo the whole toolchain but better :P
20:07:40 <ais523> I don't see why redoing a VCS wipes out a toolchian
20:07:48 <ais523> I see VCSes as mostly interchangeable
20:09:07 -!- Taneb has joined.
20:09:08 <Vorpal> what was the name of that vcs with a rat or mouse as the logo
20:09:28 <Vorpal> whatever happened to it?
20:09:57 <elliott__> Vorpal: nobody uses it because it's slow and also really weird
20:10:38 <elliott__> ais523: That's probably true for you, but (and I ask you to suspend your blanket objections to GitHub in the name of seeing things as everyone else sees them), services like GitHub basically build an entire smooth version control/merging methodology around the VCS
20:11:02 <ais523> elliott__: doesn't this just add support for my objection to GitHub?
20:11:07 <ais523> in that it locks you in for no real reason at all?
20:11:23 <ais523> there's no reason it should be specific to one VCS, or even one website
20:11:25 <elliott__> Obviously it's nothing unreplicatable, but a corporation with a good product with a few years head start is a hard thing to beat
20:11:32 <elliott__> ais523: no, GitHub is definitely git-specific
20:11:42 <elliott__> ais523: I agree that it should be more decentralised and open
20:11:42 <ais523> there's no inherent reason why it should be, though
20:11:47 <elliott__> ais523: but it doesn't matter /what/ it does to your objection
20:11:48 <Vorpal> elliott__, I find VCSes interchangeable too.
20:12:06 <elliott__> I don't care about your objection right now, I'm just trying to explain why VCSes are not really interchangable for most people
20:12:13 <ais523> elliott__: what you're effectively saying is "this is a bad idea because there's an existing product that's good enough", which is a plausible argument
20:12:22 <ais523> but one that would stop all progress if people didn't ignore it from time to time
20:12:44 <elliott__> ais523: I'm just saying that "you have to replicate [large, polished product] and this serves as a communications barrier"
20:13:00 <CakeProphet> huh, weird, so I'm calling a method called get_entire_page_screenshot
20:13:13 <elliott__> because if you speak GitHub, then collaborating with someone who uses decentralised-sg-hub involves learning the new language
20:13:23 <elliott__> unless you literally directly clone GitHub, which would be lame
20:13:24 <CakeProphet> you give a filename and it's supposed to take a screenshot of the browser and write it to that file.
20:13:43 <CakeProphet> I gave it a temp file and it writes a bunch of small tempfilename-N files, where n is an integer
20:13:55 <elliott__> ais523: I think a GitHub-like service definitely suffers if it doesn't take advantage of one specific VCS, though
20:13:58 <ais523> elliott__: well, you'd provide the same operations GitHub did (pull request, for instance), as they're useful
20:14:21 <CakeProphet> ais523: you should put up a project request on one of the freelancing sites I frequent
20:14:23 <elliott__> indeed, but the UI will always be different, and more importantly, it's a separate thing to learn
20:14:46 <elliott__> like, if you contribute to thirty projects on github and you have some minor fixes to another one but you have to learn how to use decentralised-sg-hub to do it, you're quite likely to just not bother
20:15:11 <elliott__> I still think it's worth it, but it's hard to deny that for most people and most situations, a VCS barrier is one of the biggest ones
20:15:14 <ais523> well, it should be pretty obvious, I imagine, especially if you're already used to a similar project
20:15:24 <ais523> and actually, I don't really observe many VCS barriers around
20:15:45 <elliott__> amplified by specifically avoiding GitHub :P
20:15:45 <ais523> the main problem with me hosting AceHack in darcs has been that neither darcs nor ghc is in the package manager on AWS
20:16:02 <Vorpal> elliott__, I could claim it is selection bias that you observe them. Amplified by frequenting github.
20:16:41 <Vorpal> elliott__, statically linking a darcs would be huge
20:17:00 <ais523> some people are hosting AceHack servers on it
20:17:16 <Vorpal> ais523, you made acehack?
20:17:27 <elliott__> Vorpal is a good inane statement generator today
20:17:46 <Vorpal> elliott__, well, why else would he have any say about the VCS
20:17:53 -!- Taneb has quit (Ping timeout: 240 seconds).
20:18:07 <ais523> Vorpal: err, what did you think AceHack was?
20:18:10 <ais523> Deewiant: a fork of NetHack
20:18:11 <Vorpal> elliott__, I was just surprised at it being made by him
20:18:14 <Vorpal> ais523, a nethack fork
20:18:15 <elliott__> acehack is the ace hacking tool for pros.
20:18:21 <ais523> Vorpal: yes, I made it
20:18:27 <Vorpal> ais523, I didn't know you made it however
20:18:28 <ais523> but I don't get how you'd have heard about it except from me
20:19:18 <ais523> Deewiant: focus is on gameplay similar to vanilla NetHack's, and a much better interface
20:19:32 <ais523> still tty, of course, as tty is the best of the existing interfaces
20:19:42 -!- jcp has quit (Quit: Later).
20:19:44 -!- jcp|other has quit (Read error: Connection reset by peer).
20:19:59 <Vorpal> ais523, think I saw it mentioned in #nethack. Or maybe you mentioned it but I ended up in the middle of the convo and didn't realise you made it
20:20:25 <Vorpal> ais523, much better interface eh, how does it differ?
20:20:38 <elliott__> ais523: anyway, I would love to see github-like features integrated into the vcs itself
20:20:48 <ais523> Vorpal: http://patch-tag.com/r/ais523/acehack/snapshot/current/content/raw/doc/fixes36.0 (you can read the whole changelog)
20:20:49 <Deewiant> Vorpal: http://patch-tag.com/r/ais523/acehack/snapshot/current/content/raw/doc/fixes36.0
20:20:53 <ais523> elliott__: wow, that would make sense as well
20:21:07 <ais523> Deewiant: wow, you got that quickly given that you couldn't just look it up in browser history
20:21:13 <elliott__> ais523: some are rather difficult, though, like pull requests; you really want to be able to comment on them from the web rather than pulling, modifying some text file using thevcs and pushing... and in fact that's not right because participating in a pull request =/= having push rights
20:21:20 <ais523> or had you been looking for it already
20:21:22 <elliott__> ais523: but I guess you just build it into the vcs and then write a web interface for it
20:21:38 <ais523> along the lines of git instaweb?
20:21:51 <elliott__> ais523: yes, except more along the lines of a personal github
20:22:03 <elliott__> it would be, uh... "fun" if a bunch of competing interfaces sprung up. "Now how do I comment on a pull request in /this/ one?"
20:22:18 <ais523> elliott__: you ever used a webforum?
20:22:32 <ais523> ah, I rarely have issues figuring out how to do things in them
20:22:34 <elliott__> ais523: aha, pull requests over NNTP
20:22:35 <ais523> perhaps we have different attitudes
20:22:50 <elliott__> hmm, I suppose pull requests are conceptually part of the /requester's/ repository
20:23:09 <elliott__> and the pull request tab of a repository would just show all the pull requests in the repositories it's been notified of as being forks
20:23:21 <ais523> and in sg, you can actually do that without world chaos
20:23:46 <ais523> try to imagine how you'd do it in, say, git
20:24:04 <ais523> you'd basically need to have to be able to add remotes in other people's repos
20:24:21 <elliott__> oh, I was viewing the "notified of forks" thing as part of an out-of-VCS API
20:24:22 <ais523> in sg, it doesn't cause chaos
20:24:35 <elliott__> it seems wrong to modify the repository just to keep a list like that
20:24:47 <elliott__> I suppose the chaos of different interfaces is massively lessened if you define a consistent API
20:24:54 <ais523> elliott__: well, in sg you aren't modifying the repo
20:25:04 <ais523> you're just modifying what turtles exist
20:25:19 <elliott__> ais523: that's not what a turtle is LOTS OF EXCLAMATION MARKS TO AMPLIFY MY ANNOYANCE
20:25:48 <ais523> I use the word as "vaguely sg-related concept I don't know the word of"
20:25:59 <elliott__> turtles basically mean the directory/file structure
20:26:09 <elliott__> they're an obsolete name, as they're just "directory changes" really
20:26:31 <elliott__> I suppose I should write a platonic implementation of your amended model with the "change hashes of this other change" and "ignore change" things you added for conflict resolution, that would be a good start
20:26:34 <ais523> is it a name obsolete enough that I can use it to describe something entirely different?
20:26:40 <elliott__> unfortunately it's not clear where to go from there :)
20:26:47 <elliott__> ais523: yes, but I'll yell at you every time you do
20:26:59 <elliott__> ais523: I'd just say "object" if you mean "thing in the hash-storage system"
20:27:26 <elliott__> (I really want some sort of medication that you can take to stop worrying about hash collisions)
20:28:21 <Vorpal> elliott__, where is hash collisions a potential (if unlikely) issue?
20:28:45 -!- boily has quit (Read error: Operation timed out).
20:28:54 <Vorpal> elliott__, yeah but what part of it?
20:29:12 <elliott__> everything is stored as an object in the hash-addressed database
20:29:32 <elliott__> (a separate-file system doesn't work for various reasons, among them that you have thousands and thousands of tiny objects)
20:29:37 <Vorpal> elliott__, would it be possible to resolve it by a linked list in case of collisions, like hashtables do?
20:29:54 <elliott__> ais523: please inform Vorpal what the "D" in DVCS stands for
20:30:10 <Vorpal> elliott__, well you didn't indicate what part of it.
20:30:27 <Vorpal> elliott__, anyway use a good enough hash algorithm and it shouldn't be an issue
20:30:32 <Vorpal> elliott__, SHA512 or such
20:30:33 <ais523> Vorpal: a linked list between different repos is probably only possible in @
20:30:36 <ais523> and quite possibly not even then
20:30:42 <elliott__> hash collisions exist, that's a fact
20:30:54 <elliott__> sg will be inevitably completely broken
20:30:57 <elliott__> it doesn't matter, but it still upsets me
20:31:01 <Vorpal> elliott__, what does git and so on do?
20:31:11 -!- Taneb has joined.
20:31:13 <ais523> elliott__: just pick an algo in which finding a hash collision would be sufficiently major news that it'd make all existing programs useless anyway
20:31:17 <elliott__> usually when I start thinking along these lines
20:31:18 -!- Taneb has quit (Client Quit).
20:31:30 <elliott__> that names are fundamentally useless
20:31:48 <Vorpal> ais523, and make sure changing hash algo in the future would be possible. On old repos.
20:31:54 <elliott__> because no naming system can have names that are smaller than the thing itself except for a tiny finite number of exceptions
20:32:05 <elliott__> and wake up having forgotten the whole thing
20:32:21 <Vorpal> elliott__, I shall remind you
20:32:46 <Vorpal> elliott__, anyway, why not use the thing as the name itself
20:32:59 <elliott__> ais523: I was planning on just going for SHA-3, on the basis that a lot of people will be very angry if it turns out to be a bad function, and that will make me feel better if that happens
20:33:03 <Vorpal> possibly after applying gzip (sure it can grow, but most often won't)
20:33:10 <elliott__> Vorpal: exact same problem with gzip
20:33:14 -!- zzo38 has left.
20:33:20 <elliott__> every object has to include all its children
20:33:25 <elliott__> it's an impossible situation, so eh
20:33:29 <Vorpal> elliott__, okay it would grow huge
20:33:34 <elliott__> the set of sg objects humans care about
20:33:39 <elliott__> is a lot smaller than the set of sg objects
20:33:46 <elliott__> you just hope the hash function optimises for this
20:34:36 <elliott__> ais523: I'm still not sure how to store individual changes as part of a changeset (i.e. individual line replacements and the like) without a bunch of overhead because of the hash and everything :/
20:34:42 <elliott__> I guess git stores the whole tree though
20:34:46 <elliott__> So we can't possibly do worse than that
20:36:02 <elliott__> hmm, maybe this will solve every problem I come into wrt sg
20:36:07 <quintopia> omg. i followed @sirisaacnewton like 6 months ago and he just tweeted for the first time in that period...
20:36:12 <elliott__> just remember how git does it, and it'll inevitably be worse than whatever I was thinking of
20:36:49 <pikhq> Though it's also storing the whole tree using immutable data structures, and delta encodes objects as an optimisation... So it's not like git's the ultimate in naive storage.
20:37:45 <ais523> it stores the whole current tree, and gets older versions by diffing backwards from there
20:37:46 <elliott__> hmm, git's patch knowledge is implemented at the /storage/ layer?
20:38:13 <ais523> on the basis that reverse diffs are typically just "delete bytes x-y" with a few additions
20:38:31 <quintopia> has anyone written up somewhere exactly scapegoat is meant to do/be like?
20:39:09 <elliott__> quintopia: yes, see irc log date ........
20:39:16 <elliott__> the logs of hash-scapegoat are pretty good, actually
20:39:26 <pikhq> Modulo pack files, git stores not only the whole current tree, but the whole of every single tree.
20:39:28 <elliott__> although you'll have to experience the same days of confusion followed by eurekas that we did
20:39:41 <pikhq> git's patch knowledge DNE.
20:39:54 <quintopia> so no condensed milk version. got it.
20:40:42 <elliott__> quintopia: changes are constructed from other changes; primitive change is start/end of a file; in this way merging becomes trivial; same is applied to directory structures.
20:40:59 <pikhq> git-diff actually pulls out two commits and computes the diff from them.
20:42:47 <pikhq> If it weren't for git's immutableness making it really easy to handle the case where a blob or tree hasn't changed, git would be extremely slow and inefficient.
20:43:13 <elliott__> sg is slow and inefficient... probably not inherently though
20:43:30 <elliott__> hmm, does git actually hash every single file in the repo when you do like "git status"?
20:43:40 <elliott__> it must be true, but it seems like that could be very slow
20:43:48 <ais523> either that, or it checks last-modified dates, I suppose
20:44:02 <ais523> as it knows when the files in the pristine tree last changed
20:44:18 <elliott__> well, yes, but the point is it's O(n)
20:49:41 <Sgeo_> git immutableness?
20:49:59 <ais523> I don't think there's any way around that, other than having the filesystem integrated with the VCS
20:50:30 <ais523> or combining sg with that editor you were working on that uses a VCS for its undo feature
20:50:35 <pikhq> Sgeo_: Yes, git is an immutable data store.
20:50:40 <elliott__> ais523: indeed (uh oh: this is exactly tup monitor vs. tup upd)
20:50:49 <elliott__> ais523: (stop being everything, sg)
20:50:51 <pikhq> Which happens to have a VCS hacked on top.
20:51:00 <ais523> pikhq: that's a good description
20:51:43 <elliott__> sg is an immutable patch tree with a data store so that you can store it in something more convenient than graphviz format
20:51:56 <elliott__> (it's a tree, not a graph, I believe)
20:52:15 <elliott__> (because you can't modify previous objects to refer to later ones, and you can't construct an object that refers to a non-existent one)
20:52:47 <ais523> you can construct an object that refers to two previous patches, though
20:53:06 <ais523> well, an object that refers to two previous objects, which will typically be patches
20:54:17 <elliott__> not necessarily; changes have authors too
20:54:26 <elliott__> although I think the whole "header" of a change has to be optional so that the small ones can omit it
20:54:32 <elliott__> and have their fields filled-in by their enclosing changeset
20:54:38 <elliott__> but then it's not clear how to do a lookup if you don't know about the changeset
20:54:45 <elliott__> so you need a microchange → changeset lookup cache
20:54:52 <ais523> elliott__: I think it should conceptually always exist, but be stored in an optimised way
20:55:15 <elliott__> ais523: that would still be a large amount of duplication
20:55:47 <elliott__> it would still seem to have them from inside the sg code, though
20:55:51 <elliott__> they'd just be looked up via the cache
20:55:51 <ais523> a reference needn't be a huge hash; you could have some sort of abbreviated format for references
20:57:14 <elliott__> ais523: what, and make collisions vastly more likely?
20:57:22 <elliott__> anyway, it's not "huge"; a hundred bytes or so
20:57:41 <ais523> elliott__: no, what I mean is, the hash of something doesn't have to be a hash of its contents
20:58:04 <ais523> in particular, for changes which are "subchanges" of something else, it would make sense for their name to be its hash, plus an index number
20:58:18 <ais523> so they can just say "copy metadata from parent"
20:58:21 <elliott__> umm, gross, you're proposing making the hash-addressed storage system be not totally hash-addressed
20:58:32 <ais523> it's still hash-addressed, it's just a different hash function
20:58:46 <elliott__> you can't rely on properties of the hash function...
20:58:51 <ais523> there's no reason why sg hashes have to be completely unreversable, right?
20:58:55 -!- monqy has joined.
20:58:59 <elliott__> it's not hash-addressed if you exploit its internal details
20:59:06 <elliott__> but w/e, _I'm_ not certainly implementing it that way :)
20:59:09 <ais523> wouldn't it make more sense to have a hash function that's reversable as possible while still avoiding collisions?
20:59:13 <ais523> to aid in optimisations?
20:59:19 <ais523> also, that's quite an s//
20:59:29 <ais523> did you just leave out the match string, on the basis that it's inferrable from context?
20:59:37 <elliott__> you can use the same hash function without sacrificing storage constraints
20:59:41 <elliott__> I think you could do it using the index, in fact
20:59:52 <elliott__> I can't type asterisks, so why not
21:00:04 <ais523> I suppose you also have to infer whether that's the match or replacement from context
21:00:09 <elliott__> ais523: btw, you have an unterminated /
21:00:18 <ais523> you did an s// not an s///
21:00:22 <ais523> so I said "that's quite an s//"
21:02:53 <elliott__> maybe when i'm sixteen sg's implementation will be completely obvious and transparent to me
21:04:16 <ais523> I'm so old that I've forgotten how old I am
21:04:40 <quintopia> i thought you were a bit younger than me
21:05:00 <elliott__> ais523: is my linguistic typing of numbers spreading?
21:05:17 <ais523> elliott__: there had been no digits for ages (except in monqy's IP address and my nick)
21:05:22 <ais523> and it would seem out of place to add one
21:05:31 <ais523> elliott__: I thought you had two working digits on your keyboard
21:05:36 <ais523> the issue being, that really you want ten
21:05:38 <elliott__> ais523: can't wait until you're 523
21:05:52 <augur> when you're 16, elliott__?
21:05:56 <augur> arent you 16 already
21:06:24 <elliott__> i forget what rights i get then, oh well
21:06:24 <augur> 3 days and you're legal ;o
21:06:34 <elliott__> no you see, there's this fifty pounds.
21:06:50 <augur> 50 pounds? thats pretty cheap
21:07:01 <ais523> you need to be 18 to be legal nowadays
21:07:11 <augur> ais523: in the uk?
21:07:14 <ais523> I'm trying to remember what you're allowed to do at 16
21:07:21 <elliott__> ais523 expertly diverts the topic with calculated obliviousness
21:07:24 <ais523> there's something under-16s can't buy, but I forget what
21:07:32 <ais523> elliott__: no, it's because I wasn't paying attention to what the topic was
21:07:36 <ais523> and guessed, and got it wrong
21:07:58 <HackEgo> 55) <oklopol> GregorR: are you talking about ehird's virginity or your soda beer?
21:08:25 <ais523> I think you're allowed to start learning to drive when 16, so that you can get a driving license as soon as you turn 17
21:08:51 <Gregor> ais523: I don't understand how that's an "I think" thing ...
21:08:55 <elliott__> im not ready to be an adult yet help
21:09:27 <ais523> Gregor: it's an "I can't quite remember, but I think this is correct"
21:09:41 <monqy> i'll neve rbe readey to adulte :(
21:09:51 <ais523> given that I have no intention of learning how to drive, and putting me at the controls of a car would probably be criminal negligence
21:10:03 <ais523> I might try in an emergency (to save my life, for instance), but it would be unlikely to end well
21:10:13 <ais523> I know how to drive in theory, but don't have the levels of concentration or coordination required
21:10:48 <elliott__> i dont think anyone else does either
21:10:58 * Sgeo_ is embarrassed at not knowing how to drive, and having no real excuse
21:11:03 <ais523> well, I don't have them to such an extent that it'd be obvious very quickly
21:11:19 <ais523> occasionally I have problems just standing without falling over
21:11:40 <ais523> (walking's easier; but when standing still, I actually have to concentrate, to some small degree, to stay upright)
21:11:48 <Gregor> In the US, everybody older than 9 knows that you can get your permit at 15, your license at 16.
21:11:50 <Gregor> (That is to say, nobody "thinks" they know the driving age, they just know it)
21:12:07 <ais523> that's because it's physically impossible to survive without driving in most of the US
21:12:23 <ais523> hmm, do university campuses in the US require driving to survive too?
21:12:29 <ais523> or are they more like UK villages?
21:12:47 <Sgeo_> ais523, I don't know if mine counts. It's small enough to walk around, and has dorms
21:12:50 <Gregor> ais523: My point was that you don't find people in the US who "don't quite remember, but think this is correct"
21:12:56 * copumpkin has lived (alone) in the US for 8 years without knowing how to drive
21:12:58 <Sgeo_> But a lot of people commute there by car
21:13:14 <Sgeo_> Also, don't know if it counts as a "university"
21:13:15 <pikhq> ais523: University campuses are usually quite walkable.
21:13:25 <ais523> I was wondering if the US could mess even that up
21:13:25 <pikhq> ais523: Bikes are also typical on them.
21:13:47 <ais523> bikes are only really common in Cambridge, over in the UK (because it's so large), most campuses people typically walk or run
21:13:59 <ais523> I can run from one end of the University of Birmingham's main campus to the other in around ten minutes
21:14:07 <ais523> and have had to do so on occasion, but that's rare
21:14:14 <Gregor> pikhq: Come visit Purdue X-P
21:14:38 <Gregor> If you don't have a car, you can EITHER get to school, or fulfill your basic needs for living. Not both.
21:14:57 <pikhq> Okay, true, the area *surrounding* the campus can be t3h fucked up still.
21:15:23 <Phantom__Hoover> * copumpkin has lived (alone) in the US for 8 years without knowing how to drive
21:15:31 -!- augur has quit (Remote host closed the connection).
21:15:53 -!- augur has joined.
21:15:54 <Gregor> My reason to learn to drive was that my mom forced me to X-D
21:16:07 <ais523> Phantom__Hoover: do you live in an area of Scotland where it's physically possible to build roads?
21:16:21 <ais523> (I assume yes, the other areas are larger but not a lot of people tend to live there for obvious reasons)
21:17:38 <ais523> what's the local bus service like?
21:18:04 <ais523> it's entirely possible to survive with a good bus service (or a settlement sufficiently small that walking everywhere is practical), and a train station for use when you need to go long-distance
21:18:14 <Sgeo_> elliott__, there are others who only read the linked SBAHJ
21:18:20 <ais523> bonus points if you have a coach station, in case you need to go long-distance and are mostly out of money
21:18:35 <ais523> (my parents have an irrational fear of coaches)
21:19:18 <ais523> I'm not entirely sure of the basis behind the fear
21:19:34 <ais523> that seems a little implausible as one, I suspect
21:20:00 <ais523> does that generate a sequence of characters that looks vaguely like an acronym?
21:20:17 -!- elliott__ has quit (Ping timeout: 240 seconds).
21:20:17 <EgoBot> haskell let pick a = System.Random.randomRIO (0, length a - 1) >>= return . (a !!) in do {len <- pick [2..10]; putStrLn =<< (Control.Monad.replicateM len $ pick ['A'..'Z'])}
21:20:29 <ais523> US is a particularly likely letter sequence to appear at the start of an acronym
21:20:43 <ais523> also, randomRIO is an incredible hack, but I see why it exists
21:20:59 <lambdabot> forall a. (Random a) => (a, a) -> IO a
21:21:13 <lambdabot> forall a g. (Random a, RandomGen g) => (a, a) -> g -> (a, g)
21:21:22 <CakeProphet> if I had more data I could weight individual characters by their likelihood of being the first letter of an English word
21:22:48 <quintopia> i have a word list you could analyze, unless you want to count more common words with higher weight, in which case you best download some english texts
21:23:08 <quintopia> however, you could do well just looking at the weightings used in english-specific compression programs
21:25:08 <ais523> a vital part of any modern operating systme
21:25:20 <CakeProphet> I suppose that would be good, since acronyms aren't strictly going to be commonly used words.
21:25:27 <HackEgo> head: cannot open `/usr/share/dict/words' for reading: No such file or directory
21:26:17 <EgoBot> /usr/bin/head: cannot open `/usr/share/dict/words' for reading: No such file or directory
21:29:10 -!- zzo38 has joined.
21:32:12 <fizzie> I have Google's "ngrams of 1 billion words of interweb text" corpus, it's got a unigram list followed by count, wouldn't be too tricky to make a relative ranking of first letters I guess.
21:32:54 <fizzie> Or is it trillion? Anyway.
21:33:57 -!- GreaseMonkey has joined.
21:35:37 <CakeProphet> w:2711 r:5285 a:5902 x:56 d:5811 j:1259 y:380 u:1899 k:1247 h:3856 g:3452 f:4075 t:5002 i:3613 e:3813 �:15 n:2015 v:1584 m:5952 s:11072
21:35:41 <CakeProphet> :1 l:3437 p:7539 c:9507 q:464 b:6095 z:287 o:2240
21:36:34 -!- dbelange has left ("WeeChat 0.3.2").
21:37:03 <CakeProphet> there's a word that starts with a newline... or?
21:37:10 <fizzie> That's the part that's not awesome. :p
21:37:37 -!- sebbu2 has joined.
21:37:38 -!- sebbu2 has quit (Changing host).
21:37:38 -!- sebbu2 has joined.
21:38:34 <CakeProphet> okay so to make this into a weighting scheme I need to find the gcd
21:38:46 <fizzie> Here's some numbers from googledata: http://p.zem.fi/lyui
21:39:21 -!- sebbu has quit (Ping timeout: 258 seconds).
21:39:23 <fizzie> That's mostly unfiltered internets, so it can be a bit non-linguistic.
21:39:58 <augur> what is it with you people calling things linguistic? :|
21:40:10 <fizzie> Do you have a highlight for it? :p
21:41:27 <fizzie> "linguistic, adj.: Of or pertaining to the knowledge or study of languages. Also used for: Of or pertaining to language or languages." See latter use. (Which admittedly OED admonishes with "is hardly justifiable etymologically; it has arisen because lingual suggests irrelevant associations".)
21:43:47 <CakeProphet> fizzie: I think it's cute how you name your variables in Perl.
21:44:37 <fizzie> What? 'a' as in 'array', 'f' as in 'frequencies'. 'k' as in 'key'. How more clear can you get.
21:45:48 -!- shachaf_ has changed nick to shachaf.
21:48:13 <fizzie> Yeah, well. I think it's cute how you use a while loop when there's a perfectly serviceable command line option to loop over lines.
21:48:23 <fizzie> TMTOWTDI or however they say.
21:50:44 <fizzie> Not insulting? On *this* channel? I don't think that's how we "roll".
21:51:03 <augur> fizzie: yes i do have it on highlight
21:51:07 <augur> but thats not why im commenting
21:51:16 <augur> its just that you peeps seem to use it in the most inaccurate ways
21:52:10 <fizzie> "That new dynamic lingusticer sure beats the pants off old ld.so!"
21:57:38 <fizzie> At least looking from here it looks like the Unicode "replacement character".
21:57:46 <fizzie> But that could be happening anywhere.
21:57:59 <CakeProphet> so, is that something I should be concerned about?
21:58:25 <fizzie> It's not like you're doing science here, so I don't see why not. Unless of course you want to.
21:59:33 <CakeProphet> but I'm not really sure how to convert percentages to weighted random selector thing.
22:01:39 -!- Patashu has joined.
22:05:46 <fizzie> Relative numbers of Google; also took your constructive criticism and streamlined it: http://p.zem.fi/bvzk -- quite a bit different, but, again, not-a-wordlist.
22:06:40 <fizzie> Auspicuously it starts with "TAOSICP" -- some sort of a hybrid of TAOCP and SICP?
22:10:31 <CakeProphet> script and output when given /usr/share/dict/words as input
22:11:27 <CakeProphet> er, the top line of the output is on the bottom of the script, lol
22:12:56 <fizzie> Wouldn't it be extra-magical if sort worked so that if you give {...$a...$b...} it uses the value of that as the comparison result, but if it's just {...$a...} with no refs to $b it would apply that to each element and compare those results with <=> or cmp, whatever the default sort uses?
22:17:03 <CakeProphet> I wonder why t is more common in the Google data.
22:17:55 <CakeProphet> also I'm not really sure how to use these ratios to construct a new generator.
22:18:28 <fizzie> If I just count the unique words (and disregard the number of times they occur), it's 8.61% s, 7.77% c, 6.77% w, 6.73% p, 6.61% a and so on.
22:19:05 <CakeProphet> so the same ordering but the weights have events out a little.
22:21:17 <fizzie> If you want fungot's "select from a discrete random distribution", that's: let @w be the weights and @v the values, and $t sum of @w; now $r = int(rand($t)); for $i (0..$#w) { if ($r < $w[$i]) { $selected = $v[$i]; last; } $r -= $w[$i]; }
22:21:18 <fungot> fizzie: it would be...
22:21:27 <fizzie> Paraphrasing a bit; it's not exactly that code.
22:22:20 <CakeProphet> you just chop the total number up into segments kind of.
22:22:32 <fizzie> Yes, and then find which segment it hit.
22:22:55 <CakeProphet> I wonder if I should do this in Perl or Haskell again.
22:22:58 <fizzie> Supposedly it's going to always break at $i == $#w at the latest.
22:25:35 <fizzie> Why not? $r is always going to be less than sum of @w, so after having done $r -= $w[$i] for all $i = 0 ... $#w-1, $r is guaranteed to be < $w[$#w].
22:25:41 <CakeProphet> unless it's the word count and not the count/total ratio
22:26:08 <fizzie> It's best done with integers, that much is true. Assuming sum @w fits in one.
22:27:43 <fizzie> It's also O(n) w.r.t. the number of possibilities, which is suboptimal, but oh-well.
22:28:04 <Patashu> could you make it a cumulative distribution and binary search it?
22:28:43 <fizzie> You could also make a balanced binary tree out of them, and do a single choice at each non-leaf node.
22:31:51 <fizzie> Mmmaybe; but you could also do an interpolation search, which would I guess be better if the distribution is uniform-ish.
22:32:26 <Patashu> interpolation is an interesting idea...
22:32:34 <Patashu> something like newton for when it has a derivative?
22:35:08 <fizzie> Something like. Usually it's like a binary search, except you take the values at the endpoints, then linear-interpolate about where the thing you're looking for would be, and then use that as the binary-search "midpoint".
22:41:21 -!- pumpkin has joined.
22:42:25 -!- copumpkin has quit (Disconnected by services).
22:42:29 -!- pumpkin has changed nick to copumpkin.
22:43:33 <fizzie> A house is not a motel, and a hash is not an array?
22:43:43 <Gregor> Today I was wearing a pakul
22:43:52 <Gregor> From a car, somebody yelled at me "Yo, rasta man!"
22:44:00 <fizzie> (I suppose if you *really* wanted to be silly about it, you could also sort the order of the possible values in the cdf table in an order where the table is as uniform-ish as possible for the linear-interpolation search.)
22:44:22 <Gregor> Let me reiterate: Me in afghani hat. With blond hair. Not in dreads. Guy things "rasta"
22:44:31 <fizzie> Gregor: At least it was "man" and not "mon".
22:44:51 <CakeProphet> fizzie: a hash is almost an array in Perl though...
22:45:10 <fizzie> Yeah, but I don't think %t has a corresponding $#t.
22:45:38 <fizzie> There was some in-recent-Perls change that made hashes and arrays even more like each other, but I forget what it was.
22:45:54 <CakeProphet> so I doubt you want to subtract 1 from $#w
22:46:21 <CakeProphet> => is the comma operator with some auto-quoting sugar.
22:46:30 <fizzie> If you mean "for all $i = 0 ... $#w-1", yes, I did, because I was talking about all elements except the last one.
22:47:13 -!- kwertii has joined.
22:47:22 <fizzie> 'each' can run on arrays in Perl 5.12, but I'm not sure that was the change.
22:48:28 <fizzie> Oh, yes; it was that, and the related change that you can run 'keys' on an array and get (0 .. $#array) back. I think.
22:49:31 <fizzie> Right, except the latter comes in Perl 5.14, not 5.12.
22:50:01 <ais523> Perl's going to end up with Lua-style arrays if it keeps going down that path
22:50:18 <ais523> (Lua arrays versus PHP arrays; similar idea, except Lua's idea works great, PHP's is completely messed up)
22:50:20 <fizzie> http://perldoc.perl.org/functions/keys.html -- 5.14 adds "keys EXPR" which auto-dereferences when EXPR evaluates to a hashref or an arrayref.
22:50:43 <ais523> Phantom__Hoover: in Lua, an array is conceptually a hash index => value
22:50:53 <fizzie> "This aspect of keys is considered highly experimental. The exact behaviour may change in a future version of Perl."
22:51:11 <ais523> so arrays and hashes are handled the same way
22:51:15 <ais523> JavaScript uses the same method
22:51:18 <fizzie> Isn't that quite close to a JavaScript array too, except it's an object with numeric properties.
22:51:20 <CakeProphet> fizzie: your algorithm also assumes the data is sorted correct?
22:51:21 <ais523> behind the scenes, it's probably optimised
22:51:39 <ais523> but the behind-the-scenes representation doesn't have to be the same as the interface in a high-level language
22:51:51 <fizzie> CakeProphet: Nnno, I don't think it needs to be anyhow specially sorted, as long as @w and @v are in the same order of course.
22:51:53 <ais523> PHP arrays are basically ordered dictionaries, which is a huge mess in all sorts of ways
22:52:34 <Vorpal> ais523, isn't that what bash arrays are?
22:52:53 <Vorpal> though numbers only, until bash 4
22:52:53 <ais523> you should see how many sort functions PHP has
22:53:03 <ais523> it's not only more than one (which is insane), it's more than ten
22:53:26 <ais523> Vorpal: wait, an ordered dictionary with numerical-only keys? that's a pretty ridiculous data structure
22:53:36 <Vorpal> ais523, maybe we mean different things
22:54:01 <Vorpal> ais523, ordered dictionary with numerical-only keys <-- sounds like a sparse array to me. Conceptually at least
22:54:05 <CakeProphet> and, it is a very popular language for many of the freelancing jobs I've found.
22:55:10 <Vorpal> CakeProphet, what about bancstar?
22:55:39 <ais523> good, you don't want to
22:55:45 <ais523> however, I think PHP is somehow worse
22:55:54 <Vorpal> CakeProphet, http://en.wikipedia.org/wiki/BANCStar_programming_language
22:55:55 <ais523> BANCstar was at least designed as a machine-code-equivalent
22:56:43 <CakeProphet> fizzie: ah okay, took me a second but I've got it now.
22:56:53 <Vorpal> CakeProphet, http://reocities.com/ResearchTriangle/station/2266/tarpit/bancstar.html too
22:57:31 <CakeProphet> it makes the likelihood correspond directly to the weight, which is what you want...
22:59:20 <fizzie> In R you'd just say sample(vals, 1, prob=probs).
23:00:29 <fizzie> > sample(c(1, 2, 3), 30, replace=TRUE, prob=c(0.1, 0.8, 0.1))
23:00:30 <fizzie> [1] 3 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 2 2 2 1 3 2 2 2
23:00:30 <lambdabot> <no location info>: parse error on input `='
23:00:45 <fizzie> lambdabot: It was just a prompt, I wasn't speaking to you. Sorry about that.
23:01:51 <fizzie> Maybe it's a bit unfair to compare to a statistical-computing language, though.
23:03:08 <CakeProphet> okay so how do I get my script into egobot
23:03:28 <fizzie> Did EgoBot take URLs directly?
23:04:33 <fizzie> !perl http://p.zem.fi/2hyh
23:04:54 <fizzie> Pastebin it somewhere where there's a "raw" link?
23:07:32 <CakeProphet> !addinterp wacro perl http://pastebin.com/raw.php?i=mDyuacbS
23:07:33 <EgoBot> Interpreter wacro installed.
23:09:14 <EgoBot> perl (sending via DCC)
23:09:37 <CakeProphet> monqy: you can also just click on the URL...
23:09:58 <monqy> shouldnt have pastebined it there...
23:10:18 <fizzie> Doesn't make a difference to Perl either.
23:10:54 <monqy> when I !showed it I got a M with foreground and background colours switched at the end of each line, which upset :(
23:11:39 <EgoBot> perl (sending via DCC)
23:12:44 <monqy> (and i think how M with foreground and background swapped is how irssi renders \r)
23:12:55 <monqy> like swapped I is how it does tab??
23:13:25 <CakeProphet> I think my favorite thing about Perl is that it supports sane versions of map and filter.
23:13:36 <fizzie> !graph a -> b; b -> c; c -> a
23:13:46 <fizzie> That's the best thing ever.
23:13:55 <monqy> CakeProphet: any general purpose language worth using should have those
23:14:18 <CakeProphet> surprisingly few have ones that are preferable to looping constructs.
23:14:29 <CakeProphet> Python has map and filter but poor anonymous functions.
23:14:59 <Sgeo_> Is Perl's anonymous subroutines better than Ruby's?
23:15:55 <CakeProphet> is how I generate the sequence of characters. uc is uppercase, pick is the weighted selection algorithm.
23:16:00 <fizzie> !perl print &{&{sub { my $f = shift; return &$f($f); }}(sub { my $f = shift; return sub { my $n = shift; return 1 if $n < 2; return &{&$f($f)}($n-1) + &{&$f($f)}($n-2); }; })}(8), "\n";
23:16:04 <fizzie> That's how good they are.
23:16:28 <CakeProphet> well, yes, if you call them directly you have to use &{}
23:16:40 <CakeProphet> but usually you're passing them as sub refs... which is just sub {...}
23:17:45 <fizzie> The "sub { my $a = shift; ... }" thing is a bit overly verbose, compared to, say, "\a -> ..."
23:17:52 <CakeProphet> and if you're using a sub that has a & prototype for its first argument you can omit the sub and the ,
23:18:02 <CakeProphet> similar to how map and grep work as built-ins
23:18:23 <fizzie> CakeProphet: Mountains are nice.
23:18:40 <CakeProphet> fizzie: also no one is forcing you to name those parameters. :D
23:19:27 <Sgeo_> Ruby kind of forces methods to only take one anon function at the end of its arg list if it's going to look good
23:19:40 <fizzie> Or if you're going to use them once but from inside another lexically scoped sub.
23:19:54 <Sgeo_> (It's possible to give several anon functions, but the syntax for passing those in is ... well, improving, but still not as nice
23:19:56 <CakeProphet> I wish Perl would allow the special bracket-only syntax with subroutine refs at the end as well as at the front of the call.
23:20:31 <fizzie> ("Huh? Shut up! Get lost! Mountains're nice. This's the life. Mountains're nice. Man, you're nosy. Here, take this.")
23:20:34 <CakeProphet> also sub{my($a,$b,$c)=@_;} is a bit better than using shifts for multi-argument subs.
23:21:04 <CakeProphet> but if you want brevity you could use $_[0], $_[1], ...
23:22:53 <CakeProphet> fizzie: oh I forgot there's also subref->(args...)
23:23:05 <fizzie> Or you could be the odd one out and use pop in one-arg subs. Truu underkround and so on.
23:23:33 <CakeProphet> fizzie: I've used pop when the evaluation order suited it.
23:24:15 <CakeProphet> pop would also be a better choice for golfing
23:25:23 <fizzie> !perl sub ding { while ($a = shift and $b = pop) { print "$a -> $b | " } } ding("foo", "bar", "baz", 3, 2, 1);
23:25:23 <EgoBot> foo -> 1 | bar -> 2 | baz -> 3 |
23:25:38 <fizzie> The best way to combine arguments that occur in pairs.
23:26:19 <fizzie> A software professional would call that the Burning Your Candle From Both Ends Idiom.
23:26:40 <CakeProphet> actually I think the -> syntax may require a bareword rather than an arbitrary expression
23:28:26 <ais523> -> is generally used for dereference-and-do-something
23:28:41 <ais523> you have ->() for subs, ->[] for arrays, ->{} for hashes, and plain -> for objects
23:29:04 <ais523> so why did you think subs would be different?
23:29:12 <ais523> ->{} only treats barewords specially because {} does
23:29:32 <CakeProphet> I just didn't remember whether or not you could have an expression on the left-hand side.
23:30:08 <CakeProphet> I was thinking of the $@ $% $$ syntax that requires a variable.
23:30:52 <ais523> Gregor: is a "5/4" time signature normally considered to be 3+3+2+2 rather than 2+2+2+2+2? I'd call 3+3+2+2 10/8 myself
23:31:20 <fizzie> Related construct: a != FOO ? a != BAR ? a != BAZ ? 0 : 3 : 2 : 1 in C.
23:31:57 <Patashu> oh wait, in terms of 8ths? then 3+3+2+2 -usually-
23:31:58 <ais523> Patashu: I'm going over a list of video game musics apparently in nonstandard time signatures
23:32:14 <Patashu> nonstandard time signatures rule
23:32:17 <ais523> and both the "5/4" examples I recognise (FF8's battle music, and the Ridley battle music from the Metroid series) have been 3+3+2+2
23:33:20 <Patashu> http://www.youtube.com/watch?v=O6f2yvhOupM This is all kinds of time signature crazyness
23:33:23 <ais523> apparently the Pokémon Red and Blue gym theme has four bars in 7/4 time; I think they meant the gym leader theme, which does have an unusual time signature
23:33:27 <ais523> but I can't count it as 7/4
23:33:34 <ais523> (the first 4 bars after the intro)
23:34:10 <ais523> 1 and 2 and 3 and 4 and 5 and 6 and 7 8 and a, I think it goes
23:34:20 <ais523> which makes it a usual 4/4 with a random bit of syncopation
23:34:50 -!- Phantom__Hoover has quit (Quit: Leaving).
23:34:57 <Patashu> nothing in pokemon uses weird time signatures I think ever?
23:35:14 <ais523> http://www.youtube.com/watch?v=9OO5VAKk0d8 is the song I'm thinking about
23:35:19 -!- GreaseMonkey has quit (Quit: about to lose connection).
23:35:20 <ais523> first section after the intro
23:35:50 <Patashu> why would anyone think it's 7/4? you just count
23:36:08 <ais523> I agree that it's 4/4 with syncopation, though
23:36:17 <Patashu> haha, and there's never surrender in the related videos (or is it only for me?)
23:36:55 <CakeProphet> the acronym quality has definitely improved.
23:37:53 <CakeProphet> though sometimes acro produces something charming with unusual letters.
23:38:12 <monqy> rdqctma is not good
23:38:20 <CakeProphet> thus is the nature of random selection. ;)
23:38:22 <ais523> shouldn't it be a real word if it's an acronym?
23:38:34 <ais523> PPI is a real abbreviation, anyway, although I've forgotten what it stands for
23:38:43 <ais523> CakeProphet: an acronym is an initialism that also happens to spell a real word (typically deliberately)
23:39:03 <Vorpal> ais523, one meaning is "pixels per inch"
23:39:03 <CakeProphet> Acronyms and initialisms are abbreviations formed from the initial components in a phrase or name.
23:39:25 <ais523> CakeProphet: that sentence doesn't prove anything at all
23:39:50 <CakeProphet> Acronyms and initialisms are abbreviations formed from the initial components in a phrase or name. These components may be individual letters (as in CEO) or parts of words (as in Benelux and Ameslan). There is no universal agreement on the precise definition of the various terms (see nomenclature), nor on written usage (see orthographic styling). While popular in recent English, such abbreviations have historical use in
23:39:50 <ais523> because I'm claiming that the difference between an acronym and an initialism is whether it spells a word or not
23:40:38 <ais523> Wikipedia says that dictionaries disagree on the definition, it seems
23:40:48 <ais523> which means that we almost certainly both have a dictionary supporting our point of view
23:40:50 <ais523> thus, we're both right
23:41:22 <pikhq> Whether or not it's a word depends on what you mean by "word".
23:41:38 <CakeProphet> except that I'm pretty sure the most common meaning involves an abbreviation formed from the initial letters of words (or selected letters from the words for example XML)
23:42:02 <Gregor> It doesn't matter one iota what dictionaries say.
23:42:17 <pikhq> Which is generally ambiguous, and only happens to be *slightly* less ambiguous in English than usual.
23:42:32 <Gregor> In all likelihood, most people, when presented with the word "acronym", would identify e.g. SMS as one.
23:43:08 <Gregor> Not that I actually polled, that's just my understanding of current word motion :P
23:43:13 <ais523> Gregor: you didn't answer my question about 5/4 time!
23:43:18 <CakeProphet> therefore: I win. That's was the point right? trying to win?
23:43:23 <Gregor> ais523: I wasn't here, presumably :P
23:43:31 <Gregor> ais523: (I just got back from a meal)
23:44:01 <ais523> Gregor: <ais523> Gregor: is a "5/4" time signature normally considered to be 3+3+2+2 rather than 2+2+2+2+2? I'd call 3+3+2+2 10/8 myself
23:44:09 <ais523> and I directed that at you because I thought you'd know
23:45:19 <ais523> I know I started writing a song in 11/8 once
23:45:24 <pikhq> ais523: I have a sneaking suspicion that list of music with nonstandard time signatures has rather a lot of Uematsu.
23:45:28 <CakeProphet> ais523: http://www.youtube.com/watch?v=WedRDYmtvX4
23:45:33 <Gregor> ais523: Denominators are irrelevant when the numerator is prime. 5 is 3+2 or 2+3, depending. You could (poorly) expand either of those into 2+2+2+2+2, but that's more like (2+2+2)+(2+2)
23:45:33 <ais523> it's pretty easy to do, but the result wasn't too inspiring
23:45:53 <ais523> Gregor: well, in my case, an ostensibly "5/4" song was 3+3+2+2
23:46:02 <ais523> and I suspect it perhaps ought to be labeled 10/8 instead
23:46:24 <Gregor> ais523: I would probably label that 10/8, yes. Splitting in the middle of a beat is less than ideal.
23:46:44 <Gregor> ais523: That being said, I'd need to hear it to be convinced of whether that statement is true or not (the 3+3+2+2 part)
23:47:44 <ais523> Gregor: the two examples I'm thinking of are final fantasy 8's regular battle music (http://www.youtube.com/watch?v=2WL4SGO85Uk) and Ridley's battle music from the Metroid series (e.g. http://www.youtube.com/watch?v=nLLjibR_c4Q)
23:48:14 <ais523> Ridley's been in pretty much every Metroid game (multiple times in some of them), so there are a lot of versions of his battle music to choose from
23:48:45 <Patashu> my favourite version of the ridley battle music is metroid fusion - not because it sounds good, but because it has interesting rhythms
23:49:17 <Gregor> (re 1st) plainly 3+2. Syncopation does not magically break rhythm.
23:49:18 <CakeProphet> okay so, I'm pretty sure the number of Haskell linked lists in uncountable, but how would you prove this?
23:49:35 <Patashu> ais523: did you listen to never surrender? if so, would you call it 5/8 or something else?
23:49:36 <ais523> Gregor: hmm, I was going on the percussion
23:49:51 <lambdabot> Try --help for command line options
23:49:53 <pikhq> http://www.youtube.com/watch?v=ltCbrDWGo68 This version of Don't Be Afraid should be much more tolerable. The PSX synth sounds like shit...
23:50:00 <lambdabot> Data.Generics.Schemes gdepth :: GenericQ Int
23:50:00 <lambdabot> Data.Generics.Schemes glength :: GenericQ Int
23:50:00 <lambdabot> Data.Generics.Schemes gnodecount :: GenericQ Int
23:50:18 <Gregor> ais523: The actual sequence of notes is not the division of the measure, it's the actual rhythmic balance that matters.
23:50:35 <ais523> Gregor: it doesn't sound like simple syncopation to me, just because there's no stressing on the third quaver of the bar at all
23:51:47 <Gregor> ais523: I was slightly (OK, extremely, in retrospect :P ) stretching the term, I just mean that the rhythm isn't sitting flatly on beats.
23:52:05 <ais523> what's your opinion on the Ridley music?
23:52:11 <Gregor> Haven't listened yet :P
23:52:17 <ais523> you're better at this than I am, I only got a B in my Music GCSE
23:53:02 <ais523> pikhq: I actually don't really like the instruments in that one, for whatever reason
23:53:34 <Gregor> ais523: The interlude is in 6! X-D
23:54:05 <ais523> well, it doesn't have to have the same time signature all the way through
23:54:43 <Vorpal> <Gregor> ais523: The interlude is in 6! X-D <-- that would be 720?
23:54:55 <Gregor> Yeah, I'd say the fundamental underlying structure is still 3+2 ... at parts it almost strains to be 4+1, but for the most part, it has that same underlying rhythm as the FF8 one.
23:55:00 <Vorpal> or is it just an exclamation mark?
23:55:03 <ais523> and actually, I completely missed the treble of the FF8 tune
23:55:09 <ais523> I'd tuned it out to hear the bass more carefully
23:55:31 <Gregor> ais523: That's what made it so plain for me in there, this doesn't really have that because everything other than the beat is ... not music :P
23:55:37 <Gregor> (Or only at the scale of full measures)
23:55:48 <CakeProphet> in the past I had done something in the past!
23:55:54 <Patashu> At times the FF8 battle theme goes 3+3+2+2 instead of 3+2+3+2
23:56:00 <pikhq> CakeProphet: Yes, English is a bitch.
23:56:10 <ais523> Patashu: it always goes 3+3+2+2 , was my argument
23:56:17 <ais523> but it doesn't quite, just usually
23:56:50 <Patashu> oh, if you're counting 8ths then yes
23:56:57 <Gregor> And my argument is quite simply that the fact that the rhythm doesn't fall plainly on beats doesn't mean that it should be renumbered such that they do. The 5 indicates an overall flow of 3+2, which it has.
23:58:12 <Gregor> That being said, people prefer 6/8 to 2/2 with triplets :)
23:58:14 <ais523> ah, so two 3/8 and two 2/8 becomes three crotchets and two crotchets, so it's 3+2
23:58:47 <Gregor> At a certain point if you argue about time signatures too much, you realize it's all irrelevant though 8-D
23:58:52 <Patashu> the 3+3+2+2 part is x.xx.xx.xx.xx.x.x.x.x and the 3+2 parts are x..x..x.x.x
23:59:24 <Gregor> Patashu: That is the musical notation I shall use from now on.
23:59:55 <Patashu> yeah it sucks but I don't know of a better way to represent rhythms in ascii