00:02:13 -!- Vorpal has quit (Ping timeout: 264 seconds).
00:02:32 -!- myndzi has quit (Ping timeout: 260 seconds).
00:03:48 -!- myndzi has joined.
00:05:55 -!- CakeProphet has quit (Ping timeout: 276 seconds).
00:08:19 -!- CakeProphet has joined.
00:08:52 -!- MigoMipo has quit (Read error: Connection reset by peer).
00:27:53 <zzo38> Have you used a literate programming system to document a file format?
00:31:21 -!- Sgeo has quit (Ping timeout: 250 seconds).
00:39:35 -!- Kr1sp13kr3m3 has joined.
00:40:08 -!- Kr1sp13kr3m3 has quit (Remote host closed the connection).
00:40:56 -!- Kr1sp13kr3m3 has joined.
00:50:43 -!- Lymia has joined.
00:51:24 -!- Lymee has quit (Disconnected by services).
00:51:27 -!- Lymia has changed nick to Lymee.
00:58:22 -!- Sgeo has joined.
01:12:08 -!- invariable has joined.
01:12:33 -!- invariable has left.
01:16:14 -!- Kr1sp13kr3m3 has quit (Remote host closed the connection).
01:17:48 -!- cheater__ has joined.
01:21:12 -!- cheater_ has quit (Ping timeout: 250 seconds).
01:25:01 -!- Kr1sp13kr3m3 has joined.
01:27:32 -!- Kr1sp13kr3m3 has quit (Remote host closed the connection).
01:54:29 -!- Lymee has quit (Ping timeout: 252 seconds).
01:57:17 -!- azaq23 has joined.
02:03:03 -!- oerjan has quit (Quit: Good night).
02:07:26 -!- Lymee has joined.
02:17:40 * Sgeo vaguely imagines running GoL in reverse, with multiple possibilities as superpositions
02:18:17 <Sgeo> Although I haven't thought it through, it seems like it would have an infinite neighborhood
02:18:55 <Sgeo> Which almost seems to imply c = infinite. That almost makes sense though (but not quite) since a Garden of Eden anywhere means there is no next step
02:19:15 <Sgeo> I'm too tired to be thinking this through properly
02:20:20 <zzo38> I am trying to write a program that reads LLVM bitcode files and I keep making mistakes
02:21:52 <zzo38> And I am unable to access the repository to look at the codes they use.
02:24:56 -!- Lymee has quit (Ping timeout: 240 seconds).
02:37:02 -!- Lymee has joined.
02:51:16 <Sgeo> Given a finite area (say, on a torus), would it be possible to make a rule such that the neighborhood of the rule is Moore 1, and N steps of the rule correspond to -1 steps of GoL? (Of course, with superpositions)
02:51:57 -!- Lymia has joined.
02:55:34 -!- Lymee has quit (Ping timeout: 276 seconds).
02:57:23 -!- ralc has quit (Ping timeout: 250 seconds).
03:22:11 -!- Lymia__ has joined.
03:22:51 -!- Lymia__ has changed nick to Lymee.
03:22:54 -!- Lymee has quit (Changing host).
03:22:54 -!- Lymee has joined.
03:25:34 -!- Lymia has quit (Ping timeout: 258 seconds).
03:32:16 -!- Lymia has joined.
03:32:41 -!- Lymee has quit (Disconnected by services).
03:32:42 -!- Lymia has changed nick to Lymee.
03:38:59 -!- azaq23 has quit (Read error: Operation timed out).
03:39:12 <zzo38> My program appears to be running out of memory for some reason, realloc is returning 0
03:50:19 <zzo38> I think malloc(0) doesn't work (at least in Windows), removing them resulted in not crashing.
03:50:35 <zzo38> But now I get no output if I redirect the output to a file
03:53:00 <zzo38> Can you possibly tell me what is going wrong????????????????
03:53:04 -!- Lymia has joined.
03:53:13 -!- Lymee has quit (Disconnected by services).
03:53:15 -!- Lymia has changed nick to Lymee.
03:53:16 <zzo38> It seems to stop after reading an abbreviation encoding.
03:53:45 -!- azaq23 has joined.
03:56:00 <ais523> zzo38: malloc(0) is not guaranteed to succeed
03:56:14 <ais523> you could try using malloc(1) instead, it has the same effect
03:56:49 <zzo38> I just replaced all of malloc(0) with (0) and now I get no error but I have other problems.
03:57:09 <pikhq_> zzo38: malloc(0) returns *either* a valid pointer or NULL; which of the two is implementation-defined.
03:57:39 <Lymee> !c printf("%u", malloc(0));
03:58:03 <Lymee> !c ((*unsigned char) malloc(0))[0] = 123;
03:58:05 <pikhq_> glibc malloc always returns a valid pointer.
03:58:11 <zzo38> The thing is that I was using the result later in realloc and/or free. What happen if NULL is used there?
03:58:13 <Lymee> !c *((*unsigned char) malloc(0)) = 123;
03:58:26 <Lymee> !c *((*unsigned char)(malloc(0))) = 123;
03:59:22 <pikhq_> zzo38: realloc(NULL, size) is the same as malloc(size), free(NULL) is a no-op.
03:59:47 <pikhq_> If this is *not* happening, then you have a broken C environment.
04:02:52 <newsham> !c int main() { assert(0); return 0; }
04:03:00 -!- Lymia has joined.
04:03:38 -!- Lymee has quit (Disconnected by services).
04:03:40 -!- Lymia has changed nick to Lymee.
04:04:13 <zzo38> Using malloc(0) or malloc(1) crashes. Using NULL results in the program stopping early and prevents it from working when output is redirected to a file.
04:06:22 <zzo38> (Note: "crashes" means realloc returns 0)
04:06:40 <zzo38> If you look, can you notice something wrong that I have failed to notice?
04:06:41 <pikhq_> What are you passing to realloc?
04:07:31 <Lymee> !c printf("%u", realloc(malloc(0),10));
04:07:32 <zzo38> o=realloc(o,(s+=(_amount))*sizeof(number));
04:08:22 <newsham> whats the security for !c?
04:09:00 <pikhq_> zzo38: Underscore-prefixed identifiers are reserved. Using a reserved identifier in your program is undefined behavior.
04:09:07 <pikhq_> zzo38: Aside from that, I got nothing.
04:09:14 <zzo38> pikhq_: _amount is a macro argument.
04:09:32 <pikhq_> Still undefined behavior.
04:10:03 <pikhq_> Admittedly, not going to trigger on any reasonable compiler.
04:10:18 <Lymee> DeathStation 9000 wants a word with youi.
04:10:22 <newsham> Plash virtualizes access to the filesystem. Operations by sandboxed processes on the file namespace, such as opening a file, are mediated by a user-space process. This works by modifying library calls (such as open()) so that they make remote procedure calls (RPCs) to another process instead of making the usual Linux system calls.
04:10:27 <pikhq_> Lymee: I said "reasonable".
04:10:33 <newsham> uh, so all you have to do is provide your own machine code which uses syscalls?
04:11:01 <pikhq_> newsham: And you're running unpriveledged in a chroot without any files. Good luck!
04:11:47 <newsham> thats still more access than most people want to give an attacker.
04:11:53 <newsham> you dont mind giving me a shell in the chroot?
04:11:54 <Lymee> if(name.startsWith("_")) blowUp();
04:12:22 <newsham> because I can put in code that opens a socket and pulls down a larger shell-like program that runs in your chroot
04:13:15 <pikhq_> It's *also* got some very heavy ulimits set up, and what's more, it's running on a VM that exists for running IRC bots.
04:13:51 <Lymee> I think you'd have more luck from attacking a back door than the front door
04:13:54 <pikhq_> Seriously, even if you manage a root exploit you're getting just about nothing out of there.
04:14:09 <newsham> ahh, so its not just the chroot files that are attack surface, you also have the whole VM as an attack surface? :) sweet.
04:14:30 <newsham> do you trust malicious code running in a VM?
04:14:34 <zzo38> http://sprunge.us/XdVd
04:14:46 <Lymee> If you manage to get out of that, then I don't think any other security is going to be a problem.
04:14:54 <pikhq_> Well, if the VM itself gets exploited it's Somebody Else's Problem.
04:15:06 <pikhq_> Since it's not Gregor's machine.
04:15:07 <zzo38> I am also having problems connecting to llvm.org
04:16:00 <Lymee> pikhq_, if the VM has an exploit, couldn't you attack it directly, without messing with the chroot?
04:16:03 <zzo38> What is "DeathStation 9000"?
04:16:25 <pikhq_> Lymee: Most VM exploits would *probably* require access to /dev/kmem.
04:16:45 <pikhq_> If you can exploit the VM from ring 3, we have *serious* problems happening.
04:17:00 <Lymee> The "wtf is this security" kind?
04:17:23 <zzo38> Can you look see in case you noticed something wrong with my program, that I have failed to notice?
04:18:58 <pikhq_> zzo38: Nothing *obviously* wrong.
04:20:14 <zzo38> pikhq_: Do you have any suggestions though? Would it help if you read this document too? http://llvm.org/docs/BitCodeFormat.html
04:29:49 <zzo38> I tried various ways of making macros to override free,malloc,realloc but none of that helped.
04:32:03 <zzo38> I get errorlevel 128. What does that mean?
04:33:59 <zzo38> The output before it unexpectedly stops seems correct.
04:36:45 <zzo38> I found out where it appears to be failing.
04:37:21 <zzo38> It seems to be failing in the chunk @<If the kind is not |endblock|, create a node@>
04:38:21 <zzo38> It seems to be the malloc in that chunk that is causing it to stop.
04:39:30 <zzo38> I don't see anything wrong but maybe you can check maybe you can see something wrong with that?
04:43:33 <zzo38> Can you please try to help?
04:47:04 <zzo38> Here is the output I received, in case it helps: http://sprunge.us/gJWC
04:48:07 <zzo38> The output looks correct to me except that it is incomplete.
04:56:26 -!- Lymee has quit (Ping timeout: 255 seconds).
04:58:45 <zzo38> AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
04:58:56 <zzo38> Oops I don't think AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA can help me either
05:05:26 -!- Lymee has joined.
05:08:56 -!- derrik has joined.
05:13:43 <Sgeo> It's demonstratable that reverse life has an infinite neigh.. n/m
05:14:49 <Sgeo> Well, I can't imagine how to do universe end on GoE without an infinte neighborhood
05:31:47 <zzo38> Here is the memory allocation trace: http://sprunge.us/NGYP
05:33:16 -!- Lymia has joined.
05:33:43 -!- Lymee has quit (Disconnected by services).
05:33:45 -!- Lymia has changed nick to Lymee.
05:53:30 -!- Lymia has joined.
05:56:28 -!- Lymee has quit (Ping timeout: 240 seconds).
05:57:40 <zzo38> The ##C channel is no help.
05:59:29 <zzo38> They told me to define 'good' even though none of my questions are about that.
05:59:38 <zzo38> And then they told me that I haven't asked them a question.
06:00:55 <zzo38> Can you please answer my question?
06:04:10 <derrik> zzo38: what question do you have besides "Can you please answer my question?"
06:05:04 <zzo38> derrik: The question about the program.
06:15:25 <zzo38> When compiling with -Os the program stops at the same place but with the error message "The exception unknown software exception (0xc00000fd) occurred in the application at location 0x77f5a84."
06:16:16 <zzo38> -O2 results in the same error.
06:16:39 <zzo38> However, -O0 results in it stopping with no message (it stops in the same place though).
06:18:04 <zzo38> -O3 results same as -O0
06:20:29 <zzo38> gdb says the error appears in RtlLookupElementGenericTableAvl and no stack information is available.
06:21:09 <zzo38> gdb does say it is a segmentation fault.
06:23:36 <zzo38> node*x=malloc(sizeof(node)+(b->kind==beginblock?0:(s-w)*sizeof(number)));
06:26:52 <Sgeo> Does it make sense for live to evolve in a universe where information is monotonically non-decreasing?
06:26:57 <zzo38> What do you dislike about it? Some other people also dislike it, and that is OK. I find it useful.
06:27:17 <CakeProphet> I was making fun of the people who dislike it, actually.
06:28:02 <CakeProphet> my only complaint is that there's not an alternative syntax for else ifs
06:28:52 <zzo38> I know that isn't the problem with my program. I have written macros to override malloc,realloc,free and realized exactly where it stops. I still don't know why it stops, though.
06:30:21 <zzo38> Can you try the program on your computer?
06:37:36 <CakeProphet> I have to go consol a friend of mine actually...
06:40:26 <zzo38> Is anyone else in here that can do so please?
06:41:15 -!- monqy has quit (Quit: hello).
06:53:22 -!- derrik has quit (Read error: Connection reset by peer).
06:53:55 -!- derrik has joined.
07:09:22 <zzo38> If I do #define malloc(X) malloc((X)+999) then the program stops later than before.
07:10:34 <Deewiant> zzo38: When you allocate abbrevinfo*x, you don't multiply the allocation size by sizeof *x
07:11:54 <zzo38> Deewiant: You are absolutely right!
07:12:02 <Sgeo> How well would evolution even work in a macro non-deterministic environment?
07:12:54 <zzo38> That was exactly the problem! I am glad you noticed that.
07:17:08 -!- Vorpal has joined.
07:23:46 <zzo38> I found another problem that isn't about memory allocation and I think I know what it is and how to fix it.
07:35:46 <Sgeo> FUCK FUCK FUCK FUCK FUCK
07:36:03 -!- derrik has left.
07:37:13 <Sgeo> I accidentally touched a broken lightbulb.
07:37:30 <Sgeo> My dad claims it's ok, because it was an old bulb and anything in it has dissipated
07:39:21 <coppro> what's wrong with touching a bulb?
07:39:30 <Sgeo> It's one of those Hg bulbs
07:40:29 <ais523> well, you'll want to wash your hands thoroughly
07:40:53 <ais523> although mercury doesn't actually stick to the skin anyway, it slides off, so the warnings are mostly safety precautions
07:41:39 <ais523> but important ones, just in case some does remain
07:41:48 <Sgeo> I washed my hands
07:42:24 <ais523> the correct solution to a mercury spill, btw, is to mix it with sulphur
07:42:37 <ais523> I've seen that happen in chemistry labs when someone broke a mercury thermometer
07:42:44 <ais523> but it tends not to be readily available
07:45:17 -!- Lymia has quit (Read error: Connection reset by peer).
07:45:41 <Sgeo> I think I'll sleep in a different room
07:46:22 -!- Lymia has joined.
07:47:08 -!- Lymia has changed nick to Lymee.
07:51:39 <zzo38> Is printf("^vbrr: %llu\n",z); the incorrect way to display a 64-bit number?
07:52:26 <Deewiant> With MSVCRT it is, I think it's %I64d there
07:53:33 <zzo38> That did work, but will that work on other systems?
07:54:23 <Deewiant> There's no single way that works both with MSVCRT and other libcs
07:54:37 <zzo38> Maybe I can use a macro
07:58:21 <coppro> it supports some useful subsets
07:58:42 <coppro> if it doesn't work on MSVCRT well fuck them anyway
07:58:55 <pikhq_> C99 is 12 years old now.
07:59:24 <pikhq_> If you can't support even *simple* things right, then you should fuck off.
08:00:02 <coppro> C1X is nearing publication
08:00:16 <pikhq_> Though, part of the problem is that C++98 does not incorporate C99, and Microsoft is too dense to realise that C still matters.
08:00:32 <pikhq_> Of course, *C++0x* is nearing publication.
08:01:20 <pikhq_> Which, of course, incorporates changes made in C99.
08:01:57 <pikhq_> Well, actually, I dunno how much of C99 they did incorporate, but they at least did long long and %llu.
08:02:05 -!- Phantom_Hoover has joined.
08:03:14 <pikhq_> According to Stroustrup, vast majority.
08:03:37 <pikhq_> They didn't bring in variable-length arrays.
08:03:44 <zzo38> I just used #ifdef to decide making a macro called fmt64 which uses the proper format code.
08:04:23 <pikhq_> Though those are less necessary in C++, and optional in C1X, anyways.
08:04:32 <coppro> They brought in most of C99
08:04:39 <Deewiant> Did they bring in the t and z width specifiers?
08:04:47 <coppro> The entire C99 library is in C++0x
08:05:36 <coppro> Of course, timing again means that C++ will miss the C library boat
08:05:44 <coppro> but C1X is so ridiculously conservative
08:05:47 <pikhq_> *gaaah*, they didn't bring in "restrict".
08:05:54 <coppro> it's amazing it took them so long to do it
08:06:17 <pikhq_> Most of the features of C1X are unnecessary in C++0x, anyways.
08:06:42 <coppro> which is just a reinvention of overloading
08:07:10 <coppro> pikhq_: specifically, they didn't bring it in because it's a non-trivial feature and because nobody wanted to do the work
08:07:11 <pikhq_> Bit annoying that the two languages will have different threading support.
08:07:37 <pikhq_> coppro: Didn't bring in "restrict"?
08:07:51 <coppro> at this point C++ should ditch C imo
08:07:54 <pikhq_> Uh, it's an utterly trivial feature to *support*.
08:08:06 <coppro> pikhq_: I mean to put in the standard
08:08:33 <pikhq_> It's still a *very* useful compiler hint.
08:09:01 <coppro> I think it should be supported as an attribute
08:09:08 <pikhq_> Perhaps a little less so in C++, where you throw around types like candy, but still.
08:09:21 <coppro> and I also think that C++ should just stop thinking C cares about it
08:10:16 <pikhq_> The only reason I care at *all* about C++ maintaining C features is that C++ pretty much is forced to interact with C.
08:10:38 <pikhq_> So, the larger the set of features in C that isn't in C++, the greater the impedence mismatch is.
08:10:53 <pikhq_> If it weren't for that, C++0x could drop the entire C standard library for all I care.
08:11:00 <coppro> But really, the C committee doesn't actually care too much about C++
08:11:27 <pikhq_> C++'s insanity is their own damned problem. :P
08:11:37 <coppro> I'm not saying they should
08:12:21 <coppro> but it seriously hurts both C and C++ that they are divergin
08:12:49 <coppro> they're free to take a "fuck C++" approach
08:13:00 <coppro> but it has consequences
08:13:05 <pikhq_> C++ seems to have taken a "fuck C" approach, so.
08:13:11 <coppro> no, that's not their approach
08:13:37 <pikhq_> Then why isn't C++ a superset of C?
08:14:14 <coppro> C++98 was nearly a superset of C90. The only changes you would have to make were relatively trivial and, in nearly every case, already considered good style in C
08:14:32 <coppro> plus a few ones like extra keywords that couldn't be helped
08:14:37 <pikhq_> They changed void*'s semantics.
08:14:59 <coppro> Fixing a conformant C program could be done automatically
08:15:13 <coppro> and implicit void* casts are bad C style
08:15:46 <coppro> malloc should be casted
08:16:14 <pikhq_> The only time I've seen that done is if someone wants their C to compile with a C++ compiler.
08:16:31 <coppro> really? In my exerience it's been a style thing
08:16:46 <coppro> admittedly, I may not have a representative sample
08:17:17 <pikhq_> It's about as "good style" as Hungarian notation.
08:18:03 <coppro> in any case, that's minor compare to C99 features which didn't make it into C++0x
08:18:38 <pikhq_> Yeah, the distinction between C89 and C++98 was somewhat minor.
08:19:03 <coppro> restrict didn't make it in because no one wanted to define its semantics
08:19:19 <pikhq_> Between C99 and C++98, *wince*. C99 and C++0x, really annoying details. C1x and C++0x, *sigh*
08:19:43 <coppro> VLAs and designated initializers were worse; they would need to be expanded to work in C++
08:19:49 <coppro> VLAs are probably never worth it in C++
08:20:01 <pikhq_> Yeah, I actually understand VLAs not making it in.
08:20:05 <coppro> also weird stuff like x[const 5]
08:20:12 <pikhq_> And they're optional in C1x, anyways.
08:20:14 <coppro> is in the same boat as restric
08:20:31 <coppro> But the real issues are about to surface
08:20:40 <coppro> where C and C++ have differing implementations of the same feature
08:21:21 <pikhq_> That's an Apple extension.
08:21:43 <pikhq_> For Objective C, no less, that got kinda retrofitted into C.
08:22:03 <Sgeo> I am confident enough in my thinking to state the following: For any CA in a finite universe where Garden of Eden patterns exist, for each configuration of cells, there is a Garden of Eden pattern that reaaches it eventually. Maybe excluding oscillatiors from the configuration of cells, I'm not quite sure yet.
08:22:06 <pikhq_> More pressing is the differing implementations of threading.
08:22:17 <pikhq_> There's C++0x threads, C1x threads, and POSIX threads.
08:24:48 <Sgeo> Proof: Start from a configuration, and go "backwards", making random choices when needed. In a finite universe, either a loop must be reached, or the simulation must end. Assume that a loop occurs. Then, going forwards again, you'd never reach the initial configuration. Therefore, the backwards process must terminate.
08:24:49 <pikhq_> C++0x does not have "long long" and "unsigned long long".
08:24:58 <Sgeo> (Unless the initial configuration oscillates)
08:25:03 <pikhq_> It has _Longlong and _ULonglong.
08:25:20 <Sgeo> And can only be reached from its oscillation
08:25:27 <coppro> actually, I take it back
08:25:34 <ais523> Sgeo: fallacy: the configuration itself could be included in the loop
08:25:38 <coppro> I had thought WG14 had rejected C++ lambda syntax
08:25:54 <ais523> note that in a finite-universe CA, /all/ configurations are oscillators or precursors to oscillators, so you can hardly exclude those
08:26:14 <pikhq_> Well, C++ lambda *semantics* are fundamentally incompatible with C.
08:26:35 <pikhq_> Those are literally singleton classes with operator().
08:26:49 <Sgeo> ais523, ... oh, right
08:28:02 <coppro> pikhq_: Yes, but the syntax could be the same
08:28:09 <Sgeo> So, I proved something about a set that doesn't even exist, how wonderful
08:28:31 <pikhq_> Not sure how much that would help, but yes, they could be.
08:28:36 <coppro> and some magic could potentially be done to breach the language barrier magically if you attempt to call a C function with a C++ lambda
08:28:54 <coppro> although inline C functions would probably screw it all up
08:29:46 <Sgeo> ais523, well, it still applies to oscillators that have precursors, doesn't it?
08:29:48 <coppro> They would be compiled differently in C and C++ modules
08:30:23 <pikhq_> You'd need a __cplusplus guard around some inline functions or something. :/
08:30:30 <coppro> Now, C could go C++ syntax but with Apple's capture model
08:30:40 <coppro> that would be safe, I think
08:31:31 <pikhq_> Those aren't real function pointers. Though C++ could treat them as opaque pointers without any real problem.
08:31:33 <Sgeo> ais523, it's not particularly easy though to see if any oscillating pattern has a precursor is it?
08:31:58 <ais523> unless the CA in question has a simple method of constructing precursors, like setting one isolated cell in Life
08:32:46 <Sgeo> Well, that still makes for an interesting result in Life though, doesn't it?
08:33:57 <Sgeo> Since it's easy to make precursors for any pattern at least 2 rows/columns smaller than the universe, there is a GoE that results in any pattern 2 rows/columns smaller than the universe
08:33:57 <ais523> Sgeo: you get "in finite life, all finite patterns significantly smaller than the bounding box are produced by a garden of eden"
08:34:10 <ais523> and I think it has to be something like 5 smaller to work
08:34:19 <Sgeo> Oh, why 5 smaller?
08:34:28 <ais523> you need five blank columns to give two squares of buffer space either side of your pixel
08:34:52 <ais523> if you only have one square of buffer space, the extra cell could result in cells there being set due to having 3 rather than 2 neighbours
08:37:18 <Sgeo> Why wouldn't 3 columns, 2 blank and 1 with the cell suffice for 2 buffer space?
08:37:50 <ais523> so you have to connect to both ends of the playfield
08:37:56 <ais523> unless you're using an unusual definition of finite CA
08:38:45 <Sgeo> Ah, wasn't thinking _necessarily_ in terms of wrapping
08:46:43 <coppro> pikhq_: C++'s function<> model is sufficiently generic that the user burden is low
08:55:58 <pikhq_> coppro: True, it'd just really need a way to get the C lambda callable from function<>.
08:56:12 <pikhq_> And, if they feel really nice, a way to make a C lambda into a function<>.
08:57:01 <coppro> since function works by calling ()
08:57:19 <pikhq_> So long as there's a way to call it at all (define a C function call_lambda(lambda *func, va_args args)), yeah.
09:14:01 -!- cheater_ has joined.
09:17:26 -!- cheater__ has quit (Ping timeout: 250 seconds).
09:18:04 -!- zzo38 has quit (Quit: zzo38).
09:42:15 -!- BeholdMyGlory has joined.
09:44:37 <Sgeo> ais523, is it reasonably safe for me to stay in the room? :/
09:45:18 <Sgeo> The one where the light bulb broke
09:46:22 <olsner> since the bulb is broken, be careful about obstacles that are not clearly visible in the dark
10:03:41 <Sgeo> I just want to be certain that I shouldn't be worried about mercury fumes or something
10:05:50 -!- sebbu2 has joined.
10:05:51 -!- sebbu2 has quit (Changing host).
10:05:51 -!- sebbu2 has joined.
10:08:44 -!- sebbu has quit (Ping timeout: 255 seconds).
10:19:39 -!- ais523 has quit (Remote host closed the connection).
10:27:30 <Sgeo> I'm going to go sleep on the couch and just risk bugs
10:27:48 <fizzie> !perl print scalar (() = (1,2,3,1))
10:28:04 <fizzie> (The silly-looking "force list context" thing I've seen somewhere.)
10:28:47 <fizzie> (At least it avoids the arrayref.)
10:38:29 <Gregor> !perl print ("nancy" == "nancy") ? "true" : "false"
10:40:41 <CakeProphet> it's usually not necessary to force list context though.
10:41:04 <CakeProphet> but yeah, taking the length of a list is needlessly difficult in Perl.
10:46:47 <CakeProphet> but I see how 'lists' in scalar context don't return the length, because , doesn't construct a list in scalar context at all.
10:47:10 <CakeProphet> , in scalar context is like , in C. Whereas , in list context is list concatenation / append
10:48:39 <CakeProphet> I'm surprised there's not just a length keyword, or just a regular subroutine, by default.
10:50:25 -!- CakeProphet has quit (Quit: leaving).
10:50:45 -!- CakeProphet has joined.
10:52:03 -!- MigoMipo has joined.
10:56:55 -!- CakeProphet has quit (Quit: leaving).
10:57:15 -!- CakeProphet has joined.
11:14:55 -!- oerjan has joined.
11:21:38 -!- CakeProphet has quit (Quit: leaving).
11:21:59 -!- CakeProphet has joined.
11:53:14 -!- MigoMipo has quit (Remote host closed the connection).
11:59:30 <CakeProphet> this is definitely one of my favorite Haskell programs:
11:59:40 <lambdabot> ["a","b","c","aa","ab","ac","ba","bb","bc","ca","cb","cc","aaa","aab","aac"...
12:00:08 <lambdabot> forall (m :: * -> *) a. (Monad m) => Int -> m a -> m [a]
12:01:45 <CakeProphet> I've never seen another language that can generate every possible string from an alphabet with such a small amount of code.
12:02:11 <Phantom_Hoover> But the functions it uses are all highly general ones.
12:02:52 <CakeProphet> yeah I would say Control.Monad is more akin to a set of control structures for Haskell more than it is some kind of "helper" library.
12:03:44 <CakeProphet> this is where the power of functional programming lies, I think.
12:06:01 <lambdabot> [[1],[2],[3],[4],[1,1],[1,2],[1,3],[1,4],[2,1],[2,2],[2,3],[2,4],[3,1],[3,2...
12:07:08 <CakeProphet> yeah, I'm bad at making those kinds of transformations. That one was even pretty simple to spot.
12:07:39 <Deewiant> > ((=<<) =<< flip replicateM) [1,2,3]
12:07:41 <lambdabot> [[1],[2],[3],[1,1],[1,2],[1,3],[2,1],[2,2],[2,3],[3,1],[3,2],[3,3],[1,1,1],...
12:08:07 <CakeProphet> also bind on function is still kind of alien to me.
12:08:50 <Deewiant> CakeProphet: Using the argument itself instead of [1..]
12:09:22 <lambdabot> forall (m :: * -> *) a b b1. (Monad m) => (((a -> m b) -> m b) -> m a -> b1) -> m a -> b1
12:09:28 <lambdabot> Occurs check: cannot construct the infinite type: m = (->) (m b)
12:09:28 <lambdabot> Probable cause: `>>=' is applied to too few arguments
12:09:28 <lambdabot> In the second argument of `(>>=)', namely `(>>=)'
12:09:35 <CakeProphet> ah okay, so it's a all "strings" with a length of at most 3 in that case.
12:10:51 <CakeProphet> not quite sure how it knew to do that though..
12:10:56 <lambdabot> forall (m :: * -> *) a. (Monad m) => Int -> m a -> m [a]
12:11:16 <lambdabot> replicateM n x = sequence (replicate n x)
12:13:01 <lambdabot> "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv...
12:15:31 <CakeProphet> > [Nothing,Nothing,Nothing,Nothing] >> "a"
12:16:34 <CakeProphet> so if I ever have a list b I want to concatenate length of list a repetitions of... then a >> b is my choice.
12:36:19 <lambdabot> lexical error in string/character literal at chara...
12:36:40 <CakeProphet> for some reason this haskellwiki page has some lisp code.
12:40:09 -!- BeholdMyGlory has quit (Remote host closed the connection).
12:41:59 <CakeProphet> but I doubt it's the most efficient. Still more efficient that using lists over sets though.
12:43:24 <CakeProphet> using Map a [a] might be better than Set (a,a) for walking paths and such.
12:44:56 <CakeProphet> well, actually using Set won't work for all graphs, because it wouldn't handle loops and parallel edges.
12:45:47 <oerjan> there _is_ a Data.Graph module somewhere
12:46:00 <CakeProphet> oh I know, I'm just doing this as a learning exercise.
12:46:56 <CakeProphet> I think you'd need some kind of multiset structure for the edge set if you want parallel edges.
12:48:39 -!- jcp has quit (Ping timeout: 258 seconds).
12:50:12 <CakeProphet> so for a graph of integers using Array is probably the best choice.
12:53:48 -!- jcp has joined.
13:06:48 -!- sebbu2 has quit (Quit: reboot).
13:19:01 <Phantom_Hoover> Graphs are taken to be undirected unless qualified otherwise.
13:24:15 -!- jcp has quit (Read error: Operation timed out).
13:29:50 -!- jcp has joined.
13:40:20 -!- cheater__ has joined.
13:43:04 -!- cheater_ has quit (Ping timeout: 250 seconds).
13:55:15 -!- oerjan has quit (Quit: leaving).
14:15:46 -!- sebbu has joined.
14:15:46 -!- sebbu has quit (Changing host).
14:15:46 -!- sebbu has joined.
14:23:33 -!- jcp has quit (Ping timeout: 260 seconds).
14:32:21 -!- jcp has joined.
15:17:43 <Sgeo> According to my dad, the bulb had been there a week or two
15:19:03 <olsner> so the grues have had 1-2 weeks to multiply already?
15:20:47 -!- augur has quit (Remote host closed the connection).
15:27:05 -!- derrik has joined.
15:27:25 -!- derrik has left.
15:35:53 -!- CakeProphet has quit (Ping timeout: 255 seconds).
16:08:35 -!- monqy has joined.
16:49:42 -!- augur has joined.
16:50:51 -!- augur has quit (Remote host closed the connection).
16:51:23 -!- monqy_ has joined.
16:51:29 -!- monqy has quit (Disconnected by services).
16:51:36 -!- monqy_ has changed nick to monqy.
16:51:42 -!- augur has joined.
17:15:49 -!- augur has quit (Remote host closed the connection).
17:39:45 -!- wth has joined.
17:40:08 -!- wth has changed nick to Guest48844.
17:41:01 -!- Guest48844 has quit (Client Quit).
17:42:57 -!- pikhq has joined.
17:43:09 -!- pikhq_ has quit (Ping timeout: 258 seconds).
18:01:14 -!- Lymee has quit (Ping timeout: 255 seconds).
18:14:19 -!- Lymee has joined.
18:30:06 -!- milidragmilic has joined.
18:33:21 <pikhq> Esoteric programming languages, nominally.
18:33:36 <olsner> "#esoteric -- come for the esolangs, stay for the zzo38, leave for the zzo38"
18:34:06 <olsner> yes, ostensibly is a good word
18:34:19 -!- milidragmilic has left.
18:38:19 -!- augur has joined.
18:39:36 <Gregor> http://www.totaljerkface.com/happy_wheels.php
18:39:42 <Gregor> ^^^ Play. Fear. Have fun :P
18:41:04 <Gregor> Haha 500 error GOOD TIMING, ME
18:56:01 -!- azaq23 has quit (Quit: Leaving.).
19:02:18 -!- pikhq_ has joined.
19:02:36 -!- pikhq has quit (Ping timeout: 244 seconds).
19:07:57 -!- augur has quit (Remote host closed the connection).
19:14:37 -!- augur has joined.
19:14:55 -!- BeholdMyGlory has joined.
19:14:56 -!- BeholdMyGlory has quit (Changing host).
19:14:56 -!- BeholdMyGlory has joined.
19:19:45 -!- oerjan has joined.
19:30:07 -!- Wamanuz has joined.
19:38:59 -!- Wamanuz has quit (Read error: Operation timed out).
19:44:32 -!- Wamanuz has joined.
19:55:12 -!- augur has quit (Remote host closed the connection).
20:15:48 <lambdabot> Data.Graph.Inductive.Example e :: Gr Char ()
20:15:48 <lambdabot> Data.Graph.Inductive.Example e' :: IO (SGr Char ())
20:16:06 <Vorpal> oerjan, looking for e the constant
20:16:22 <Vorpal> oerjan, so not predefined like pi is?
20:17:05 <lambdabot> class (Fractional a) => Floating a where
20:17:06 <lambdabot> exp, log, sqrt, sin, cos, tan :: a -> a
20:17:06 <lambdabot> asin, acos, atan, sinh, cosh, tanh, asinh, acosh, atanh :: a -> a
20:19:04 <Vorpal> oerjan, what about phi
20:20:10 <oerjan> well it's not in that class
20:23:36 -!- augur has joined.
20:28:55 <lambdabot> [3.141592653589793,4.141592653589793,5.141592653589793,6.141592653589793,7....
20:29:05 <Lymee> > [pi ** 0.5, pi..]
20:29:06 <lambdabot> [1.7724538509055159,3.141592653589793,4.510731456274071,5.8798702589583485,...
20:29:29 <Lymee> > sum [pi ** 0.24234, pi..]
20:30:13 <oerjan> > sum [pi ** 0.24234, pi..]
20:31:00 <oerjan> she just likes going around in circles
20:32:08 <Lymee> > reverse [pi ** 0.5, pi..]
20:33:41 <oerjan> Lymee: do you have any reason to believe those expressions should halt? :P
20:34:05 -!- augur has quit (Remote host closed the connection).
20:34:18 <Lymee> > sum $ take 5 $ reverse [pi ** 0.5, pi..]
20:35:29 <oerjan> i suspect that list may actually be infinite, and so reverse can never give anything on it
20:35:36 <Phantom_Hoover> oerjan, wouldn't [a,b...] expand into [a,b,2b-a,3b-2a...]?
20:35:53 <Lymee> I fully expect it to not halt.
20:36:05 <Lymee> I just want to see in what creative ways lambdabot fails.
20:36:06 <Lymee> > sum $ take 5 $ reverse [pi ** 0.5, pi..]
20:36:35 <Lymee> > sum $ take (sum $ take 5 $ reverse [pi ** 0.5, pi..]) $ [sum $ take 5 $ reverse [pi ** 0.5, pi..]..]
20:36:36 <lambdabot> No instance for (GHC.Float.Floating GHC.Types.Int)
20:36:46 <Lymee> > sum $ take (sum $ take 5 $ reverse [pi ** 0.5, pi..]) $ [(sum $ take 5 $ reverse [pi ** 0.5, pi..])..]
20:36:47 <lambdabot> No instance for (GHC.Float.Floating GHC.Types.Int)
20:36:48 <oerjan> Phantom_Hoover: essentially. but this _is_ floating point...
20:37:03 <fizzie> > sum $ let t = 1:(map (/2) t) in t
20:37:50 <fizzie> Not clever enough to go all "2" on that, eh?
20:38:10 -!- MigoMipo has joined.
20:38:23 <monqy> (reverse . reverse) is taking forever on infinite lists :(
20:38:50 <monqy> hate having to traverse the whole list to reverse it
20:39:02 <monqy> does it work any better with optimizations
20:39:18 <lambdabot> forall i a. (Integral i) => i -> [a] -> [a]
20:39:35 <oerjan> i guess even that won't work with floating point
20:39:41 <fizzie> > let s i = sum $ take i $ let t = 1:(map (/2) t) in t in map s [2, 4, 16, 64]
20:40:02 <Lymee> oerjan, taking an irrational number and most likely infinite number of things from an array makes no sense.
20:42:26 <oerjan> monqy: reverse . reverse is by definition bottom on infinite lists, so an optimization which "fixed" that would be incorrect. (same with fizzie's sum btw)
20:44:43 -!- augur has joined.
20:45:12 <oerjan> mind you i vaguely recall reading that the foldr + unfoldr deforestation optimization _does_ ignore such an issue in order to work at all (presumably it doesn't matter in practice)
20:45:46 <oerjan> well it _should_ have been foldl' >:)
20:46:17 <lambdabot> forall a b. (a -> b -> a) -> a -> [b] -> a
20:46:22 <lambdabot> forall a b. (a -> b -> a) -> a -> [b] -> a
20:46:32 <lambdabot> foldl f z (x:xs) = foldl f (f z x) xs
20:46:33 <oerjan> they differ only in strictness
20:46:34 <lambdabot> foldl' f a (x:xs) = let a' = f a x in a' `seq` foldl' f a' xs
20:47:07 <Lymee> > reverse $ reverse $ [1..]
20:47:08 <oerjan> foldl can build up a thunk if ghc cannot detect that the folding operation is strict
20:47:15 <Lymee> > reverse . reverse $ [1..]
20:47:22 <Phantom_Hoover> Oh god, what do I do with this huge wodge of disk space taken up by Red Dwarf.
20:47:29 <Lymee> Phantom_Hoover, rm -rf
20:47:46 <oerjan> (that was to the "Lies.")
20:48:03 <fizzie> > sum $ let t n = if n == 0 then [0] else n:(t (n/2)) in t 1
20:48:13 <fizzie> Floating-point underflow saves the day.
20:48:40 <oerjan> > sum . takeWhile (/= 0) . iterate (/2) $ 1
20:49:38 <fizzie> I'm not really a haskeller, so I do things the hard way.
20:50:09 <fizzie> Though your version didn't add that final 0, I guess.
20:50:55 <oerjan> i think i saw that function somewhere
20:51:05 <oerjan> @hoogle (a -> Bool) -> [a] -> [a]
20:51:06 <lambdabot> Prelude dropWhile :: (a -> Bool) -> [a] -> [a]
20:51:07 <lambdabot> Prelude filter :: (a -> Bool) -> [a] -> [a]
20:51:07 <lambdabot> Prelude takeWhile :: (a -> Bool) -> [a] -> [a]
20:52:02 <Lymee> > takeUntil x = takeWhile (not . x)
20:52:03 <lambdabot> <no location info>: parse error on input `='
20:53:45 <oerjan> that's not an expression.
20:54:06 <oerjan> Lymee: also that's not the function i actually meant
20:54:46 <oerjan> i meant one which includes the first element after as well
20:56:30 <oerjan> :t (uncurry (++) . (id *** take 1) .) . span
20:56:31 <lambdabot> The operator `.' [infixr 9] of a section
20:56:31 <lambdabot> must have lower precedence than that of the operand,
20:56:41 <oerjan> :t ((uncurry (++) . (id *** take 1)) .) . span
20:56:42 <lambdabot> forall a. (a -> Bool) -> [a] -> [a]
20:58:28 <Phantom_Hoover> FFS, OSX, why do you make it impossible to write files on external volumes from a Linux computer.
21:00:10 <Phantom_Hoover> Dammit, the kernel drivers don't actually support writing to HFS+.
21:03:08 <oerjan> http://www.downforeveryoneorjustme.com/altavista.digital.com
21:04:16 <cheater__> i would have gone to that website but with the Web Catalog being down i can't find it anymore.
21:05:21 <cheater__> fortunately enough lycos is working
21:11:48 -!- Sgeo_ has joined.
21:12:03 -!- Sgeo_ has quit (Client Quit).
21:35:13 -!- MigoMipo has quit (Read error: Connection reset by peer).
21:41:06 -!- zzo38 has joined.
21:41:26 <zzo38> I wrote a program which can be used for LLVM bitcodes, it might be usable even for things other than LLVM. http://sprunge.us/bCLQ
21:52:39 -!- Slereah has quit (Ping timeout: 252 seconds).
22:02:50 -!- elliott_ has joined.
22:05:28 -!- Slereah has joined.
22:07:00 <lambdabot> forall a b c. (a -> b -> c, (a, b)) -> c
22:09:13 <Sgeo> https://docs.google.com/document/pub?id=1smG1sBiZ4Gs3kmQm6Ge30zVPnYW6Lz06Jncqgug1k9I Deepak Chopra
22:09:29 <Sgeo> Oh, and it actually gets worse from what's in there
22:10:02 <Sgeo> Apparently, the force working against entropy is intelligence
22:11:01 <Sgeo> Phantom_Hoover, I may have typoed a bit
22:11:41 <Sgeo> Yeah, that's my typo, not his
22:11:45 <zzo38> Entropy increases anyways.
22:12:46 <Sgeo> From the paragraph after what I typed out: "Intelligence holds together the blueprint of each cell in its DNA, and many scientists now believe the same holds true of the entire universe."
22:13:10 <zzo38> What exactly does that supposed to mean?
22:13:31 <Phantom_Hoover> The blueprint of the universe is held together by intelligence in its DNA.
22:14:09 <Sgeo> zzo38, we're discussing a pseudoscientific loon.
22:14:10 <zzo38> DNA consists of A,C,T,G not of intelligence or anything else, I think, isn't it?
22:14:14 <Sgeo> Don't expect stuff to make sense
22:15:08 <zzo38> Now it is my turn to beat Imakuni?
22:16:01 <zzo38> And then is your turn next please
22:27:57 -!- Phantom_Hoover has quit (Quit: Leaving).
22:29:45 -!- zzo38 has quit (Remote host closed the connection).
22:32:16 -!- augur has quit (Remote host closed the connection).
22:32:17 -!- pikhq has joined.
22:32:36 -!- pikhq_ has quit (Ping timeout: 255 seconds).
22:48:19 <elliott_> Gregor Gregor Gregor Gregor Gregor Gregor Gregor Gregor Gregor Gregor Gregor Gregor
22:59:21 <elliott_> newsham: why are you impersonating the news ham
23:01:11 -!- krbot has joined.
23:01:26 -!- krbot has quit (Remote host closed the connection).
23:02:38 <oerjan> elliott_: it's just a new sham
23:03:01 <elliott_> oh god i lost the code for the news ham
23:03:04 <elliott_> maybe ill dig it out of the logs
23:09:15 <newsham> is it edible mineral or vegetable?
23:10:11 <Sgeo> I'd think it's "animal"
23:10:40 <Sgeo> Dear Chrome: When I type stuff into the address bar, it's not nice to pretend I didn't
23:13:40 <Sgeo> I'd think it qualifies as animal though
23:18:52 <oerjan> i note that newsham doesn't consider vegetables edible
23:20:58 <newsham> oerjan: when it interferes with funny, vegetables are excluded.
23:21:36 <oerjan> so it's kind of a heisenberg principle of edible vs. funny?
23:22:24 <newsham> funny > strange, truth + beauty
23:23:36 -!- CakeProphet has joined.
23:23:36 -!- CakeProphet has quit (Changing host).
23:23:36 -!- CakeProphet has joined.
23:29:18 -!- krbot has joined.
23:30:59 <oerjan> the fourth family: fun quark, food quark, caulifloron and caulifloron neutrino
23:31:16 <oerjan> (in other news there are suspiciously few vegetables in f)
23:32:05 <newsham> i want a shirt made of spider silk
23:32:08 <Sgeo> Are muons and muon neutrinos actually connected to charm and strange quarks in some way, other than being sort of a next level thing?
23:34:09 -!- Vorpal has quit (Ping timeout: 250 seconds).
23:38:22 <Sgeo> Um, would that be a question that we currently don't know the answer to?
23:41:47 -!- krbot has quit (Remote host closed the connection).
23:43:34 -!- krbot has joined.
23:44:34 <Sgeo> Oh no, not again.
23:47:04 -!- ChanServ has set channel mode: +o oerjan.
23:47:19 -!- augur has joined.
23:47:26 -!- oerjan has set channel mode: -b *!*krbot@*.hsd1.ca.comcast.net.
23:47:41 -!- oerjan has set channel mode: +b *!*krbot@*.
23:47:49 -!- oerjan has kicked krbot krbot.
23:49:30 -!- oerjan has set channel mode: -o oerjan.
23:50:46 -!- augur has quit (Remote host closed the connection).
23:52:53 -!- elliott_ has quit (Ping timeout: 260 seconds).