00:02:40 <fizzie> And obviously we don't know about the rest of the system, what you do with the Unix-timestamp-corresponding-to-the-most-recent-Manila-midnight-that-has-already-happened.
00:02:51 <lambdabot> forall a. (Floating a) => a -> a -> a
00:02:58 <pikhq_> Hmm. Let's put this vaguely algebraically: Manila = UTC + 8 hours. Now, if you have the UTC time 12:00 and want that in Manila time, you add 8 hours. If you have the Manila time 12:00 and want that in UTC time, you subtract 8 hours (obviously).
00:03:17 <Vorpal> fizzie: looks like Dagoth-Ur showed up in Arena too
00:03:31 <pikhq_> Hrm. That's not quite helping...
00:04:29 <fizzie> pikhq_: The simplest prose-style explanation I can make for the "clamp to midnight, subtract eight" rule is: "clamp to midnight" represents UTC 00:00:00; after you subtract eight hours, it represents UTC 16:00:00; any UTC 16:00:00 time will be a Manila 00:00:00, because it's UTC+8.
00:04:42 <pikhq_> fizzie: Right, that's a bit better.
00:04:58 <fizzie> But I did try that out earlier and it didn't help, so it probably won't now, either.
00:08:29 -!- oerjan has quit (Quit: Clearly you are doomed, good night.).
00:09:12 <fizzie> Anyway, if you look at Manila time of 04:00, the corresponding UTC time is 20:00 (subtract eight hours). When you clamp to midnight, you're subtracting 20 hours; so the UTC midnight will be Manila time 04:00-(20 hours) = 08:00. You will need to subtract 8 hours from that to get a midnight in Manila. (But it will be the midnight of the previous day, because you will be subtracting a total of 28 hours.)
00:10:21 <fizzie> For Manila 12:00, corresponding UTC is 04:00. Clamp to midnight means subtracting 4 hours. That UTC midnight is Manila time 08:00. Again, you will need to subtract 8 hours to get a midnight in Manila, and will end up subtracting a total of 12 hours, and you get the midnight of "today" in Manila.
00:12:26 <fizzie> In fact, any UTC midnight is going to always be 08:00AM in Manila, that's what UTC+8 means. If you want a midnight in Manila, you must subtract eight hours, or add 16.
00:14:14 <myndzi> i'm writing. be patient
00:14:44 <fizzie> I'm not going to be awake to see how this ends, sadly; it's past 02am here.
00:14:54 <myndzi> there'll be a link for you tomorrow
00:15:04 <myndzi> sorry for the frustration i've caused, thank you for your efforts
00:16:52 <fizzie> (It is 02:15AM here in UTC+2. Currently it's 00:15AM in UTC. If you do a "clamp to UTC midnight" operation, you will subtract 15 minutes, so that time in my timezone will be 02:00AM. You'll need to subtract 2 more hours to get a local midnight. Substitute 8 for 2 for Manila. Sorry, couldn't resist.)
00:19:02 <fizzie> (Current Unix timestamp is about 1322871375. 1322871375%86400 = 975, about 16 minutes. If you subtract that from current time, it's about 02am here. You will need to subtract further two hours from the Unix timestamp to get a Unix timestamp value that corresponds to our midnight. Sorry, couldn't resist that either.)
00:22:32 <fizzie> (When the time was "today, 01:00am" here in Finland, it was 23:00 in UTC. If you clamped that timestamp to previous UTC midnight, you'd end up subtracting 23 hours, leading to "yesterday, 02:00am". Then you could subtract two more hours to get a local midnight, but it would be "yesterday, 00:00", a day earlier than you wanted. This might explain the issues you mentioned.)
00:22:38 <fizzie> Seriously for reals now. ->
00:22:39 -!- derdon has quit (Remote host closed the connection).
00:26:27 <elliott> myndzi: I think fizzie is trolling you.
00:28:55 <fizzie> (If it was "today, 01:00am" here, and you wanted to round to local midnight, you could (I'm not sure I would): add two hours to the timestamp, so you'd have a Unix timestamp that'd translate to UTC 01:00am; a different instant in time, yet same in local time. Then clamp to UTC midnight, which would end up subtracting the "proper" one hour. Then you would reverse the initial "time zone conversion" by subtracting two hours, and end up with local "today, 00:00", U
00:28:55 <fizzie> TC. That sort of thing would work, though the idea of having Unix timestamps that represent time instants that have the "local time" value when converted-to-display-as-UTC is a bit iffy. But if you're doing something like that, it does work.)
00:29:06 <fizzie> No, maybe some of that stuff might actually help.
00:29:27 <fizzie> I mean, after talk of "timestamps in local time", it's not inconcievable it could be something like that.
00:32:21 <fizzie> (But I'm still pretty sure if you just get current time() value, round to previous multiple of 86400, then; (a) subtracting K hours will give a local midnight in the UTC+K timezone, but it could be the "wrong" midnight; and (b) adding K hours will not give a local midnight, assuming K is not 12; at least as long as the resulting value is treated as a real Unix timestamp and converted to local time properly.)
00:32:28 <fizzie> Okay, maybe I really should go.
00:32:55 <HackEgo> /home/hackbot/hackbot.hg/multibot_cmds/lib/limits: line 5: exec: finger: not found
00:33:39 <elliott> What does "..." even mean? You say it so often.
00:34:09 -!- DCliche has joined.
00:35:21 <elliott> That's not what it means, that's what it is.
00:35:47 -!- Phantom_Hoover has quit (Quit: Leaving).
00:35:55 <elliott> 'Cause it's not installed?
00:35:59 <elliott> bash: finger: command not found
00:37:38 -!- Ngevd has quit (Ping timeout: 252 seconds).
00:37:40 <fizzie> (Also even after all this thinking, if I were making a "production" system, I'd seriously consider testing my thing at Manila local times of 04:00, 12:00 and 20:00, and checking that mycode(now()) approximately equals now()-4*3600, now()-12*3600 and now()-20*3600, respectively. Assuming now() returns current Unix timestamp, and mycode() is supposed to return a Unix timestamp corresponding to local midnight.)
00:37:41 -!- Klisz has quit (Ping timeout: 255 seconds).
00:37:53 <HackEgo> 2010-10-22.txt:21:21:13: <elliott> pikhq: Sure, neither of us can watch that, but...
00:38:15 <elliott> fizzie: Having fun are we?
00:48:18 -!- GreaseMonkey has quit (Quit: The Other Game).
00:48:27 <elliott> fizzie: I hope you're not still here.
00:51:52 -!- elliott has quit (Remote host closed the connection).
00:52:47 -!- elliott has joined.
00:53:09 <elliott> fizzie: Keep not being here, then.
00:53:22 <elliott> fizzie: (But I don't think myndzi is still here.)
00:54:11 -!- HalfTauRSquared has changed nick to PiRSquared17.
00:58:07 <fizzie> But I'm unsure why not: 1. Get current Unix timestamp. 2. Convert timestamp into a broken-down structure with 'year', 'month', 'day', 'hour', 'min', 'sec' members in timezone of interest; pretty much any language can do that. 3. Set hour = min = day = 0. 4. Convert structure to Unix timestamp. 5. Use result for DB query.
00:58:19 <fizzie> So simple there's no many places to go wrong; is easy to change the target timezone; and (major win?) works also for the large parts of the world that do the stupid DST thing, even during the changeover days.
00:58:33 <fizzie> Except I mean hour = min = sec = 0.
00:58:43 <fizzie> Seconds, days, who cares.
00:59:15 <elliott> fizzie: I think it's because it looks like WHERE foo > ((bar - nonsense) + lol).
00:59:41 <elliott> So it'd be either (a) actually learning SQL's trivial timezone facilities (which would take 5 minutes, as opposed to the 2 days invested so far; clearly unworkable, this is the Easiest Way) or (b) another round-trip.
00:59:51 <fizzie> I... guess it could be that.
01:00:05 <elliott> fizzie: Well, *he* claims it's because he doesn't know much SQL.
01:00:50 -!- hagb4rd has quit (Quit: Nettalk6 - www.ntalk.de).
01:01:31 <elliott> fizzie: How does one go from an SDL_Surface to its PixelFormat :P
01:01:33 <fizzie> If it's a programming language doing the thing, it doesn't need SQL. Though I suppose it could be that it's just a fixed query without parameters or something.
01:01:51 <fizzie> Uh, maybe you needed to lock it first?
01:01:56 <elliott> fizzie: Well, what I meant is that foo and bar are both columns.
01:01:59 <elliott> nonsense and lol being constants.
01:02:55 <fizzie> The PixelFormat for the screen surface might be allowed to change. Maybe. Well, maybe not.
01:03:24 <elliott> fizzie: Yes, but how do I get at it?
01:05:01 <elliott> fizzie: Hmm. A thing that seems to be gleefully unexposed through the Haskell binding. I swear I've solved this problem before.
01:05:15 <fizzie> Ah, right, the binding.
01:05:25 <fizzie> I vaguely recall something about it too.
01:05:41 <elliott> Someone make a grep alterantive called gerp, that won't be confused at all.
01:07:25 <fizzie> surfaceGetPixelFormat :: Surface -> PixelFormat
01:07:46 <fizzie> From the docs of Graphics.UI.SDL.Types.
01:08:42 <elliott> fizzie: (A pure function...?)
01:09:08 <fizzie> Yeah, that's a bit funny.
01:09:32 <fizzie> surfaceGetPixelFormat surface
01:09:33 <fizzie> withForeignPtr surface $ \ptr ->
01:09:33 <fizzie> newForeignPtr_ =<< (\hsc_ptr -> peekByteOff hsc_ptr 4) ptr
01:10:04 <elliott> fizzie: Well, there's nothing wrong with that for immutable fields.
01:10:12 <elliott> You just said it could change is all.
01:10:36 <fizzie> After all, setvideomode returns a new screen surface.
01:11:05 <elliott> Now to figure out why SDL-gfx circles are cyan despite being drawn with a white colour.
01:11:06 <fizzie> It is "read-only" in the SDL_Surface struct doc.
01:11:21 <elliott> I have a feeling the answer may be very 90s.
01:12:22 <fizzie> ARGB <-> RGBA sort of mishaps can easily get cyan, but I guess there were mapping functions that took a PixelFormat.
01:12:54 <elliott> white <- SDL.mapRGB (SDL.surfaceGetPixelFormat surf) 255 255 255
01:12:54 <elliott> SDLP.box surf (SDL.Rect 10 10 10 10) white
01:13:01 <elliott> is what it looks like now after changing circles to boxes :P
01:13:20 <elliott> Which generates a single cyan pixel. *sign* :/
01:13:34 <fizzie> Well, that certainly looks like it should be someone else's problem to make work right.
01:14:21 <fizzie> Maybe the lazy language made libSDL lazy too, and it couldn't be arsed to fill more bytes.
01:14:31 <elliott> Well, SDL-gfx is nothing "official", is it?
01:14:42 <elliott> All these things are so dormant because nobody actually does software rendering in 2011.
01:14:53 <elliott> And if they do they don't use wuss drawing libraries to do it.
01:17:13 <fizzie> Why's mapRGB 'IO Pixel' anyway? I don't think PixelFormat structures ever change. (Though don't quote me on that.) ((Actually, come to think of it, the palettes probably are mutable.))
01:17:23 <fizzie> Vorpal: I don't think it's any mor
01:17:31 <fizzie> e unnatural than RGBA.
01:17:34 -!- zzo38 has joined.
01:17:49 <Vorpal> fizzie: RBGA is just the normal way of doing it though afaik
01:17:55 <Vorpal> elliott: I believe people mostly use sdl to get a opengl context these days, and sound of course
01:18:11 <fizzie> Also you get to write 0xaabbcc without having to add an explicit 00 if you don't-care about alpha.
01:18:54 <elliott> Vorpal: Sound? OpenAL these days, surely.
01:19:06 <Vorpal> fizzie: nevertheless, ARGB is seldom seen when drawing stuff. Maybe in file formats? I don't know.
01:19:23 <fizzie> It's all /Open.L/ nowadays.
01:19:29 <Vorpal> elliott: iirc openal is great for 3D sound, with positioning and such
01:19:43 <Vorpal> elliott: but make it rather complicated to play, say, a stereo sound track
01:19:55 * elliott is planning to use OpenAL for AII, and that's 2D.
01:20:12 <fizzie> Vorpal: And of course in-memory it may easily end up being ABGR or BGRA if you read it byte-orientedly.
01:20:13 <elliott> Mostly because some of that positioning stuff is relevant, if only to make further away sounds quieter.
01:20:46 <Vorpal> fizzie: is that for little or big endian?
01:21:11 <Vorpal> fizzie: but stuff like opengl does it as GLfloat[4] basically
01:22:10 <fizzie> The pixel buffers still have a format. But I suppose you normally aren't supposed to actually play with those bytes.
01:22:46 <Vorpal> fizzie: you generally just send them along in buffer objects and such
01:23:06 <elliott> Honestly, all I want to do is animate some circles going around each other.
01:23:10 <elliott> Maybe I can use that gloss thing.
01:23:44 <elliott> Haskell's FFI is low-overhead, but not /that/ low-overhead.
01:23:51 <Vorpal> elliott: could you do a real time software ray tracer in haskell?
01:24:09 <elliott> At least if realtime involves >10fps.
01:24:12 <Vorpal> elliott: you can for some simple scenes
01:24:24 <Vorpal> I have one that runs in 50 FPS for a plane, two balls and a cone here
01:24:29 <elliott> I'm sure you could do it. Probably not on Unix.
01:24:38 <elliott> @ should be able to do ray-tracing just fine.
01:24:55 <elliott> Vorpal: "Can Haskell do X in an environment practically designed to work against Haskell in areas such as X?"
01:24:56 <Vorpal> elliott: it is part of a lab at university. We are running it on core i7s there
01:25:20 <Vorpal> elliott: I'm just saying you can do it in C (actually C++ here...)
01:25:29 <Vorpal> elliott: you said you couldn't do it with C
01:25:57 <elliott> Well, I thought you meant more complex scenes than that.
01:26:34 <pikhq_> Congrats, you named one of the few areas where the performance of tight, math-heavy loops that fit in cache is still relevant!
01:26:50 * elliott thinks @ will raytrace just fine.
01:26:54 <Vorpal> elliott: but you can to some degree do it on more complex scenes, you just need like way more CPUs :P
01:26:55 <fizzie> I've again forgotten what "Ncon" meant in the "caveats" field of glxinfo. I guess non-conformant, but that's not saying much either.
01:27:02 <elliott> Pure mathematical code is pretty easy to eliminate all the overhead from.
01:27:06 <pikhq_> Which, for perverse reasons, is what most people think of as more general "performance".
01:27:17 <Vorpal> pikhq_: indeed not the case.
01:27:18 <elliott> Just get things unboxed and the loop into an iteration and you're done.
01:27:32 <Vorpal> pikhq_: it is however an area I'm greatly interested in.
01:28:22 <pikhq_> elliott: I'd imagine worst-case scenario you'd have a @lang-subset->verified-safe-machine-code compiler and a way to execute verified-safe machine code.
01:28:29 <elliott> @ might lose where you have a tight loop that involves a lot of operations on things larger than machine words and no allocation.
01:28:39 <Vorpal> pikhq_: ray tracing is interesting. Especially real time ray tracing. Since there is no way we are going to get real time photon mapping (or even further away I believe: real time MLT)
01:28:39 <elliott> There might be some overhead imposed there.
01:28:44 <pikhq_> Or even make that assembly instead of @ lang.
01:28:58 <elliott> pikhq_: Weelll, there's @ll.
01:29:03 <elliott> But that's not really for human consumption.
01:29:25 <elliott> (@ll being an imperative, safe-by-construction language that shares @lang's type system.)
01:29:29 <pikhq_> It's only human-used for perverse edge cases, or for perverse people.
01:29:35 <elliott> (Kind of like LLVM IR, but with things like allocation built in to the language.)
01:29:49 <elliott> (@lang of course compiles down to @ll.)
01:29:52 <pikhq_> Vorpal: Perverse edge case, perverse people.
01:29:53 <Vorpal> pikhq_: I guess those count as perverse?
01:29:53 <elliott> Vorpal: "perverse edge cases", "perverse people"
01:30:05 <Vorpal> pikhq_: compiler writers?
01:30:11 <Vorpal> for the generating bit
01:30:20 <pikhq_> They're not actually human-writing assembly.
01:30:26 <pikhq_> They're human-writing assembly generation.
01:30:31 <elliott> Oh, @ will also lose where you have a tight loop that does allocation, and can deal with a slow allocation, but /cannot/ deal with a GC pause.
01:30:57 <elliott> More commonly: @ will lose if you need a loop to not allocate but you can't get the @lang compiler to not allocate there.
01:31:16 <elliott> Although since I can have pluggable GCs, you could run a low-throughput concurrent collector in those situations for that pool.
01:31:22 <Vorpal> elliott: how well will @ keep up with hard realtime requirements? I know there aren't a lot of them on PCs. But one case comes to mind if you are interested.
01:32:07 <Vorpal> elliott: accelerometer in laptop. You want to send the "get the fucking head off the disk RIGHT NOW" command with hard realtime constraints when it happens.
01:32:17 <elliott> Er, I think that's done in hardware.
01:32:23 <Vorpal> elliott: not on thinkpads at least
01:32:33 <Vorpal> elliott: you need a polling daemon running on it
01:32:35 <elliott> But anyway, does that correspond to an interrupt on the host computer?
01:32:51 <Vorpal> elliott: it is terrible
01:32:55 <elliott> I don't *want* @ to be good at this. Your HD deserves to die if it's protected by such an infernal contraption.
01:33:11 <elliott> If it caused a host interrupt instead, then I think @ would be able to handle it.
01:33:22 <elliott> I mean, if you're under heavy load it might not work out.
01:33:24 <pikhq_> Vorpal: Um, that's not going to be any worse on @ than on any other OS.
01:33:34 <elliott> But yeah, if you have a userspace polling daemon and that works, then @ will handle it.
01:33:38 <elliott> But I'm shocked that it works.
01:33:49 <pikhq_> If it needs to poll, pretty much any kernel is only going to poll when you jump back into kernel space.
01:33:51 <Vorpal> elliott: I can't say I have tested it
01:34:03 <elliott> Vorpal: Lend Sgeo your laptop and you'll find out.
01:34:16 <pikhq_> And probably not even that often; I'd be willing to bet it simply sets up a timer for the checking.
01:34:32 <pikhq_> Which shouldn't be anything impossible for @.
01:34:35 <elliott> Vorpal: Anyway, @ is designed for SSDs :)
01:34:37 <Vorpal> elliott: anyway yes it seems like a terrible design due to not offering any protection during booting
01:34:49 <elliott> Specifically, 1-2 Tio+ SSDs.
01:35:04 <Vorpal> elliott: those are fucking expensive
01:35:11 <pikhq_> Pretty much all you need is for @ to make reasonable guarantees on interrupts being handled (including timer interrupts)
01:35:26 <pikhq_> Vorpal: @ is designed for where computers will be, not where computers are and have been.
01:35:26 <elliott> They probably won't be when I'm in my 20s.
01:35:40 <Vorpal> by the time @ is done SSDs will be a thing of the past :P
01:35:47 <elliott> pikhq_: Can I hire you to write my marketing copy?
01:35:54 <pikhq_> elliott: Plausibly. :)
01:36:09 <elliott> It'll be like those computer ads from the 60s.
01:36:19 <fizzie> By the time @ is done we've all been fused into the Core Mind, I'd say.
01:36:23 <elliott> @. The revolutionary new system from @ Systems, Incorporated.
01:36:24 <lambdabot> Plugin `compose' failed with: Unknown command: "The"
01:36:27 <pikhq_> fizzie: At which point, no worries.
01:36:33 <Vorpal> <pikhq_> Vorpal: @ is designed for where computers will be, not where computers are and have been. <-- you mean DRM-filled pieces of crap designed to run C and .NET code?
01:36:44 <pikhq_> Vorpal: That's where computers are, yes.
01:36:48 <elliott> The *only* computer operations system powering the new Microsoft Singularity(tm) software.
01:36:53 <Vorpal> pikhq_: and where they are going.
01:37:07 <elliott> Get it now before Omega gets it for you.(tm)
01:37:07 <Vorpal> pikhq_: oh? I'm not sure we will get less DRM
01:37:10 <fizzie> Trusted @-puting Initiative.
01:37:24 <pikhq_> Vorpal: I give it 10 years tops for the media companies to collapse entirely.
01:37:35 <elliott> Vorpal: I don't think mandatory hardware DRM will catch on
01:37:39 <Vorpal> pikhq_: what about DRM for games?
01:37:51 <Vorpal> elliott: I *hope* it won't
01:37:54 <elliott> Vorpal: So it's not something "computers" will suffer by the @-relevant definition
01:38:04 <pikhq_> Though the game industry is probably *less* doomed than others.
01:38:13 <Vorpal> pikhq_: but where will we be then? I don't think there is enough people to support open source for niche applications
01:38:31 <Vorpal> pikhq_: DRM for autodesk?
01:38:44 <elliott> Although I don't know what pikhq_ intended by "media" exactly.
01:38:52 <Vorpal> but those companies want DRM too
01:38:59 <pikhq_> elliott: Mostly TV, music, movies.
01:39:19 * elliott thinks if Netflix's boost for original content gets off the ground, then it'll surviev.
01:39:28 <Vorpal> pikhq_: I can see more than just media wanting DRM: games, specialised applications
01:39:28 <elliott> And I would consider Netflix a TV company.
01:39:47 <elliott> Vorpal: I think specialised applications need DRM less than mass-market stuff.
01:39:55 <elliott> Because the people who want it can afford it, and nobody else wants it.
01:40:04 <elliott> And ofc the people who want it need support.
01:40:15 <elliott> And so the internet won't help for support.
01:40:28 <Vorpal> elliott: mathematica then? It isn't exactly mass-market. But it is popular enough to find well seeded over torrents
01:40:53 <Vorpal> maybe not the linux version, but certainly the windows version
01:41:06 <elliott> What Wolfram wants has very little connection to what is reasonable or what anyone else wants
01:41:27 <Vorpal> elliott: true. But other applications in the same general category. Mathlab perhaps.
01:41:44 <pikhq_> Also, DRM is a quixotic effort anyways.
01:41:51 <elliott> http://en.wikipedia.org/wiki/MATHLAB
01:41:53 <Vorpal> I believe I can get AutoCAD from university btw
01:41:57 <myndzi> https://docs.google.com/a/searchfanatics.com/spreadsheet/ccc?key=0Aqlaw_Uc29ZrdGRuMDVoQzcwR1VHQm1VV3AxZXZRX2c&hl=en_US#gid=0
01:41:59 <elliott> MATHLAB is an on-line system providing machine aid for the mechanical symbolic processes encountered in analysis. It is capable of performing, automatically and symbolically, such common procedures as simplification, substitution, differentiation, polynomial factorization, indefinite integration, direct and inverse Laplace transforms, the solution of linear differential equations with constant coefficients, the solution of simultaneous linear equa
01:41:59 <elliott> tions, and the inversion of matrices. It also supplies fairly elaborate bookkeeping facilities appropriate to its on-line operation.
01:42:13 <elliott> myndzi: Did you read fizzie's last words?
01:42:22 <myndzi> nope, i've been writing all this time
01:42:27 <myndzi> which last words where
01:42:44 <elliott> 00:16:52: <fizzie> (It is 02:15AM here in UTC+2. Currently it's 00:15AM in UTC. If you do a "clamp to UTC midnight" operation, you will subtract 15 minutes, so that time in my timezone will be 02:00AM. You'll need to subtract 2 more hours to get a local midnight. Substitute 8 for 2 for Manila. Sorry, couldn't resist.)
01:42:44 <elliott> 00:19:02: <fizzie> (Current Unix timestamp is about 1322871375. 1322871375%86400 = 975, about 16 minutes. If you subtract that from current time, it's about 02am here. You will need to subtract further two hours from the Unix timestamp to get a Unix timestamp value that corresponds to our midnight. Sorry, couldn't resist that either.)
01:42:47 <elliott> 00:19:06: <fizzie> Okay, seriously. ->
01:42:49 <elliott> 00:22:32: <fizzie> (When the time was "today, 01:00am" here in Finland, it was 23:00 in UTC. If you clamped that timestamp to previous UTC midnight, you'd end up subtracting 23 hours, leading to "yesterday, 02:00am". Then you could subtract two more hours to get a local midnight, but it would be "yesterday, 00:00", a day earlier than you wanted. This might explain the issues you mentioned.)
01:42:54 <elliott> 00:22:38: <fizzie> Seriously for reals now. ->
01:42:56 <elliott> 00:22:39: -!- derdon has quit (Remote host closed the connection).
01:42:58 <elliott> 00:26:27: <elliott> myndzi: I think fizzie is trolling you.
01:43:00 <elliott> 00:28:55: <fizzie> (If it was "today, 01:00am" here, and you wanted to round to local midnight, you could (I'm not sure I would): add two hours to the timestamp, so you'd have a Unix timestamp that'd translate to UTC 01:00am; a different instant in time, yet same in local time. Then clamp to UTC midnight, which would end up subtracting the "proper" one hour. Then you would reverse the initial "time zone conversion" by subtracting two hours, and en
01:43:05 <elliott> d up with local "today, 00:00", U
01:43:06 <Vorpal> elliott: "AutoCAD 2012 was released on 2011, March 22" <-- wut.
01:43:07 <elliott> 00:28:55: <fizzie> TC. That sort of thing would work, though the idea of having Unix timestamps that represent time instants that have the "local time" value when converted-to-display-as-UTC is a bit iffy. But if you're doing something like that, it does work.)
01:43:11 <elliott> 00:29:06: <fizzie> No, maybe some of that stuff might actually help.
01:43:13 <elliott> 00:29:27: <fizzie> I mean, after talk of "timestamps in local time", it's not inconcievable it could be something like that.
01:43:16 <elliott> 00:30:28: <elliott> fizzie: Hi.
01:43:18 <elliott> 00:32:21: <fizzie> (But I'm still pretty sure if you just get current time() value, round to previous multiple of 86400, then; (a) subtracting K hours will give a local midnight in the UTC+K timezone, but it could be the "wrong" midnight; and (b) adding K hours will not give a local midnight, assuming K is not 12; at least as long as the resulting value is treated as a real Unix timestamp and converted to local time properly.)
01:43:23 <elliott> 00:32:28: <fizzie> Okay, maybe I really should go.
01:43:26 <myndzi> a search term would have sufficed
01:43:27 <elliott> 00:37:40: <fizzie> (Also even after all this thinking, if I were making a "production" system, I'd seriously consider testing my thing at Manila local times of 04:00, 12:00 and 20:00, and checking that mycode(now()) approximately equals now()-4*3600, now()-12*3600 and now()-20*3600, respectively. Assuming now() returns current Unix timestamp, and mycode() is supposed to return a Unix timestamp corresponding to local midnight.)
01:43:55 <elliott> @tell fizzie myndzi's reply: https://docs.google.com/spreadsheet/ccc?key=0Aqlaw_Uc29ZrdGRuMDVoQzcwR1VHQm1VV3AxZXZRX2c&hl=en_US#gid=0
01:43:57 <Sgeo> Why would such a thing require the co-operation of the OS at all?
01:43:59 <myndzi> it doesn't look like he got it anyway
01:44:00 <Sgeo> That sounds stupid to me
01:44:16 <myndzi> and i don't think he was trolling me because everyone here thought i was crazy ;)
01:44:25 <myndzi> i thought i was crazy too until i sat down and thought about it
01:44:46 <myndzi> please do tell me if the spreadsheet makes it clear for you...?
01:45:04 <elliott> myndzi: I only glanced at it. I'd rather leave it up to fizzie, so I guess we'll see tomorrow.
01:45:04 <Vorpal> myndzi: no: "Firefox has detected that the server is redirecting the request for this address in a way that will never complete."
01:45:09 <Sgeo> elliott, telling the HD head to get off of the disk in the event of significant motion
01:45:18 <myndzi> it's just a google docs link
01:45:29 <pikhq_> myndzi: So, basically, you were discussing a *completely different thing* than we thought you were.
01:45:32 <Vorpal> not going to spend time debugging
01:45:54 <myndzi> so, basically, you have no reading comprehension at all, as it was stated multiple times and clearly
01:45:56 -!- TeruFSX_ has quit (Read error: Connection reset by peer).
01:45:57 <Sgeo> elliott, I'm responding to something Vorpal said I thin
01:46:15 <pikhq_> Of course to go from 00:00:00 UTC+8 -> x UTC+0, you add 8 hours, thus getting 08:00:00 UTC+0.
01:46:18 <Sgeo> <elliott> Er, I think that's done in hardware.
01:46:18 <Sgeo> <Vorpal> elliott: not on thinkpads at least
01:46:20 <Vorpal> Sgeo: because bad architecture
01:46:23 <Sgeo> Oh, didn't see that
01:47:05 <pikhq_> To go from x UTC+0 -> UTC+8 you add 8. To do the inverse you subtract.
01:47:12 <Vorpal> <myndzi> so, basically, you have no reading comprehension at all, as it was stated multiple times and clearly <-- you just failed horribly at expressing yourself then
01:47:31 -!- TeruFSX has joined.
01:47:48 * elliott still thinks myndzi is wrong, but also thinks that multiple people arguing with myndzi is much less productive than the best person here arguing with myndzi alone.
01:47:49 * myndzi still thinks elliott is wrong, but also thinks that multiple people arguing with elliott is much less productive than the best person here arguing with elliott alone.
01:48:20 <Vorpal> I'm not sure about that for either of you.
01:48:36 <Vorpal> PiRSquared17: not still. again.
01:48:44 <Vorpal> because myndzi bought it up
01:48:54 <elliott> <Vorpal> I'm not sure about that for either of you.
01:49:12 <Vorpal> I'm not going to specify further to avoid offending you both
01:50:13 <elliott> Vorpal: (The best person is meant to be fizzie, and myndzi's response was scripted, if that's what you mean.)
01:50:38 <Vorpal> not at all what I meant
01:51:08 <Vorpal> elliott: speaking of rendering, this is cool: https://en.wikipedia.org/wiki/Metropolis_light_transport
01:51:23 <elliott> Vorpal: I know what you think you were getting at, but it doesn't really work as an insult at all.
01:51:38 <Vorpal> elliott: who said insult?
01:51:41 <Sgeo> Is there a name for the class of functions that can be expressed as an infinite term polynomial?
01:51:46 <Vorpal> elliott: just forget it!
01:52:03 <Vorpal> Sgeo: sure one such name is "functions that can be expressed as an infinite term polynomial"
01:52:47 <myndzi> i can't even find in the history the last time it was summed up, but somebody else restated it and i agreed
01:53:14 <myndzi> hopefully the document makes both the question and the answer exceedingly clear
01:53:19 <myndzi> and everybody can agree and be happy :)
01:53:26 <Vorpal> I do not care about the time problem any more.
01:53:27 <myndzi> good thing i did the chart too
01:53:36 * elliott expects it'll go another way entirely.
01:53:51 <Vorpal> elliott: what will go another way?
01:53:58 <elliott> The thing you don't care about.
01:54:20 <myndzi> tis all i have to say on the matter, go back to ... whatever it is you guys do in here :P
01:55:17 <elliott> myndzi: But what if fizzie proves you wrong. It's no fun without bloodshed :(
01:55:49 -!- GreaseMonkey has joined.
01:56:03 <myndzi> i'll happily be proven wrong
01:56:12 <Vorpal> <elliott> The thing you don't care about. <-- ?
01:56:19 <myndzi> all i wanted to do was grok it in the first place
01:56:24 <elliott> Vorpal: You're being pretty thick.
01:56:38 <Vorpal> elliott: I don't care about what way it is going any more!
01:57:07 <elliott> <Vorpal> I do not care about the time problem any more.
01:57:09 <elliott> * elliott expects it'll go another way entirely.
01:57:10 <elliott> <Vorpal> elliott: what will go another way?
01:57:11 <elliott> <elliott> The thing you don't care about.
01:57:25 <Vorpal> elliott: go another way than WHAT?
01:57:27 <myndzi> i care what about thing going that where more have it done
01:57:33 <elliott> <myndzi> i can't even find in the history the last time it was summed up, but somebody else restated it and i agreed
01:57:33 <elliott> <myndzi> hopefully the document makes both the question and the answer exceedingly clear
01:57:33 <elliott> <myndzi> and everybody can agree and be happy :)
01:57:41 <elliott> Vorpal: For something you don't care about you are asking lost of questions about it.
01:57:55 <Vorpal> elliott: oh I see. A trick.
01:58:18 <Vorpal> elliott: I'm not even meta-discussing it further.
01:58:24 <elliott> You're being a fucking moron, I said something to someone other than you and then you proceeded to act dense about what I was talking about for like five minutes.
01:58:42 <myndzi> hey guys? i heard that .999 repeating = 1
01:58:51 <Vorpal> elliott: you mean <elliott> * elliott expects it'll go another way entirely wasn't aimed at me?
01:58:57 <elliott> Of course it fucking wasn't.
01:59:00 <myndzi> he was responding to me
01:59:05 <Vorpal> * elliott expects it'll go another way entirely.
01:59:05 <elliott> myndzi: .999 repeating does indeed = 1.
01:59:13 <elliott> .999.999.999.999.999... = 1.
01:59:13 <Vorpal> thing is, it didn't look like that here
01:59:19 <myndzi> elliott: i know, but it is a nefarious and easy flamewar starter
01:59:35 <elliott> myndzi: You missed my joke. :'(
01:59:42 <elliott> I don't think anyone in here is stupid enough to deny that .9r = 1.
01:59:43 <myndzi> i was typing at the time
02:00:22 <Sgeo> Is there an easy way to determine whether a given number has more than one representation in decimal?
02:00:26 <Vorpal> myndzi: that is only true in base 10 surely?
02:00:38 <Vorpal> in base 16 I assume .ffff = 1
02:00:47 <myndzi> what about .fffffuuuuuuuu
02:01:00 <Vorpal> myndzi: which base is that?
02:01:01 <myndzi> i actually managed to explain to my mom why the adding digits trick works in any base
02:01:22 <myndzi> Vorpal: well it has to be at least 31
02:01:23 <Jafet> > 0.99999999999999999999
02:01:26 <myndzi> something like that anyway
02:01:32 <elliott> I love how http://en.wikipedia.org/wiki/0.999... has like a thousand proofs.
02:01:38 <Sgeo> elliott, What about 0? Or .333repeating
02:01:56 <PiRSquared17> @type (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
02:01:57 <elliott> Sgeo: 0 = 0.00000000000000000000000000000 :-)
02:01:57 <lambdabot> Workaround: use nested tuples or define a data type
02:01:59 <Vorpal> elliott: I love how this section exists: https://en.wikipedia.org/wiki/0.999..#In_popular_culture
02:02:16 <elliott> Sgeo: .3r is a fair point.
02:02:28 <myndzi> interestingly i actually have a script that detects likely encoded text in base 2 through 36 and makes a guess at the correct base, then decodes it
02:02:35 <myndzi> it was interesting to write
02:02:51 <elliott> Sgeo: Anything with a finite decimal representation has multiple representations.
02:03:10 <elliott> Sgeo: I'm sure you can find for yourself how to determine whether a number has one of those.
02:03:13 <myndzi> 3C11343F3M3I113B343P38113I3H38113N3I113M343S113N3B3C3H3A3M113C3H11343L353C3N3L343L3S1135343M383M
02:03:18 <Vorpal> elliott: hm what about 0+
02:03:36 <Vorpal> I can't think of another for 0
02:03:39 <elliott> 0 is just, like, -0.9999999999999999999999999999999999999999.
02:03:50 <Vorpal> elliott: no that is -1?
02:03:57 <elliott> Vorpal: No, that's -(0.999999999).
02:04:12 <Vorpal> what do you mean by (-0).99999999999 exactly
02:04:19 <elliott> (-0).9999999... = -0 + 9/9 = -0 + 1 = +0.
02:04:24 <myndzi> obviously he means negative zero times point nine repeating to infinity
02:04:31 <myndzi> the answer is obviously q
02:04:53 <Sgeo> elliott, are there numbers with more than two decimal representations?
02:05:18 <elliott> Sgeo: Yes, for instance 0 is 0, 0.00000..., and (-0).999...
02:05:23 <myndzi> guess that depends on how you represent numbers
02:05:27 <Sgeo> Which would also imply that a number without a finite decimal representation could have multiple decimal representations
02:05:30 <myndzi> also how does "-0 + 1 = +0"
02:06:03 <Sgeo> I'm not counting extra 0s at the end to be a separate representation
02:06:22 <myndzi> Sgeo: the interesting thing about .99999... etc
02:06:33 <myndzi> is that you can actually produce it by long division with 9 into 9
02:06:40 <myndzi> if you break a little rule and follow the process
02:07:08 <myndzi> (9 goes into 9 0 times)
02:07:24 <myndzi> it'd be interesting if you could do the same thing with other values, but i expect it to be unlikely
02:08:20 <myndzi> (actually, i'm pretty sure you can produce .9999 by dividing any number by itself with long division, if you don't count it as going into itself exactly)
02:09:04 <Vorpal> elliott: yeah I can't get -0 + 1 = +0
02:09:22 <Vorpal> elliott: what sort of weird system is that
02:09:43 <Vorpal> > (-0)::CReal + 1::CReal
02:09:43 <lambdabot> <no location info>: parse error on input `::'
02:09:56 <Jafet> Decimals suck, Dedekindcuts4life
02:10:13 <elliott> Vorpal: CReal just doesn't support negative 0.
02:10:21 <myndzi> interesting: if you do the same long division shenanigans with less than one, you wind up with carries that make it .999999 anyway ;)
02:10:22 <Vorpal> elliott: lets do it in float then
02:11:29 <Vorpal> elliott: I call your -0 + 1 = +0 bullshit unless you can back it up by a reliable source /such as/ oerjan (when he gets back) or a wikipedia articles with proper references.
02:11:48 <elliott> Vorpal: oerjan is educated evil.
02:11:57 <Vorpal> so it /is/ bullshit then
02:12:13 <Vorpal> so give me an actual different representation of 0
02:12:56 <elliott> Counterpoint: You smell funny.
02:13:20 <Vorpal> you only do this when you need to sleep
02:13:29 <elliott> No, I only do it when I want to irritate you.
02:13:42 <Vorpal> which mostly happens when you are sleepy
02:14:27 -!- kallisti has quit (Ping timeout: 252 seconds).
02:25:01 -!- kallisti has joined.
02:30:55 -!- pikhq has joined.
02:31:07 -!- pikhq_ has quit (Ping timeout: 244 seconds).
02:47:52 -!- calamari has joined.
03:07:09 <elliott> oklopol: do you want a box, i can give you a box
03:13:36 <elliott> oklopol: btw i'm working on the thing that ph proved you wrong with
03:13:53 <elliott> just flinging particles around in 2d
03:13:56 <elliott> watching them form stable orbits
03:14:39 <calamari> anyone happen to know how I can figure out what is causing a kernel module to be in use?
03:14:57 <elliott> kernel modules are only "used" because they're explicitly loaded
03:15:20 <calamari> sorry I guess I didn't ask the question right
03:15:48 <elliott> assuming by remove you mean unload
03:15:56 <calamari> FATAL: Module snd_hda_intel is in use.
03:16:07 <elliott> you'll have to disable ALSA somehow i think
03:16:11 <elliott> why are you trying to do that
03:16:21 <calamari> because I'm trying to avoid rebooting
03:16:37 <calamari> I need to change the options for the module
03:29:31 -!- calamari has quit (Remote host closed the connection).
03:34:44 -!- calamari has joined.
03:36:16 -!- hagb4rd has joined.
03:41:23 <zzo38> Check the phase of the moon on the calendar and then guess what you think is the tropical Moon sign at this time. (Use numbers if you prefer; I prefer to use numbers myself but it doesn't matter) Try to guess also the sign for Mercury and for Venus?
03:42:23 <zzo38> O, you are making palindrome. It is palindrome using letters (only letters) as units, so you need to put spaces afterward by yourself. Once I found the very long palindrome text!!
03:45:25 -!- DCliche has changed nick to Klisz.
04:02:08 -!- Sgeo has quit (Read error: Connection reset by peer).
04:02:53 -!- Sgeo has joined.
04:08:58 -!- MDude has changed nick to MSleep.
04:13:40 <PiRSquared17> ^bf >,[.>,]+<[<.]!madam president, commissioner, in this case, i would like this document to ban the advertising of tobacco products, regardless of all our people.
04:13:40 <fungot> madam president, commissioner, in this case, i would like this document to ban the advertising of tobacco products, regardless of all our people.elpoep ruo lla fo sseldrager ,stcudorp occabot fo gnisitrevda ...
04:17:33 <fungot> PiRSquared17: mr president, mr president, that the special relationship between france and germany at the brussels summit achieved was clarification as regards financing. in other words the extension of the schengen acquis in the applicant countries as well. i am still looking for.
04:18:45 <zzo38> How long does it take for ARM processor program to fill an amount of RAM with null bytes?
04:20:21 <PiRSquared17> @faq How long does it take for ARM processor program to fill an amount of RAM with null bytes?
04:20:21 <lambdabot> The answer is: Yes! Haskell can do that.
04:21:02 <zzo38> I mean in a program written in assembly language (or machine code); not Haskell.
04:31:15 <zzo38> "He who lives by the sword...should probably bring something better to a gun fight."
04:32:02 <fungot> Selected style: ct (Chrono Trigger game script)
04:32:07 <fungot> PiRSquared17: the masamune!! grribit... in that energy field, our molecular structure to the north. it's a great place for a picnic! heard that magus's place...
04:32:28 <elliott> I'm so glad this channel is #bots.
04:34:09 <PiRSquared17> At least ^bf >,[.>,]+<[<.]!... was related to esoteric programming languages
04:35:45 <zzo38> O, whatever............................
04:39:16 <elliott> "O, whatever............................" --zzo38
04:42:16 <zzo38> Can you make 1962 points in one turn of Scrabble game? How many points can you score in total in a Scrabble game?
04:44:17 <PiRSquared17> http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi?board=riddles_general;action=display;num=1071784078
04:59:28 -!- Sgeo has quit (Ping timeout: 248 seconds).
04:59:38 <Jafet> Sure, if QWUZTJA is a word
05:03:34 -!- Sgeo has joined.
05:07:33 <calamari> I, for one, welcome our new esolang overlords
05:09:05 <PiRSquared17> --Ken Calamari, winner of 10 cents on the game show "The Simpsons" against a computer
05:10:15 <calamari> is that another way of saying I put my 2 cents in?
05:13:20 -!- calamari has quit (Quit: Leaving).
05:30:56 -!- Sgeo has quit (Ping timeout: 248 seconds).
05:32:57 -!- Sgeo has joined.
05:59:38 -!- pikhq_ has joined.
05:59:56 -!- pikhq has quit (Ping timeout: 252 seconds).
06:06:15 <kallisti> pikhq_: the majority of your messages are bot commands.
06:06:33 <kallisti> PiRSquared17: the majority of your messages are bot commands.
06:10:09 <PiRSquared17> And my last message was an hour ago... I stopped
06:14:57 -!- PiRSquared17 has left (".").
06:19:10 -!- copumpkin has quit (Quit: Computer has gone to sleep.).
06:19:51 -!- copumpkin has joined.
06:20:06 <kallisti> elliott: you can now bye snoop dogg velvet house shoes
06:20:44 <elliott> bye, snoop dogg velvet house shoes
06:22:33 <kallisti> that is not what they're being advertised as
06:23:12 <elliott> where the fuck is oerjan he's had like 6 hours of sleep come on dude i need to bug you about quadtree zippers
06:24:05 <elliott> do you have an internet connection
06:24:20 <elliott> wow yeah it's that data structure that not a single person on the planet calls a 4-tree
06:25:18 <kallisti> um yeah in general people say n-tree
06:25:33 <elliott> no everybody calls quadtrees quadtrees
06:25:45 <elliott> http://en.wikipedia.org/wiki/Quadtree wikipedia doesn't even list 4-tree as an alternate name
06:25:59 <elliott> "4-tree" on wikipedia returns 2-3-4-tree as first result, nothing relevant on first page
06:39:44 -!- hagb4rd has quit (Ping timeout: 248 seconds).
06:58:47 -!- hagb4rd has joined.
07:00:05 -!- Klisz has quit (Quit: You are now graced with my absence.).
07:05:27 -!- itidus21 has joined.
07:05:58 <elliott> note to self: http://sprunge.us/KjUW
07:29:54 <zzo38> What is this program for?
07:30:29 <elliott> it was the start of a quadtree-with-zippers library, but then I threw it away to abstract it out better to reduce code duplication, and used sprunge + this channel as a backup in case it went horribly wrong :P
07:30:34 <elliott> it's coming along very nicely now
07:34:23 <elliott> http://sprunge.us/LCNO deriving zippers by differentiation is one of the most beautiful things
07:35:28 <elliott> kallisti: look at that. tell me that's not amazing.
07:37:04 <elliott> kallisti: btw homestuck book is out.
07:39:46 <kallisti> focus _ (Branch _ _ _ _) = error "focus: path too short"
07:40:06 <kallisti> I didn't notice the Dir argument is _ too
07:40:41 <kallisti> you could put [] there instead of _ I think... but then it won't be all vertically symmetrical with the _
07:41:15 <kallisti> also I have no fucking clue what's going on in this code.
07:45:43 <kallisti> I'm focus moves the zipper around?
07:45:54 <kallisti> that's what it looks like it does.
07:47:39 <kallisti> elliott: would it be possible to make a typeclass for both STRef and IORef
07:47:45 <kallisti> so you can write code generally for either of them?
07:47:53 <elliott> trivially. shut up, I'm trying to be as mindlessly consumerist as possible.
07:48:14 <kallisti> elliott: why isn't this standard then, aside from needing a multi-param typeclass
07:48:24 <elliott> because nobody needs it, SHUT UP TRYING TO SPEND SO MUCH MONEY
07:48:57 <elliott> yes. also the newest problem sleuth book which also just came out.
07:49:19 <kallisti> I actually get free shipping for most things on Amazon
07:49:25 <kallisti> for a year, anyway. because I have a student account.
07:49:29 <elliott> UM WAIT there's t-rex plushes let me examine the prices
07:49:33 <zzo38> I didn't know you could use differential calculus to figure out types but now I can see how it works.
07:49:37 <elliott> kallisti: topatoco ain't amazon
07:49:55 * kallisti bought a Problem Sleuth fractal shirt from that site.
07:50:25 <elliott> I think I'm going to go for one of the sbahj shirts
07:50:30 <elliott> they glow in the fucking dark
07:50:57 <elliott> ok YES a small t-rex plush is exactly what my life needs right now. as well as a hole in my pocket. TWO BIRDS, ONE STONE MADE OUT OF MONEY!!
07:52:01 <kallisti> elliott: how are you affording this.
07:52:11 <elliott> THAT'S THE PROBLEM YOU SOLVE AFTER BUYING SO MANY THINGS!!! NOT BEFORE!!!
07:52:17 <elliott> IF I SPEND TIME TO THINK ABOUT THAT THIS SHIT WILL SELL OUT
07:52:19 <kallisti> I remember when I was 16 I had an average of 0.1 dollars
07:52:21 <elliott> WHICH IT WILL BE DOING RAPIDLY AS I SPEAK
07:52:29 <elliott> http://www.topatoco.com/merchant.mvc?Screen=PROD&Store_Code=TO&Product_Code=QW-EXTREME&Category_Code=QW
07:53:02 * kallisti also has a Dave record t-shirt
07:53:17 <kallisti> and that yellow shirt with the bandit riding a velociraptor.
07:53:23 <kallisti> because. IF YOU BUY 3 SHIRTS THERE'S A DISCOUNT OMG
07:54:27 <kallisti> also it wasn't a hole in my pocket because at the time I had like $2000
07:54:54 <kallisti> you can see where that logic has gotten me though: I now have like $200
07:55:06 <kallisti> (in my defense I had to buy A WHOLE CAR. ALL OF IT)
07:55:58 <zzo38> Do you have something to cut a hole in your pocket? Does it need to be large enough for a t-rex plush to fit through?
07:58:23 <kallisti> probably, though the T-rex plush will fit snuggly in his new pocket hole. it's a well known law of fixed that burning a hole in your pocket so that money can escape will immediately fill the resultant gap with T-rex plushes
07:58:38 <kallisti> proportional to the inverse square of the money spent.
07:58:39 <elliott> hmm, the wee plush is definitely the best bet, as opposed to the big one
07:58:54 <elliott> big t-rex is adorable but not 20 dollars adorable
07:59:22 * kallisti snuggles a 20 dollar bill. so cute.
07:59:50 * elliott wonders what the chances of the stairs shirt being interpreted sincerely are.
08:00:05 <elliott> kind of want to go for the slam-dunk one instead, it's so artsy
08:00:51 <kallisti> I think all of the SBaHJ shirts can be taken seriously.
08:01:11 <elliott> well yes. the stairs one is definitely the loudest of 'em though
08:01:18 <elliott> http://www.topatoco.com/graphics/mspa-sbahj-black-pic.jpg
08:01:19 <elliott> http://www.topatoco.com/graphics/00000001/mspa-bigman.jpg
08:02:01 <kallisti> !perl print (qw(blackpic bigman))[int(rant(2))]
08:02:04 <EgoBot> syntax error at /tmp/input.16316 line 1, near ")["
08:02:14 <kallisti> !perl print (qw(blackpic bigman)[int(rant(2))])
08:02:15 <EgoBot> Undefined subroutine &main::rant called at /tmp/input.16387 line 1.
08:02:21 <kallisti> !perl print (qw(blackpic bigman)[int(rand(2))])
08:02:29 <kallisti> now let me actually click on the links
08:02:51 <elliott> i think i'll go with stairs though
08:02:59 <kallisti> dunno the hoop is pretty nice.
08:03:11 <elliott> i really don't like red shirts
08:04:17 <kallisti> the stairs shirt could use more compression artifacts
08:04:50 <elliott> i would omit the first two problem sleuth books because really i am only buying the third because of the doodle but
08:04:55 <elliott> if i'm gonna have the books they might as well be in a readable form
08:05:19 <kallisti> you're practically looking for excuses to spend obscene amounts of money on overpriced merchandise
08:05:32 <kallisti> BUT THINK OF THIS WAY YOU'RE SUPPORTING YOUR FAVORITE WEBCOMIC YEAAAAH
08:05:42 <elliott> it's not really overpriced though? topatoco prices are pretty reasonable
08:05:44 <kallisti> and also topatoco and whoever makes those shirts.
08:05:49 <elliott> and they're giving me that $5 three-pack discount!!!
08:05:55 <elliott> kallisti: topatoco is run by jeffrey rowland
08:07:29 <kallisti> elliott: well it's not overpriced for novelty t-shirts you can only get alone
08:07:34 <kallisti> but it is overpriced for clothing.
08:07:41 <kallisti> I guess the books are probably not overpriced.
08:07:44 <elliott> kallisti: $20 is not that bad for a t-shirt...
08:07:45 <kallisti> because they're probably huge.
08:08:48 <elliott> (there are going to be like 50 books)
08:09:55 <kallisti> I wonder how many pages of homestuck on average are on a page.
08:10:08 <kallisti> also how do you put a flash movie in a book? :P
08:10:30 <elliott> you adapt it for the medium
08:11:56 <kallisti> homestuck popup book would be epic.
08:12:11 <elliott> "Let's Do This Thimg. Let's Make It Happen." --topatoco confirmation button
08:12:34 <kallisti> gotta love their leet markteing skillz
08:12:45 <kallisti> appealing to your niche fandom.
08:13:20 <kallisti> does... Dinosaur Comics have a book?
08:21:22 <Sgeo> We need a User Friendly/MSPA crossover
08:21:29 <Sgeo> (Note: Not a serious suggestion)
08:21:32 -!- GreaseMonkey has quit (Quit: The Other Game).
08:22:08 <elliott> what we need is for user friendly to stop existing
08:22:53 <Sgeo> It's still on repeat for now, isn't it?
08:23:43 <Sgeo> It could come back
08:24:17 <elliott> I'm not saying it's comparable, but it's comparable.
08:24:53 <zzo38> What is the use of making differentiations on Haskell types?
08:25:32 <Sgeo> Apparently the derivative of a Haskell type is a zipper. I do not know what that means, so don't ask me to elaborat.e
08:26:09 <elliott> zzo38: http://en.wikibooks.org/wiki/Haskell/Zippers
08:26:18 <zzo38> Can integrations be done?
08:26:19 <elliott> zzo38: that covers deriving them automatically with the differentiation rules too
08:26:33 <elliott> http://www.haskell.org/haskellwiki/Zipper is also good for showing why zippers are useful (but lacks the derivation stuff)
08:26:50 <elliott> also http://strictlypositive.org/calculus/ is where the whole thing originated
08:26:56 <zzo38> It seems to me that differentiation won't work with function types as far as I can tell
08:27:43 <elliott> e.g. (Bool -> a) === a^2 === a*a === (a,a)
08:28:39 <zzo38> elliott: Yes I can see that, but what if the A is some other type you don't know?
08:28:55 <Sgeo> How is a (Bool -> a) the same as an (a,a)?
08:29:02 <elliott> zzo38: well, then it's harder :)
08:29:16 <elliott> Sgeo: oneWay f = (f False, f True)
08:29:28 <elliott> Sgeo: theOtherWay (a,b) x = if x then b else a
08:30:06 <Sgeo> For some reason I was thinking (a -> Bool)
08:31:51 <Sgeo> The storylines page updated! http://www.userfriendly.org/archivist/gallery/storylines.html
08:32:54 <Sgeo> I can practically quote http://www.userfriendly.org/animation/episode1.html from memory.
08:34:45 <Sgeo> Ok, so maybe I don't remember it 100% exactly
08:34:58 -!- monqy has quit (Quit: hello).
08:36:22 <zzo38> It seems that if the (a) in (a -> b) is a Maybe type then it might be able to be done I suppose?
08:38:34 <Sgeo> Sadly, episode 2 was never made.
08:39:47 <Sgeo> Fortunately, there are other animations
08:39:55 <elliott> (Maybe a -> b)' = (b^(a+1))' = (a+1)*b^a = (Fin |a+1|, a -> b)
08:40:05 <elliott> what a thoroughly odd type
08:40:11 <kallisti> Sgeo: why do you like clipart universe.
08:40:26 <Sgeo> http://www.userfriendly.org/animation/
08:40:36 <zzo38> What does (Fin |a+1|) means?
08:40:51 <elliott> zzo38: Fin n for natural n is the type with n elements, you can define this in a dependently typed language
08:40:54 <Sgeo> kallisti, bought a UF book when I was a kid.
08:40:58 <elliott> it isn't fin, I'm an idiot
08:41:00 <Sgeo> Didn't realize what it was until I bought it
08:41:04 <elliott> (Maybe a -> b)' = (b^(a+1))' = (a+1)*b^a = (Maybe a, a -> b)
08:41:12 <Sgeo> Read it, loved it, misplaced it on a summer camp field trip
08:41:19 <Sgeo> Remembered the URL I saw
08:41:19 <zzo38> elliott: Yes, that one (Maybe a, a -> b) is the answer I was thinking of.
08:41:23 <elliott> that's uh, the derivative of (Maybe a -> b) with respect to a
08:41:42 <elliott> foo :: a -> (Maybe a, a -> b) -> (Maybe a -> b)
08:41:47 <Sgeo> I wonder if UF had a major impact on my life
08:41:51 <elliott> bar :: (Maybe a -> b) -> (a, (Maybe a, a -> b))
08:41:59 <kallisti> elliott: so types here represent their number of inhabitants in this system?
08:42:19 <elliott> kallisti: 1 is just the notation for the unit type
08:42:27 <elliott> a+b is alternation, i.e. Either a b
08:42:36 <elliott> obviously the notation is picked for the effects on cardinality
08:42:43 <kallisti> elliott: and all of this are -- yes
08:43:26 <kallisti> what happens with recursive types?
08:43:46 <elliott> you reason about them with fixed-points
08:43:52 <elliott> you can basically just use the chain rule
08:44:22 <zzo38> And I think it is repect to b isn't it? Rather than repect to a?
08:44:49 <elliott> zzo38: hmm, maybe -- but isn't that the rule you use for a^n for constant n?
08:44:59 <elliott> yes, it's with respect to b :)
08:45:09 <elliott> foo :: b -> (Maybe a, a -> b) -> (Maybe a -> b)
08:45:15 <elliott> bar :: (Maybe a -> b) -> (b, (Maybe a, a -> b))
08:45:22 <elliott> bar makes sense, the b is obviously (f Nothing)
08:45:29 <elliott> but I'm not sure what the (Maybe a) is at all
08:45:31 <kallisti> hmmm is there an integer division type?
08:45:37 <Sgeo> I can't seem to remember where the book started, but it ended at the end of a Star Wars parody. Or was it an LOTR Parody
08:45:39 <elliott> kallisti: you can't divide or subtract, generally
08:47:41 <Sgeo> Ah, ok, it was User Friendly, O'Reilly, 1999, ISBN 1-56592-673-0 January 25, 1998 - December 25, 1998 (misses out December 20 and probably some others)
08:49:41 <Sgeo> kallisti, I hope you don't think good or bad graphics make a webcomic
08:50:49 <elliott> is Sgeo seriously offended
08:50:54 <elliott> because kallisti doesn't like user friendly
08:50:58 <elliott> aka one of the worst comics in ever
08:51:35 <Sgeo> I'm just amused that "clipart" is the insult used
08:51:46 <kallisti> no it's so much more than that
08:51:51 <kallisti> clipart is like... the state of mind.
08:52:04 <kallisti> it's a clipart universe in a very real sense
08:52:15 <kallisti> not just TANGIBLE VISUAL PROJECTIONS OF ENTITIES
08:52:53 <elliott> does in fact make a web comic worse
08:53:06 <elliott> although i disagree that clipart=bad
08:53:22 <Sgeo> elliott, T&R is not bad.
08:53:36 <elliott> TOUCHING A LOT OF NERVES TODAY
08:53:41 <elliott> also: completely misreading things I said!
08:53:44 <Sgeo> Although "worse" doesn't imply bad I guess
08:53:48 <elliott> art is one aspect of a comic
08:53:56 <elliott> if triangle and robert is sufficiently funny
08:54:04 <elliott> then it is only harmed by its quality of art, not ruined by it
08:54:15 <elliott> whether meets this criterion or not
08:55:37 <zzo38> As far as I know, it means, if the (Maybe a) is (Just x) then the (b) should instead be (f $ Just x) and the (a -> b) becoming (\a -> if a == x then f Nothing else f (Just a)) so there can be more than one answer; the simple definition is: bar f = (f Nothing, (Nothing, f . Just))
08:57:08 <elliott> zzo38: well, you need the answer that makes it a bijection along with foo
08:57:21 <elliott> that looks like it would work
08:57:26 <elliott> but I'm not sure what foo will do with that Nothing
08:58:32 -!- Ngevd has joined.
08:58:34 <zzo38> foo x (Nothing, f) = maybe x f;
08:59:11 <elliott> zzo38: and the Just case? :p
09:01:53 <oklopol> okokokokokokokokokokokokokokokokokokokokokokoko
09:01:58 <oklopol> okokokokokokokokokokokokoko
09:02:06 <zzo38> foo x (Just y, f) Nothing = f y; foo x (Just y, f) (Just z) = if y == z then x else f z;
09:03:35 <elliott> zzo38: strange that an Eq constraint is required
09:06:08 <zzo38> elliott: Yes it does seems strange. Am I correct about these functions though? It seem to me, that is how calculus says these functions are supposed to be, but I might have made some mistake
09:06:34 <elliott> zzo38: It seems right to me, just strange.
09:07:21 <kallisti> Sgeo: I could see user friendly being funny if you lived in a 90s office culture clipart universe
09:07:44 <zzo38> Yes, it seems right to me too
09:07:56 <Sgeo> I think UF introduced me to Linux
09:08:16 <Sgeo> Is (Maybe a) just a+1?
09:08:48 <Ngevd> Statement: as k approaches infinity, the curve y = x^(-k+1) approaches xy = 0
09:09:48 <zzo38> I have used (Maybe a) to represent the "Sa" in Typographical Number Theory although it wouldn't seem to work unless you have a type that can only hold bijective functions
09:10:09 <elliott> Sgeo: List(a) = 1 + a*List(a)
09:10:49 <Sgeo> If a is >1, isn't that infinity?
09:10:53 <zzo38> So I suppose it is aleph 0
09:11:03 <elliott> Sgeo: types are not, in fact, literally numbers.
09:11:48 <Ngevd> How do I tell if I can do IPv6?
09:12:32 <zzo38> But there must be some command for dealing with IPv6 isn't it?
09:12:38 <Ngevd> How can I tell if my computer has an IPv6-capable internet connection?
09:13:00 <zzo38> It probably depend whether you are on Windows or Linux?
09:13:13 <elliott> If you're in the UK, it doesn't.
09:13:15 <oklopol> "<Ngevd> Statement: as k approaches infinity, the curve y = x^(-k+1) approaches xy = 0" you have one crazy topology
09:13:17 <elliott> Unless you're with, uh, Bogons or...
09:13:24 <elliott> There's two other ISPs that do it. Absolutely nothing big name.
09:13:50 <oklopol> (1, 1) is always there for instance
09:13:54 <zzo38> I suppose ask the ISP if you want to know if they provide it
09:14:40 <Ngevd> I'm with quite a big ISP
09:24:24 <zzo38> Can you write Applicative laws in terms of pure fmap liftA2 (,)
09:24:40 <elliott> zzo38: didn't oerjan show you how to do that earlier?
09:25:18 <zzo38> elliott: oerjan confirmed it can be done; I don't remember if the laws were shown.
09:26:35 -!- derrik has joined.
09:26:48 <kallisti> zzo38: oh did you get my message thing?
09:26:58 <kallisti> pure = slide >>= pure or whatever
09:27:08 <zzo38> kallisti: What message thing?
09:27:31 <lambdabot> forall a b (f :: * -> *) (f1 :: * -> *). (Functor f, Functor f1) => (a -> b) -> f1 (f a) -> f1 (f b)
09:27:38 <elliott> @hoogle (a -> b) -> f1 (f a) -> f1 (f b)
09:27:38 <lambdabot> Prelude fmap :: Functor f => (a -> b) -> f a -> f b
09:27:38 <lambdabot> Data.Functor fmap :: Functor f => (a -> b) -> f a -> f b
09:27:39 <lambdabot> Control.Monad fmap :: Functor f => (a -> b) -> f a -> f b
09:28:30 <zzo38> kallisti: What is that, though?
09:28:45 <kallisti> oh I thought it was related to something you were doing.
09:29:58 <elliott> kallisti: that was me, you idiot
09:30:22 <kallisti> I thought slide was a barrier monad thing
09:30:58 -!- Phantom_Hoover has joined.
09:37:10 <Ngevd> I may start AAARGH
09:37:19 <Ngevd> DO'T SAY "I may"!!!
09:37:38 <Ngevd> I am thinking about contributing to rosetta code
09:44:05 <Ngevd> I reckon I can do an "is even" program with a 10 by 2 piet program
09:44:36 -!- pikhq_ has quit (Ping timeout: 244 seconds).
09:44:39 -!- pikhq has joined.
09:51:50 <Ngevd> And most of that is getting it to say "y" or "n"
10:05:36 -!- Ngevd has quit (Ping timeout: 248 seconds).
10:11:53 -!- Ngevd has joined.
10:14:15 <Ngevd> A functional Piet-like language
10:14:39 <Ngevd> Using a combitor stack
10:14:59 -!- derrik has quit (Quit: quitter).
10:16:45 <HackEgo> scheishece ung adawskrakauffiilei meaneflics ths angezcatitionvermoderotmat pos calodikarountickepat serprierayalandeseuriocas of co chstit ratiouskinaveong mana la al vidifey verne fratee consic prics ceteghtaystrestishartheer anfree leinflucterquilecid per
10:26:58 <zzo38> At first I thought of number theory in Haskell types by using types that can only hold bijective functions, but now I thought, is there another way, by using type families?
10:34:09 -!- zzo38 has quit (Remote host closed the connection).
10:36:05 -!- sebbu2 has joined.
10:36:26 <elliott> kallisti: did you ever finish that better version of word
10:36:57 <kallisti> I HAVE TWO WEEKS OF CHRISTMAS BREAK
10:37:08 <kallisti> and then the beginning of next semester will be pretty easy.
10:37:15 <kallisti> so I'll time there as well to work on projects.
10:39:13 -!- sebbu has quit (Ping timeout: 248 seconds).
10:39:48 <Ngevd> Well, I've given up trying to write an Eodermdrone interpreter, on account of not actually understanding Eodermdrone
10:48:17 -!- Phantom_Hoover has quit (Ping timeout: 248 seconds).
11:02:01 -!- Phantom_Hoover has joined.
11:08:00 <Vorpal> elliott: you should give Eodermdrone a try!
11:35:02 <elliott> i am not smart enough to write this function
11:36:14 <itidus21> Is it possible to write it in another language, such as pascal?
11:36:36 <elliott> you expect that to _simplify_ my task?
11:37:23 <itidus21> no.. just being a smartass.. i apologize
11:38:19 <elliott> i don't see how you were a smartass
11:46:34 -!- zzo38 has joined.
11:48:15 <elliott> "Once an order is out the door there's not much
11:48:15 <elliott> we can do short of breaking into the post office in the middle of the night, and they keep a real mean dog in there now."
11:48:43 <Ngevd> That sounds familiar
11:49:50 <elliott> It's from this TopatoCo confirmation email.
11:50:09 <Ngevd> Yes, I ordered a shirt from them
11:50:14 <Ngevd> It is a nice shirt
11:50:23 <elliott> But is it as nice as a Homestuck book??? (Answer: Probably.)
11:50:26 <elliott> (But I got other things too!)
11:50:35 <fizzie> myndzi: I don't really have anything to say about that reply except that it's nonsense in places. The rows B35 and B36 are the same *time*: "UTC at midnight in Manila", and "Midnight in Manila"; they *must* yield equivalent Unix timestamp values. If you convert a Manila local time with toTimestamp to a Unix timestamp, it will not be a Unix timestamp representing that instant in time. (Also if you simply look at B33: Manila local time after "midnight(b8)" is 8am
11:50:35 <fizzie> . No matter how you muddle the waters, you have to subtract eight hours from 8am to end up to a midnight.)
11:51:41 <elliott> fizzie: My daring counter-prediction came true!
11:53:06 <fizzie> But it's certainly possible the math happens to "work out" in practice.
11:53:18 <elliott> extract ((Id 1 :*: Id 2) :*: (Id 3 :*: Id 4))
11:53:19 <elliott> (:*:) (Id :*: Id) (Id :*: Id) (Loc ((Id :*: Id) :*: (Id :*: Id)) a)
11:59:19 <fizzie> myndzi: As for the table, "midnight(unixtime+8)" is very much different from "midnight(unixtime)+8". When you do "midnight(unixtime+8)", what you end up doing is basically "convert unixtime to a value that, when converted to humantime assuming local time is UTC, will give Manila local time values; then clamp that to midnight of that day, giving the correct midnight". You'd need to subtract eight hours to get back the actual Unix timestamp representing that inst
11:59:19 <fizzie> ant of local time in Manila, but the rounding to midnight will work in that scenario.)
12:00:00 <fizzie> myndzi: I pointed out that that will work before: "(If it was "today, 01:00am" here, and you wanted to round to local midnight, you could (I'm not sure I would): add two hours to the timestamp, so you'd have a Unix timestamp that'd translate to UTC 01:00am; a different instant in time, yet same in local time. Then clamp to UTC midnight, which would end up subtracting the "proper" one hour. ---"
12:00:20 <fizzie> That was for our UTC+2, but the principle is the same.
12:00:26 <fizzie> Okay, I think that was enough of it.
12:02:48 -!- Patashu has quit (Quit: MSN: Patashu@hotmail.com , Gmail: Patashu0@gmail.com , AIM: Patashu0 , YIM: patashu2 , Skype: patashu0 .).
12:04:33 <fizzie> myndzi: Oh, one final explanation for midnight(unixtime+8) in terms of the document. It's just applying midnight() to the offsettime, so of course humantime() will return the correct-looking time. But it's still an offsettime, not a Unix timestamp representing that Manila local time. If you look at the G, H columns of the table, humantime() takes a Unix timestamp and returns the UTC human time, so the H column values are UTC midnights if you are treating G as a
12:13:44 -!- derrik has joined.
12:13:50 <elliott> fizzie: All I'm hearing is "SO MANY TYPE ERRORS".
12:17:15 -!- Slereah has joined.
12:17:37 -!- Slereah_ has quit (Ping timeout: 260 seconds).
12:38:09 -!- Ngevd has quit (Ping timeout: 248 seconds).
12:39:11 <zzo38> Under what circumstances is a derivative type a functor/applicative/monad/comonad?
12:46:27 <elliott> fizzie: Can you summon oerjan?
12:56:25 -!- sebbu has joined.
12:56:25 -!- sebbu has quit (Changing host).
12:56:25 -!- sebbu has joined.
12:59:36 -!- sebbu2 has quit (Ping timeout: 252 seconds).
13:05:38 -!- oerjan has joined.
13:05:39 -!- elliott has quit (Read error: Connection reset by peer).
13:05:48 -!- MSleep has changed nick to MDude.
13:06:22 -!- elliott has joined.
13:16:34 -!- Ngevd has joined.
13:17:57 <oerjan> my cold seems to have got worse again :(
13:18:27 <elliott> I've been waiting for hours so I can ask you about
13:18:33 <oerjan> i am afraid that the only thing that can save me is the relief of knowing that i will never, ever, have to figure out those damn quadtree zippers.
13:18:40 <elliott> NOOOOOOOOOOOOOOOoooooooooooooooo
13:19:01 <Ngevd> What's a quad tree?
13:19:05 <elliott> oerjan: Does it help if they're only 1-cursor, not n-cursor, and I already have a formulation of them, and it only has two constructors?
13:20:00 <oerjan> Ngevd: it's a tree where each internal node has 4 branches; moreover they are labelled nw, ne, sw and se and are used to implement 2d maps
13:20:34 <elliott> oerjan: In fact I daresay it's even elegant(!)
13:20:53 <elliott> THAT'S COMPLETELY IMPOSSIBLE
13:21:21 <oerjan> didn't we discuss the 1-cursor case before going into that n-cursor madness
13:23:59 -!- Vorpal has quit (Quit: ZNC - http://znc.sourceforge.net).
13:24:14 <elliott> oerjan: the one-cursor case is really easy, it's just
13:24:28 <elliott> data QuadTree' a = Top | Fork Direction (QuadTree' a) (QuadTree a) (QuadTree a) (QuadTree a)
13:24:40 <elliott> data QuadTree' a = Top | Fork (QuadTree' a) (Four' (QuadTree a))
13:24:54 <elliott> you can derive that with the standard derivative rules
13:25:21 <Ngevd> I'm struggling to understand this "quad tree" thing
13:25:26 -!- Vorpal has joined.
13:26:12 <Ngevd> Mine you, (.) confuses me and list zippers seemed obvious?
13:26:41 <Vorpal> Ngevd, what is confusing about (,) ?
13:26:51 <Vorpal> also I presume you meant "Mind you"?
13:27:00 <lambdabot> forall a b (f :: * -> *). (Functor f) => (a -> b) -> f a -> f b
13:27:02 <Vorpal> how is composition confusing
13:27:13 <zzo38> Can there be a typeclass for derivative types?
13:27:58 <elliott> zzo38: http://hackage.haskell.org/packages/archive/functor-combo/0.1.0/doc/html/FunctorCombo-Holey.html
13:28:12 <lambdabot> forall b c a. (b -> c) -> (a -> b) -> a -> c
13:28:19 <Vorpal> okay that is the most awkward notation ever
13:29:57 <zzo38> elliott: O, that one uses type families; I suppose that works
13:32:36 -!- Ngevd has quit (Ping timeout: 252 seconds).
13:37:19 -!- Ngevd has joined.
13:38:15 <Ngevd> I've just twigged how (->) r is a functor
13:38:26 <Ngevd> Haskell competency, here I come!
13:39:51 <oerjan> next: how it is a monad.
13:40:08 <Ngevd> I don't know what a monad is yet
13:40:57 <zzo38> It is actually very simple: fmap = (.); return = const; join f x = f x x;
13:42:14 <oerjan> and each of them is obvious from the types they have to have
13:43:38 <oerjan> the tricky part is to realize that it could possibly be a monad in the first place
13:44:17 -!- Phantom_Hoover has quit (Ping timeout: 248 seconds).
13:44:44 <elliott> oerjan: please please please become haskell zen master
13:45:29 <Vorpal> elliott, what is the type of clapping with one hand?
13:45:42 <oerjan> If you cannot get out of the monad, bring what you desire _into_ the monad!
13:46:05 <kallisti> > f >>= (g :: Expr -> Expr -> Expr) $ x
13:46:47 <elliott> oerjan: become the monad you wish to see int he world --buddha
13:47:24 <kallisti> actually introducing the (-> a) monad when Ngevd doesn't really get monads in general yet is probably a bad idea?
13:47:52 <oerjan> to the Applicative, the flow of the world is known from the beginning; to the Monad, it changes at every step.
13:48:05 <elliott> return :: b -> (b -> a) -- impossible to implement
13:48:19 <elliott> oerjan: you did not succumb to my trolling :(
13:48:41 <elliott> <elliott> oerjan: become the monad you wish to see int he world --buddha
13:48:53 <kallisti> elliott: what is the function monad then.
13:49:17 <oerjan> now that _return_ type there is trolling, though.
13:49:53 <zzo38> If the input type is a monoid then it makes a comonad as well. extract = ($ mempty); duplicate f x y = f $ mappend x y;
13:50:01 <oerjan> Only the negative cannot fully operate in the world.
13:50:26 <zzo38> elliott: Well in that case it is commutative but OK
13:50:36 <elliott> zzo38: but not necessarily!
13:50:59 <oerjan> zzo38: does that mean Writer is a comonad, even without monoid?
13:51:23 <oerjan> hm obviously snd is extract
13:52:09 <oerjan> zzo38: so there is a sort of duality between Reader/-> and Writer/(,)
13:52:26 <lambdabot> forall source. (Extract source) => (Int, Int) -> source -> source
13:54:08 <zzo38> Well, you can use the ((,) a) type (which I also made a Monad instance of; I don't particularly like the names "Reader" and "Writer") in which case: extract = snd; duplicate (x, y) = (x, (x, y));
13:55:08 <zzo38> oerjan: OK yes I suppose so, there is that sort of duality. I didn't realize it at first, but yes that is how it work
13:56:31 <elliott> oerjan: this is surprising?
13:56:53 <oerjan> zzo38: i think the Reader and Writer names are so that one can use their abstract API without confusing with prelude types
13:56:55 -!- Phantom_Hoover has joined.
13:57:03 <oerjan> which have many other uses
13:58:25 <zzo38> Well, the names are useful for making monad transformers ReaderT and WriterT names
13:59:07 <kallisti> what's the name of the ST transformer?
13:59:35 <zzo38> (The comonad library has the instances for (-> a) and ((,) a) in there; my monoidplus library has the monad instance for ((,) a))
13:59:38 <elliott> kallisti: you can't implement it safely without it being really slow.
14:01:15 -!- azaq23 has joined.
14:02:05 <zzo38> return = (,) mempty; join (x, (y, z)) = (mappend x y, z);
14:04:11 <oerjan> hm would state also be a comonad with a monoid restriction?
14:05:58 <oerjan> some join definitions are so much simpler than the corresponding >>=
14:06:01 -!- Ngevd has quit (Quit: Goodbye).
14:11:17 <kallisti> what is the exact relation between join and >>=?
14:11:47 <lambdabot> No instance for (GHC.Show.Show (m t))
14:11:47 <lambdabot> arising from a use of `M6416529558...
14:12:01 <zzo38> kallisti: join = (>>= id);
14:12:01 <oerjan> x >>= f = join (fmap f x), join x = (x >>= id)
14:13:00 <kallisti> definitely should add join to Monad.
14:13:05 <oerjan> and fmap f x = x >>= return . f, to complete the correspondence
14:13:19 -!- pikhq has quit (Ping timeout: 252 seconds).
14:13:24 -!- pikhq_ has joined.
14:14:08 <lambdabot> forall (m :: * -> *) a a1. (Monad m, Functor m) => (a1 -> m a) -> m a1 -> m a
14:15:22 <oerjan> kallisti: the thing is you still couldn't make a default for >>= based on join until Monad subclasses Functor
14:15:26 <kallisti> so you could actually automatically define Functors for Monads.
14:15:32 <kallisti> but I'm guessing haskell doesn't do this by default?
14:15:39 <oerjan> nope, hysterical raisins
14:15:58 <oerjan> haskell makes it too hard to rearrange the class hierarchy
14:16:17 <kallisti> I thought Functor was required for a Monad instance?
14:16:20 <oerjan> kallisti: there isn't actually an @info command, you know
14:16:43 <kallisti> oerjan: but... but I want to believe in lambdabot...
14:16:47 <oerjan> you're just being fooled by spelling correction
14:17:06 <oerjan> @info do x <- test; return (2*x)
14:18:30 <kallisti> I actually used a levenshtein-like algorithm in detecting typos with some operations having different weights
14:18:48 * oerjan kicks elliott with the BOOT |__\
14:19:50 <kallisti> so substition was 2, insertion was 3, deleting was 2, and swapping two letters was 1.
14:19:51 <Vorpal> hm, where is the code for making show on a [Char] pretty print like a string?
14:19:59 <lambdabot> forall a. (Show a) => [a] -> String -> String
14:20:10 <elliott> then instance (Show a) => Show [a] where shows = showList
14:20:18 <elliott> showList is in the Show class itself
14:21:03 <elliott> Vorpal: Better than Erlang.
14:21:04 <Vorpal> elliott, so doing something similar for [MyOwnType] would be impossible?
14:21:13 <elliott> That's what showList is for.
14:21:46 <Vorpal> what is showsPrec in Show for?
14:22:31 <kallisti> "pretty print like a string" doesn't Show already do this for [Char]?
14:22:55 <lambdabot> Overlapping instances for GHC.Show.Show
14:23:45 <lambdabot> forall a. (Show a) => [a] -> String -> String
14:23:54 <Vorpal> elliott, what about doing it for other things than lists? Like, say a "Rope a" type?
14:24:40 <elliott> But it's painful and won't work how you want.
14:25:03 <kallisti> what's... different about show and showList here.
14:25:08 <Vorpal> so that is the bit that is such a horrible hack then
14:26:49 <oerjan> kallisti: showList is defined in the show instance for a, but is used to define show for [a]
14:27:19 <kallisti> I don't understand what they are accomplishing.
14:27:35 <kallisti> elliott: I understand what showlist does
14:27:40 <kallisti> read: I understand what showlist does
14:27:43 <oerjan> kallisti: they're accomplishing that Strings can be shown in a different format than other [a]'s
14:27:52 <elliott> you would not be asking these questions
14:27:54 <fizzie> myndzi: Oh, one final thing: here's example tables of my own for all three of "clamp to midnight, add eight hours", "clamp to midnight, subtract eight hours" and "convert to 'offsettime' by adding eight hours, clamp to midnight, convert back": https://docs.google.com/spreadsheet/ccc?key=0AoJ9OAzXNfZAdG5ESEZ3MzBkWW9nWEJTYXI0NFdaQmc&hl=en_US#gid=0
14:28:02 <kallisti> what does vorpal mean by "pretty printing strings"
14:28:13 <kallisti> and how is it different that what happens in Prelude by default.
14:28:15 <elliott> fizzie: High hopes, do you?
14:28:21 <Vorpal> kallisti, <elliott> > ['a','b','c'] <lambdabot> "abc" <-- this is what I mean
14:28:34 <oerjan> kallisti: he is referring to what the Prelude does
14:28:40 <fizzie> elliott: As of now I've seriously, finally, honestly, truly, done.
14:28:49 <kallisti> I thought Vorpal was trying to do something different from what the Prelude does.
14:28:54 <elliott> fizzie: Even if he disagrees?!
14:28:58 <fizzie> elliott: (Except if I figure out one more way to say the same thing.)
14:29:34 <kallisti> showList could easily be lifted to other typed via a separate typeclass.
14:30:13 <kallisti> showSomethingElse :: (GoodNameHere s, Show a) => s a -> String -> String
14:30:20 <elliott> showList dpends on being in the Show typeclass to work.
14:30:40 <oerjan> elliott: sometimes you are ridiculously presumptuous about what it is people don't understand...
14:30:51 <elliott> oerjan: s/people/kallisti/
14:30:55 <elliott> kallisti: you could not implement showSomethingElse in any instance
14:31:11 <elliott> unless GoodNameHere basically makes s a isomorphic to [a].
14:31:21 <elliott> in which case it's not very useful
14:31:23 <elliott> as you could just use showList.
14:32:27 <kallisti> what about a 2-param typeclass with a Show instance?
14:32:33 <kallisti> ...is that a thing you can do?
14:32:42 <oerjan> <elliott> showList dpends on being in the Show typeclass to work. <-- well you _could_ add (usually empty) instances all over the place for the separate typeclass
14:32:49 <kallisti> what becomes a legal instance when you enable extensions is kind of fuzzy to me.
14:32:56 <elliott> oerjan: yes. that's not what kallisti is proposing though
14:34:34 <oerjan> i guess OverlappingInstances could also work for this, maybe not without flaws.
14:35:26 <elliott> apparently it kind of sort of works
14:35:34 <elliott> it was proposed for Vector
14:36:03 <oerjan> iiuc the flaw being that you could sometimes not get the specific instance if there wasn't enough information to tell that it applies
14:36:58 <zzo38> Can you use multi-parameters type class?
14:38:47 <oerjan> (insufficiently late resolution, and then choosing the general instance because it's the only one already present)
14:39:53 -!- derrik has quit (Quit: gone).
14:42:15 -!- zzo38 has quit (Remote host closed the connection).
14:43:03 <kallisti> oerjan: at least with the most common case (Char) I don't think that would be an issue though
14:43:50 <oerjan> kallisti: there could be an issue with polymorphic functions
14:44:10 -!- ais523 has joined.
14:45:12 <oerjan> like if you are having f :: Show a => (a, [a]) -> String; f (x, l) = show x ++ ": " ++ show l
14:45:38 <oerjan> and because of the explicit type declaration, you _cannot_ use the specific instance for Show [a]
14:45:57 <oerjan> i haven't actually tested this stuff :P
14:49:00 <kallisti> apparently clients don't like it when you disappear for 6 months because of RAPIDLY PILING BACKLOG OF HOMEWORK
14:50:24 <oerjan> :D at today's http://www.mezzacotta.net/postcard/
14:53:02 <oerjan> elliott: ok you're right, kallisti _is_ special
14:53:25 <kallisti> I assume you can only mean special in a very awesome way.
14:54:00 <kallisti> like maybe if I could get the image to load
14:54:02 <elliott> hi ais523; what do you call a meta-embarrassingly parallel problem
14:54:11 <elliott> that is, an embarrassingly parallel problem where each unit of work is itself embarrassingly parallel
14:54:30 <kallisti> elliott: parallel embarassment trees
14:54:41 <ais523> elliott: it's still just ordinary embarassing parallelism, isn't it?
14:55:05 <elliott> ais523: but now it's _really_ embarrassing!
14:55:35 <ais523> elliott: but any embarassingly parallel problem with enough elements is two embarassingly parallel problems; the first half, and the second half
14:56:17 -!- Phantom_Hoover has quit (Ping timeout: 248 seconds).
14:56:51 -!- Phantom_Hoover has joined.
14:57:39 <kallisti> elliott: just mergesort and you'll be fine.
14:58:20 <elliott> ais523: but this is embarrassingly parallel /squared/!
14:58:45 <ais523> kallisti: nah, bitonic sort
14:59:04 <ais523> it's basically the same algo as mergesort, but adapted for parallel implementation
14:59:08 <kallisti> elliott: wow that sounds strangely relevant to your quadtrees!
14:59:24 <ais523> much the same way as an FFT is one way to do a DFT, a bitonic sort is one way to do a mergesort
14:59:38 <elliott> <!-- According to whoever added that, Wikipedia doesn't support MPICC, so it's listed as C instead. -->
14:59:38 <elliott> --visible text on [[Bitonic sorter]]
14:59:59 <kallisti> let's push it for featured article status.
15:00:27 <ais523> elliott: that /is/ correct comment syntax in Wikipedia, so presumably someone escaped it, perhaps by accident
15:00:44 <elliott> ais523: it's in a code block
15:01:34 <ais523> aha, that probably explains it
15:01:40 <kallisti> http://28.media.tumblr.com/tumblr_lrbca4gZCE1qdtcgvo1_500.jpg
15:01:48 <ais523> you don't want to know how MediaWiki parses extension tags (such as GeSHi's <code>)
15:02:05 <ais523> and I can easily imagine that it would pass comments literally to the extension without parsing them
15:04:18 <elliott> ais523: it should, <!-- ... --> is valid code in many languages
15:05:00 <ais523> it's a syntax error in INTERCAL, though
15:06:50 <ais523> hmm, it's valid, and potentially even useful, brainfuck, though
15:11:25 <oerjan> > let so <!-- legal = legal; isn't --> it = isn't in 1 <!-- 2 --> 3
15:16:26 <ais523> oerjan: I'd call that valid but not potentially useful
15:18:58 <elliott> A lot of au pairs, especially those who are new to the role, don't know what to expect when they get started do the job with a new host household. Even though your principal duty would be to care for the little ones, there are also a array of other household tasks you could be asked to do. The aim of this article is to give you a fast insight into the forms of tasks you might be anticipated or asked to do.
15:19:08 <elliott> ais523: --> is a perfectly plausible operator name
15:19:19 <ais523> yep, but <!-- isn't really
15:19:21 <oerjan> RUBBISH THIS IS OBVIOUSLY THE RIGHT NOTATION FOR PREPROHISTOQUADROMORPHIC ZIPPOPOTAMUS OPERATORS
15:19:24 <lambdabot> parse error (possibly incorrect indentation)
15:19:42 <ais523> I didn't expect a parse error from that; is it the starting with - that matters?
15:19:56 <oerjan> that _should_ be legal
15:20:08 <lambdabot> parse error (possibly incorrect indentation)
15:20:11 <ais523> yep, and that verifies that there's an --> operator already, which doesn't surprise me
15:20:39 <lambdabot> parse error (possibly incorrect indentation)
15:21:02 <oerjan> i think it is breaking the comment parsing rules
15:21:15 <oerjan> that _shouldn't_ be a comment
15:21:20 <Deewiant> (--test) is supposed to be a parse error
15:21:22 <ais523> yep, it seems to get confused by --
15:22:14 <ais523> which given that that's comment syntax, is a plausible thing for it to be confused by
15:22:58 <ais523> personally, I think that for a language with -- comments, the correct comment introducer should be "-- " with the space
15:23:04 <ais523> otherwise you get too many clashes
15:23:13 <lambdabot> parse error (possibly incorrect indentation)
15:23:19 <elliott> <ais523> yep, but <!-- isn't really
15:23:23 <elliott> it might be like <-- but strict!
15:23:38 <ais523> !<-- or <--! would be better names there
15:23:41 <elliott> <ais523> personally, I think that for a language with -- comments, the correct comment introducer should be "-- " with the space
15:23:44 <oerjan> ais523: the correct comment introducer regex in haskell is ---* _not_ followed by an operator char
15:23:50 <elliott> ais523: it's complicated for haskell
15:23:51 <ais523> hmm, what language is it that uses =/= as its not-equal? I've forgotten
15:24:08 <ais523> elliott: I knew it was something like that, but forgot what exactly
15:24:32 <ais523> I thought it was -- followed by space or alphanumeric, which is basically the same thing, possibly even exactly the same thing (allowing for me forgetting about multiple - being allowed)
15:24:58 <oerjan> ais523: no, there are other non-operators like ,;
15:25:09 <elliott> > let a --^ b = False in 99 --^ 3
15:25:22 <elliott> I guess the space is requiredc
15:25:37 <ais523> > let a--^b=False in 99--^3
15:25:53 <elliott> after -- before haddock chars
15:26:27 <ais523> most $language-doc syntaxes I've seen just repeat the last char of the comment syntax
15:26:46 <ais523> like javadoc's /** and the /// used in some C++ documentation languages
15:27:10 <elliott> haddock has multiple types of comment, though
15:27:17 <ais523> I imagine ## wouldn't work so well in, say, Perl, though
15:27:26 <elliott> or hmm, is that just splint
15:27:36 <ais523> and it uses it to not clash with anything else
15:27:36 -!- oerjan has quit (Quit: Later).
15:27:44 <ais523> (and even lets you change the @ to some other character if you still get a clash somehow)
15:28:08 <elliott> /*\ least confusing syntax
15:29:25 <elliott> ais523: but /*\ doesn't look like an opener!
15:29:39 <ais523> elliott: and //\ by itself affects the next line too
15:29:48 <ais523> pretty rare but mindboggling C++/C99 trap
15:30:55 <ais523> (deletion of backslash-newline takes precedence over pretty much everything; I think character set decoding, including trigraphs, comes first though)
15:31:04 <kallisti> perl's documentation syntax is already awesome, so ## wouldn't be useful.
15:31:08 <kallisti> also ## wouldn't work well for Python either.
15:31:14 <kallisti> or.. well.. any language that uses #
15:31:29 <ais523> well, Python uses """ for multiline comments, typically, doesn't it?
15:31:37 <ais523> and it also uses that for docstrings, if they're in a particular location
15:31:42 <kallisti> """ is documentation and multi-line comments, yes.
15:33:12 <ais523> well, it's really a misuse of the string syntax, but it's basically become part of the language now
15:33:24 <ais523> I rarely see people use q/ ... / for comments in Perl, even though you /could/ do that
15:33:25 <kallisti> I thought it was always a part of the language.
15:34:00 <ais523> hmm, I think you could use any of the other string syntaxes for docstrings, just """ is the most convenient
15:34:57 <elliott> lisp uses normal string syntax for docstrings
15:35:16 <kallisti> you could easily add docstrings to perl as well.
15:36:14 <kallisti> sub func($$&) { my ($name, $doc, $subref) = @_
15:36:56 <ais523> kallisti: err what? that takes the docstring as an argument on every call of the function
15:37:11 <ais523> oh, it's a function you call to register docstrings, that makes more sense
15:37:58 <kallisti> though I'm not sure that you can write function wrappers in Perl.
15:38:05 <kallisti> I don't see an overloader for it
15:38:49 <kallisti> actually this is similar to what I do my perl IRC bot for registering commands
15:39:10 <kallisti> command Name => Category => "Doc string",
15:39:28 -!- zzo38 has joined.
15:39:50 <olsner> "Maybe there's a pointer fault in the holosuite's parameter file."
15:40:26 <kallisti> once I split it up into multiple modules I might have it so that if the category string is omitted it uses a dynamically scopped $category var, so you can define local $category = "whatever" in the top-level of the module and make all the commands in the same help category.
15:43:21 <kallisti> actually I could be making more use of the state variable declaration
15:43:29 <olsner> ooh, this episode was nominated for an Emmy Award!
15:43:33 <olsner> ... for Outstanding Hairstyling for a Series.
15:43:39 <kallisti> ais523: is our basically like global in Python?
15:43:44 <kallisti> I'm not sure I understand it completely.
15:43:57 <ais523> kallisti: it's package scope
15:44:08 <ais523> the variable can be referenced from anywhere in the package
15:44:15 <ais523> and anywhere else if you give the name of the package as a namespace
15:44:37 <kallisti> right but I see it uses inside subroutines a lot.
15:46:14 <ais523> kallisti: well, if you package-scope a variable in a subroutine, it's going to keep its value between calls, I think
15:46:25 <kallisti> okay so I think our is very similar to global in nature but not quite the same.
15:46:28 <kallisti> ais523: that's what state is for.
15:46:43 <kallisti> basically if I understand it correctly, our doesn't necessarily allocate any memory
15:46:58 <kallisti> it just makes a package-scoped variable available by name rather than requiring qualification.
15:47:07 <ais523> yep; but our was invented before state
15:47:22 <ais523> so it's not surprising it's used in contexts where state would be better
15:47:37 <ais523> just like old Perl code uses a lot of local where nowadays you'd use my, because my hadn't been invented yet
15:48:43 <kallisti> I think if there's already a package-scoped variable by that name then our just lets you refer to it without the package qualification???
15:48:46 <ais523> state is /very/ recent as Perl goes, the version of Perl installed here considers it an experimental feature
15:49:01 <ais523> kallisti: well, you don't have to "create" variables in Perl, they just exist
15:49:19 <ais523> so yes, you're referring to the package-scoped variable with that name without having to qualify
15:49:31 <ais523> you could do that anyway, but use strict would shout at you, so you use the our to let use strict know that it's deliberate
15:49:48 <kallisti> right but typically my, local, and state pretty much always create a new variable (possibly shadowing an old one)
15:49:53 <kallisti> whereas our doesn't necessarily.
15:50:49 <ais523> my/local/state are all /scoping/ mechanisms
15:51:11 <ais523> and actually, local never creates a new variable, it just fiddles with the value of an existing variable to make it look new
15:51:42 <kallisti> well, right, but I'm thinking in the context of use strict where the variable effectively cannot be used without being declared first.
15:52:12 <kallisti> though local kind of does work differently...
15:52:35 <kallisti> because you can't know if it's defined until runtime, so...
15:53:43 <kallisti> ah okay if you use a dynamically scoped variable outside of its lexical scope you need to declare the variable again... I think.
15:55:30 <kallisti> !perl local $x = 2; package Hello; print $x;
15:55:40 <kallisti> !perl use strict; local $x = 2; package Hello; print $x;
15:55:40 <EgoBot> Global symbol "$x" requires explicit package name at /tmp/input.4318 line 1.
15:56:40 <kallisti> !perl sub hello() { print $x } package Hello; local $x = 1; print hello
15:56:48 <kallisti> !perl use strict; sub hello() { print $x } package Hello; local $x = 1; print hello
15:56:49 <EgoBot> Global symbol "$x" requires explicit package name at /tmp/input.4494 line 1.
15:57:24 <kallisti> I've never used local so maybe I don't understand it very well.
15:59:37 <kallisti> !perl use strict; sub hello() { print $::x } package Hello; local $x = 1; print hello
15:59:37 <EgoBot> Global symbol "$x" requires explicit package name at /tmp/input.4780 line 1.
16:00:05 <kallisti> !perl use strict; sub hello() { print $Hello::x } package Hello; local $Hello::x = 1; print hello
16:00:52 <ais523> kallisti: "hello" has no referent at the end of that line
16:01:03 <ais523> ::hello() is out of scope, and there's no Hello::hello
16:01:35 <ais523> !perl use strict; sub hello() {print $Hello::x } package Hello; local $Hello::x = 1; print ::hello()
16:02:03 <kallisti> hmmm, okay, but there's no way to omit the package there in hello?
16:02:26 <ais523> sure, there are libraries for importing
16:04:47 <kallisti> at the top of a package, what is
16:06:42 <ais523> that package variable, I think
16:06:57 <ais523> except that local sets the value to undef, then changes it back to the previous value when it goes out of scope
16:07:07 <ais523> don't think of local as declaring variables at all, because it doesn't
16:07:22 <kallisti> so I think I want our instead.
16:07:33 <ais523> !perl my $x = 4; my $rx = \$x; print $$rx; {local $x = 5; print $$rx; } print $$rx;
16:07:33 <EgoBot> Can't localize lexical variable $x at /tmp/input.5617 line 1.
16:07:35 <kallisti> then in the command subroutine which registers new commands
16:07:41 <ais523> !perl our $x = 4; my $rx = \$x; print $$rx; {local $x = 5; print $$rx; } print $$rx;
16:07:54 <kallisti> if there's category specified then I want to access $category in caller
16:07:55 <ais523> ah no, local affects global, not package, variables
16:07:58 <ais523> !perl $x = 4; my $rx = \$x; print $$rx; {local $x = 5; print $$rx; } print $$rx;
16:07:59 <kallisti> which I don't remember how to do.
16:08:10 <ais523> or, hmm, I'm misremembering something ehre
16:08:27 <ais523> !perl $_ = 4; my $r = \$_; print $$r; {local $_ = 5; print $$r; } print $$r;
16:08:40 <kallisti> ...I definitely don't think that's how refs work.
16:08:48 <ais523> perhaps it's the ref that's the problem
16:09:32 <kallisti> okay so I could use our, as I outlined above
16:09:42 <kallisti> and then access the global variable?
16:10:06 <ais523> you should probably not use local ever, nowadays
16:10:22 <kallisti> I've used local a few times to change special variables
16:10:39 <ais523> !perl local $x = 4; sub y {print $x}; { local $x = 6; y(); } y();
16:10:40 <EgoBot> Missing right curly or square bracket at /tmp/input.6648 line 1, at end of line
16:11:08 <ais523> !perl local $x = 4; sub y {print $x} { local $x = 6; y(); } y();
16:11:09 <EgoBot> Missing right curly or square bracket at /tmp/input.6733 line 1, at end of line
16:11:31 <ais523> !perl local $x = 4; sub y {print $x} if (1) { local $x = 6; y; } y;
16:11:31 <EgoBot> Transliteration replacement not terminated at /tmp/input.6817 line 1.
16:11:53 <ais523> !perl local $x = 4; sub y {print $x} if (1) { local $x = 6; y ; } y ;
16:11:54 <EgoBot> Transliteration replacement not terminated at /tmp/input.6893 line 1.
16:12:01 <ais523> nope, I think I need to disambiguate it more clearly
16:12:08 <ais523> !perl local $x = 4; sub y {print $x} if (1) { local $x = 6; &y(); } &y();
16:12:13 <ais523> that's what local does
16:12:21 <ais523> it was meant to be a sub call, not a bareword
16:12:48 <ais523> no, barewords are where you write an identifier and it's interpreted as a string
16:13:09 <kallisti> no I believe barewords are literally identifiers with no sigil.
16:14:06 <kallisti> but then what happens when you turn strict on>
16:15:10 <ais523> strict doesn't mind subroutine calls to subroutines you've declared
16:15:21 <kallisti> but any string of valid identifier characters without word boundaries and no leading sigil
16:15:35 <kallisti> but it doesn't it might the local $x stuff?
16:15:45 -!- elliott has quit (Ping timeout: 248 seconds).
16:16:22 <kallisti> I've seen the phrase "bareword" appear in the context of the => operator, subroutine names, and bareword filehandle names.
16:17:26 <kallisti> I think I'll just avoid local because it confuses me.....
16:18:51 <kallisti> !perl sub hi { print $x}; local $x = 1; print hi;
16:19:13 <kallisti> !perl use strict; sub hi { print $x}; local $x = 1; hi;
16:19:14 <EgoBot> Global symbol "$x" requires explicit package name at /tmp/input.7662 line 1.
16:19:24 <kallisti> !perl use strict; sub hi { print $::x}; local $x = 1; hi;
16:19:24 <EgoBot> Variable "$x" is not imported at /tmp/input.7725 line 1.
16:20:40 <kallisti> !perl use strict; sub hi { our $x; print $x}; local $x = 1; hi;
16:20:40 <EgoBot> Variable "$x" is not imported at /tmp/input.7885 line 1.
16:21:17 <kallisti> !perl use strict; our $x; sub hi { print $x}; local $x = 1; hi;
16:22:04 <kallisti> but that doesn't show me how to use local with global names.
16:26:09 <ais523> to get a /truly/ global name in Perl, you have to start it with a control character
16:26:29 <ais523> !perl use strict; sub hi { print ${^test}}; local ${^test} = 1; hi;
16:26:29 <EgoBot> syntax error at /tmp/input.8539 line 1, near "{^"
16:26:44 <ais523> !perl use strict; sub hi { print ${^Test}}; local ${^Test} = 1; hi;
16:26:53 <ais523> there we go, forgot it had to be capital there
16:27:07 <ais523> but the syntax for true globals is awkward precisely because you rarely want to use them
16:27:16 <kallisti> I'll just use package scope with caller to do what I want.
16:27:48 <kallisti> though I don't remember what that looks like...
16:27:58 <ais523> kallisti: whatever you want, I suspect it's a bad idea
16:29:15 <kallisti> maybe if you like conventionally lexically scoped programs where you pass information via function arguments.
16:29:31 <kallisti> in which case you live your life IN FEAR.
16:30:41 <kallisti> actually no there's an easier way to do it.
16:30:51 <kallisti> I can just have a package scoped variable in the main bot module
16:31:03 <kallisti> and then the command modules override it with local.
16:31:15 <kallisti> ALL IN THE NAME OF SAVING A FEW KEYSTROKES.
16:33:12 <fizzie> I've seen somewhere a "'local' mutates a global (package) variable, doesn't make a new variable" example a bit like
16:33:13 <fizzie> !perl our $x = 42; sub inner { print "xi $x "; } sub way1 { my $x = 69; print "x1 $x "; inner; } sub way2 { local $x = 69; print "x2 $x "; inner; } way1; print "xa1 $x -- "; way2; print "xa2 $x";
16:33:13 <EgoBot> x1 69 xi 42 xa1 42 -- x2 69 xi 69 xa2 42
16:33:36 <fizzie> (Except with better names, I suspect.)
16:34:31 -!- derdon has joined.
16:42:58 <kallisti> > my $x = "test"; print ${x $x}
16:42:59 <lambdabot> <no location info>: parse error on input `='
16:43:04 <kallisti> !perl my $x = "test"; print ${x $x}
16:43:05 <EgoBot> Can't locate object method "x" via package "test" (perhaps you forgot to load "test"?) at /tmp/input.10941 line 1.
16:43:16 <kallisti> that's the syntax I was looking for.
16:45:19 <kallisti> so I can do my $package = caller; eval "require $package"; do_stuff ${category $packge};
16:45:35 <kallisti> though I think that require step won't be necessary as all the command modules /should/ be preloaded.
16:46:18 <kallisti> well.... no that's a method call syntax.
16:47:46 <kallisti> so I can do my $package = caller; eval "require $package"; {no strict 'refs'; do_stuff ${"$packge::category"}}
16:48:13 <kallisti> but I think using local will be easier, in fact.
16:48:35 <kallisti> local $Bot::default_category = "whatever";
16:49:33 <kallisti> but it's good to know how to do this highly dynamic perl voodoo in case I need it?
16:49:40 * kallisti has done similarly dynamic Python voodoo before.
16:52:50 <fizzie> I think you need ${"${package}::category"} or something there, otherwise "$package::category" will, when dquote-interpolating, be looking for variable $category in package 'package'.
16:53:50 <kallisti> I actually wrote a function wrapper class in Python that could take a string of Python code and recompile itself with the string as the function's body.
16:54:19 <kallisti> it was going to be for a MUD codebase. the idea being that the Python code was available and editable from within the MUD itself.
16:56:33 <kallisti> but turns out that's pretty complicated to implement.
16:57:26 <kallisti> probably easier to version control the source code, allow the source code to be changed in-file rather than dynamically in memory, then hot-swap the code.
17:00:18 <Ikarus> kallisti: don't even try in memory tricks
17:08:31 <Phantom_Hoover> http://en.wikipedia.org/wiki/File:Christopher_Nolan_at_WonderCon_2010_1.JPG
17:10:28 -!- sebbu has quit (Read error: Connection reset by peer).
17:10:51 -!- sebbu has joined.
17:10:51 -!- sebbu has quit (Changing host).
17:10:51 -!- sebbu has joined.
17:15:14 <zzo38> I found out, that Wolfram|Alpha can compute equatorial coordinates (such as "right ascension of sun"), but ecliptic coordinates do not work. You also cannot seem to specify what epoch to reference. However, it can compute astrological signs. (The blog mentions "ecliptic longitude", in relation to the moon; but the program doesn't understand "ecliptic longitude of moon")
17:31:42 <ais523> wow YouTube's got uglyh
17:32:31 <ais523> the "Subscribe" button doesn't even have a correctly centered label
17:33:08 <fizzie> "a**igned" -- profanity filter strikes again.
17:34:01 <fizzie> From the same page: "tool-a**isted", "occa**ions" (presumably a typo originally) -- the page in question was tasvideos' SMB infopage, http://tasvideos.org/GameResources/NES/SuperMarioBros.html
17:34:50 <ais523> I don't think the TASvideos wiki censors
17:34:57 <ais523> perhaps it was a copy-and-paste from somewhere that does
17:36:53 <fizzie> Perhaps; there are no **s on other "game resources" pages which also contain the word "tool-assisted".
17:39:30 -!- Taneb has joined.
17:40:33 <Taneb> Priorities, right?
17:42:18 <fizzie> Are the other people at the party on IRC too?
17:42:20 <ais523> <TASVideoAgent> Page GameResources/NES/SuperMarioBros edited by ais523 (remove censorship of the "ass" in "tool-assisted" and similar words; presumably this was caused by a confused proxy or the like): http://tasvideos.org/GameResources/NES/SuperMarioBros.html
17:44:37 <Taneb> Which I am awful at.
17:50:41 <fizzie> Church of...? oh, right Call of Duty.
17:52:24 <ais523> fizzie: Discordianism?
17:54:06 <fizzie> I don't think they have a single Church, really.
17:57:25 <ais523> still, you can use the name to describe an individual church out of a set of more
17:58:09 <kallisti> There is no Goddess but Goddess and She is Your Goddess
17:58:22 <fizzie> I guess. But normally I suppose you'd just use whatever they call themselves; the Paratheo-Anametamystikhood Of Eris Esoteric or whatever.
17:58:36 <kallisti> There is no Movement but The Erisian Movement and it is The Erisian Movement.
17:59:58 <Taneb> Now we will watch FPS Russia
18:00:41 <ais523> fizzie: I'm reminded of something at school I wasn't involved in, which had two teams which were unofficially competing
18:00:51 <ais523> one called themselves "A Team", so the other called themselves "Another Team"
18:00:55 <ais523> it made for very confusing announcements
18:01:58 <fizzie> Another Team, or A Team in short.
18:05:26 <ais523> but no, they didn't do that
18:13:57 <ais523> wow, ITV1 is being unexpectedly awesome right now
18:14:16 <ais523> they're showing a game show on, but it's a celebrity special, and they've got Ann Widdecombe there (former politician)
18:14:26 <ais523> and she's talking back to the host continuously and trying to take control of the show
18:15:16 <ais523> for anyone who's upset with game show hosts stating the obvious continuously, this is revenge
18:16:03 <ais523> aww, she just won the round, presumably it'll go back to normal now
18:17:23 <ais523> I'd be very surprised if it's not up on YouTube tomorrow, anyway
18:46:46 <fungot> Phantom_Hoover: in the middle ages, sir slush!... you're gaspar, the guru of time! get moving! crono!!!
18:47:29 -!- sebbu2 has joined.
18:50:08 <Gregor> ais523: Tool-buttisted speedrun.
18:50:29 -!- sebbu has quit (Read error: Operation timed out).
18:54:00 <ais523> one of you is doing present tense, the other past tense
18:54:18 <Deewiant> I was thinking like a stupid word filter
18:54:53 -!- sebbu2 has changed nick to sebbu.
18:58:03 <Taneb> I think Deewiant is using the noun
18:58:04 -!- monqy has joined.
19:32:09 -!- Taneb has quit (Ping timeout: 255 seconds).
19:32:28 -!- Taneb has joined.
19:39:46 <Phantom_Hoover> I retreated once I was seriously considering becoming religious just to spite them.
19:39:47 -!- Taneb has quit (Read error: Connection reset by peer).
19:54:09 -!- derdon has quit (Remote host closed the connection).
20:07:19 <zzo38> You don't need to become religious; just learn some things about religious stuff, and in some cases that might not be needed either if they simply make logical mistakes.
20:09:24 <zzo38> If you *want* to be religious, then do so; but that isn't a very good reason to do as far as I know.
20:13:38 <Slereah> did someone come in here thinking esoteric meant something else again?
20:36:32 -!- derrik has joined.
20:38:31 -!- oerjan has joined.
20:46:07 <oerjan> does anyone else find it annoying when a blog post has no date near the top, so you have no idea before starting to read whether it is from today or 3 years ago...
20:48:32 * oerjan thought of this when visiting shtetl-optimized, although for this particular post he knew it was from today by how he found it
20:52:48 <Deewiant> I find it annoying when they only have month/day but not year
20:57:14 -!- oerjan has quit (Remote host closed the connection).
20:57:20 -!- oerjan has joined.
21:37:51 -!- Ikarus has quit (Ping timeout: 240 seconds).
21:39:25 <zzo38> Once I read something it says how to make C program without a semicolon. I didn't know at first; but now I realized it and I can understand.
21:39:31 <zzo38> Can you understand?
21:40:25 <oerjan> main () { if ( ...crazy expression... ) {} }
21:40:48 <zzo38> oerjan: Yes, that is it.
21:41:12 <pikhq_> A while loop ought to fill the same role.
21:41:55 <oerjan> well yeah but the if statement is equivalent to ...crazy expression...;
21:42:10 <pikhq_> Yeah; while's just more useful if you want iteration in there.
21:42:50 <oerjan> oh hm what about variable declarations, can you do those?
21:43:05 <pikhq_> No, but you can cheat.
21:43:15 <Deewiant> main() { if (foo(1)) {} } foo(int x) { ... }
21:43:17 <pikhq_> foo(int foo, int bar, int baz) { ... }
21:44:07 <oerjan> ah essentially like the let ... in ... to (\ ... -> ...) ... conversion of haskell
21:45:33 <oerjan> i don't recall enough details to know if you can do arrays or structs in that way.
21:45:48 <zzo38> Except that, in C you can change a variable inside of an expression, and including looping too.
21:46:11 <Deewiant> No nonempty structs/unions nor arrays
21:46:35 <Deewiant> Pointers work though, so you can malloc
21:46:36 <oerjan> oh well, you still have malloc
21:46:40 <zzo38> You can probably use alloca to make up array access
21:46:57 <Deewiant> Possibly VLAs, not sure how those work
21:47:56 <fizzie> You can probably have a compound-literal array and then pass that toa function which takes a pointer.
21:51:16 -!- pikhq has joined.
21:51:28 <fizzie> void foo(int* p) {} int main(void) { if (foo( (int[]){1,2,3} ), 1) {} }
21:51:37 -!- pikhq_ has quit (Ping timeout: 260 seconds).
21:56:54 -!- oerjan has quit (Remote host closed the connection).
21:57:13 -!- oerjan has joined.
21:57:45 -!- derrik has quit (Quit: disappear).
22:01:43 <Jafet> main ought to return something.
22:01:53 <Jafet> http://codepad.org/xVFNe2LP
22:03:23 <Jafet> Maybe I could rewrite that
22:03:30 <Deewiant> main can also default-return zero in C99
22:26:41 <fizzie> That's funny, Ubuntu includes a LSM thing which patches ptrace so that (by default) you can't attach to an arbitrary process with the same uid; you can only attach to a real descendant. (Or if the target has set you as a "designated tracer" with prctl.)
22:29:24 <fizzie> Otherwise it just goes all http://p.zem.fi/icgj
22:37:54 <ais523> wait, is that actually writing to stderr? (or /dev/tty?)
22:38:05 <ais523> and if so, what's doing the writing? the kernel?
22:39:54 <fizzie> ais523: I suspect it's part of Ubuntu's GDB patches.
22:40:06 <fizzie> (But haven't checked.)
22:40:12 <ais523> oh, they patched gdb to explain the error caused by their patch to ptrace? that makes more sense
22:40:30 -!- derdon has joined.
22:41:13 <fizzie> dpkg-source: info: applying ptrace-error-verbosity.patch
22:42:14 -!- PiRSquared17 has joined.
22:44:14 <zzo38> GHC has a extension for existential types but I cannot seem to make existential logic statements with that?
22:48:12 <oerjan> well if you have data Exists (p :: * -> *) = forall x. Exists (p x)
22:48:46 <oerjan> then you should be able to use Exists P where P is a type of kind * -> *
22:48:54 <zzo38> oerjan: O, that is how to do it?
22:50:18 <oerjan> well, P needs to be a data type, not a synonym
22:50:28 <oerjan> (or it could be a newtype)
22:52:15 <zzo38> Could a Classical constraint be used? Would it help with anything? (Classical is the class I made up for law of excluded middle)
22:53:11 <oerjan> well yes, if you need any constraints on x you should add them
22:53:51 <zzo38> OK, I will try like that.
22:56:44 <zzo38> What is an example to use Exists type?
22:57:25 <oerjan> i don't know about its type logic use, it's just the obvious way i'd try it
23:00:37 <oerjan> test :: (forall x. P x -> Q x) -> Exists P -> Exists Q; test f (Exists x) = Exists (f x)
23:01:12 <oerjan> oh and P and Q could be type variables
23:02:58 <oerjan> test2 :: (forall x. p x -> q) -> Exists p -> q; test2 f (Exists y) = f y
23:05:44 <oerjan> i think s/x/px/g for the pattern variable in the first one
23:05:54 <oerjan> since it's not actually of type x
23:07:52 -!- atehwa has quit (Remote host closed the connection).
23:08:42 <oerjan> untested, hopefully those work
23:10:55 -!- Klisz has joined.
23:18:01 <zzo38> Is it possible to use type families for equality of cardinality of natural numbers types? (I am using uninhabited type for zero and Maybe for successor)
23:24:10 -!- PiRSquared17 has left.
23:32:55 <myndzi> fizzie: wrt midnight(unixtime+8) vs midnight(unixtime)+8, i discovered my error, the correction, and why the difference was (and thought i noted it?) when composing the spreadsheet. since it was a last minute addition, i admit to not examining it thoroughly, so yeah, i could see needing to subtract 8 again; i'll check it out.
23:34:28 <myndzi> as for "i told you so", i confess to missing that line in a furor of typing because it was unrelated to whatever thread of conversation i was following at the time, and forgetting to go back and read it. something like that anyway. at least i suppose we understand each other now :)
23:35:16 <fizzie> I'm willing to call it quits as long as you are, sure. :)
23:35:25 <myndzi> i don't see anything to argue about? :P
23:35:33 <myndzi> no need to "call it quits"
23:35:51 <myndzi> i never wanted to "win", only to reach common understanding :)
23:38:18 <fizzie> Oh, there's always something to argue about; if nothing else, fonts. But yes, I suppose it's all good now.
23:40:05 <zzo38> There are many font making programs, including the private character set editor included with Windows; but I think METAFONT is best one.
23:40:24 <oerjan> fizzie: see what you have done
23:40:33 <myndzi> wow, that was impressive
23:40:38 <myndzi> t-mobile is shittier than aol to cancel with
23:40:52 <myndzi> i called them up and they didn't even OFFER me a menu option to talk to someone about ANYTHING relevant to my account
23:40:59 <myndzi> i tried hitting 0 but it was like pshaw
23:41:01 <fizzie> oerjan: Lo, there are many font-making programs in the archipelago of software.
23:41:22 <myndzi> so i go through the menu to talk to someone about "starting" an account, got on the line with a person in about 30 seconds, ask them to transfer me to cancellation
23:41:27 <myndzi> and then was on hold for about 15 minutes
23:41:59 <myndzi> heh, i know a guy who made a font of his handwriting
23:42:14 <myndzi> he did a good job of it too, learned all about the fancy technical stuff you can do
23:42:46 <myndzi> after he got english and the extended accented characters etc. he moved on to greek, russian, japanese kana, and hangeul
23:42:59 <fizzie> An urban legend says those automated phone systems automatically detect when the caller is spouting curse words, and then connect to a real person to calm them down, to avoid losing a customer. (In reality I'd guess they'd rather just record those bits for the staff to chuckle about later.)
23:43:19 <myndzi> heh heh, i suppose it's quite possible these days
23:43:51 <zzo38> myndzi: O, you did try pushing zero. I was going to suggest that. Another suggestion, try saying "Agent" or "You are a stupid idiot" into the telephone; apparently sometimes that works. Another suggestion is to attempt guessing at passwords or extra DTMF tones, going to their office, violating terms of service in obvious way, etc
23:44:00 <myndzi> t-mobile used to be like
23:44:13 <myndzi> Automated voice: I'm sorry, if you just punch the right numbers *i* can help you
23:44:21 <myndzi> and if you kept pounding it you'd get someone
23:44:24 <myndzi> but not even that anymore
23:44:42 <myndzi> anyway, it turns out when you port a number
23:44:48 <myndzi> it automatically cancels the account
23:44:56 <fizzie> "4) Say the magic word: "complaint" (as in "I'd like to file a complaint") as many times as possible. You may be forwarded to a real human being after a mere three or four utterances of that word." <- from a page about dealing with IVR systems, the ones you (try to) speak to.
23:44:58 <myndzi> which is interesting because all they need to port a number is the phone number and account number apparently
23:45:02 <myndzi> seems quite open to abuse
23:45:11 <fizzie> "5) Curse. Many programs are trained to recognize swear words and often take you to an operator after you drop an f-bomb or two. Just remember not to carry this method over when you're speaking to the actual operator!"
23:45:22 <fizzie> I guess it's less likely if the system is just a touch-tone one.
23:45:30 <myndzi> related: http://www.youtube.com/watch?v=30J-WEx0xhI
23:46:13 <myndzi> but yeah. That Feel when an automated fucking system tries to be like "no really, i know better than you" >:(
23:46:19 <zzo38> fizzie: The first thing I always try is to push zero, followed by "Agent" if zero doesn't work.
23:46:27 <myndzi> especially when they specifically design it to make it hard to get to things you want
23:46:56 <fizzie> There's a website called http://gethuman.com/ which tries to collect best ways to reach a human at different companies.
23:46:58 <myndzi> 0 -> agent -> shit motherfucker ass tits cunt cock motherfucker ass tits motherfucker shit come on!
23:47:07 <myndzi> actually i think i got the very end of that wrong
23:47:21 <myndzi> http://www.youtube.com/watch?v=tjayrv8HSP4
23:47:23 <myndzi> i didn't make it up :)
23:48:29 <myndzi> ahh, i forgot one 'shit' :P
23:53:31 <zzo38> I would have, for my business telephone service, you talk to a person who is answering the telephone, normally. But, if you want automated system you can push 1 before someone answers, in case you don't want to bother them. Or, if nobody is there, can be a voice message "Nobody is available to answer telephone; please leave a message after the tone or push 1 for automated system. [BEEP]"
23:54:15 <myndzi> that would be pretty sweet.
23:54:34 <myndzi> the other one is "press a button to speak in your native language"
23:54:44 <myndzi> but that could be solved by a receptionist too!
23:56:47 <zzo38> Yes, it can be a receptionist who understand the language. Not my plan; but an idea in csae people want to implement a scheme like this one, you can have many possible ideas.
23:57:40 <myndzi> or just can RECOGNIZE other languages and forward you
23:58:02 <myndzi> i can recognize a decent number of different languages, but most of the time the optios are only 'english' and 'spanish'
23:58:05 <myndzi> so that's not hard at all
23:58:21 <myndzi> i haven't really worked out how to distinguish korean from japanese though
23:58:26 <myndzi> except maybe to listen for a bunch of desu
23:58:38 <myndzi> i was surprised they sounded so similar when chinese was so distinct
23:59:04 <myndzi> and with those one-syllable names, i expected it to sound more chopped up
23:59:10 <pikhq> Korean has significantly more variety in its syllables.
23:59:23 <pikhq> They can end with consonants!
23:59:30 <myndzi> oh now that's a nice giveaway
23:59:37 <myndzi> i'll remember that one :)
23:59:47 <Deewiant> The syllable thing isn't necessarily easy to hear though
23:59:53 <pikhq> Also: Chinese isn't a single language. :)