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 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:14:20 3~3~3~3~3~3~3~3~3~3~3~3~ 02:14:32 no clue why alt-pgup does that. 02:17:40 * Sgeo vaguely imagines running GoL in reverse, with multiple possibilities as superpositions 02:18:17 Although I haven't thought it through, it seems like it would have an infinite neighborhood 02:18:55 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 I'm too tired to be thinking this through properly 02:20:20 I am trying to write a program that reads LLVM bitcode files and I keep making mistakes 02:21:52 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 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 My program appears to be running out of memory for some reason, realloc is returning 0 03:50:19 I think malloc(0) doesn't work (at least in Windows), removing them resulted in not crashing. 03:50:35 But now I get no output if I redirect the output to a file 03:53:00 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 It seems to stop after reading an abbreviation encoding. 03:53:45 -!- azaq23 has joined. 03:56:00 zzo38: malloc(0) is not guaranteed to succeed 03:56:14 you could try using malloc(1) instead, it has the same effect 03:56:49 I just replaced all of malloc(0) with (0) and now I get no error but I have other problems. 03:57:09 zzo38: malloc(0) returns *either* a valid pointer or NULL; which of the two is implementation-defined. 03:57:39 !c printf("%u", malloc(0)); 03:57:42 1357139984 03:58:03 !c ((*unsigned char) malloc(0))[0] = 123; 03:58:04 Does not compile. 03:58:05 glibc malloc always returns a valid pointer. 03:58:11 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 !c *((*unsigned char) malloc(0)) = 123; 03:58:15 Does not compile. 03:58:18 :< 03:58:26 !c *((*unsigned char)(malloc(0))) = 123; 03:58:27 Does not compile. 03:59:22 zzo38: realloc(NULL, size) is the same as malloc(size), free(NULL) is a no-op. 03:59:47 If this is *not* happening, then you have a broken C environment. 04:02:30 !c assert(0); 04:02:32 Does not compile. 04:02:52 !c int main() { assert(0); return 0; } 04:02:54 Does not compile. 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 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:05:20 Compiler and libc? 04:05:27 MinGW 04:05:37 Okay, libc is msvcrt. 04:05:59 That is very strange. 04:06:22 (Note: "crashes" means realloc returns 0) 04:06:40 If you look, can you notice something wrong that I have failed to notice? 04:06:41 What are you passing to realloc? 04:06:50 Yeah, I sure can. 04:06:54 !c main() { return 0; } 04:07:31 !c printf("%u", realloc(malloc(0),10)); 04:07:32 o=realloc(o,(s+=(_amount))*sizeof(number)); 04:07:33 3791159312 04:08:22 whats the security for !c? 04:08:27 newsham: plash. 04:09:00 zzo38: Underscore-prefixed identifiers are reserved. Using a reserved identifier in your program is undefined behavior. 04:09:07 zzo38: Aside from that, I got nothing. 04:09:14 pikhq_: _amount is a macro argument. 04:09:32 Still undefined behavior. 04:10:03 Admittedly, not going to trigger on any reasonable compiler. 04:10:18 DeathStation 9000 wants a word with youi. 04:10:21 you* 04:10:22 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 Lymee: I said "reasonable". 04:10:33 uh, so all you have to do is provide your own machine code which uses syscalls? 04:11:01 newsham: And you're running unpriveledged in a chroot without any files. Good luck! 04:11:47 thats still more access than most people want to give an attacker. 04:11:53 you dont mind giving me a shell in the chroot? 04:11:54 if(name.startsWith("_")) blowUp(); 04:12:22 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 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 I think you'd have more luck from attacking a back door than the front door 04:13:52 =p 04:13:54 Seriously, even if you manage a root exploit you're getting just about nothing out of there. 04:14:09 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 do you trust malicious code running in a VM? 04:14:34 http://sprunge.us/XdVd 04:14:46 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 Well, if the VM itself gets exploited it's Somebody Else's Problem. 04:15:06 Since it's not Gregor's machine. 04:15:07 I am also having problems connecting to llvm.org 04:16:00 pikhq_, if the VM has an exploit, couldn't you attack it directly, without messing with the chroot? 04:16:03 What is "DeathStation 9000"? 04:16:25 Lymee: Most VM exploits would *probably* require access to /dev/kmem. 04:16:45 If you can exploit the VM from ring 3, we have *serious* problems happening. 04:17:00 The "wtf is this security" kind? 04:17:23 Can you look see in case you noticed something wrong with my program, that I have failed to notice? 04:18:58 zzo38: Nothing *obviously* wrong. 04:20:14 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 I tried various ways of making macros to override free,malloc,realloc but none of that helped. 04:32:03 I get errorlevel 128. What does that mean? 04:33:59 The output before it unexpectedly stops seems correct. 04:36:45 I found out where it appears to be failing. 04:37:21 It seems to be failing in the chunk @ 04:38:21 It seems to be the malloc in that chunk that is causing it to stop. 04:39:30 I don't see anything wrong but maybe you can check maybe you can see something wrong with that? 04:43:33 Can you please try to help? 04:47:04 Here is the output I received, in case it helps: http://sprunge.us/gJWC 04:48:07 The output looks correct to me except that it is incomplete. 04:56:26 -!- Lymee has quit (Ping timeout: 255 seconds). 04:58:45 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 04:58:56 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 It's demonstratable that reverse life has an infinite neigh.. n/m 05:14:49 Well, I can't imagine how to do universe end on GoE without an infinte neighborhood 05:30:34 0x41414141 05:31:47 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 The ##C channel is no help. 05:59:29 They told me to define 'good' even though none of my questions are about that. 05:59:38 And then they told me that I haven't asked them a question. 06:00:55 Can you please answer my question? 06:04:10 zzo38: what question do you have besides "Can you please answer my question?" 06:05:04 derrik: The question about the program. 06:15:25 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 -O2 results in the same error. 06:16:39 However, -O0 results in it stopping with no message (it stops in the same place though). 06:18:04 -O3 results same as -O0 06:20:29 gdb says the error appears in RtlLookupElementGenericTableAvl and no stack information is available. 06:21:09 gdb does say it is a segmentation fault. 06:23:36 node*x=malloc(sizeof(node)+(b->kind==beginblock?0:(s-w)*sizeof(number))); 06:25:54 EWWW ?: is the devil. 06:25:59 I never use that trash. 06:26:15 conditional expression? too expressive. 06:26:52 Does it make sense for live to evolve in a universe where information is monotonically non-decreasing? 06:26:57 What do you dislike about it? Some other people also dislike it, and that is OK. I find it useful. 06:27:03 Sometimes. 06:27:17 I was making fun of the people who dislike it, actually. 06:28:02 my only complaint is that there's not an alternative syntax for else ifs 06:28:52 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 Can you try the program on your computer? 06:37:36 I have to go consol a friend of mine actually... 06:37:38 so, no. :P 06:40:26 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 If I do #define malloc(X) malloc((X)+999) then the program stops later than before. 07:10:34 zzo38: When you allocate abbrevinfo*x, you don't multiply the allocation size by sizeof *x 07:11:54 Deewiant: You are absolutely right! 07:12:02 How well would evolution even work in a macro non-deterministic environment? 07:12:54 That was exactly the problem! I am glad you noticed that. 07:17:08 -!- Vorpal has joined. 07:23:46 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 FUCK FUCK FUCK FUCK FUCK 07:36:03 -!- derrik has left. 07:37:13 I accidentally touched a broken lightbulb. 07:37:30 My dad claims it's ok, because it was an old bulb and anything in it has dissipated 07:39:11 uh what 07:39:21 what's wrong with touching a bulb? 07:39:30 It's one of those Hg bulbs 07:40:29 well, you'll want to wash your hands thoroughly 07:40:53 although mercury doesn't actually stick to the skin anyway, it slides off, so the warnings are mostly safety precautions 07:41:39 but important ones, just in case some does remain 07:41:48 I washed my hands 07:42:24 the correct solution to a mercury spill, btw, is to mix it with sulphur 07:42:37 I've seen that happen in chemistry labs when someone broke a mercury thermometer 07:42:44 but it tends not to be readily available 07:45:17 -!- Lymia has quit (Read error: Connection reset by peer). 07:45:41 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 Is printf("^vbrr: %llu\n",z); the incorrect way to display a 64-bit number? 07:52:26 With MSVCRT it is, I think it's %I64d there 07:53:33 That did work, but will that work on other systems? 07:54:00 No 07:54:23 There's no single way that works both with MSVCRT and other libcs 07:54:37 Maybe I can use a macro 07:57:22 %llu should work fine 07:57:27 It's standard C99 07:57:48 MSVCRT doesn't support C99 07:58:21 it supports some useful subsets 07:58:42 if it doesn't work on MSVCRT well fuck them anyway 07:58:55 C99 is 12 years old now. 07:59:24 If you can't support even *simple* things right, then you should fuck off. 07:59:47 ^ 08:00:02 C1X is nearing publication 08:00:16 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 Of course, *C++0x* is nearing publication. 08:00:35 yeah 08:01:20 Which, of course, incorporates changes made in C99. 08:01:57 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 According to Stroustrup, vast majority. 08:03:37 They didn't bring in variable-length arrays. 08:03:44 I just used #ifdef to decide making a macro called fmt64 which uses the proper format code. 08:04:23 Though those are less necessary in C++, and optional in C1X, anyways. 08:04:32 They brought in most of C99 08:04:39 Did they bring in the t and z width specifiers? 08:04:47 The entire C99 library is in C++0x 08:05:04 Alright, cool 08:05:36 Of course, timing again means that C++ will miss the C library boat 08:05:44 but C1X is so ridiculously conservative 08:05:47 *gaaah*, they didn't bring in "restrict". 08:05:54 it's amazing it took them so long to do it 08:06:17 Most of the features of C1X are unnecessary in C++0x, anyways. 08:06:22 yeah 08:06:24 like _Generic 08:06:42 which is just a reinvention of overloading 08:06:44 goddamn it 08:07:10 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 Bit annoying that the two languages will have different threading support. 08:07:37 coppro: Didn't bring in "restrict"? 08:07:40 yeah 08:07:51 at this point C++ should ditch C imo 08:07:54 Uh, it's an utterly trivial feature to *support*. 08:08:06 pikhq_: I mean to put in the standard 08:08:33 It's still a *very* useful compiler hint. 08:09:01 I think it should be supported as an attribute 08:09:08 Perhaps a little less so in C++, where you throw around types like candy, but still. 08:09:21 and I also think that C++ should just stop thinking C cares about it 08:10:16 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 indeed 08:10:38 So, the larger the set of features in C that isn't in C++, the greater the impedence mismatch is. 08:10:53 If it weren't for that, C++0x could drop the entire C standard library for all I care. 08:11:00 But really, the C committee doesn't actually care too much about C++ 08:11:09 Why should they? 08:11:27 C++'s insanity is their own damned problem. :P 08:11:37 I'm not saying they should 08:12:21 but it seriously hurts both C and C++ that they are divergin 08:12:24 *diverging 08:12:32 @messages? 08:12:32 Sorry, no messages today. 08:12:49 they're free to take a "fuck C++" approach 08:13:00 but it has consequences 08:13:05 C++ seems to have taken a "fuck C" approach, so. 08:13:11 no, that's not their approach 08:13:37 Then why isn't C++ a superset of C? 08:14:14 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 plus a few ones like extra keywords that couldn't be helped 08:14:37 They changed void*'s semantics. 08:14:59 Fixing a conformant C program could be done automatically 08:15:13 and implicit void* casts are bad C style 08:15:20 Tell that to malloc. 08:15:46 malloc should be casted 08:16:14 The only time I've seen that done is if someone wants their C to compile with a C++ compiler. 08:16:31 really? In my exerience it's been a style thing 08:16:46 admittedly, I may not have a representative sample 08:17:17 It's about as "good style" as Hungarian notation. 08:18:03 in any case, that's minor compare to C99 features which didn't make it into C++0x 08:18:26 *compared 08:18:38 Yeah, the distinction between C89 and C++98 was somewhat minor. 08:19:03 restrict didn't make it in because no one wanted to define its semantics 08:19:19 Between C99 and C++98, *wince*. C99 and C++0x, really annoying details. C1x and C++0x, *sigh* 08:19:43 VLAs and designated initializers were worse; they would need to be expanded to work in C++ 08:19:49 VLAs are probably never worth it in C++ 08:20:01 Yeah, I actually understand VLAs not making it in. 08:20:05 also weird stuff like x[const 5] 08:20:12 And they're optional in C1x, anyways. 08:20:14 is in the same boat as restric 08:20:16 *restrict 08:20:31 But the real issues are about to surface 08:20:40 where C and C++ have differing implementations of the same feature 08:20:46 see: lambdas 08:21:13 C1x doesn't... 08:21:21 That's an Apple extension. 08:21:43 For Objective C, no less, that got kinda retrofitted into C. 08:22:03 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 More pressing is the differing implementations of threading. 08:22:17 There's C++0x threads, C1x threads, and POSIX threads. 08:24:37 *gah* 08:24:48 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 C++0x does not have "long long" and "unsigned long long". 08:24:58 (Unless the initial configuration oscillates) 08:25:03 It has _Longlong and _ULonglong. 08:25:20 And can only be reached from its oscillation 08:25:27 actually, I take it back 08:25:34 Sgeo: fallacy: the configuration itself could be included in the loop 08:25:38 I had thought WG14 had rejected C++ lambda syntax 08:25:39 I was wrong 08:25:54 note that in a finite-universe CA, /all/ configurations are oscillators or precursors to oscillators, so you can hardly exclude those 08:26:14 Well, C++ lambda *semantics* are fundamentally incompatible with C. 08:26:35 Those are literally singleton classes with operator(). 08:26:49 ais523, ... oh, right 08:28:02 pikhq_: Yes, but the syntax could be the same 08:28:09 So, I proved something about a set that doesn't even exist, how wonderful 08:28:31 Not sure how much that would help, but yes, they could be. 08:28:36 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 although inline C functions would probably screw it all up 08:29:35 ... How? 08:29:46 ais523, well, it still applies to oscillators that have precursors, doesn't it? 08:29:48 They would be compiled differently in C and C++ modules 08:29:53 Oh, true. 08:29:54 *TUs 08:29:59 Sgeo: yep, I think so 08:30:23 You'd need a __cplusplus guard around some inline functions or something. :/ 08:30:30 Now, C could go C++ syntax but with Apple's capture model 08:30:40 that would be safe, I think 08:31:31 Those aren't real function pointers. Though C++ could treat them as opaque pointers without any real problem. 08:31:33 ais523, it's not particularly easy though to see if any oscillating pattern has a precursor is it? 08:31:44 Sgeo: no 08:31:58 unless the CA in question has a simple method of constructing precursors, like setting one isolated cell in Life 08:32:46 Well, that still makes for an interesting result in Life though, doesn't it? 08:33:57 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 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 and I think it has to be something like 5 smaller to work 08:34:19 Oh, why 5 smaller? 08:34:28 you need five blank columns to give two squares of buffer space either side of your pixel 08:34:52 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 Why wouldn't 3 columns, 2 blank and 1 with the cell suffice for 2 buffer space? 08:37:45 because it wraps 08:37:50 so you have to connect to both ends of the playfield 08:37:56 unless you're using an unusual definition of finite CA 08:38:45 Ah, wasn't thinking _necessarily_ in terms of wrapping 08:46:43 pikhq_: C++'s function<> model is sufficiently generic that the user burden is low 08:55:58 coppro: True, it'd just really need a way to get the C lambda callable from function<>. 08:56:12 And, if they feel really nice, a way to make a C lambda into a function<>. 08:56:22 Which is trivial 08:57:01 since function works by calling () 08:57:19 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 ais523, is it reasonably safe for me to stay in the room? :/ 09:44:49 Sgeo, which room? 09:45:18 The one where the light bulb broke 09:45:34 Low energy? 09:45:45 Yes 09:46:22 since the bulb is broken, be careful about obstacles that are not clearly visible in the dark 09:56:43 Also grues. 10:03:41 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:23:40 !perl print scalar (1,2,3,4) 10:23:46 4 10:23:53 !perl print scalar (1,2,3,1) 10:23:53 1 10:23:56 ah, yes. 10:24:25 !perl print scalar @{[1,2,3,1]} 10:24:26 4 10:27:30 I'm going to go sleep on the couch and just risk bugs 10:27:48 !perl print scalar (() = (1,2,3,1)) 10:27:49 4 10:28:04 (The silly-looking "force list context" thing I've seen somewhere.) 10:28:47 (At least it avoids the arrayref.) 10:38:29 !perl print ("nancy" == "nancy") ? "true" : "false" 10:40:41 it's usually not necessary to force list context though. 10:41:04 but yeah, taking the length of a list is needlessly difficult in Perl. 10:46:47 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 , in scalar context is like , in C. Whereas , in list context is list concatenation / append 10:48:39 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 this is definitely one of my favorite Haskell programs: 11:59:38 > flip replicateM ['a'..'c'] =<< [1..] 11:59:40 ["a","b","c","aa","ab","ac","ba","bb","bc","ca","cb","cc","aaa","aab","aac"... 12:00:07 :t replicateM 12:00:08 forall (m :: * -> *) a. (Monad m) => Int -> m a -> m [a] 12:01:45 I've never seen another language that can generate every possible string from an alphabet with such a small amount of code. 12:01:55 granted it does us other modules. 12:02:00 *use 12:02:11 But the functions it uses are all highly general ones. 12:02:52 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 this is where the power of functional programming lies, I think. 12:03:55 especially with lazy evaluation. 12:05:59 > flip replicateM [1..4] =<< [1..] 12:06:01 [[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:06:46 @pl (\x -> flip replicateM x =<< [1..]) 12:06:46 ([1..] >>=) . flip replicateM 12:07:08 yeah, I'm bad at making those kinds of transformations. That one was even pretty simple to spot. 12:07:39 > ((=<<) =<< flip replicateM) [1,2,3] 12:07:41 [[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:07:55 ...lol what? 12:08:07 also bind on function is still kind of alien to me. 12:08:50 CakeProphet: Using the argument itself instead of [1..] 12:09:21 :t (>>=) (>>=) 12:09:22 forall (m :: * -> *) a b b1. (Monad m) => (((a -> m b) -> m b) -> m a -> b1) -> m a -> b1 12:09:26 :t (>>=) (>>=) (>>=) 12:09:28 Occurs check: cannot construct the infinite type: m = (->) (m b) 12:09:28 Probable cause: `>>=' is applied to too few arguments 12:09:28 In the second argument of `(>>=)', namely `(>>=)' 12:09:30 bah 12:09:35 ah okay, so it's a all "strings" with a length of at most 3 in that case. 12:09:44 +list 12:10:15 ...not including the null one. 12:10:26 > replicateM 0 ['a'..'z'] 12:10:27 [""] 12:10:33 ..good. 12:10:51 not quite sure how it knew to do that though.. 12:10:55 :t replicateM 12:10:56 forall (m :: * -> *) a. (Monad m) => Int -> m a -> m [a] 12:11:16 @src replicateM 12:11:16 replicateM n x = sequence (replicate n x) 12:11:27 ah sequence okay. 12:12:59 > ['a'..'z'] >> ['a'..'z'] 12:13:01 "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv... 12:13:38 > "a" >> "A" 12:13:39 "A" 12:14:03 > "a" >> "a" 12:14:04 "a" 12:14:11 > "ab" >> "ab" 12:14:12 "abab" 12:14:22 @src (>>) 12:14:23 m >> k = m >>= \_ -> k 12:14:29 > [1,2,3] >> "abcd" 12:14:30 "abcdabcdabcd" 12:14:51 ...ah okay. 12:15:31 > [Nothing,Nothing,Nothing,Nothing] >> "a" 12:15:32 "aaaa" 12:16:34 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:18 > '(a b c d) 12:36:19 : 12:36:19 lexical error in string/character literal at chara... 12:36:31 oh okay. 12:36:40 for some reason this haskellwiki page has some lisp code. 12:40:06 data Graph a = Graph (Set a) (Set (a,a) 12:40:08 ) 12:40:09 -!- BeholdMyGlory has quit (Remote host closed the connection). 12:40:18 this is a pretty good Graph type right? 12:41:20 fits the actual definition anyways. 12:41:59 but I doubt it's the most efficient. Still more efficient that using lists over sets though. 12:43:24 using Map a [a] might be better than Set (a,a) for walking paths and such. 12:44:56 well, actually using Set won't work for all graphs, because it wouldn't handle loops and parallel edges. 12:45:07 ..loops would be fine, actually. 12:45:47 there _is_ a Data.Graph module somewhere 12:45:54 (never used it) 12:46:00 oh I know, I'm just doing this as a learning exercise. 12:46:56 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 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:18:39 fits the actual definition anyways. 13:18:41 Nope. 13:19:01 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 According to my dad, the bulb had been there a week or two 15:18:36 we are all doomed 15:19:03 so the grues have had 1-2 weeks to multiply already? 15:19:09 you are indeed doomed 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). 15:39:46 Sgeo, wait, what? 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). 17:54:19 Wait, what was eso-std again? 18:01:14 -!- Lymee has quit (Ping timeout: 255 seconds). 18:14:19 -!- Lymee has joined. 18:30:06 -!- milidragmilic has joined. 18:30:54 what is purpose of this chat 18:33:21 Esoteric programming languages, nominally. 18:33:36 "#esoteric -- come for the esolangs, stay for the zzo38, leave for the zzo38" 18:33:38 I prefer 'ostensibly' myself. 18:34:04 ok 18:34:06 yes, ostensibly is a good word 18:34:19 -!- milidragmilic has left. 18:38:19 -!- augur has joined. 18:39:36 http://www.totaljerkface.com/happy_wheels.php 18:39:42 ^^^ Play. Fear. Have fun :P 18:41:04 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:38 > e 20:15:39 e 20:15:40 hm 20:15:48 @hoogle e 20:15:48 Data.Graph.Inductive.Example e :: Gr Char () 20:15:48 Data.Graph.Inductive.Example e' :: IO (SGr Char ()) 20:15:48 Data.Fixed data E12 20:15:51 nope 20:15:58 :t e 20:15:59 Expr 20:16:06 oerjan, looking for e the constant 20:16:09 oh 20:16:11 > exp 1 20:16:13 2.718281828459045 20:16:15 right 20:16:22 oerjan, so not predefined like pi is? 20:16:39 not in the standard 20:16:44 ah 20:16:49 :t pi 20:16:50 forall a. (Floating a) => a 20:16:58 :t exp 20:16:59 forall a. (Floating a) => a -> a 20:17:05 @src Floating 20:17:05 class (Fractional a) => Floating a where 20:17:06 pi :: a 20:17:06 exp, log, sqrt, sin, cos, tan :: a -> a 20:17:06 asin, acos, atan, sinh, cosh, tanh, asinh, acosh, atanh :: a -> a 20:17:06 (**), logBase :: a -> a -> a 20:17:33 > pi 20:17:34 3.141592653589793 20:17:34 hm 20:19:04 oerjan, what about phi 20:20:10 well it's not in that class 20:20:23 > (sqrt 5 + 1)/2 20:20:25 1.618033988749895 20:20:43 hm 20:22:03 > 2*acos 0 20:22:03 3.141592653589793 20:23:36 -!- augur has joined. 20:28:47 > pi * pi 20:28:48 9.869604401089358 20:28:54 > [pi..] 20:28:55 [3.141592653589793,4.141592653589793,5.141592653589793,6.141592653589793,7.... 20:29:05 > [pi ** 0.5, pi..] 20:29:06 [1.7724538509055159,3.141592653589793,4.510731456274071,5.8798702589583485,... 20:29:29 > sum [pi ** 0.24234, pi..] 20:29:32 * Lymee runs 20:29:40 mueval: ExitFailure 1 20:29:59 wat 20:30:13 > sum [pi ** 0.24234, pi..] 20:30:18 mueval-core: Time limit exceeded 20:30:20 Lymee, what is it with you and pi. 20:31:00 she just likes going around in circles 20:32:08 > reverse [pi ** 0.5, pi..] 20:32:34 thread killed 20:32:52 Lymee, suggest you don't mention pi to pikhq_. 20:33:41 Lymee: do you have any reason to believe those expressions should halt? :P 20:33:51 oerjan, nope. 20:34:05 -!- augur has quit (Remote host closed the connection). 20:34:18 > sum $ take 5 $ reverse [pi ** 0.5, pi..] 20:34:26 mueval: ExitFailure 1 20:34:26 mueval-core: Time limit exceeded 20:34:58 ...or that. 20:35:29 i suspect that list may actually be infinite, and so reverse can never give anything on it 20:35:36 oerjan, wouldn't [a,b...] expand into [a,b,2b-a,3b-2a...]? 20:35:53 I fully expect it to not halt. 20:36:05 I just want to see in what creative ways lambdabot fails. 20:36:06 > sum $ take 5 $ reverse [pi ** 0.5, pi..] 20:36:10 mueval-core: Time limit exceeded 20:36:35 > sum $ take (sum $ take 5 $ reverse [pi ** 0.5, pi..]) $ [sum $ take 5 $ reverse [pi ** 0.5, pi..]..] 20:36:36 No instance for (GHC.Float.Floating GHC.Types.Int) 20:36:36 arising from a use of... 20:36:46 > sum $ take (sum $ take 5 $ reverse [pi ** 0.5, pi..]) $ [(sum $ take 5 $ reverse [pi ** 0.5, pi..])..] 20:36:47 No instance for (GHC.Float.Floating GHC.Types.Int) 20:36:47 arising from a use of... 20:36:48 Phantom_Hoover: essentially. but this _is_ floating point... 20:36:49 Aww. 20:37:03 > sum $ let t = 1:(map (/2) t) in t 20:37:40 thread killed 20:37:50 Not clever enough to go all "2" on that, eh? 20:38:10 -!- MigoMipo has joined. 20:38:23 (reverse . reverse) is taking forever on infinite lists :( 20:38:33 yeah 20:38:50 hate having to traverse the whole list to reverse it 20:39:02 does it work any better with optimizations 20:39:09 Lymee: genericTake 20:39:16 :t genericTake 20:39:18 forall i a. (Integral i) => i -> [a] -> [a] 20:39:24 oh hm 20:39:35 i guess even that won't work with floating point 20:39:41 > let s i = sum $ take i $ let t = 1:(map (/2) t) in t in map s [2, 4, 16, 64] 20:39:43 [1.5,1.875,1.999969482421875,2.0] 20:40:02 oerjan, taking an irrational number and most likely infinite number of things from an array makes no sense. 20:40:08 I think.... 20:40:22 yep 20:42:26 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:42:39 mmh 20:44:43 -!- augur has joined. 20:45:07 @src reverse 20:45:07 reverse = foldl (flip (:)) [] 20:45:12 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:15 Elegant. 20:45:46 well it _should_ have been foldl' >:) 20:46:16 :t foldl' 20:46:17 forall a b. (a -> b -> a) -> a -> [b] -> a 20:46:21 :t foldl 20:46:22 forall a b. (a -> b -> a) -> a -> [b] -> a 20:46:31 @src foldl 20:46:32 foldl f z [] = z 20:46:32 foldl f z (x:xs) = foldl f (f z x) xs 20:46:33 @src foldl' 20:46:33 they differ only in strictness 20:46:34 foldl' f a [] = a 20:46:34 foldl' f a (x:xs) = let a' = f a x in a' `seq` foldl' f a' xs 20:47:07 > reverse $ reverse $ [1..] 20:47:08 foldl can build up a thunk if ghc cannot detect that the folding operation is strict 20:47:11 mueval-core: Time limit exceeded 20:47:15 > reverse . reverse $ [1..] 20:47:20 mueval-core: Time limit exceeded 20:47:20 Lies. 20:47:22 Oh god, what do I do with this huge wodge of disk space taken up by Red Dwarf. 20:47:27 I can't bring myself to delete it. 20:47:29 Phantom_Hoover, rm -rf 20:47:31 Lymee: what? 20:47:46 (that was to the "Lies.") 20:47:52 Oh, never mind. 20:48:03 > sum $ let t n = if n == 0 then [0] else n:(t (n/2)) in t 1 20:48:05 2.0 20:48:13 Floating-point underflow saves the day. 20:48:40 > sum . takeWhile (/= 0) . iterate (/2) $ 1 20:48:43 2.0 20:49:38 I'm not really a haskeller, so I do things the hard way. 20:50:09 Though your version didn't add that final 0, I guess. 20:50:24 indeed 20:50:31 :t takeUntil 20:50:33 Not in scope: `takeUntil' 20:50:45 erm 20:50:55 i think i saw that function somewhere 20:51:05 @hoogle (a -> Bool) -> [a] -> [a] 20:51:06 Prelude dropWhile :: (a -> Bool) -> [a] -> [a] 20:51:07 Prelude filter :: (a -> Bool) -> [a] -> [a] 20:51:07 Prelude takeWhile :: (a -> Bool) -> [a] -> [a] 20:51:13 @more 20:51:17 takeUntilBored. 20:51:21 > not True 20:51:22 False 20:51:29 Lymee: shocking! 20:52:02 > takeUntil x = takeWhile (not . x) 20:52:03 : parse error on input `=' 20:52:05 :< 20:53:45 that's not an expression. 20:54:06 Lymee: also that's not the function i actually meant 20:54:46 i meant one which includes the first element after as well 20:56:30 :t (uncurry (++) . (id *** take 1) .) . span 20:56:31 The operator `.' [infixr 9] of a section 20:56:31 must have lower precedence than that of the operand, 20:56:31 namely `.' [infixr 9] 20:56:34 ff 20:56:41 :t ((uncurry (++) . (id *** take 1)) .) . span 20:56:42 forall a. (a -> Bool) -> [a] -> [a] 20:58:28 FFS, OSX, why do you make it impossible to write files on external volumes from a Linux computer. 21:00:10 Dammit, the kernel drivers don't actually support writing to HFS+. 21:01:29 hey guys 21:01:34 Well, journalled HFS+. 21:01:34 is altavista.digital.com down? 21:03:08 http://www.downforeveryoneorjustme.com/altavista.digital.com 21:04:16 i would have gone to that website but with the Web Catalog being down i can't find it anymore. 21:04:45 ...RIGHT... 21:05:15 hmm 21:05:21 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 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:02:57 > curry howard 22:02:58 Not in scope: `howard' 22:03:12 > curry favor 22:03:12 Not in scope: `favor' 22:03:25 > masala curry 22:03:26 Not in scope: `masala' 22:05:28 -!- Slereah has joined. 22:05:56 > curry chicken 22:05:57 Not in scope: `chicken' 22:06:59 :t uncurry uncurry 22:07:00 forall a b c. (a -> b -> c, (a, b)) -> c 22:08:44 uncurry chicken? 22:09:13 https://docs.google.com/document/pub?id=1smG1sBiZ4Gs3kmQm6Ge30zVPnYW6Lz06Jncqgug1k9I Deepak Chopra 22:09:16 * Sgeo slaps 22:09:29 Oh, and it actually gets worse from what's in there 22:10:02 Apparently, the force working against entropy is intelligence 22:10:05 * Sgeo mindboggles 22:10:07 Man, space is so *boring*. 22:10:46 Sgeo, I like the way he spells 'entropy' with an h. 22:11:01 Phantom_Hoover, I may have typoed a bit 22:11:41 Yeah, that's my typo, not his 22:11:45 Entropy increases anyways. 22:12:46 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 What exactly does that supposed to mean? 22:13:31 The blueprint of the universe is held together by intelligence in its DNA. 22:13:46 In what DNA? 22:14:09 zzo38, we're discussing a pseudoscientific loon. 22:14:10 DNA consists of A,C,T,G not of intelligence or anything else, I think, isn't it? 22:14:14 Don't expect stuff to make sense 22:15:08 Now it is my turn to beat Imakuni? 22:16:01 And then is your turn next please 22:26:52 * Phantom_Hoover → sleep 22:27:44 Gregor: ping 22:27:57 -!- Phantom_Hoover has quit (Quit: Leaving). 22:29:15 i prefer dna made of ICFP 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 Gregor Gregor Gregor Gregor Gregor Gregor Gregor Gregor Gregor Gregor Gregor Gregor 22:49:52 SII(SII) 22:59:21 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:01:38 i dont get it 23:02:38 elliott_: it's just a new sham 23:02:52 newsham: its not OK 23:03:01 oh god i lost the code for the news ham 23:03:04 maybe ill dig it out of the logs 23:09:15 is it edible mineral or vegetable? 23:10:11 I'd think it's "animal" 23:10:40 Dear Chrome: When I type stuff into the address bar, it's not nice to pretend I didn't 23:12:02 newsham: other 23:12:54 sgeo: ham's edible 23:13:40 I'd think it qualifies as animal though 23:18:52 i note that newsham doesn't consider vegetables edible 23:20:58 oerjan: when it interferes with funny, vegetables are excluded. 23:21:02 in reality i like em alot 23:21:36 so it's kind of a heisenberg principle of edible vs. funny? 23:22:24 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 the fourth family: fun quark, food quark, caulifloron and caulifloron neutrino 23:31:16 (in other news there are suspiciously few vegetables in f) 23:32:05 i want a shirt made of spider silk 23:32:08 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:32:33 interesting question 23:34:09 -!- Vorpal has quit (Ping timeout: 250 seconds). 23:38:22 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 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:51:24 > 524351/86400 23:51:26 6.068877314814815 23:52:53 -!- elliott_ has quit (Ping timeout: 260 seconds).