00:00:04 mwahaha 00:05:15 -!- tombom has quit (Quit: Leaving). 00:10:07 Which is worse, T-Mobile, or AT&T 00:12:12 T-Mobile has not-so-good 3G coverage; AT&T hates its customers and blames them using its service for its extremely subpar performance. 00:12:13 AT&T. 00:13:15 Looking at the maps 00:13:16 hey, it's not AT&T's fault it gets all the hoarders 00:13:30 I looked at AT&T map the other day, my area had 3G coverage 00:14:07 T-Mobile has "Fast Mobile Web" [as opposed to Very Fast Mobile Web, or Mobile Web] in most, but not all, of my area 00:16:13 Well, let me tell you that as someone who doesn't have a 3G phone -- only EDGE -- I don't really miss it. 00:16:19 Maybe if you wanted to watch YouTube a lot when nowhere near WiFi. 00:19:13 -!- Gracenotes has joined. 00:19:48 Also, my dad wants me to hide this from my step-mother and her mother 00:20:01 Meaning no nice free calls with Google Voice to/from them 00:20:16 Among other annoyances 00:36:12 Your family sounds nice and well-adjusted. :) 00:36:17 lol 00:58:08 -!- alise_ has joined. 00:59:07 -!- alise has quit (Ping timeout: 258 seconds). 01:03:32 -!- augur has quit (Remote host closed the connection). 01:04:38 holy shit 01:04:40 google redesigned 01:04:43 new logo 01:04:45 new interface 01:04:47 everything 01:06:05 Nice joke. 01:06:10 Joke? 01:06:12 It's no joke. 01:06:16 Make sure you're on .com. 01:06:27 The logo /is/ redesigned, and the UI /is/ significantly different. 01:06:38 Yup, still the normal Google. 01:06:48 Got the text-fadein-thing of a few months ago and everything. 01:07:15 Yes, but http://www.google.com/intl/en_ALL/images/srpr/logo1w.png is definitely new. 01:07:26 As is the redesigned sidebar on a search results page. 01:07:33 Yeah, that's not what I'm seeing. 01:07:37 -!- augur has joined. 01:07:45 -!- BeholdMyGlory has quit (Remote host closed the connection). 01:07:49 Want some screenshots? 01:07:51 http://www.google.com/intl/en_ALL/images/logo.gif <-- This is what I get. 01:08:02 Are you on google.com? Clear cache, mayhaps. 01:08:02 -!- FireFly has quit (Quit: Leaving). 01:08:03 Sure. 01:08:10 Yes, google.com 01:09:19 Okay, uploading images now 01:10:35 pikhq: http://imgur.com/5k9XF.png, http://imgur.com/ymPSq.png, http://imgur.com/FaxDX.png 01:11:20 It's an improvement, mind you; looks cleaner. But still, Google changing their logo? That's only happened onfce. 01:11:22 *once 01:11:23 -!- Asztal has quit (Ping timeout: 276 seconds). 01:11:38 alise_: Holy fudgsicles 01:12:09 My path to Google is less cached than yo-ou, my path to Google is less cached than yo-ou! 01:12:14 Na na na na na, na na na na na!# 01:12:15 *! 01:14:00 Katamari Damacy! 01:14:10 (塊魂!) 01:14:14 Katamari Democracy. 01:14:45 塊住民? 01:15:31 Naaaaaaaaaaa na na na na na naa naa na naa naa nana naaaaaaaa 01:15:47 Erm, sorry. 塊民主主義. 01:17:02 "Katamari minshushugi" just sounds less awesome than "Katamari damashii". XD 01:17:50 Not to mention a bizarre concept. 01:17:54 "Clump democracy"? 01:21:11 :-D 01:21:47 "Naaaaaaaaaaaa na na na na na na katamari minshushugi...." 01:24:22 the political system you feel attached to 01:24:35 -!- fhoahf38771 has joined. 01:24:35 -!- fhoahf38771 has left (?). 01:32:19 -!- jcp has joined. 01:33:29 -!- MizardX has quit (Ping timeout: 276 seconds). 01:35:36 -!- MizardX has joined. 01:40:44 WHY IS ECLIPSE SO DAMN SLOW? 01:41:22 Java 01:41:25 gui 01:41:25 libs 01:41:30 & sucky coding. 01:41:32 Use Emacs or something. 01:41:52 Emacs doesn't have an Android Developer Tools plugin 01:42:05 ADT even has a Glade-like thing 01:42:47 Write out boring XML by hand, or use Eclipse.. hm 01:43:52 lava or liquid helium, that's the question 01:43:54 *waits 5 minutes to switch to the xml file for the layout 01:44:53 algorithms are the best things ever 01:45:32 FINALLY 01:45:40 al-gore-isms 01:45:48 algae-rhythms 01:45:53 if you disagree consider that i just replaced your mother with an algorithm 01:46:01 er that wasn't intended specifically at either of the two people talking 01:46:03 ...awkward 01:47:00 awkward-isms 01:47:37 algae rhythms is a nice term 01:49:16 -!- zzo38 has joined. 01:50:04 hi zzo38 01:50:07 got my algorithm yet :P 01:50:32 algarve swims 01:51:01 No 01:51:06 WHYEVER NOT 01:51:16 i'll have you fired for this :P 01:51:17 Have you ever used pointer to pointer to pointer, in C programming? How many level of pointers have you used 01:51:53 algae bra 01:52:03 zzo38: three-star programmer! 01:52:23 http://c2.com/cgi-bin/wiki?ThreeStarProgrammer 01:52:47 I have that page already open in my browser, before you posted it 01:52:52 zzo38: I'm an n-star programmer, my code is so abstract that the depth of nested pointers depends fundamentally on the subtle properties of the algorithm I'm metaimplementing 01:53:00 (I wish) 01:53:27 If I ever get beyond 2, I add more types. 01:53:37 I have used three stars at most, I think. 01:53:37 Even a struct with only one member will clear things up extraordinarily. 01:53:54 A struct with only one member? Jesus weeps. 01:53:59 If I ever get beyond 2, I rethink my design. 01:54:10 And I wrote the three star code today, in fact, as part of a command-line argument parsing program 01:54:37 I have created structs that are completely unused, in fact. And there is a reason for that. 01:54:40 Generally I just try and avoid using languages that have the anti-abstraction of pointers. 01:54:45 alise_: A struct with only one member is a way of forcing C to have more types. :) 01:54:46 Or mutation. 01:54:58 Also. Pointers, an abstraction? 01:55:08 I said antiabstraction. 01:55:10 If they are, they're the thinnest possible abstractions. 01:55:21 They deabstract memory; they make it more concrete than it needs be. 01:55:23 Mmkay. 01:55:55 alise_: I disagree. I think they need to deabstract a bit more things to make C useful in some ways, too 01:56:11 zzo38: I'm just a mathematical weenie, though. 01:56:12 They *do* make things like "moving objects" a royal pain. And lord help you if you want a compacting GC. 01:56:31 I don't really care about stupid machines. Everything's graph reduction, or high-school algebra. :) 01:56:45 (it's possible... If you force all dereferencing through your GC.) 01:57:09 If you want a lot of abstraction in that kind of way, perhaps you can use a different program language for your project 01:57:35 alise loves his abstractions. 01:57:44 *her 01:57:48 Get the confusing pronouns correct! 01:57:49 C allows precious few. 01:57:54 alise_: 'er 01:57:54 I /will/ demolish English! 01:58:16 Unless you want me to start using Japanese pronouns. 01:58:26 http://c2.com/cgi-bin/wiki?YouMightBeaThreeStarProgrammer 01:58:52 zzo38: Technically I'm in favour of low-level programming: just low-level programming on a decent machine; something like the Reduceron that does symbolic reduction, not a silly peeking-and-poking 70s BASIC machine like we all use today. 01:58:56 Actually. Kochira know what? Ware think ware'm going to. :P 01:59:01 Throw it all out and start again; then everything will be perfect. 02:00:19 (note: all pronouns in use are completely and utterly *bizzare* to use in normal Japanese, if valid. Koretachi are somewhat difficult to map into English otherwise. :P) 02:01:19 2b \/ ~2b, obviously multiplication on the booleans is just mod-2, so this is 0*b = false, so we have false \/ ~false, i.e. false \/ true 02:01:25 shakespeare, it's true. 02:01:29 thought you might like to know. 02:01:54 Hah. Nanji wouldst do such a thing. 02:02:05 Some of the things listed in the YouMightBeaThreeStarProgrammer are I have used, but some I don't. 02:02:12 pikhq: Who, what, where, why, when? 02:03:13 I don't write code which intentionally depends on undefined/unspecified behavior when writing in C, because C is supposed to be cross-platform. But I sometimes *do* intentionally undefined/unspecified behavior when writing in a lower-level program language such as plain machine-codes, but not always. It depends on circumstances. 02:03:24 Dare, nani, doko, naze, nan no toki? 02:04:15 ("nanji" not used for where to avoid confusion with "nanji" for thou) 02:04:39 "You have ever wished you could set a breakpoint within an expression." Yes, I have wanted this. In C, but also in other programming languages too 02:04:50 Have you? 02:05:04 zzo38: The difference between expressions and statements is just silly. 02:05:21 Erm. Distinction, is nani ware meant. 02:05:33 so guys, judy arrays 02:05:35 cool things huh 02:06:30 pikhq: Yes, it is a bit. In Forth there is no difference between expressions and statements. But in C some statement must be used not inside of a expression 02:06:45 (Although GNU C allows code-blocks inside of expressions) 02:07:12 alise_: So, nani anata are saying is that ware should use kore for Fungespace? 02:07:25 pikhq: It may be an idea. 02:07:26 -!- augur has quit (Remote host closed the connection). 02:07:28 I was considering it. 02:07:31 -!- augur has joined. 02:07:32 pikhq: Either that, or quadtrees. 02:07:49 And I'm going to stop the silliness with pronouns. 02:07:54 But, you know, http://judy.sourceforge.net/ is all pre-made and well-engineered for you. 02:07:59 Except for 君, alise_. 02:08:03 :P 02:08:19 And it has a nice API. 02:08:20 alise_: Yeah. 02:09:10 pikhq: You might also, if you care about performance, want to add a static array of maybe a megabyte in size somewhere near (0,0) to handle "most" accesses. 02:09:35 "You have bitshifted the result of a boolean expression and used it as an array index..." Yes, I have, both in C and in BASIC and others. I have done this to fix a bug in MegaZeux so that the spiders can travel on their proper kind of web 02:10:06 (Or even outside of a web, as the case may be) 02:11:49 Multiple times I day I get very pissed off at how immature software engineering is. 02:12:07 We've been doing this gig since about the 50s, and we still haven't figured out how to code properly. 02:12:09 Or even acceptably. 02:13:13 It is true, some people can't program neatly at all. Many examples on http://thedailywtf.com/Series/CodeSOD.aspx 02:14:40 alise_: I was actually thinking of doing something like precomputing the ray of execution into a single thread, and just interpreting from that. And cacing precomputed threads. 02:14:51 pikhq: Not sure what you mean by that. 02:14:55 zzo38: Indeed, but even good programmers are bad. 02:14:58 (thread in the "threaded programming" since) 02:15:02 s/since/sense/ 02:15:10 pikhq: That makes p/g harder. 02:15:20 pikhq: Also, remember to test Mycology regularly. Also, exact bounds. 02:15:22 You need exact bounds. 02:15:32 Yes, I have written codes that later I thought was TRWTF (but some of the codes that other people don't like that I wrote, I find to be perfectly OK, but not always) 02:15:37 For y, you need to be able to determine the exact maximum and minimum (x,y) coordinates of inhabited fungespace. 02:16:00 Yes, it requires that I *either* keep track of the cells in each thread so I can invalidate them on modification, or just chuck out the entire cache upon modification. 02:16:32 And yes, I have every intent of keeping track of exact bounds. 02:17:03 How is pikhq storing Fungespace? 02:17:09 Well, I'd say you are, in all likelihood (I haven't seen a piece of complex code by you), a very competent software engineer. And I can't think of any problems with your scheme. 02:17:12 Judy array, it seems. 02:17:12 So go for it. 02:17:16 Sgeo_: Well, I've suggested Judy arrays. 02:17:34 alise_: I shall after this weekend. 02:17:36 pikhq: You'll want to lightly spec some sort of abstract fungespace interface so you can swap it out later, of course; in case, say, quadtrees are significantly faster. 02:17:50 Of course. 02:17:50 Language is plain C, I assume? Maybe GNU C. 02:17:54 89 or 99? 02:18:00 GNU C 99. 02:18:24 Alright. 02:18:31 I make a lot of use of C99 features by habit, and my "compiling into threads" bit requires computed goto. 02:18:40 I look forward to seeing your progress over the coming weekends; and hopefully soon enough weekdays too. 02:18:54 Which, amusingly, clang handles much more efficiently than GCC. 02:19:08 I guess in AndFunge-98, I'd use the NDK to access the Judy array stuff? 02:19:21 Stop calling it AndFunge; just makes me think of Avid NorlanDer. 02:19:31 And I'd just implement it all in Java. 02:19:33 Do quadtrees. 02:19:36 They're fast. 02:19:58 It's still a long way off, ofc 02:20:12 I keep feeling an urge to do some object-oriented programming in a language like Java. 02:20:29 uorygl: You're just longing for the platonic realisation of the hype. 02:20:32 I have another question: Have you ever used __attribute__((unused)) in GNU C? 02:20:37 A brief session coding in such a language should dispel any illusion. 02:20:39 *illusions 02:20:43 zzo38: No. 02:20:43 I never feel like doing anything in particular; I keep just wanting to use it. 02:20:46 zzo38: No, I haven't. 02:21:03 I avoid __attribute__ because I like to let the compiler think about optimisations rather than making half of my program instructions to the optimiser. :P 02:21:05 Have you ever used *any* __attribute__ in GNU C? And if so, which ones? 02:21:17 I've used noreturn, when doing fiddly Scheme compilation stuff. 02:21:21 I'm only using Java because Android uses, well, not the JVM, but something that JVM bytecode gets compiled into 02:21:29 And probably printf-checking attributes, for error reporting functions that do printf-formatting. 02:21:49 Sgeo_: Considered Jython/JRuby/Scala/etc? 02:22:10 alise_, I want to get up-to-speed with the basics of Android dev first 02:22:11 You could still use the GUI APIs that way; or if there's some actually-Java-specific thing, write the GUI in Java and interface to the actual interp. 02:22:36 alise_: I like to tune optimizations myself and stuff, but I just do more of that "RealProgrammer" stuff that is generally not preferred in modern programming, sometimes 02:22:58 I have used __attribute__((hot)) and even __attribute__((unused)) and more 02:23:34 Currently, Eclipse is getting in my way more than Java is 02:24:03 Why is there a "Do Not Click" button? 02:24:15 I tried Android extremely briefly today. 02:24:26 It seemed to have more features, less well implemented, than the iPhone. 02:25:42 uorygl: Did you try Android 2? 02:25:47 Android 1 was very unpolished. 02:25:56 Also, Android really suffered on slower CPUs. 02:26:03 I have no idea what I tried. It was in a store. 02:26:17 Okay. 02:26:23 Well, there are quite a few not-so-good Android phones out there. 02:26:35 I tried two or three. 02:26:38 But the Nexus One and the HTC Desire, say, are almost certainly as good as the iPhone, or at least very near it. 02:26:57 And, you know, they're unlike the iPhone in that they don't completely disallow any non-Objective-C language to be used, even pre-compiled, in their legal documents. 02:27:05 Which is sort of a big deal. 02:28:24 while(pc) (***++pc)(); 02:28:39 zzo38: Ouch :( 02:28:42 Is it possible to make a coprocessor for ARM which adds an instruction to quickly execute that? 02:28:53 I don't see why not. 02:28:57 I would find such an instruction useful directly in machine code 02:29:11 What does that do? I don't speak C. 02:29:19 Or, actually I mean just: (***+pc)(); 02:29:22 At least, not C with ***++ in it. 02:29:35 The while(pc) part would be a separate instruction 02:29:41 Sorry, I meant (***++pc)(); 02:29:45 (I forgot a plus sign) 02:29:54 uorygl: Copy the value of pc to pc1. Increment pc. Dereference pc1 into pc1*. Dereference pc1* into pc1**. Dereference pc1** into pc1***. 02:30:03 pc1*** is some code; execute it. 02:30:08 Repeat while pc is not zero. 02:30:18 Whoa. 02:30:27 alise_, no 02:30:34 that would be ***pc++ 02:30:40 (with parens?) 02:30:46 Er, right. 02:30:50 There could be one register (or the command could work with multiple registers) that would be the "pc" in this example and it would execute (***++pc)() 02:30:59 uorygl: Increment pc. Dereference pc into pc*. Dereference pc* into pc**. Dereference pc** into pc***. 02:31:03 pc*** is some code; execute it. 02:31:07 Repeat while pc is not zero. 02:31:11 When would this be useful? 02:31:18 uorygl: So, basically, pc is a pointer-to-a-pointer-to-a-function-pointer. 02:31:34 So a function-pointer is basically a passable-'round bit of mutable executable code. 02:31:34 When you have indirection. 02:31:42 So pointer-to-pointer-to-koed. 02:31:55 zzo38: I've used __attribute__((malloc)), because it sometimes lets the compiler generate better code. 02:32:17 (all that that does is state that any non-NULL pointers returned don't alias anything else) 02:33:29 I haven't use all the __attribute__ but I have read all of them and might use all of them if I have the use for them. What I would also like is the ability to use __attribute__ for blocks inside of a function instead of only for the entire function 02:35:48 pikhq: http://mazonka.com/subleq/hsq.html A compiler from a reasonably competent C-esque language into Subleq. 02:35:56 It can also do bignums. 02:36:02 Mazonka is as crazy as he is cool. 02:36:05 I have written ARGOPT today and I used three stars so that is why I tried to comment it 02:36:47 pikhq: Subleq, in case you've had a case of amnesia, is "subtract and branch if less than or equal to 0". 02:36:59 alise_: Fun language. 02:36:59 I plan to use ARGOPT when I write a new GNU/Linux distribution (although with a lot of differences in both GNU and in Linux) 02:36:59 So compiling that... into that... yowzers. 02:37:13 Fairly impressive that he did that, though. 02:37:25 http://esoteric.voxelperfect.net/wiki/Higher_Subleq It even compiles to a sort of twisted assembly beforehand. 02:37:46 -!- zzo38 has left (?). 02:38:02 Impressive. 02:38:06 pikhq: He even implemented printf. 02:38:10 Inside the language. 02:38:11 My dad doesn't want me carrying a charger nor a spare battery around 02:38:11 Is Esolang's User:Oleg the same Oleg as the famous Haskell Oleg? 02:38:25 uorygl: No; I don't believe so. 02:38:31 I checked once, iirc. 02:38:36 Sgeo_: Why... not? 02:38:47 alise_: Dang. 02:38:49 Not sure 02:39:04 Sgeo_: Ignore him? 02:39:06 I applaud this guy. 02:39:08 Personally, I'd rather not, but willing too if battery life is too short 02:39:19 *to 02:39:54 I know alise already asked, and you already responded, but why not? 02:40:45 uorygl: I gather, from recent things he's said, that his father is rather apprehensive about chipping money into a new phone and seems to be dictating things purely for the sake of it. 02:41:03 He was reportedly earlier making baseless assertions about the quality of PDFs on phones, so... who knows. 02:41:12 THE WAYS OF ADULTS ARE NOT TO BE KNOWN 02:42:03 I feel like making my own OISC now. 02:42:32 alise_: Do it in Funge! 02:42:34 hmm; with a bignum machine we only need one parameter to the instruction because we have N^n -> N mapping 02:42:43 but can we have a fixed-bit-size OISC that only has one operand? 02:43:17 alise_, if you want to give up TC, yes 02:43:29 Take A, subtract B, divide by C, NAND with D, if greater than E, branch to F. 02:43:39 [Note that I make no statement about whether it's possible to do it and still be TC] 02:43:40 Sgeo_: No shit, sherlock. :P 02:43:54 uorygl: Note: That is actually six-operand. 02:44:10 I was just making my own OISC. 02:44:24 uorygl: Now prove it touring-complete. 02:44:37 Done. 02:44:49 Present the proof. 02:45:07 Q.E.D. 02:46:17 quit endless doubting 02:46:26 Anyway, how about RSSB? 02:46:58 Quite Easily Demonstrated, I think uorygl meant. 02:47:03 He was leaving it as an exercise to the hearer. 02:47:04 Of course. 02:48:13 Fucking topologists. 02:49:03 http://www.facebook.com/group.php?gid=2410064537 o_O 02:49:04 i sense a slight annoyance in your phrasing 02:49:48 Oh, no, topologists are awesome. 02:49:54 uorygl: Oh, yeah, RSSB works. 02:50:10 Hmm, can the two registers in RSSB be moved into memory? 02:50:28 I think the spec says they are. 02:50:48 Location 0 is IP, 1 is accumulator, 2 is always 0, 3 is input, 4 is output. 02:50:57 Ah, right. 02:51:22 It might be better if those were locations -1 through -5, but oh well. 02:51:37 I wonder if there are other, simpler single-operand OISCs. 02:51:46 Reverse-subtract-and-skip-if-borrow is not the simplest semantics. 02:51:56 Compare, e.g. subtract-and-branch-if-negative. 02:52:24 I'd say they're approximately equally simple. 02:52:42 Well, maybe. 02:53:01 I dunno. 02:53:02 I'd just like something ridiculously simple. :-) 02:53:24 It'd nice to have the core of the assembly code just be a list of names (defined to memory locations) and literals. 02:53:29 (Plus sugar on top for more complex things). 02:55:03 pretty please 02:55:22 har har har 03:01:42 Sgeo_: when starting the emulator i just see 03:01:44 A N D R O I D 03:01:45 and a cursor 03:01:51 on a bios-style text field 03:01:53 alise_, be patient 03:01:54 am i meant to do something? 03:01:55 ok 03:02:23 Note: If you had to restart the emulator every time you compiled an app, there would be no 3rd-party Android apps 03:02:32 *compiled and wanted to test 03:02:37 heh 03:02:46 five years later... 03:03:42 yay it started 03:03:49 i'm not missing much by not having sound am I :P 03:03:57 like are there amazing WHOOSH sounds!! 03:04:12 this thing is a bit sluggish 03:04:46 I still have yet to get sound working on the emulator to the PC, although it might be just me 03:05:21 Although maybe I simply haven't tried any apps that use sound 03:05:34 how do you do multitasking? 03:06:11 and why does it think i'm japanese? 03:06:29 alise_, press the Home button 03:06:33 * alise_ dials 999. let's hope this doesn't actually work 03:06:35 Sgeo_: oh that's it? 03:06:39 Yes 03:06:48 is it always this sluggish? 03:06:50 Then when you go back into the app, it should be where you left off 03:07:56 -!- oerjan has quit (Quit: Good night). 03:08:16 no but seriously why is it trying to compose kanji 03:09:31 There's some setting you can change to fix that 03:09:36 I'm not sure why it does that 03:09:36 yeah i did 03:09:54 this interface is pretty damn polished 03:10:06 It's not quite the Nexus One interface 03:11:01 i don't see why not 03:11:04 nexus one = stock google stuff 03:11:06 it's from google after all 03:11:25 That thing containing all the apps works differently on the Nexus One 03:11:35 The Nexus One has that pretty Live Wallpaper 03:11:48 The Nexus One has the Android Market, but that's not a UI thing 03:11:56 pretty & battery-consuming 03:13:26 Wow, the Droid (and the Nexus One although slightly less so) has really ridiculously high resolution. 03:13:34 Although with the Nexus One it's PenTile so it's not reaaally the resolution. 03:13:41 But bah, Droid sucks in other ways. 03:14:17 Oh how I *love* segfaults that make no sense. 03:14:35 pikhq: Maybe you shouldn't use C. 03:14:51 alise_: But but lowlevel tricks and also pain and agony! 03:15:16 *Much* pain and agony! 03:15:28 pikhq: Sometimes I consider using C++ and restricting myself to only using namespaces and references of the C++ features. 03:15:39 And no pointers, or at least as few as possible. 03:17:42 Sgeo_: Make a device with skin WVGA854. 03:17:45 Gawp at the resolution. 03:18:02 That's actually what Droid has. But, again, the Droid has numerous flaws; the Nexus One is far better. 03:18:06 And the Nexus One is pretty darn close anyhoo. 03:18:24 The default is nicer for me than the real Nexus One, since I can display the whole thing without the "real size" gimmick 03:18:31 yeah 03:19:13 I wonder if anyone's done a sparse array by having all arrays be of length two, and using the bitstring representation. 03:19:19 (with a fixed size for the bitstrings) 03:19:30 of course, that requires 5 billion dereferences for even small indices 03:20:31 alise_, anohter multitasking thing [try it with the phone]: Some apps put things in the notification area 03:20:37 That you can use to switch to them 03:20:49 Use the notification area by dragging the top bar down 03:28:20 * Sgeo_ lols at setText(getText(...)) 03:29:55 Apparently, that doesn't quite work either 03:30:06 * Sgeo_ decides that the right way is too difficult 03:31:32 Actually, Eclipse makes it easy to turn the wrong way into the right way 03:31:36 It's actually very, very nice 03:31:49 Well, not Eclipse, but the Android Development Tools for Eclipse 03:34:06 ADT is really, really, really nice 03:34:19 It's more than worth dealing with Eclipse 03:37:51 My trivial app finally worked! 03:43:21 3:42 am; sleep soon I probably should. 03:44:55 I wonder whether it's actually a good idea to take out my anger on pens. 03:45:15 Sometimes, when I'm angry, I'll grab one and snap it in two. 03:45:28 I would rathest I just not be angry. 03:53:59 -!- jcp has quit (Quit: I will do anything (almost) for a new router.). 03:55:07 -!- jcp has joined. 04:02:44 i love algorithms so much :| 04:03:34 Hmm, it turns out that when you snap a pen in just the right way, it will send ink flying everywhere. 04:03:40 Like onto our hardwood floor. 04:03:52 And since that's a porous surface, it now has ink stains. 04:14:29 4:14 am; I really should sleep soon. 04:14:31 uorygl: congrats 04:15:11 Thank you. 04:15:12 * Sgeo_ kicks alise_ 04:15:18 Who owns this channel? 04:15:25 me 04:15:30 Anyone else? 04:15:35 Not me, actually. 04:15:38 But, uh, andreou is the founder. 04:15:47 fizzie, lament and oerjan are the active ops. 04:15:48 It's owned by lament, if the portion of this sentence before the comma is true. 04:15:53 They effectively run the place. 04:15:57 But why do you ask? 04:16:02 Well, oerjan doesn't do anything; and lament just does things to troll us. 04:16:07 And fizzie only does things with extreme hesitance. 04:16:10 Because one of them needs to kickban alise_ so e'll go to sleep 04:16:12 So we're very close to total anarchy here. 04:16:14 * uorygl nods. 04:16:18 Sgeo_: Eh, but why? 04:16:23 I don't need to be up at a certain time until Monday. 04:16:35 And this is more enjoyable. 04:16:41 alise_, health 04:16:51 Eh? Staying up late isn't going to damage my health. 04:16:52 I suppose health is a good reason for anything. 04:16:53 And to make it easier to wake up at that point 04:17:03 It does kind of seem to damage health. 04:17:16 I have a rather nasty infection, not a huge requirement for sleep. 04:17:24 uorygl: It makes me dumber, sure, and it makes me more tired if I don't sleep enough. 04:17:31 But I'm happy enough right now, and I'll sleep in. 04:20:57 sgeocomet 04:20:57 04:20:57 #ZodiacFacts The stars that make up the constellation #Taurus are, for the most part, undergoing nuclear fusion. 04:21:16 That's ... nice to know. 04:21:34 At least it's accurate, unlike most of the stuff in #ZodiacFacts 04:21:41 BadAstronomer's are funnier though 04:22:38 -!- mycroftiv has quit (Read error: Operation timed out). 05:01:21 -!- alise_ has quit (Remote host closed the connection). 05:06:24 -!- mycroftiv has joined. 05:13:55 -!- Oranjer has left (?). 05:15:00 -!- Alex3012_ has joined. 05:16:42 -!- Alex3012 has quit (Ping timeout: 265 seconds). 05:16:50 -!- Alex3012_ has changed nick to Alex3012. 07:30:55 -!- lament has joined. 07:53:33 -!- lament has quit (Quit: lament). 07:57:13 -!- coppro has quit (Ping timeout: 276 seconds). 07:58:22 -!- coppro has joined. 07:59:59 -!- clog has quit (ended). 08:00:00 -!- clog has joined. 08:45:04 -!- kar8nga has joined. 08:52:32 -!- augur has quit (Remote host closed the connection). 08:52:40 -!- augur has joined. 09:28:16 -!- augur has quit (Remote host closed the connection). 09:28:21 -!- augur has joined. 10:12:36 -!- tombom has joined. 10:46:45 -!- MigoMipo has joined. 10:53:04 -!- FireFly has joined. 11:22:14 -!- oerjan has joined. 11:28:20 Hmm, it turns out that when you snap a pen in just the right way, it will send ink flying everywhere. 11:28:30 i guess that answer your previous question, then 11:28:40 *s 12:09:01 -!- kar8nga has quit (Remote host closed the connection). 12:17:15 -!- BeholdMyGlory has joined. 12:18:41 -!- Alex3012_ has joined. 12:22:10 -!- Alex3012 has quit (Ping timeout: 245 seconds). 12:22:15 -!- Alex3012_ has changed nick to Alex3012. 12:24:14 -!- oerjan has quit (Quit: leaving). 12:37:08 -!- ENKI-][ has quit (Ping timeout: 276 seconds). 12:43:24 -!- tombom has quit (Quit: Leaving). 12:44:51 i guess that answer your previous question, then <-- what was that question? 13:06:12 -!- ENKI-][ has joined. 13:17:58 -!- Asztal has joined. 13:38:40 -!- kar8nga has joined. 13:44:34 -!- BeholdMyGlory has quit (Remote host closed the connection). 13:45:37 -!- mycroftiv has quit (Ping timeout: 240 seconds). 13:48:04 -!- alise has joined. 13:55:16 An illegality of jazz. 14:04:01 http://retroforth.org/ Are the Forthers trying to be post-hip-modernist-minimalist? 14:04:39 What, they've implemented their VM in Javascript. 14:05:20 http://retroforth.org/demos/demos/listener/index.html 14:06:58 Hmm. 14:07:07 In RSSB, does the subtraction /have/ to be reverse? 14:07:16 Or would SSB work fine? 14:09:19 Hmm, and http://esolangs.org/wiki/TOGA_computer's using of bits is interesting. 14:09:45 I wonder if TSZ (toggle and skip next instruction if result is 0) would be TC? 14:10:23 -!- mycroftiv has joined. 14:10:52 hi mycroftiv 14:13:04 -!- mycroftiv has quit (Read error: Operation timed out). 14:16:01 Of course a toggle-style instruction set makes IO harder. 14:25:00 I wish http://eigenratios.blogspot.com/ still posted. 14:26:32 ok, [[User:Oleg]] is mazonka.com 14:26:42 case closed 14:34:11 "8. Why in the mirror the left swaps with the right, but the top does not swap with the bottom?" 14:34:13 "# 8. This is very difficult question. I do not know its answer." 14:34:19 --Oleg Mazonka on his "mathematical puzzles" page 14:35:36 O_O 14:36:09 It's obviously a joke. 14:36:28 (The simple answer, of course, is that mirrors rotate in the fourth dimension.*) 14:36:31 *I find this fact extremely awesome 14:36:41 lol 14:36:52 Hey, it is true. 14:38:15 I mean, obviously they don't literally pop into the fourth dimension for some rotating action... but that's the transformation they do to what you see. 14:39:09 So, I'm still trying to figure out a simpler one-operand OISC than RSSB. 14:41:15 Hmm, I feel like making a fast Brainfuck interpreter. Like a snack, only programming. 14:43:49 Gregor: Do you know if malloc( sizeof somestruct - sizeof int ) is valid, where the last member of somestruct is an int? 14:44:07 -!- kar8nga has quit (Read error: Connection reset by peer). 14:45:04 alise: Depends on your definition of "valid" and the particulars of the system. It won't give wonky results unless the only member is an int. In most but not all cases the int will be inaccessible of course. 14:45:43 Right; I was just checking it wasn't U.B. 14:45:46 Not that I care much. 14:46:01 "U.B."? 14:46:16 Gregor: And I'm gonna go out on a limb here and guess that putting computed goto &&pointers into a static array for use later, when the function has been exited and re-entered, is not such a guaranteed-to-work idea. 14:46:20 Undefined behaviour. 14:46:36 Actually this is irritating, since computed gotos are just right for what I want. 14:46:38 Although, wait. 14:46:47 A switch with defined values will likely be faster than dereferencing the goto pointer, won't it? 14:46:52 Actually that has perfectly well-defined semantics and people (including me) use it all the time. 14:46:59 I was going to use this: 14:47:01 typedef struct { 14:47:01 alise: Could go either way. 14:47:01 void *kind; /* computed-goto pointer to a blueprint */ 14:47:01 intptr_t val; 14:47:01 } INS; 14:47:04 for a BF instruction 14:47:08 and have kind be one of the elements of this: 14:47:11 static void *blueprints[6]; /* move, change, output, input, [, ] */ 14:47:20 but it'll be quicker just to switch over a char, won't it? 14:47:23 since the range is predefined 14:47:28 and it doesn't involve dereferencing a pointer 14:47:29 It could be, but not likely. 14:47:32 That's three jumps. 14:47:46 (Instead of 1) 14:48:08 Eh? 14:48:11 Hmm, right. 14:48:14 So the computed goto is better? 14:48:17 I guess so. 14:48:22 Probably, but not always :P 14:48:42 That's called a threaded interpreter. Look it up. And don't get confused with the meaning of "threading" that real people use. 14:49:09 Yeah, I know that. 14:49:12 I've read JonesForth, you know. :P 14:49:20 I was just thinking that in this case the number of instructions is very small. 14:49:23 void interp(char setup) { 14:49:23 blueprints = {&&move, &&change, &&output, &&input, &&loop, &&next}; 14:49:23 if (setup) return; 14:49:23 ... 14:49:23 } 14:49:27 lulz 14:50:05 #define MOVE blueprints[0] 14:50:06 #define CHANGE blueprints[1] 14:50:06 (etc) 14:50:10 You're still going to have while (1) { switch (foo) { a: break; b: break; c: break; } } 14:50:13 That's three jumps. 14:50:18 I'm not. 14:50:26 I mean if you use a switch and not computed gotos. 14:50:29 Ah. 14:50:30 Right. 14:50:44 Hmm, I wonder which is better: 14:51:02 while (1) { goto *ins->kind; foo: ...; continue; bar: ...; continue; ... } 14:51:03 or 14:51:20 LOOP: goto *ins->kind; next ins 14:51:23 foo: ...; goto LOOP; 14:51:26 bar: ...; goto LOOP; 14:51:31 I guess they will be compiled into much the same code. 14:51:39 Probably. Both are pretty awful :P 14:52:04 Gregor: Got any better suggestions? 14:52:18 #define NEXT ins++; goto *ins->kind; 14:52:25 Then put NEXT at the end of every instruction. 14:52:32 Oh, of course. 14:52:36 I really should re-read JonesForth. 14:52:40 :P 14:52:41 * alise renames the NEXT instruction to avoid clashing 14:54:23 Hmm, if I want to beat http://mozaika.com.au/oleg/brainf/bff4.c fairly, I need a dynamically-allocated tape. 14:54:29 Eh, I'll do that later. 14:55:23 Gregor, you mean he doesn't know this? 14:55:25 wth 14:55:38 Just because I haven't written a threaded interpreter in a while... 14:55:52 I left C and ages for months to mess around with mathematical languages. 14:56:00 Whereas I've been TAing a class in which half the class are writing them :P 14:56:11 Gregor, "TA"= 14:56:14 Gregor: He won't get the context; he has me on ignore. 14:56:14 s/=/?/ 14:56:19 AnMaster: Teaching Assistant 14:56:21 It's not like many people outside of Forth write threaded interps in practice anyhow. 14:56:22 ah 14:56:35 alise: That's not true at all. 14:56:47 Well, okay, but it certainly isn't the most common method of implementation. 14:56:49 alise: Most half-decent bytecode interpreters are threaded nowadays. 14:56:57 Python wasn't until recently. 14:56:57 alise: (Before JITing of course) 14:57:05 Then again, GvR is a retard. 14:57:11 alise: Nowadays = this year, basically, it's all the rage :P 14:57:28 * alise wonders whether 14:57:31 alise: Most half-decent bytecode interpreters are threaded nowadays. <-- yes, I'm surprised if he didn't know that... 14:57:41 * alise wonders whether 14:57:44 input: if ((c = getchar()) == EOF) *tape = 0; else *tape = c; 14:57:44 or 14:57:45 input: if ((*tape = getchar()) == EOF) *tape = 0; 14:57:48 is more micro-efficient 14:57:50 I suspect the latter 14:57:51 Being the intermediary in a half-blocked conversation is amusing :P 14:57:52 since EOF is an edge-case 14:58:01 Gregor, I can imagine 14:58:12 alise: I would guess the latter as well. 14:58:17 Gregor: I like how you're mostly half-agreeing with me when I clarify things and AnMaster thinks him and you are dissing me into Retard Hell :P 14:58:31 alise: Yup :P 14:59:07 I think I'm finally managing to think like AnMaster. "Hey, I have a lot of ->s in this code. I could pre-dereference the struct beforehand..." 15:01:04 * alise realises he has a potential "goto NULL" situation 15:01:10 No problem; one more blueprint entry for STOP. 15:01:14 Call that "exit" :P 15:01:14 The most famous of all brainfuck instructions. 15:01:19 The program will definitely exit :P 15:01:28 But it also stops! 15:01:33 Oh, NULL 15:01:34 xD 15:01:38 Yeah :P 15:02:42 Gregor, any new music recently? 15:03:07 I wonder if gcc will be happy with a 10485760-length static array. 15:03:08 AnMaster: No, I'm currently in wrist splints for carpal tunnel :( 15:03:15 For all those ten-megabyte brainfuck programs. 15:03:25 gcc usually has an internal error when you allocate a static array big enough. 15:03:29 -!- mycroftiv has joined. 15:03:32 Gregor, ouch 15:04:18 I think I've realised that most of my C coding is designed around avoiding to have to use malloc at all. 15:04:22 Or, especially realloc. 15:05:17 op ip[5242880]; /* do not make a program longer than five megabytes i will be sad */ 15:05:22 Truer words have never been spoken. 15:05:28 lawl 15:05:37 alise: Use my buffer.h :P 15:05:42 You know you want to. 15:05:52 Linky me up 15:06:05 If it does anything to slow down the main interpreter loop, no way :P 15:06:21 http://codu.org/projects/stuff/hg/index.cgi/file/tip/buffer.h 15:06:27 You would just use it to easily load in the file. 15:06:38 Not expanding the tape? 15:06:45 char tape[65536] = {0}; /* I wonder if I should just rely on this working */ 15:06:47 Oh, you could do that too if you wanted to use it for the tape. 15:06:57 But you'd have to do bounds-checking for that. 15:06:59 Gregor: Hmm, not for the tape; too much overhead. 15:07:03 I was just thinking loading in files :P 15:07:13 I was just going to embed the program source at first... 15:07:22 This is just bf1.c, there is plenty of time for polish in bf137 :P 15:07:23 INIT_BUFFER(buf); fopen etc; READ_FILE_BUFFER(buf, filehandle); /* hooray */ 15:07:29 Gregor, idea: use stat() to figure out in advance how large that buffer needs to be 15:07:45 AnMaster: That would be a sensible thing for me to do >_> 15:07:58 Gregor, yeah, is that a bad thing? 15:08:20 AnMaster: Except that buffer.h works on "all" C systems, not just Unix. IIRC there's no very good stdio equivalent, but maybe I just don't recall it. 15:08:20 Yes it is. 15:08:22 Race condition. 15:08:24 For one. 15:08:38 Gregor, well true, so do #ifdef PURE_C or some such 15:08:49 alise: It would just be for guessing the initial buffer size. 15:08:57 It turns out that intensive use of #ifdefs is not the way to write correct code. 15:08:57 alise: Just preallocation. 15:09:10 Unless you like reading half a page of preprocessor directives for every actual meaty line of code. 15:09:23 Gregor: consider trigging pathological behaviour by making a 0-length file then immediately overwriting it with a 5gb one 15:09:28 it would certainly readuce reallocation, and also mean you would know at initial allocation if you had enough memory 15:09:49 Gregor, why macros and not inline functions? 15:10:25 You can rely on a macro being inlined perfectly. 15:10:31 Also, you don't need to write a separate .c file. 15:10:40 Gregor, or do you with "all C" mean C90 too? Not just C99? 15:10:53 That also. 15:11:03 AnMaster: I mean I can compile it for 16-bit DOS with outdated Watcom compilers :P 15:11:12 :DE 15:11:13 :D* 15:11:33 Gregor, still some #ifdef to for *nix might be a good idea 15:11:43 alise: Your pathological behavior is an edge case that could be detected. a 1-length file would be a nonissue. 15:12:13 Gregor: Fair enough. 15:12:48 Also, I'd just like to throw out a strong vote against #ifdef fuckery. If you really want uber-ridiculous-speed, make them actual separate .c files compiled differently depending on the OS (in e.g. your build system) 15:12:53 Or at least do 15:12:55 #ifdef FOO 15:13:02 #include "ricer_speed_buf.h" 15:13:02 #else 15:13:06 #include "i_am_sane.h" 15:13:07 #endif 15:13:20 I haven't changed buffer.h in significant ways (except for adding totally new macros) basically since its inception :P 15:13:24 So *eh* 15:13:32 I once met a programmer who didn't know you could put function bodies in headers... After all it is just included. static inline in a header works fine. 15:13:48 AnMaster: So long as your compiler supports static ;) 15:13:55 And inline 15:14:05 You know, sometimes there is a good reason for .h and .c to be separate. 15:14:06 Deewiant, well sure 15:14:06 Just saying. 15:14:15 alise: CRAZY 15:14:26 -!- mycroftiv has quit (Ping timeout: 276 seconds). 15:14:34 You can always #define inline away, but if you #define static away you'll get multiply-defined errors. 15:14:44 Gregor, you do? 15:14:45 op *stk[65536]; /* also if you use more than 65536 nested loops i will be sad too */ 15:14:54 AnMaster: consider separate compilation. 15:14:59 AnMaster: That's ... the whole idea of static X_X 15:15:00 oh you mean like that 15:15:00 right 15:15:01 multiple definitions in separate objects 15:15:07 WOW ANMASTER DIDN'T KNOW THAT? 15:15:10 MUST BE PRETTY DUMB HUH 15:15:11 alise: :P 15:15:16 RIGHT GREGOR :P 15:15:19 Gregor, but it will work on some platforms anyway iirc 15:15:26 AnMaster: Sure, depends on the linker. 15:15:29 Gregor, anyway I don't know of a compiler that lacks static 15:15:36 char tape[65536] = {0}; <-- Please tell me that some compiler, somewhere, supports this :-) 15:15:42 AnMaster: I'll go dig up a pre-ANSI one for PDP-11 ;) 15:15:52 Gregor, I don't care about pre-ANSI 15:16:51 static for file-local is rather strange btw 15:16:54 I mean as a keyword 15:17:32 AnMaster: C's use of "static" is a bit schizophrenic :P 15:17:41 Gregor, exactly my point 15:17:46 Gregor: also I'm not sure buffer would work so well as I want to "compile"/parse as I go 15:17:50 maybe I should read just a bit at a time 15:17:53 or maybe not, maybe this is better 15:17:55 Gregor, it makes a whole lot of sense for the "persists between calls 15:17:57 " 15:18:06 No it doesn't 15:18:13 That's the most confusing sense 15:18:19 possibly they were out of keywords and didn't want to mess up with anyone who had a variable called "local" 15:18:19 alise: Up to you, I've just found I always like my buffers :P 15:18:23 or function called it 15:18:31 or type for that matter 15:18:42 Gregor: Well if I were optimising for happiness and laughter I would use some language other than C but I'm going for mega performancebucks here :P 15:21:08 with intptr_t -- which I've never used before; I'm a radical kind of freewheeling fellow as far as integers and pointers go -- do you need to cast when assigning pointers to it, or when assigning integers? 15:21:36 Never used it :P 15:21:48 Right, well, clearly you know best; bye-bye intptr_t. 15:23:27 Gregor: Hmm, I'm not sure doing what I said I'd do -- and what you said would work -- with computed gotos /will/ work. 15:23:29 Oh, wait 15:23:32 I just have to preinitialise the array 15:24:12 er, or rather, just not assign it as a literal 15:27:08 -!- mycroftiv has joined. 15:27:12 bf1.c:41: warning: cast from pointer to integer of different size 15:27:13 bf1.c:42: warning: cast from pointer to integer of different size 15:27:13 wuteva. 15:27:51 size_t? 15:28:17 just void * 15:28:18 :P 15:28:30 $ echo abc | ./bf1 15:28:31 $ 15:28:32 It almost echoes! 15:28:47 it appears to read one character in, then exit 15:28:53 15:15:12 char tape[65536] = {0}; <-- Please tell me that some compiler, somewhere, supports this :-) 15:29:00 you mean 0-init the whole array? 15:29:24 yeah, i know it does work 15:29:29 but still, it's such a weird feature 15:29:44 i _think_ that arrays are 0-inited by default, if specified outside of a fucntion 15:29:48 function* 15:29:54 yeah i think so too 15:29:55 still 15:30:01 so char tape[65536]; should do it as well 15:30:15 yeah, i just get twitches whenever i see a decl without initialiser in c 15:30:18 for obvious reasons 15:30:18 it's only if you have to malloc() the array that it's random 15:30:19 Uhhhh 15:30:25 obvious reasons? 15:30:31 int *x; 15:30:32 *x 15:30:33 aaaah 15:30:34 On MOST systems arrays outside a function are in BSS, but that's NOT guaranteed by C. 15:30:47 fuck yeah, standards fight 15:31:02 Gregor: i'm going by memory of K&R 15:31:43 I'm going by memory of your FACE. 15:32:06 sorry honey, i don't recognise you 15:32:08 Gregor, static ones are going to be zero at start 15:32:21 not sure about non-static ones 15:32:48 your MOM are going to be zero at start 15:33:03 * alise declares a bunch of stuff static for moar speed 15:33:11 moar speed in my broken program 15:33:30 oh 15:33:35 move: tape += (int)p.val; NEXT; 15:33:35 change: *tape += (int)p.val; NEXT; 15:33:36 output: putchar(*tape); NEXT; 15:33:36 input: if ((*tape = getchar()) == EOF) *tape = 0; 15:33:36 loop: if (!*tape) ip = p.val; 15:33:36 end: if (*tape) ip = p.val; 15:33:38 stop: return; 15:33:40 spot the issue 15:34:03 sweet, EOF generates a segfault 15:34:13 even normal progam termination does 15:34:16 oh 15:34:19 I forgot to add the stop instruction 15:34:20 heh 15:34:37 Well, cat works. 15:34:44 * alise tries mandelbrot.b 15:34:56 brainfuck? 15:35:42 15:03:54 I think I've realised that most of my C coding is designed around avoiding to have to use malloc at all. - any reason why? 15:35:52 pineapple: Well, malloc's not so bad. 15:35:55 But realloc is tedium personified 15:36:17 (and I'm not just some shitty PHP coder who doesn't "get" C -- I've used lower level languages than it, and loved C for ages, and I've used languages all the way up the spectrum too) 15:36:24 shouldn't it be unsigned char for bf? 15:36:36 Doesn't make any difference, does it? 15:36:54 i think it does for integer wraparound 15:37:05 nope 15:37:12 oh, right 15:37:16 only for bit shifting 15:38:09 if you write C, signed-integer overflow is undefined :) 15:38:30 Oh. Okay then. 15:38:42 Hey, mandelbrot.b works. 15:38:51 I only made one mistake in writing the entire program. 15:39:31 Slowly, mind, but not nearly as slowly as you'd expect from a relatively naive first draft. 15:40:28 $ time ./bf1 > /dev/null 15:40:28 real0m44.460s 15:40:29 user0m43.255s 15:40:29 sys0m0.108s 15:40:53 So, I need to make "parsing" smarter -- combine moves and modifies. 15:41:18 Then I need to shift moves and the like into the other instructions. 15:41:25 Then I need to do linear-loop optimisation. 15:41:41 char *prog = 15:41:41 #include "mandelbrot.h" 15:41:42 ; 15:42:18 and implement reading a program from file perhaps? 15:44:35 yes, well, later. 15:45:14 * alise writes bf2.c 15:50:47 * alise benchmarks bf1 vs bf2 15:50:58 I imagine around bf10 might be faster than bff4 with linear loop optimisation 15:51:07 incremental development is a blast 15:52:09 -!- cheater3 has joined. 15:53:09 Hmm, I do wonder if indexing into my static tape array with an integer might not help the compiler figure out more than using just an opaque pointer. 15:53:17 $ ./bf1 > /dev/null; time ./bf1 >/dev/null; ./bf2 >/dev/null; time ./bf2 >/dev/null 15:53:17 real0m45.774s 15:53:17 user0m43.171s 15:53:17 sys0m0.080s 15:53:17 real0m20.209s 15:53:18 user0m18.277s 15:53:20 sys0m0.096s 15:53:23 Only change was combining multiple <>, +- instructions. 15:53:31 Low hanging fruit right there. 15:53:37 (Well, and I changed the type to int, not void *.) 15:53:43 (It should probably be long.) 15:55:08 Changing to long only varies mandelbrot.b's time from 20.209s to 20.635s 15:55:11 So that's good. 15:55:14 * alise tries -m32 15:55:25 -!- cheater2 has quit (Ping timeout: 260 seconds). 15:56:02 eh, don't have the 32 libs 15:58:09 Daniel B. Cristofani's self-interpreter is so amazing. 15:58:12 Hey, changing to a tape index shortened the time to 18.194s. 16:01:12 Speeding this thing up is... rather ridiculously easy. 16:01:44 Oh, dear; bf4 slowed things down. 16:03:25 Down to 17.969s; I'm almost as fast as bff.c on mandelbrot. 16:03:43 And only 101 lines, too -- though I need to add program loading, and possibly variable tape allocation. 16:05:48 Strangely enough, not pre-dereferencing ip speeds it up a little bit (<1s, but still). 16:05:59 (<.5s, too, but it's still definitely not a coincidence giving time's results) 16:06:18 It's now only 99 lines. 16:09:41 * Sgeo_ growls at everyone who uses non-domain-name-based package names 16:09:44 I guess I'll bite the bullet. bf6 will be the one that does the first combining of move operations into other instructions. I think. 16:10:45 ++++>+<[>[>+>++<<-]>>[<<[>+<-]>[<++>-]>-]<<<-]>[<+>-]< ;; bf program to calculate 2^(2058 + 2^4116) 16:11:45 source: http://www.iwriteiam.nl/D9901.html#24 16:11:55 even bigger? http://www.iwriteiam.nl/D0904.html#15 16:12:03 if you add +s to the start of that program you get something even bigger 16:12:31 2^(2058 + 2^4116) has 10^1239 digits in base 10 16:13:00 or, in other words, 16:13:06 it has 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 16:13:06 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 16:13:06 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 base-10 digits 16:13:09 approximately. 16:13:52 So what we've learned here is with that with the BF kolgomorov complexity K(x): 16:14:09 K(2^(2058 + 2^4116)) <= 54 16:14:12 It is a rather simple integer. 16:16:45 * alise considers folding in moves by having an int that gets inc/dec on move instructions, then putting it in any newly created instruction 16:16:45 yeah 16:21:44 Oh dear; it seems like bf6, with its move-folding, is going slower than bf5. 16:22:21 -!- adam_d has joined. 16:22:32 I guess what I really need to do is handle >^nX<^n (also swapping >/<) for all n. 16:22:36 But that's Hard. 16:22:47 I think your number of digits is off by factor of about 3... :-> 16:23:05 Ilari: Quite possibly. 16:23:16 I just asked Wolfram Alpha then pasted the result into Ruby (nearest thing to hand), then copy-pasted the result. 16:23:27 The potential for error at any point is large. 16:23:57 Oh, look: bf6 does not even work. 16:23:57 I'd better fix it. 16:24:02 Oh, of course. 16:25:18 * Sgeo_ wonders how playable the JS version of Robozzle is 16:25:36 i tried it. 16:25:43 it's alright 16:26:00 I get (rounding off a bit): 3.296643047157257677279598742963425708214531905272149037702927150038*10^1238 base 10 digits. 16:26:45 Nice precision. 16:26:59 Maybe I rounded a .5 down, rather than up, in the log result. 16:27:30 Grr; this really should work. 16:30:48 That was rounded from result I got (to avoid pasting 1239 digit number to IRC). 16:32:28 :-) 16:32:35 Is it using floats? 16:32:39 I guess not. 16:33:09 Fixed point (at scale of 10^1500). 16:34:11 What calculator? 16:34:16 bc 16:34:21 Clearly what we /really/ need is someone to evaluate it symbolically. 16:34:40 -!- adam_d has quit (Ping timeout: 245 seconds). 16:35:03 Well, it's /approximately/ 10^1238.518071925292. 16:35:07 But that is not very helpful. 16:35:31 -!- adam_d has joined. 16:36:11 1 + floor((2058 + 2^4116)*log(2)/log(10)) 16:36:19 It's amazing how star placement can make a puzzle easier or harder, just by leading you in the right or wrong direction to approach the puzzle 16:36:41 [ignoring placement that changes the puzzle itself, ofc] 16:37:35 Ilari: Well, that is just cheating. 16:37:51 * alise tries maxima 16:37:58 Anyone have axiom? Or Octave? 16:40:03 * Ilari is installing octave and axiom... Takes a while to download ~130MB... 16:40:31 Octave isn't symbolic, I don't think, but a lot of people use it. 16:40:35 I'm downloading Maxima. 16:40:40 Octave doesn't do much else than double-precision floats. It's an engineer thing. 16:40:52 Alright then; skip Octave. 16:41:03 It is of the utmost importance that we get an exact answer to this question! 16:42:31 * Sgeo_ goes to try /* Comments */ 16:42:46 alise, isn't Maxima costly? 16:43:52 Free. 16:43:56 Are you thinking of Mathematica? 16:44:00 I have Mathematica somewhere. I pirated it. 16:44:17 * Sgeo_ was thinking of Mathematica, yes >.> 16:45:47 * Sgeo_ drools at http://www.youtube.com/watch?v=SnWJ29eNCbY 16:46:33 "purchasing of puzzle solutions"? WTF? 16:52:42 grr, why the hell doesn't this work 16:58:05 It's behaving differently for... no reason whatsoever. 17:06:15 Ilari: Any luck with axiom? 17:08:51 * Sgeo_ wonders if it's possible to make an iPhone emulator for Android 17:10:06 Ilari: I've got the precise result. 17:11:20 sec 17:11:45 Ilari: http://pastie.org/924690.txt?key=ofuqp78ktc37x7uktmhuuw 17:12:09 But ++++>+<[>[>+>++<<-]>>[<<[>+<-]>[<++>-]>-]<<<-]>[<+>-]< doesn't even calculate the number shown there; it calculates a number with that many digits. 17:12:13 2^(2058 + 2^4116); what a number. 17:13:45 Looks like that number matches to what I calculated... 17:14:18 I just kept prompting Wolfram Alpha for more digits. :-) 17:14:22 What would adding fifth '+' in beginning do to number it calculates? How large it would then be? 17:15:44 The author didn't specify: just that it was much larger. 17:15:56 You could probably work it out by figuring out what formula it's running, and treating the initial +s as parameters. 17:16:11 http://www.iwriteiam.nl/Ha_bf_numb.html has links to the blogposts; the 1999 one is the one we're talking about. 17:20:22 * alise is absolutely determined to beat mazonka's interp... 17:20:28 why isn't my move-combining working! 17:23:38 -!- lament has joined. 17:24:17 alise: what are you trying to do? 17:24:45 successive iterations of a relatively naive BF interpreter with a new idea of sorts, aiming to beat the current champion (mazonka's bff4.c with linear loop optimisation) 17:24:49 or this specific bit? 17:25:03 both 17:25:05 I'm trying to eliminate the Move instruction by e.g. turning >><+ into a + instruction with the field move = 1 17:25:26 but either the bit that does this combining or the actual interpreter loop's handling of these values is meaning that the tape pointer is being moved in an entirely incorrect way 17:25:31 and i can't figure out why 17:25:56 * Sgeo_ growls at everyone who uses non-domain-name-based package names <-- for what? 17:26:23 Android 17:26:29 okay 17:26:36 to be general, java 17:27:52 alise: maybe you have move and the +/- the wrng way around 17:28:02 case '>': mov++; break; 17:28:02 case '<': mov--; break; 17:28:05 #define NEXT ip++; tp += ip->mov; goto *ip->kind 17:28:26 no 17:28:30 what i mean is 17:28:53 the difference btween prefix and postfix ++ is why you;re getting errors 17:28:55 or the equivalnet 17:29:56 well 17:29:58 #define NEXT ip++; tp += ip->mov; goto *ip->kind 17:30:01 is the bit that actually does the moving 17:30:16 and since i merge the mov modified in the past loop into the instruction done now, the moves come before the instruction 17:30:20 ip->kind is what actually executes it 17:30:21 err... 17:30:24 so clearly the move is in the right place 17:30:40 i'm confused 17:31:02 why? :) 17:32:12 so... ip.mov is how much to move by, and ip.kind is how much to +/- by once you're tehre? 17:32:44 oh 17:32:45 there is the issue 17:32:50 hmm? 17:32:51 if (last && last->kind == Change) { 17:32:52 last->val += c == '+' ? 1 : -1; 17:32:52 p--; 17:32:55 a relic from when i always did p++ 17:33:01 but now I have it as a separate macro 17:33:05 so that p-- keeps running backwards 17:33:08 one step forwards, two back 17:33:11 or whatever 17:33:24 pineapple: ip->kind is a pointer to a computed goto label, that contains the relevant code for the instruction that it is 17:33:34 ? 17:33:54 jane@jane-desktop:~/code/bf$ gcc -std=gnu99 -O3 bf6.c -o bf6 17:33:54 jane@jane-desktop:~/code/bf$ ./bf6 17:33:54 Segmentation fault 17:33:58 Well, that is an improvement. 17:34:03 jane? 17:34:07 (re: use name - not my computer) 17:34:08 *user 17:34:12 (haven't unpacked mine yet :P) 17:34:16 aah 17:34:20 recently moved. 17:34:27 germany? 17:34:37 er, no :) 17:34:40 not country 17:34:56 well i have it back to sitting there doing nothing useful now... 17:34:58 turns out that wasn't my bug 17:35:00 or, wait, was it? 17:35:00 hmm 17:35:05 a-HA! 17:35:25 nope ... not that either 17:35:32 OH OF COURSE! 17:35:39 if (last && last->kind == Change) { 17:35:40 p--; 17:35:40 p->val += c == '+' ? 1 : -1; 17:35:40 } else { 17:35:40 p->kind = Change; 17:35:40 p->val = c == '+' ? 1 : -1; 17:35:41 } 17:35:43 ADV; 17:35:47 adv advances the ip in the parser, and also sets the mov 17:35:48 but get this 17:35:53 it sets it 17:35:56 and when the last instruction was a change 17:35:58 we just add to the value 17:36:01 but then ADV OVERWRITES IT 17:36:10 oooops 17:36:31 now it... still doesn't work! 17:36:38 but I'll get there eventually i'm sure 17:37:29 alise: Without seeing the code it's obviously guesswork, and I wouldn't feel like looking anyway, but... I guess you 0 mov at all the right places? Have you tried dumping the code you create? 17:38:05 Dumping the created code I should probably do. 17:38:05 #define ADV p->mov += mov; mov = 0; last = p; p++; p->mov = 0 17:38:06 and the place that, I think might be causing "trickiness": 17:38:07 if (last && last->kind == Change) { 17:38:08 p--; 17:38:08 p->val += c == '+' ? 1 : -1; 17:38:08 } else { 17:38:08 p->kind = Change; 17:38:08 p->val = c == '+' ? 1 : -1; 17:38:10 } 17:38:12 ADV; 17:38:17 with the p-- and the need to combine movs and the like 17:39:52 apart from that it's just boring set-kind-advance 17:39:56 apart from maybe 17:39:57 Yes, should the p--; p->val += ... part also do something to p->move? I guess not necessarily, since you'll add the current "mov" anyway... or is that in p->mov before p-- at that point? Ah well, I don't quite know your logicks. 17:39:57 case ']': 17:39:58 p->kind = End; 17:39:58 loops[--lp]->val = (long)p; 17:39:58 p->val = (long)loops[lp]; 17:39:58 ADV; 17:39:59 break; 17:40:01 but i don't think that should make a difference 17:40:20 fizzie: Well, p-- makes p = what last was before. 17:40:26 ADV, later on, expands to adding mov to p->mov. 17:40:30 So we should add it anyway, I think. 17:40:32 Oh! 17:40:39 fizzie: Imagine >+>+ 17:40:43 We get + with mov=1 17:40:45 then mov=0 17:40:47 we increase mov, mov=1 17:40:47 then + 17:40:50 since the last instruction was + 17:40:50 we get 17:40:53 + with amount=2 mov=2 17:40:55 this is clearly incorrect 17:41:10 we need to stipulate that our current mov is 0, or we cannot combine Changes 17:41:48 now it works 17:42:22 you know, honey 17:42:40 this would be so much easier if i could see your code 17:43:16 lol, honey 17:43:26 pineapple: i was considering pasting it, but, you know, too busy tweaking random things and seeing if they work 17:44:19 I had an attitude like that with ff3 the other day, but then people pestered me too much about it. Should add that border-tracking there. 17:45:08 Is ff3 becoming Funge-98 then? 17:45:36 So, I now have a 93-line program that runs mandelbrot.b in 15.581s. 17:45:48 Admittedly, it has a fixed size tape, no bounds checking (but that's okay), and doesn't load in the program from a file yet. 17:45:52 But it's only the sixth revision. 17:46:05 bf5: 0m17.648s; bf6: 0m15.581s 17:46:12 bf1 took ~40s on mandelbrot.b 17:46:21 alise: No, I just want less useless nops in the wrapping: http://pastebin.com/00xjESHr 17:46:55 Say; there isn't any Brainfuck benchmark. 17:47:25 I don't know of any, which is a shame, because with the ^bf thing that'd work as a rudimentary Befunge benchmark too. 17:48:10 How about calculating A(3, 20)? 17:48:19 8,388,605 is big but not too unwieldy to manipulate with brainfuck. 17:48:42 Of course, that would be most useful with already-fast interpreters. 17:49:37 And then perhaps outputting the result in base-10. 17:50:06 http://mozaika.com.au/oleg/brainf/ ;; some "sort of benchmark" programs 17:51:24 Hmm... Wonder where I calculated wrong: I got that "output" of that big number BF program would be 2^(2058 + 2^2059)... 17:52:58 Maybe he got it wrong. 17:53:53 bf6 takes 34.845s to run long.b; not so good. 17:56:43 Ilari: http://www.iwriteiam.nl/Ha_bf_numb.html#lbl 17:56:45 erm 17:56:46 http://www.iwriteiam.nl/Ha_bf_numb.html 17:56:49 explains the algorithm behind the program 17:57:27 0m31.911s to run si ! si ! hi123; not very fast 17:57:49 I think I'll merge +-s into the surrounding instructions, and then perhaps think about optimising >>x<<, and then do linear loops 17:58:50 Hmm. 17:59:53 I can't just have the variables mov and chg, because then I can't distinguish +> and >+. 18:01:20 Anyway, for 5 +'s, I get that number would be bigger than 2^2^2^2059. 18:01:20 A(m,n) ? 18:01:29 pineapple: ackermann function 18:01:41 ? 18:01:41 http://en.wikipedia.org/wiki/Ackermann_function 18:01:48 you know, grows extremely quickly 18:01:55 computable but not primitive recursive -- the first such function found 18:02:05 good grief 18:02:23 A(4,4) = 2^(2^(2^65536)) - 3 18:02:54 A(3,20) is the more manageable 8,388,605 18:03:00 but it'll still take a while to compute... 18:04:19 Seems easy to express in Haskell 18:04:25 What, ackermann? 18:04:27 Of course it is. 18:04:28 Although the trivial way is probably not efficient 18:04:39 * alise wonders what the big-O of ackermann is 18:04:57 Sgeo_: Efficient doesn't matter; beyond very small values you can't fit the result into the universe, or indeed any nearby universes, anyway 18:05:58 Sure I can. 18:06:02 For A(20, 20), the result is simply A(20, 20) 18:06:42 Isn't ackerman function fairly easily describable in terms of hyper function? 18:07:02 Ilari: Yes. 18:07:13 Hyper function isn't primitive recursive either. 18:07:21 Sgeo_: That is not the result, that is a symbolic representation of the result. 18:07:28 "... Solve for n." "n = n" 18:07:52 The /result/ has to be some primitive notion: what it actually returns, such that it cannot be reduced further. 18:10:45 Hrm, this is awfully confusing results: http://pastebin.com/KrSjfAgS 18:11:20 fizzie, is it? 18:11:41 AnMaster: Yes, because of the last number. 18:12:45 What's the length of BF program that loads first cell with number at least g64 and leaves the rest zero? 18:12:54 The difference between -DPF_X=15 -DPF_Y=1 and -DBOUNDARY_TRACKING for the actual time-wasting loop part in benchmark.bef is that for -DPF_X=15, in the wrapping instruction -- ip += PF_DELTA(0, -pf_box_w, 0); IP_GOTO; -- pf_box_w is a compile-time constant, whereas for -DBOUNDARY_TRACKING it's a file-scope "static int pf_box_w". 18:13:09 You wouldn't normally assume a compile-time constant be slower to subtract than a variable value. 18:17:13 fizzie, heh indeed 18:17:30 fizzie, run more timings and see if they agree 18:18:14 I ran the benchmark a couple of times, and it seems to be constantly close to those numbers. The actual moving of boundaries on 'p' isn't done yet, so I can't run anything very complicated. 18:18:17 rot13 should work. 18:18:41 how goes jitfunge? 18:19:15 I've been sick, man! Or possibly just "sick man". Getting better now, though; will see if I get some jitfungey done tomorrow. There's that bug I was chasing still there. 18:19:37 ah 18:20:02 fizzie, where can I svn/bzr/hg/darcs/cvs it from? 18:20:13 (did I miss any major ones?) 18:20:33 no love for git? 18:20:45 I like this style of development. Write a really stupid program with 1 appended to its name, then copy it, increment the number and improve on it. Only advance to a higher number if the current revision is better than the past, by whatever metric you're going for. 18:20:51 pineapple: AnMaster really, really hates git. 18:20:55 to the point of religious zealotry. 18:21:07 pineapple, ah I missed that. And no I don't love it 18:21:13 should i ask? 18:21:15 bzr for me :) 18:21:21 pineapple, ask for what? 18:21:38 pineapple: no 18:21:38 It's a nice miss, given that git is where everything else (public) of mine is. jitfunge's not shared yet, though. 18:21:40 ...why you don't like it 18:21:44 pineapple: fuck! 18:21:47 now you've got him going 18:21:52 prepare for an hour of inanity 18:22:08 pineapple, horrible user interface. Hard to remember commands. Confusing approach at version control. 18:22:12 The only thing I know about Git is that there's GitHub 18:22:23 alise: that's what /ignore is for, should i fee it necessary 18:22:34 feel* 18:22:41 pineapple, transitioning from svg to bzr was easy. bzr -> hg was somewhat easy. git is just very alien to me 18:22:56 fair enough 18:23:10 Hrm, http://pastebin.com/caKbRGzh is the generated assembly with static and tracked boundaries; just based on the number of instructions one would think the first faster, but of course that's a singularly unreliable way of measuring speed. Still. 18:23:11 * Sgeo_ would probably use TortoiseGit 18:23:15 pineapple: As long as you don't point out that you're ignoring AnMaster every 5 seconds or whenever you miss a line of his, like he does with me. :-) 18:23:31 :-P 18:23:36 pineapple, I find darcs easier, and darcs isn't remotely similar to any other the other ones I find. 18:23:53 i only have experience with svn 18:24:02 Huh; doing increments/decrements before moves in the queuer thing makes performance only slightly worserer than the previous version. 18:24:09 bbl 18:24:32 So, that bf7 attempt failed. 18:24:46 That's really strange. For that fixed-size block, it's decided to replace those jmp *%rax's with jmp .L281, where .L281: jmp *%rax. 18:24:50 Oh well, sauna-time. 18:24:52 oh btw I just checked the logs to see what alise said that caused that comment on /ignore up there... "10:23:15 pineapple: As long as you don't point out that you're ignoring AnMaster every 5 seconds or whenever you miss a line of his, like he does with me. :-)" <-- not remotely true. 18:24:54 bbl 18:25:10 Oh, he just can't get enough of me. 18:25:13 I know you truly love me <3 18:25:18 yawn 18:25:30 AnMaster: How about either you stop ignoring me or you don't fucking respond to things I say 18:27:34 -!- Mathnerd314 has quit (Quit: ChatZilla 0.9.86-rdmsoft [XULRunner 1.9.2.2/20100316074819]). 18:27:38 The question is, what low-hanging fruit are remaining before I take the plunge and do linear loop optimisation... 18:29:02 "If you're receiving this automated message, you moderate at least one popular reddit community" 18:29:04 I do? I wasn't aware... 18:29:08 * Sgeo_ reads fiction instead of doing homework 18:29:12 alise, what's the message? 18:29:17 alise, the mspaint one? 18:29:22 If you're receiving this automated message, you moderate at least one popular reddit community. Thanks for your contribution to the site, and congratulations on your success. Please subscribe to /r/modnews, a place we've set up for announcements of interest to moderators. Only the reddit admins can post links there, so it shouldn't clutter up your front page too much. 18:29:26 I guess it's probably mspaint 18:29:32 but I don't really know how many posts that gets... 18:31:00 RedditNomic(/r/nomic/) 18:31:00 Yeah, this is a crap idea. 18:31:09 What was I thinking? 18:31:23 alise, forbidden 18:31:25 Huh, mspaint is reasonably popular. 18:33:59 I don't suppose there are any general loop semantics faster than 18:34:00 loop: if (!tape[tp]) ip = (void *)ip->val; NEXT; 18:34:00 end: if (tape[tp]) ip = (void *)ip->val; NEXT; 18:34:00 .. 18:34:02 *... 18:34:03 Hmm. 18:34:08 alise, do you know why I can't get to /r/nomic ? 18:34:16 Sgeo_: dunno. it has 0 subscribers, strangely 18:34:19 not even i am subscribed 18:34:31 alise, for me, it just says forbidden (reddit.com) 18:34:39 dunno 18:34:44 maybe i set it private 18:39:57 http://pastebin.com/raw.php?i=W4G2jwzU Can anyone think of a way to improve this interpreter that /isn't/ optimising balanced loops? :-) 18:41:44 -!- alise_ has joined. 18:45:10 -!- alise has quit (Ping timeout: 258 seconds). 18:45:39 Hmm; if I can have a five-megabyte program, I can have a five-megabyte tape. 18:47:10 optimizing balanced loops? 18:47:13 How do you do that? 18:47:27 Also: alise_, what do you think of Scala? 18:48:50 Scala appears to me to be a hodgepodge of features, none particularly cohering too well with each other; and the OOP parts do not really add anything. I gather that this is considered a common misconception about Scala by some very smart people who like Scala, though. Mainly I abandoned Scala because you had to use, not only the tedious Java toolchain, but some extra build-system related quirks are there if you use Scala; at least when I used it there wer 18:48:50 e. That was using, I think, not the most recommended build tool for Scala though. 18:48:59 If you're already using Java, using Scala would be absolutely fine. JRuby and Jython too. 18:49:39 Is that a copy/paste? 18:49:57 Sgeo_: Optimising balanced loops - [>>+<[>+<]<<+>] is p[2]++; p[0] = 0; p[-2]++; 18:50:09 You can do this for every nested loop structure with matching > and <. 18:50:29 Sgeo_: no, I wrote it now 18:59:41 alise_: Yes, Scala is very much a thing to make Java programming nicer from what I've seen. 18:59:58 Worthwhile if you've already got reasons to be in Java, not worth it otherwise. 19:00:33 * Sgeo_ really needs to learn that he can like multiple languages 19:00:41 Sgeo_: Hah. 19:04:37 Anyone have a working clang compiler? pikhq? 19:04:50 I do. 19:06:00 Would you be so kind as to compile a lil' 64-bit binary with high optimisation for me? I'm thinking clang might have the wisdom to beat gcc on my current version. 19:06:43 http://pastie.org/924802.txt?key=9hndhxn9dpruigx3zxg bf7.c 19:06:46 http://pastie.org/924803.txt?key=drcs7zwkn7w5buut0xzl9g the requisite mandelbrot.h 19:07:00 I'd install clang but I'm on an old version of Ubuntu with only a mobile internet connection. 19:07:11 Just a bit. 19:07:52 Any prefered -march=? 19:08:11 Also, -fwhole-program, correct? 19:08:21 Yeah, whole program. And, this is an... /me looks it up 19:08:27 *a 19:09:40 -!- alise__ has joined. 19:09:55 Also, -fwhole-program, correct? 19:09:57 ? 19:10:03 Yeah, whole program. And, this is an... /me looks it up 19:10:03 *a 19:10:03 ...an AMD Athlon 64 X2 5200+. 19:10:03 So I guess just dual-core Athlon 64. 19:10:03 Not sure what march that is. 19:10:10 Okay, then. 19:10:14 -march=k8 it is. 19:11:08 Filebinning. 19:11:17 There's very little to the program, really, so I don't expect it to do /vastly/ better. 19:11:26 http://filebin.ca/jnad/a.out 19:12:47 -!- alise_ has quit (Ping timeout: 258 seconds). 19:14:01 http://pastie.org/924812.txt?key=bq9xhffo89frcoacjgqr0w ;; I hope that bf7 being very, very slightly slower than its predecessor on average is just coincidence in my measurings. 19:14:06 Because, really, 19:14:08 - p--; 19:14:08 - p->val += c == '+' ? 1 : -1; 19:14:08 + last->val += c == '+' ? 1 : -1; 19:14:11 and only running ADV if we need to 19:14:14 should be a speed up if anything 19:14:18 and 19:14:19 - #define ADV p->mov += mov; mov = 0; last = p; p++; p->mov = 0 19:14:20 + #define ADV p->mov = mov; mov = 0; last = p; p++ 19:14:23 almost certainly either does the same thing, or less 19:15:55 pikhq: Congratulations. Your computer produces far better code for my computer than my computer does. 19:16:12 Hooray. 19:16:14 11.314s, vs average of 15.000 to 15.350 for mine. 19:16:23 You shaved off ~4 seconds. Fuck yeah, clang. 19:16:33 BTW, -O3 -march=k8 -msse3 should be good "absurdly good" flags for your computer. 19:16:46 -O2 -march=k8 -msse3 should be sane ones. 19:17:44 Hey, gcc does -fwhole-program too. 19:17:47 Or does -O3 automatically do that? 19:17:53 It doesn't. 19:18:03 For this program, -fwhole-program as well. 19:18:08 Hmm... no loops to unroll that wouldn't be cheating (unrolling the parsing loop would be cheating; the program is currently a constant string) 19:18:22 BTW, -fwhole-program will break not-small programs. :) 19:18:26 No fucking clue what most of the -f options do. 19:18:38 pikhq: This program will grow to at most a couple hundred lines ;-) 19:18:45 what does whole-program do? 19:18:55 olsner: assumes that nothing will link with it 19:19:01 and so basically fucks everything into one great big ball of mud 19:19:13 then smashes it with a hammer so that it looks like the pure operations that need doing, nothing more 19:19:20 olsner: -fwhole-program tells the compiler that the only symbol that will be exported is main. 19:19:20 you can see how this would cause problems on complicated programs. 19:19:26 pikhq: Also that. 19:19:40 pikhq: Why SSE? I can't think of a single thing in my program that would be helped by SSE. 19:20:00 alise__: Oh, that's just because your CPU supports -msse3. 19:20:07 XD 19:20:31 The -march flags will turn on most of the supported such extensions, but your CPU supports SSE3 and -march doesn't tell the compiler that. 19:20:35 Just a habit. ;) 19:21:07 I wonder if -Os might not help here; the programs are very small (bf7 is just 93 lines), and the actual tight main loop is all manual computed gotos, so there's not many clever optimisations to be done there. 19:21:15 So having everything fit in the computer's nice little pocket could help. 19:21:26 ah, right... -fwhole-program wouldn't really be needed if it wasn't so fiendishly complicated to tell a C compiler/linker/etc system exactly what needs to be exported 19:21:37 pikhq: -fwhole-program -march=k8 -msse3 don't seem to have improved bf7 performance any, which supports my hunch that it can't optimise my awesomeness. 19:21:49 also it bloated the size of the binary by like 500 :P 19:21:52 Your program is already small enough to fit in the whole cache. 19:21:55 now they're all 24k 19:21:59 Okay, GCC sucks. :) 19:22:00 as opposed to ~13k 19:22:05 cool 19:22:09 I never knew about -fwhole-program 19:22:12 * alise__ tries -Os 19:22:21 Now they're all 23K. 19:22:34 alise__: Strip, man, strip! 19:22:36 How queer; they won't go smaller. 19:22:47 olsner: The link-time optimiser that GCC and Clang have should help with that. 19:22:49 Will -fwhole-program work with, or against, -Os? 19:22:57 I assume -march=k8 is fine to use with it. 19:22:57 alise__: With. 19:22:59 what are you trying to accomplish? 19:23:06 comex: Me? 19:23:13 And yes, -march=k8 is just fine. 19:23:14 A brainfuck interpreter faster than bff4 with linear loop optimisation. 19:23:32 you're compiling brainfuck to C? 19:23:35 No. 19:23:37 Interpreting. 19:23:41 oh 19:23:44 Compiling, esotope has already cornered that market. 19:23:49 It compiles hello world to a constant output, after all. 19:23:54 When interpreting, optimisations cost. 19:23:57 Post-stripping, an -Os'd bf7 is 19K. 19:24:11 Let's see how fast it goes. Brrm brrm! 19:24:26 This is all just tactics to avoid working on the linear loop optimisation :-) 19:25:17 am I stupid for trying to cast a file to a string in C? 19:25:33 wareya: Intensely. 19:25:37 okay 19:25:37 $ ./bf7 >/dev/null; time ./bf7 >/dev/null 19:25:38 real0m20.730s 19:25:38 user0m20.661s 19:25:38 sys0m0.052s 19:25:42 Conclusion: Bad -Os; bad! 19:26:08 I'd love to see the assembly for this thing. Computed gotos can't be pretty. 19:26:16 -S 19:26:31 Yep. 19:26:40 -O3 restores everything back to its original glory. 19:26:43 And at 19K, too. 19:26:59 Oh, I know... 19:27:13 Clang seems to handle computed gotos *much* better than GCC. 19:27:26 Ah. 19:27:38 Clang version? 19:27:40 http://pastie.org/924802.txt?key=9hndhxn9dpruigx3zxg Anyone know if I can initialise blueprints without having to call interp? 19:27:45 After all, clearly it can be done in asm. 19:27:49 Deewiant: 2.6. 19:28:00 That's interesting, then 19:28:25 Given that 2.6 doesn't support indirectbr :-P 19:28:52 Still handles it better. 19:29:40 I can't just put the declaration of blueprints inside interp, can I? 19:29:42 No, I suppose not. 19:29:42 2.6 just lowers indirect gotos to switches 19:29:43 Hmm. 19:29:47 And I can't assign an array literal like that. 19:29:56 So it makes me wonder what GCC must be doing there, if that's better 19:30:01 Deewiant: Well, maybe that would turn out faster. 19:30:18 Since theoretically the indirect goto has an "unknown" destination, not just one-of-a-few-cases. 19:30:23 So we have to jump "generically", not specialisedly. 19:30:35 The only reason computed gotos are faster with gcc is that it sucks at switches, and a switch makes it jump more. 19:31:24 #define NEXT ip++; tp += ip->mov; goto *ip->kind 19:31:25 compiles to 19:31:29 leaq 24(%rcx), %rax 19:31:29 movq %rcx, %r8 19:31:29 xorl %esi, %esi 19:31:29 jmp .L12 19:31:31 with gcc 19:31:59 *Gah*, that's right. GCC is merging the tails of all that. 19:32:00 Some of them have code I don't even know what it does, though. 19:32:09 So it can have a single indirect jump instruction. 19:32:12 "Because". 19:32:17 L12 is just 19:32:20 .L12: 19:32:20 movq %rax, %rcx 19:32:20 .L2: 19:32:20 movzbl (%rdi), %edx 19:32:21 incq %rdi 19:32:23 testb %dl, %dl 19:32:25 je .L23 19:32:27 leal -43(%rdx), %eax 19:32:29 cmpb $50, %al 19:32:31 ja .L20 19:32:33 movzbl %al, %eax 19:32:35 jmp *.L11(,%rax,8) 19:32:37 which is, you know, longer than I'd like for threaded code 19:32:39 also there is an awful lot of .quads around here 19:32:41 pikhq: Can I disable that? 19:33:09 alise__: I've been trying to. 19:33:14 I dunno how. 19:34:30 In the next revision, or at least in the next few, I'm going to have to bite the bullet and implement linear loop optimisation. 19:34:38 When I do that I should beat least competitive with bff4lnr. 19:34:44 Hopefully, I'll be able to beat it. 19:35:02 Here's what I'm up against: http://mozaika.com.au/oleg/brainf/bff4.c compiled with -DLNR. 19:35:22 Of course, it will be cheating until I add loading a program somehow, and then an automatically growing tape. 19:35:33 I have a feeling malloc will slow my program down immensely; right now I don't use it at all. 19:35:43 Perhaps I will mmap some ridiculously large space instead, and depend on overcommitting. 19:37:08 doing it in hardware ftw! 19:37:24 -!- lament has quit (Quit: lament). 19:38:36 you could mmap a bunch of contiguous pages, mark the last one PROT_NONE, and install a SIGSEGV handler to grow the space 19:39:16 That seems... Awful. 19:39:30 besides, isn't that exactly what the kernel does internally if you just mmap the whole free address space? 19:39:44 Something like that, I think. 19:39:50 pikhq: Hey, there's a library to handle segfaults. 19:39:54 Not that I'd use it; too much overhead. 19:39:58 But it would work, yeah. 19:40:02 that's not necessary at all 19:40:05 just sigaction 19:40:08 yeah 19:40:12 it's cleaning up afterwards that's the problem 19:40:13 olsner: the kernel will likely do it faster though, won't it? 19:40:16 as for mmaping the whole space, I don't know :p 19:40:46 isn't it likely to reserve a whole lot of physical memory? or does it not do that until the memory is actually used 19:40:48 The advantage of the SIGSEGV solution is that it would work even with overcommit turned off. 19:40:50 comex: no, it doesn't 19:40:54 Linux always grants a request for memory 19:41:01 as long as it's within certain (ludicrous) bounds 19:41:04 or wait 19:41:08 you can't ask for more than you have 19:41:11 but you can ask for what you have, twice 19:41:15 it'll grant both immediately 19:41:21 then it only actually grabs the memory when you need it 19:41:24 this is why it needs the OOM killer 19:41:34 a program gets some memory, uses it, suddenly we can't give it the memory we've already told it we have 19:41:36 yes, but it could also allocate some memory to you in the assumption yuou're about to use it 19:41:39 who's the culprit? who's hogging our memory? 19:41:40 KILL! KILL! 19:41:46 but I'm wrong about that so k :p 19:41:53 comex: I've done it before and it doesn't actually reserve much memory at all 19:41:54 if any 19:41:54 ...or swap. 19:42:08 http://pastie.org/924840.txt?key=jhefhf0gduvence49befva Look for low hanging fruit, feeble-minded slaves! 19:42:23 comex: malloc almost *cannot* fail on Linux. 19:42:31 I bet using the C stack is faster than maintaining my loop stack. 19:42:37 Unless you turn off overcommitting. 19:42:42 alise__: why would it be faster? 19:42:45 alise__: Yes, the C stack is very fast. 19:42:57 comex: what pikhq said 19:42:57 oh, wait 19:43:06 x86 has dedicated opcodes for pushing on the stack 19:43:07 fine:p 19:43:09 I'm doing lots of manual stack operations for something that C compilers are optimised to do millions of times a second 19:43:13 and processors 19:43:47 the question is whether processors actually treat *SP specially 19:43:55 They do. 19:44:18 C stack handling is *absurdly* fast on x86. 19:45:11 eh, bf7 will be a cleanup revision 19:45:13 onto bf8 19:45:17 i'll do the stack thing 19:45:40 otoh, if you mean using recursion for loops, you are wasting some stack space 19:45:40 this is just like using a version control system, but nicer :P 19:45:47 nah 19:45:49 for the stack of loops 19:45:51 for the return address etc 19:45:53 case '[': p->kind = Loop; loops[lp++] = p; ADV; break; 19:45:54 case ']': 19:45:55 p->kind = End; 19:45:55 loops[--lp]->val = (long)p; 19:45:55 p->val = (long)loops[lp]; 19:45:55 ADV; 19:45:56 break; 19:45:58 } 19:46:00 also not if your compiler optimises that 19:46:17 * alise__ wonders how to write the above using recursion 19:46:26 never heard of a compiler optimizing that :p 19:46:32 gcc optimises tail recursion. 19:46:41 well, I may be thinking of a different implementation than you 19:46:47 that would definitely not be tail recursion 19:46:54 it wouldn't be in this case 19:46:59 but it'd be better than using my manual stack 19:47:02 All recursion can be turned into iteration [unless it's just tail recursion]. Can all iteration be turned into recursion somehow? 19:47:04 if you feel like being a jerk, you could use inline asm to push/pop :p 19:47:27 All recursion can be turned into iteration [unless it's just tail recursion]. 19:47:28 false 19:47:30 that would probably be the fastest, but I doubt there's a way to do that in C 19:47:30 you have to use a stack 19:47:36 which is basically just recursion 19:47:41 Sgeo_: and the answer is yes 19:47:44 iteration is just tail recursion 19:48:45 one thing you could do is do a loop beforehand that converts non-BF characters to some known character 19:49:18 Why? 19:49:22 I just completely ignore non-BF chars. 19:49:36 then you could optimize the switch statement because you know all characters are one of 8 characters 19:49:49 [About Ubisoft] "They're actually trying to stop piracy. If the servers stay down, it's impossible for the pirates to track communication between client and server in order to get the data they need to fully crack the game. So, if they keep the servers down forever, the game will be never be cracked!" 19:49:52 that would probably simplify the machine code significantly and avoid a branch 19:49:53 http://www.fark.com/cgi/comments.pl?IDLink=5216097 19:50:02 well, maybe about the branch :p 19:50:52 comex: oh, I'm not optimising the parser yet 19:51:16 The parser should be the quickest thing you deal with. 19:51:18 hmm 19:51:19 case '[': p->kind = Loop; loops[lp++] = p; ADV; break; 19:51:19 what I really want to do here is parse the current s 19:51:22 to get the loop result 19:51:28 btw, I wouldn't be surprised if it runs faster in 32-bit mode 19:51:32 Like, "parse all of LostKng in a few fractions of a second". 19:51:33 comex: yes, probably 19:51:46 comex: My experience has been "no". 19:51:47 hmm 19:51:53 pikhq: then it makes sense to preprocess for faster runtime 19:51:54 I need to have parse return, not modify a global variable 19:52:11 parse gives me a headache :p 19:52:14 parse : str -> op* 19:52:17 comex: what, mine? 19:52:19 it's simple 19:53:24 oh wait 19:53:27 I'm misunderstanding your code 19:53:32 :p 19:53:45 Admittedly I have not wrote for clarity much. 19:53:52 I think parse is quite nice code though. 19:53:57 uh, maybe. 19:54:06 how... 19:54:12 parse is running once, beforehand, right? and then interp? 19:54:20 yes 19:54:26 parse starts at prog 19:54:29 then advances onwards 19:54:31 oh, End actually stores hwere it is going 19:54:34 yes 19:54:37 jesus. 19:54:42 and then modifies the Start to point to the End 19:54:43 jesus what? 19:55:16 also, mov could be a short 19:56:13 To what avail? And what if you had more <>s than that in a row? 19:56:34 Unlikely but not almost impossible in the way overflowing the int is. 19:56:40 well the tape is only 65536 long eh? 19:56:48 such a thing would overflow the tape anyway 19:56:48 Well, true. 19:56:57 But it can be increased, and will be dynamically sized later. 19:57:03 I don't think shorts would be stored more efficiently on most machines, anyway. 19:58:14 fwiw 'val' could also be 32-bit if it's an offset from prog instead of a pointer 19:58:18 but I guess that wouldn't be much gain 19:58:55 the arithmetic would make it worse on the whole 19:59:11 Loops would be faster if their pointers pointed to the instructions /after/ the loop instructions. 19:59:19 I don't believe that without a test :p 19:59:20 That way, we could do less work than the general NEXT; we could skip ip++. 19:59:28 jane@jane-desktop:~/code/bf$ ./bf8 19:59:28 Segmentation fault 19:59:30 Well, it is a start. 19:59:35 (bf8 is the recursive-parser version) 19:59:42 heh 20:00:13 well you should definitely use a pointer to tape + tp that changes, instead of indexing every time 20:00:17 though maybe the compiler does that ofr you 20:00:23 for that matter, what if you make rsp = &tape[tp] 20:01:42 using the syntax that lets you reserve a register for a variable 20:01:42 comex: actually i used a pointer to tape + tp 20:01:43 it was slower 20:01:44 I measured it 20:01:47 huh. 20:01:57 comex: I think because the compiler can optimise the array access because it knows tape is static 20:02:02 whereas a pointer could be any old thing 20:02:24 wouldn't the same apply to indexing prog :p 20:02:34 I tried that too. Slower. 20:02:45 mm 20:02:46 I think because prog already has the indirect jump magic, so it doesn't help much, and the overhead of the indexing wins out. 20:02:52 can I have a copy of mandelbrot.h? 20:02:54 I want to try something 20:03:11 -!- BeholdMyGlory has joined. 20:03:37 .h ? 20:03:43 alise__: it should be obvious from the assembly if it actually does (optimize indexing) 20:03:51 and the compiler flags even :p 20:03:54 if you don't mind 20:03:57 pineapple: it's just mandelbrot.b without newlines enclosed in "" 20:03:58 so I can do 20:04:02 char *code = 20:04:03 #include "mandelbrot.h" 20:04:03 ; 20:04:08 comex: of bf7, presumably, since that one actually works 20:04:13 bf8 is just my tweak-parser version 20:04:20 sure, I was using the one on pastie 20:04:30 I think that is bf7. 20:04:50 Here is mandelbrot.h. 20:04:54 http://pastie.org/924867.txt?key=y1tsv0fos2dcg2ku9rkqw 20:04:57 Compiler flags I use: 20:05:09 -O3 -march=k8 -msse3 -fwhole-program 20:05:13 then afterwards, strip -s it 20:05:24 Change the march if you're not on AMD Athlon or similar, of course. 20:05:30 core2, if you're on Core 2. 20:05:38 (why not just -march=native?) 20:05:47 Because pikhq did it at first :P 20:06:01 you're using clang or gcc? 20:06:02 what does mandelbrot.b do? 20:06:35 comex: gcc. pikhq did it with clang and got significant (many seconds) improvement 20:06:38 pineapple: ascii art mandelbrot set renderer 20:06:45 a good benchmark 20:07:04 book.c:41: warning: comparison is always false due to limited range of data type 20:07:31 (getchar) 20:07:32 -!- kar8nga has joined. 20:07:33 and EOF 20:07:39 er right 20:07:42 it still works though 20:07:44 I wonder why 20:07:47 even with ,[.,] 20:08:15 yep clang is faster for me too 20:08:45 slightly faster with -m32 20:09:12 changing mov to short has no effect 20:09:37 maybe a very slight improvement 20:09:53 By low hanging fruit I meant codewise, not typewise. :-) 20:11:02 if you insist. :p 20:11:52 I get a significant improvement using a pointer instead of tape[tp] 20:12:16 on core2 who knows if you're different 20:12:45 -!- jcp has quit (Ping timeout: 264 seconds). 20:14:42 -fomit-frame-pointer is also an improvement 20:15:00 what /is/ the frame poitner anyway? 20:15:05 comex: hmm really? plz post timings for pointer 20:15:06 and also code 20:16:14 The frame pointer points to a location in the stack frame :-P 20:16:31 http://pastie.org/private/f9etyzhaoucns4mm0hfua <- pretty obvious change 20:16:32 Typically the return address or thereabouts 20:16:45 omitting it makes debugging impossible 20:17:32 I've always considered it as more a tool for humans and don't understand why compilers use it by default 20:18:34 comex: timings please? 20:18:38 i timed it before... 20:20:30 -!- ENKI-][ has quit (Read error: Connection reset by peer). 20:20:47 it's not that much of an improvement, but definitely there 20:21:10 ~.025s improvement, 5.214 instead of 5.234 20:21:16 input: if ((tape[tp] = getchar()) == EOF) tape[tp] = 0; NEXT; 20:21:16 how come this works? 20:21:16 even though the comparison is always false 20:21:16 ,[.,] works 20:21:19 and it should only work with 0 eof 20:21:25 comex: measured multiple times yeah? 20:21:31 otherwise disk cache and stuff 20:21:33 yes 20:21:50 ok, as soon as this new parser works i'll add that 20:24:06 no idea about EOF 20:25:40 grr 20:25:43 this keeps segfaulting and I have no idea why 20:26:10 gdb? :p 20:27:41 Deewiant: Did you notice my curious ff3 thing? 20:27:51 Don't think so, no 20:28:09 Deewiant: http://pastebin.com/KrSjfAgS 20:28:29 comex: gdb is worse than useless. usually :P 20:28:54 fizzie: How does boundary tracking work versus PF_X/PF_Y? 20:29:05 Deewiant: Where the difference between -DPF_X=15 and -DBOUNDARY_TRACKING is that for -DPF_X the subtraction of pf_box_x has a compile-time constant argument, whereas for the other it's a file-scope "static int pf_box_x". 20:29:13 Deewiant: Here's the generated assembly: http://pastebin.com/KrSjfAgS 20:29:21 Uh, copypaste mishap. :p 20:29:22 fizzie: Wrong link 20:29:38 Deewiant: http://pastebin.com/caKbRGzh I mean. 20:30:07 And for the upper, .L281: jmp *%rax; and nothing else. 20:30:10 There must be other differences :-P 20:30:21 Well, double-jump might do it 20:30:33 That snippet is the wrapping function. Of course there are other differences in the code. 20:30:37 It's a strange thing to do though. 20:30:48 Should perhaps try both with clang. 20:31:03 After some ice-cream experiences, away a while. 20:32:06 * alise__ steps too far in gdb. 20:32:07 feck 20:32:08 -!- oerjan has joined. 20:32:39 stepi 20:33:54 i guess that answer your previous question, then <-- what was that question? 20:34:00 you may never know 20:34:05 * oerjan cackles evilly 20:34:46 * alise__ keeps doing next 100 20:34:53 oh i think i know how it is segfaulting? 20:34:54 maybe 20:36:28 (The simple answer, of course, is that mirrors rotate in the fourth dimension.*) 20:36:39 * oerjan swats alise__ -----### 20:36:56 they swap _back_ with _front_ 20:37:30 :( 20:38:03 I tried manually (in the assembly) swapping edi (which clang picked to store ptr) with esp 20:38:07 in case it would speed things up 20:38:38 admittedly, my assembly was nonoptimal (it used two 'xchg' around each putchar) but that shouldn't make a huge difference; however, the code just slowed down a lot 20:39:59 Program received signal SIGSEGV, Segmentation fault. 20:40:00 0x00000000004005f4 in interp (setup=0 '\0') at bf8.c:39 20:40:00 39change: tape[tp] += ip->val; NEXT; 20:40:00 (gdb) 20:40:00 wutters 20:40:50 (gdb) print *(op*)*(ip+1)->val 20:40:51 $11 = {kind = 0xf00213959058b48, val = -4574530908104654666, mov = -1958210955} 20:41:02 ok; I have an end-loop instruction whose val (go back to...) is pointing to random memory 20:41:11 Understandable enough: 20:41:12 case ']': 20:41:12 p->kind = End; 20:41:13 return p; 20:41:13 but 20:41:17 q = parse(s, p); 20:41:17 q->val = (long)last; 20:41:19 last->val = (long)q; 20:41:21 p = q; 20:41:24 last should always be valid, so how is this happening? 20:43:06 $ ./bf8 20:43:06 im jumpin 20:43:07 back in da haus 20:43:07 im jumpin 20:43:07 Segmentation fault 20:43:16 im jumpin = yo bitch, this is parse() and we got a ], returning nao 20:43:23 back in da haus = parse totally gave us some fucking shit 20:43:30 so we have an un-haused jumpin. 20:43:44 I know the brackets are balanced so HOW IS THIS MONSTROSITY 20:44:08 comex: if i give you the code, you fix it k 20:44:09 Deewiant: Oh, right, forgot; did try clang earlier, but http://pastebin.com/9qX7qyd5 20:44:36 comex: http://pastie.org/924919.txt?key=djk4pkptyma547uhozx1q 20:45:34 * Sgeo_ procrastinates 20:47:04 * oerjan swears at the neighbor's barking dog 20:47:31 fizzie: So fix it :-P 20:47:32 comex: oh! 20:47:38 I don't increment s when I recurse 20:47:47 ugh, so parse needs to return a tuple 20:47:50 or a ** 20:47:52 as an argument 20:47:54 Deewiant: I guess it could be something a bit like http://llvm.org/bugs/show_bug.cgi?id=6608 which seems fixed already; I don't exactly use LLVM trunk, maybe I should start. 20:47:54 ***** 20:48:02 oh the pain 20:48:13 fizzie, when did you last play Robozzle? 20:48:13 so your s is cursed rather than recursed 20:48:28 fizzie: You could try llvm-gcc 2.6 as well 20:48:28 oerjan: I would enjoy killing you! 20:49:00 Now it works but segfaults anyway 20:49:27 * Sgeo_ hands alise__ a potion of holy water 20:50:01 Sgeo_: When it was talked about back then; I haven't played since. 20:50:29 Deewiant: I'll try this Ubuntu "llvm-gcc-4.2" thing first, but I guess if I'm serious about jitfunge's llvm side, I should try to get them codes too. 20:52:56 Deewiant: Well, that's better: http://pastebin.com/xQFwEaUu 20:56:29 WHY DOES THIS DEFOUL MY PEOPLE. 20:57:26 -!- tombom has joined. 20:59:59 Work, blasted computer! Work! 21:01:04 -!- tombom_ has joined. 21:02:56 * Sgeo_ sees another Nexus One ad and starts hyperventilating 21:03:21 AROUSING TELEPHONE 21:03:48 comex: MAKE MY CODE WORK 21:04:34 -!- tombom has quit (Ping timeout: 260 seconds). 21:05:51 12:21:16 input: if ((tape[tp] = getchar()) == EOF) tape[tp] = 0; NEXT; 21:05:54 12:21:16 how come this works? 21:06:05 is it possible that EOF % 256 is accidentally 0? 21:06:23 no, because it's -1 21:06:35 well then it should set it to 255 21:06:40 which it doesn't 21:06:42 because ,[.,] works 21:06:54 oerjan: it sets it to -1 actually 21:07:01 signed chars 21:07:06 oh well 21:07:13 maybe this is false somehow, dunno :P 21:08:13 !c ((char)(-1) == EOF) 21:08:39 !help languages 21:08:40 languages: Esoteric: 1l 2l adjust asm axo bch befunge befunge98 bf bf8 bf16 bf32 boolfuck cintercal clcintercal dimensifuck glass glypho haskell kipple lambda lazyk linguine malbolge pbrain perl qbf rail rhotor sadol sceql trigger udage01 underload unlambda whirl. Competitive: bfjoust fyb. Other: asm c cxx forth sh. 21:08:44 you need to print 21:08:47 oh 21:09:04 !c char c = EOF; if (c) { printf("true\n"); } else { printf("false\n"); } 21:09:06 true 21:09:12 then ... what? 21:09:24 !c printf ("%d", ((char)(-1) == EOF)) 21:09:25 1 21:09:49 so it is actually true 21:09:59 * Sgeo_ doesn't like the thought that most apps will come out for the iPhone before Android 21:10:04 oerjan: then wut. 21:10:14 Sgeo_: the iphone isn't an option if you have any morals. 21:10:17 or coding desire. 21:10:21 or lack of $99. 21:10:34 alise__: i guess you'll get a bug if you input an _actual_ -1 char, then 21:10:42 oerjan: er... there is no such thing :P 21:10:46 oh wait 21:10:46 hmm 21:10:59 255 21:11:05 getchar returns int 21:11:06 so 21:11:10 (mod 256) 21:11:20 !c int gcr = EOF; char c = gcr; printf("%d\n", c); 21:11:22 -1 21:11:37 oerjan: On the other hand, 255 isn't used in any UTF-8 combination, so if you only use UTF-8 input, you should be safe. 21:11:40 !c printf("%d", (char)255) 21:11:40 this is really confusing 21:11:42 -1 21:12:00 alise__: the printing converts from char to int, preserving sign, obviously 21:12:35 The "passing as argument to a vararg function" already converts it to int, doesn't it? 21:12:48 well yeah 21:13:03 !c int gcr = EOF; char c = gcr; if (c) printf("hmm\n"); else printf("WHAT THE FUCK IN THE WORLD\n"); 21:13:04 hmm 21:13:08 WHAT IS THIS 21:13:53 alise__: (char) EOF is not 0 21:13:58 I KNOW 21:14:01 So why is this happening 21:14:02 Why does it work 21:14:10 input: if ((tape[tp] = getchar()) == EOF) tape[tp] = 0; NEXT; 21:14:10 loop: if (!tape[tp]) ip = (op *)ip->val; NEXT; 21:14:11 end: if (tape[tp]) ip = (op *)ip->val; NEXT; 21:14:12 It undeniably shouldn't work 21:14:15 tape[tp] is never set to 0 21:14:24 Hmm, it IS unsigned char 21:14:30 !c int gcr = EOF; unsigned char c = gcr; if (c) printf("hmm\n"); else printf("WHAT THE FUCK IN THE WORLD\n"); 21:14:31 hmm 21:14:39 WHAT DO YOU WANT FROM ME, COMPUTER?! 21:15:04 alise__: er wait tape is _unsigned_? 21:15:13 i just had an explanation if it was signed :( 21:15:15 Well, it didn't use to be! 21:15:19 oerjan: what's the explanation? 21:15:27 TOGETHER SCIENCE WILL UNLOCK THIS MYSTERY, & ALL OTHER MYSTERIES AFTER IT 21:15:42 (== converts char back to int, preserving sign, so (char)(-1) is actually compared as (int)(-1) 21:15:46 ) 21:15:54 and 21:15:56 ? 21:16:03 gcc even tells me the comparison can't be true 21:16:06 to EOF, which is also (int)(-1) 21:16:09 oerjan: clever, though 21:16:13 maybe i should make it signed 21:16:17 wait 21:16:19 maybe ,[.,] doesn't work 21:16:22 i only tested it with bf1 21:16:25 then made it unsigned 21:16:48 !c printf("%d", (char)(-1) == (int)(-1)) 21:16:50 1 21:16:54 is char defined to be signed, or undefined either way? 21:16:56 !c printf("%d", (unsigned char)(-1) == (int)(-1)) 21:16:57 0 21:17:05 heh with char the warning disappears 21:17:12 * Sgeo_ is afraid that part of the reason he wants N1 is to show off and counter the iPhone stuff 21:17:22 Sgeo_: so what 21:17:25 *might be 21:17:33 Of course it disappears; if tape[tp] is signed, it can never be == -1, while if it's signed, it can. 21:17:49 yes 21:17:50 but I mean 21:17:52 i didn't even realise 21:17:55 that ,[.,] was broken :) 21:17:59 because of that 21:18:10 so is char defined to be signed? iirc i read that it was undefined 21:18:24 Implementation-defined, isn't it? Can't quite recall. 21:19:32 i vaguely recall it's implementation-defined 21:19:59 Maybe you should just do the input part right (something like "t = getchar(); tape[tp] = (t == EOF ? 0 : t);" with an int t); if you map the 257 possible return values (-1, 0, .., 255) of getchar() into a type that can hold 256 values, you'll undoubtedly have problems distinguishing two of them. 21:20:13 fizzie: But that is slower. 21:20:25 in the incredibly common case that t != EOF 21:20:34 Why would it be slower than writing a bogus value to tape[tp], then testing? 21:20:48 when == EOF, it's the same 21:20:49 but 21:20:51 input: if ((tape[tp] = getchar()) == EOF) tape[tp] = 0; NEXT; 21:20:55 with yours 21:21:00 we have to set t and then set tape[tp] 21:21:05 with ours, it's only one assignment 21:21:08 *mine 21:21:26 The compiler is not going to start sticking t into memory somewhere. 21:21:40 You can't really count the =s and say "this is slower, it has more of 'em". 21:22:03 Okay, fine. :P 21:22:18 Though you might want to put a { int t = getchar(); ... } block around to make sure t's scope is so short as possible to help it a bit. 21:22:31 What's wrong with just making the tape signed, though? 21:22:43 implementation-defined, it varies between compilers 21:22:47 You'll think that the character 255 is EOF in that case., 21:22:53 We're already squeezing 257 values into 256 21:22:56 because we're using 0 as \0 and EOF 21:23:04 fizzie: well, good bound 21:23:05 *point 21:25:38 this parser still confuses me to no end 21:31:06 wtf? i know there aren't unbalanced brackets in this program... 21:31:13 oh it is that problem again. 21:35:59 woot 21:36:10 recursive parser, though ugly, cut time from 15.152s to 14.552s 21:36:15 comex: I'll try your pointer now 21:36:30 What if I'm mostly getting the Nexus One because it looks sexier than the iPhone? :/ 21:37:21 This almost reminds me of Linux -- and I did end up switching back to Windows 21:37:34 your cpu sucks :p 21:38:29 comex: yes; and my compiler 21:38:34 it's only 4.3.3 21:38:44 comex: using pointer increases from 14.552 to 16.357 21:42:19 comex: can i send you bf[89].c so you can test yourself? 21:43:40 eh 21:43:45 anyone want to try it? 21:43:51 http://sprunge.us/JTZe bf8.c 21:43:53 http://sprunge.us/KZMR bf9.c 21:43:55 compile with: 21:44:03 gcc -O3 -march= -fwhole-program -fomit-frame-pointer 21:44:05 then strip -s the resulting binary 21:44:06 then 21:44:12 ./bf8 >/dev/null; time ./bf8 >/dev/null 21:44:12 -march=native 21:44:15 ./bf9 >/dev/null; time ./bf9 >/dev/null 21:44:17 Deewiant: also that 21:44:20 ...and report the timings to me 21:44:32 Deewiant need not apply as his computer runs everything in infinitesimal time 21:44:33 :-D 21:45:42 although, you know, he can if he wants. 21:45:52 4.3.3? 21:45:55 I thought you were using clang 21:45:59 also doing it with clang may be worthwhile 21:46:01 comex: no; I don't have clang 21:46:07 comex: do the timings plox :P 21:46:11 k 21:46:13 i can't believe it is faster for you 21:46:22 I can't believe it's not butter. 21:49:09 4.95 and 6.41 using gcc (GCC) 4.3.0 20080305 (alpha-testing) mingw-20080502 21:49:24 So bf9 is slower, yes? 21:49:29 Yes 21:49:38 with gcc, bf9 is slightly slower 21:49:41 Well, it's Windows, so I'm inclined to almost entirely ignore the data point, but it supports my rejection of comex's findings. 21:49:41 with clang, bf9 is slightly faster 21:49:46 Right. 21:49:53 neither of them give me as much of a result; .05 sec both ways 21:49:59 however, clang is *much* faster than gcc 21:50:01 For me, 14.552s vs 16.357s is not "slightly". 21:50:07 So I will stick to array access. 21:50:14 11ish seconds vs 7 seconds 21:50:16 comex: Yes, well, I'm on an old version of Ubuntu. 21:50:20 I'm on OSX 21:50:20 I really don't want to compile LLVM & clang. 21:50:24 Too lazy. 21:50:25 So. 21:50:27 ther'es no package for it? 21:50:43 Not in 9.04... 21:50:51 It wasn't even released then. 21:51:18 eh, okay 21:51:22 clang is pretty cool in general though :p 21:51:28 What's this mandelbrot.h file? (Haven't been following.) 21:51:46 fizzie: http://pastie.org/924867.txt?key=y1tsv0fos2dcg2ku9rkqw 21:52:04 Gah, and I just started to paste it, too. 21:53:36 If I have T a[], and and v = (long)(a[0] + 1), then a[v] should = a[1], right? 21:53:41 It's that silly 1-not-meaning-1 thing, isn't it? 21:53:47 I mean, that is the definition of array dereferencing. 21:53:51 So, I wonder, why it isn't working... 21:54:01 a[0] + 1 is not *(&a[0] + 1) 21:54:11 Oh, I see what I did wrong 21:54:19 Deewiant: It's not actually a[0] in the code 21:54:25 Complicated :P 21:54:27 But I figured it out 21:54:33 Regardless, adding one to a[0] does not, in general, give a[1] 21:54:35 -!- Oranjer has joined. 21:54:50 Well, "in general" here it's worked perfectly 21:55:34 Adding one to a[0]'s address might work; I'm having hard time believing adding one to a[0]'s value will yield a[1] unless you've set up a very specifically. 21:55:41 I think you're confused or your code does not represent your actual code 21:55:43 Yes, yes, yes, shush :P 21:55:46 It doesn't 21:55:48 I was just being stupid 21:55:58 It was actually &a[0] because it was a pointer to a variable which happens to be in the array 21:55:59 So nyah 21:56:48 clang on bf8.c: http://pastebin.com/krFjTXma -- it seems I really should get a newer clang. 21:56:59 http://pastie.org/924983.txt?key=nksyxpkqzwqs6fwwvmmppg 21:57:04 What a fucking ridiculous speedup 21:57:09 Why on earth does that make more than a tiny amount of difference 21:57:13 I hate you, GCC 21:57:54 Seriously, it's over .5s faster just because it avoids some ip++s 21:58:03 And it even pays some +1s for that at the start 21:58:24 comex: I bet if you apply that diff and do it with clang the difference is nil... 21:58:28 As for gcc, 10.4s for bf8, 11.35s for bf9. 21:58:57 The http://pastie.org/924983.txt?key=nksyxpkqzwqs6fwwvmmppg bf9 or the pointer-not-array bf9? 21:59:08 The one you pasted when asking for timings. 21:59:10 If the latter, just delete it; the former is the proper bf9 because the latter didn't work out so well. 21:59:23 There's a nice olde-style diff, if you like that kind of thing, in the pastie, from bf8 :P 21:59:27 http://sprunge.us/JTZe one 21:59:41 JTZe is bf8, not bf9 21:59:52 Oh, right. Well, the one next to it. 21:59:55 KZMR. 22:00:10 Gnblblblb qweeb zkxvfs speaking in tongues. 22:00:32 I'm surprised I've been able to get such good performance out of very little code. 22:01:51 Anyway, http://sprunge.us/JTZe + diff in http://pastie.org/924983.txt?key=nksyxpkqzwqs6fwwvmmppg = bf9 that I'm curious as to the performance of. 22:01:57 Mostly with clang, comex, ahem. 22:06:20 yeah, I'm impressed at the simplicity 22:07:06 Well, op prog[5242880] :-P 22:07:12 -!- ze_german has joined. 22:07:58 Deewiant: Well, that's just part of the whole file-loading malarkey, which is really not the most important or difficult part of brainfuck implementation. 22:08:16 True enough 22:08:32 Deewiant: I'd complain more about the fixed tape size. 22:08:46 alise__: that patch increases performance with clang by 1s 22:08:48 I don't think the code to handle segfault-means-realloc should be too terribly difficult. 22:08:54 comex: lol 22:08:55 alise__: But isn't that defined in BF 22:09:01 comex: isn't it hilarious 22:09:01 30000 or whatever. 22:09:13 7s -> 6s ish 22:09:19 Deewiant: No, not defined, just in one of the original implementations. The original compiler had significantly fewer cells, iirc. 22:09:23 comex: it's like... barely anything 22:09:30 but it has such an effect 22:09:38 Why is s a char** 22:10:01 because i recurse to do loops 22:10:04 and it advances through the string 22:10:17 please, rewrite it without the extra star, I'd love that; I hate pointers-to-pointers 22:10:19 Ah 22:10:24 maybe it affects some random register allocation 22:10:27 I'm not dropping the recursion, though; it came out quite a bit faster this way. 22:10:40 comex: it's better, though, not just some random hack, because it /is/ objectively doing less things 22:10:46 yes 22:10:51 $ time ../bf_compet/bff4 /dev/null 22:10:52 real0m18.026s 22:10:52 user0m17.865s 22:10:52 sys0m0.040s 22:10:54 HAHAHAHAHAHAA YOU LOSE 22:11:06 :] 22:11:30 Mind, I won't beat it in the general case until I do linear loop optimisation. 22:12:55 * alise__ tries the self-interp!self-interp!hi123 combo 22:13:28 comex: I wish I could get rid of the setup part of interp 22:13:32 it's such an ugly way to do it 22:17:32 I'm worried I may be overfitting for mandelbrot. 22:17:47 Well, maybe I just need linear loops. 22:17:54 I don't think I have any mandelbrot-ishly-specific optimisations. 22:21:40 oh lol 22:21:41 it was just waiting for input 22:26:12 yeah i actually beat bff4lnr 22:32:11 brb 22:36:04 Why are there more games for iPhone :( 22:59:30 iphone is more popular 23:00:07 an iphone is like windows, android is like linux, except android isn't as fiddly as linux :P 23:02:37 Anyone have any idea how to write an unordered pair {,} A type such that you can write {,} (bool,A) => (A,A) but not {,} A => (A,A) 23:02:42 i.e. it preserves unorderedness 23:04:09 please rephrase that mess 23:06:02 if the first one is an unordered pair of elements of type (bool,A), then i don't see how you can get an (A,A) from it unless the bools are different 23:06:46 er, good point 23:06:49 how was it a mess? :( 23:06:58 {,} A is an unordered pair of two As 23:07:11 well it confused me 23:07:24 _clearly_ it must then be a mess 23:07:46 hang on... what are you tryuing t do? 23:08:09 oerjan: I cannot rephrase that bool example to get it working properly... 23:08:09 (T : {,} (bool,A)) /\ (exists x y, fst x =/= fst y /\ x in T /\ y in T) 23:08:12 the problem with that is - constructively - 23:08:16 exists x y hands us the two values on a platter 23:08:19 which is not really the point at all 23:08:21 but, it works 23:08:32 so I guess I just want {,} A such that we cannot write {,} A => (A,A) and similar 23:10:10 http://lifthrasiir.jottit.com/esotope-bfc_comparison ;; I want to do "Simple loop detection"; I don't think I want to do "Pointer propagation" -- too expensive on the whole 23:10:11 * oerjan knows nothing about that 23:10:42 alise__: i'm not sure i understand 23:10:51 oh they're unrelated 23:11:01 pineapple: hmm do you know anything about type theory? or at least haskell 23:11:07 if not it's hard to explain... 23:11:12 assume i don't 23:11:20 "unordered pair"? 23:11:33 um... your regular tuple of two values, except unordered 23:11:42 think of a two-element set -- you are familiar with basic set theory, right? 23:12:00 it's been a hwile, but yeah 23:12:16 anyway, let's think about it as two-element sets 23:12:17 we have 23:12:22 intro(x,y) := {x,y} 23:12:32 so we have a function that takes two values and returns an unordered pair of those two values 23:12:42 but we don't have (function taking a function here) 23:12:48 which side of that is the unordered pair? 23:12:53 the right hand side 23:12:54 ok 23:13:03 we do intro(3,2) and get {2,3}, we do intro(2,3) and get {2,3} 23:13:07 obviously this function is valid. 23:13:11 but we do not have 23:13:11 yeah, ok 23:13:15 exit(F,{x,y}) := F(x,y) 23:13:20 because we cannot pick which value is x, and which value is y 23:13:28 it matters, because F can distinguish its two arguments 23:13:51 creating the unorderd pair is a one way "move", because it can't be reversed 23:13:56 right 23:14:23 I'm trying to come up with an analogous type in type theory -- basically a functional language's type system but more abstracted 23:14:48 perhaps 23:14:49 {,} A := A x A => Bool 23:15:02 {,} A ??? 23:16:04 -!- MigoMipo has quit (Quit: When two people dream the same dream, it ceases to be an illusion. KVIrc 3.4.2 Shiny http://www.kvirc.net). 23:16:16 i don't understand the "new" notation 23:19:16 -!- alise__ has quit (Ping timeout: 258 seconds). 23:20:03 -!- alise has joined. 23:20:10 Sorry; what did I last say? 23:20:31 ugh; ages ago 23:20:38 pineapple: I am just using {,}A to denote the type of an unordered pair of As 23:20:46 -!- tombom_ has quit (Quit: Leaving). 23:20:49 i.e., intro(X,Y) has-type {,}A where X and Y have-type A 23:20:51 {,} A := A x A => Bool 23:21:04 -!- dbc has quit (Quit: Seeeeeya). 23:21:28 pineapple: http://pastie.org/925078.txt?key=s1xvjdrz0hakx4spiqbiq 23:21:35 -!- dbc has joined. 23:21:46 A x A is an ordered tuple of As 23:22:26 tbh it helps to grasp how type theory, computation and logic intertwine to understand all of this... 23:22:32 and that requires a good knowledge of type theory 23:23:31 * alise starts work on bf10.c 23:23:35 you do know that i struggle with pointers, right? 23:23:58 pineapple: actually this is far more theoretical and mathematical than pointers. so that is not /necessarily/ an impairment 23:24:38 * Sgeo_ struggles with how magical & types seem 23:24:44 my point is that i haven't worked out how to get my head around them 23:24:48 * alise pulls an AnMaster, and reads bff4's source to find out how to do linear loops nicely 23:24:49 Well, not really badly struggle, but it's strange 23:24:52 Sgeo_: & types? 23:25:02 int& some_ref_type; 23:25:05 pineapple: have you watched Pointer Fun with Binky 23:25:10 no? 23:25:14 I like pointers. They're sensible. 23:25:16 http://www.youtube.com/watch?v=i49_SNt4yfk 23:25:19 pineapple: become enlightened 23:25:22 And non-magical 23:25:38 (it's actually a really good explanation!) 23:25:38 i'm about to (at some point) read chapter 5 of K&R though 23:25:49 i get the theory 23:25:52 pointer fun with binky. you will be enlightened forevermore 23:26:08 but... finding the syntax for what i want to do feels like pot luck 23:26:34 basically... here's a good intuition to develop: 23:26:47 if only I (this scope; mostly, this function) will want to change this, use a value 23:27:12 if I want someone else to change the individual items in this compound value (structure, array, pointer, etc), but not the compound value as a whole, use one * 23:27:20 ugh... C++? 23:27:26 if Iw ant someone else to be able to change the individual items /and/ the whole value in this compound, use two **s 23:27:28 *if I want 23:27:37 I don't want ***. 23:27:42 pineapple: there is your intuition ^ 23:28:04 does *** ever have a use? 23:28:19 and... how much of this vid is relevant to C? 23:29:58 pineapple: the whole vid is C 23:30:00 none of it is C++ 23:30:09 Anything that doesn't involve, say, int&, is probably relevant. (something& is revevant thoug) 23:30:19 erm, &something 23:30:22 pineapple: *** probably has /some/ use, but if you think it does, unless you're really experienced with pointers -- and so already /know/ what uses it has -- you're wrong; and you don't need it. 23:30:27 *** is almost always really bad practice. 23:30:36 It should be exceedingly rare; I wouldn't worry about it. If you end up doing ***, rethink. 23:30:45 alise, our professor, without explanation, had a function take an argument *& 23:30:51 Took me a bit to work it out 23:30:52 Ignore Sgeo_; I've seen the vid and it's not C++ at all :P 23:30:55 Sgeo_: lol 23:31:00 I don't think anyone else worked it out 23:31:05 Sgeo_: as we all know that is the same as taking a value argument! 23:31:07 ...right? 23:31:10 :-) 23:32:17 The linear loop code in http://mazonka.com/brainf/bff4.c is not very helpful at all... 23:33:51 I think if( o[i].c == '[' && o[i].igo == i+1 && o[i].shift==0 && o[i].off <= 0 )is the magic bit... 23:33:53 Or maybe consume. 23:34:46 alise: the new keyword is C ? 23:34:59 ?! 23:35:02 Screenshot? 23:35:05 oh 23:35:07 this is a C++ version 23:35:12 ... 23:35:12 forget every single thing you heard 23:35:16 LOL 23:35:18 and watch this http://www.youtube.com/watch?v=r4-9Mh3761E&feature=related 23:35:18 XD 23:35:20 sorry :D 23:35:20 thanks honey 23:35:29 WIPE YOUR MIND 23:35:30 LA LA LA LA 23:35:47 alise, unless it goes over reference types and not pointers, why bother wiping your mind? 23:35:56 because it's probably stupid 23:35:58 Although new instead of malloc could be hurtful 23:36:57 * pineapple throws a cucumber at alise 23:37:10 YOUR MOM 23:37:17 ? 23:37:59 I am merely deflecting your blows 23:41:16 i found the C version 23:41:51 -!- alise_ has joined. 23:41:58 hey comex 23:42:41 -!- Rugxulo has joined. 23:43:04 Rugxulo: wow i almost forgot about you 23:43:19 that's no surprise, I'm nobody ;-) 23:43:47 -!- alise has quit (Ping timeout: 258 seconds). 23:43:58 BTW, if anybody cares, I updated the tiny BEFI.COM, fixed a bug (negmod.bef), now only 1014 bytes 23:44:38 You'll be glad to know I'm doing my bit to combat bloated and slow software by writing a very small, very fast brainfuck interpreter! 23:44:47 what language? 23:44:53 C 23:44:59 using GCC? ;-) 23:45:09 I do use computed gotos, but that makes things faster. It works with clang too. 23:45:26 Apart from the computed gotos -- vital to its speed -- it's standard C. 23:45:26 yeah, Clang is getting lots of press these days, self-hosting, ClangBSD in testing, etc. 23:45:38 It's much faster with clang because gcc does really stupid things to it. 23:45:43 it's just that GCC isn't exactly super optimal in output size 23:45:51 (not that any compiler is) 23:45:56 It's bloated up marvellously for its first day of development -- bf1.c compiled to 19K when stripped; bf9, 27K. 23:46:19 alise_: goto is not evil 23:46:21 BTW, here's a modified benchmark for someone to test: 23:46:23 >91+:*-:0`#@ #._v 23:46:23 ^ < 23:46:34 Mind, bf1 is 81 lines and bf9 is 97 lines, so the actual code isn't bloating much; plus, the former takes ~40s to run mandelbrot.b, the latter something like 13s 23:46:43 pineapple: Did I ever say it was? 23:46:43 Rugxulo: -Os ? 23:46:50 N.B. for some reason, it's much slower on my P4 and AMD64 (but much faster on P1), probably self-modifying code 23:47:01 Rugxulo: -Os doesn't really help size at all here 23:47:05 alise_: no... but that seems to be the "default" answer 23:47:06 -O3 and stripping produce an executable just as small 23:47:06 -Os isn't bad anymore, but it's not perfect either 23:47:13 I dunno about clang's output size, but it is much faster 23:47:17 pineapple: lol :P 23:47:20 clang? 23:47:25 pineapple: computed gotos are non-standard 23:47:26 is the point 23:47:27 gotos aren't 23:47:35 clang is a C compiler that's better than gcc. 23:47:36 computed goto ? 23:47:49 computed goto lets you make pointers to goto labels then do 23:47:50 goto *ptr; 23:47:51 Clang is considered "more modern" (whatever that means) 23:48:04 but GCC supports more targets and languages 23:48:13 Clang is the apple-funded -- but totally open source and independent -- ultra-optimising, helpful-error-spewing, actually-well-designed-unlike-GCC C compiler. 23:48:15 (but is slow, admittedly) 23:48:15 Rugxulo: fallacy 23:48:28 Clang supports C/C++/Objective-C (admittedly, C++ not so well); and LLVM has many non-Clang compilers 23:48:44 C++ has supposedly improved a lot, it can self-host now (itself being written in C++) 23:48:44 GCC is like a badly-implemented and badly-specified half of LLVM plus something worse than Clang 23:48:58 GCC 4.5.0 was just released, now with plugin support 23:48:59 all apps in mac os x 10.6 are compiled with clang... 23:49:04 e.g. DragonEgg 23:49:11 whoop de doo 23:49:28 anyway i'm trying to beat the current bf world champion of speed... mazonka's bff4lnr 23:49:42 i think i do already, but I'm implementing the same linear loop optimisation just to clinch it 23:49:48 I also recompiled the standard bef 2.2.1 bef.c with GCC 4.4.2 -march=pentium, but it was like twice as slow as -mtune=pentium4 (even on a P1) 23:49:52 as a bonus my code is a lot shorter 23:49:54 bah, optimization is so tricky :-( 23:50:11 admittedly I need to add some code to open source files and stuff 23:50:13 but that's easy 23:50:16 and i need a tape-expander 23:50:21 (hook into segfault, make that grow the tape) 23:50:29 (either that or mmap a huge amount and rely on overcommitting) 23:50:33 (right now my tape is fixed-size) 23:50:47 so is your hard drive! ;-) 23:51:13 dumb question, but how are you testing the speed? 23:51:28 my hard drive isn't 65536 bytes long though. 23:51:43 no, but it's a fixed size, so basically I meant "don't sweat it too much" ;-) 23:51:55 my impl can never be truly tc because c pointers cannot be infinite 23:52:03 Rugxulo: yes but you need an arbitrary growing type lest you allocate 2gb every time someone runs it 23:52:09 and besides the universe is fixed-size too, but that doesn't...matter 23:52:15 testing speed, I have it hardcoded to parse & run mandelbrot.b 23:52:20 which renders a pretty ASCII art mandelbrot; slowly. 23:52:21 the universe is expanding (or so they say) 23:52:29 it's still finit. 23:52:31 *finite 23:52:44 dunno how they claim to know that anyways ;-) 23:53:04 it's called physics and you can't dismiss it with a wink 23:53:14 BTW, there's "mandel.bf" (Befunge) also ;-) 23:53:19 Gads, I hate computers. I have been getting suspicious filesystem corruptions on the system SSD, so since the manufacturer has a newer firmware (1.5 vs. 1.42) I download the updater ISO and boot. 23:53:20 turns out we can measure shit and make models that predict the things that happen 23:53:21 sure I can *wink* 23:53:23 "[ERROR]Firmware download fail! Bye!" says the updater, reboots, and now BIOS or anything else no longer sees the disk. 23:53:32 and they get incredibly detailed such that it is very likely that certain measurements imply certain things 23:53:48 Rugxulo: just out of curiosity do you live in the US? and if so what state? 23:53:49 fizzie, still in warranty? 23:53:58 yes, I do 23:54:11 why? :-) 23:54:26 I asked two questions 23:54:28 -!- Tritonio_GR has joined. 23:54:30 Rugxulo: Less than a month old, would assume so. Won't help much before Monday, I guess. 23:54:45 yes, but before I give out my precious SSN, I'd like to know why you are asking :-P 23:54:59 hhaha 23:55:06 state you live in != SSN 23:55:09 fizzie, scroll back and see my modified benchmark, try testing it (if you can drag yourself away from your SSD woes) 23:55:18 "I live in $state" is about as information-giving as "I live in Wales" 23:55:23 or did you not realise that states are fucking huge? 23:55:34 not all of 'em, some (e.g. R.I.) are small 23:55:50 Quahog ftw! ;-) 23:55:57 Oh, just tell me. 23:55:59 what's a recent version of clang? pacman is saying 2.6-6 23:56:13 alise, why oh why? 23:56:43 Rugxulo: I just have a certain hunch. I'll tell you the hunch if you answer my question. 23:56:49 pineapple: lemme look up the recentest 23:56:57 huh, mandel.bf is slow also (surprisingly) 23:57:00 Build Date : Tue 05 Jan 2010 22:52:09 GMT 23:57:01 -!- Rugxulo has left (?). 23:57:02 2.6 should be fine 23:57:16 ok... what was the hunch? 23:57:18 the svn version is more up to date but that involves a bunch of boring compilation, so just go for it 23:57:18 -!- kar8nga has quit (Read error: Connection reset by peer). 23:57:48 he hasn't answered my question yet :-) 23:57:58 (2.7 svn from March is not fine, it has problems with the labels-as-values thing.) 23:58:07 -!- Rugxulo has joined. 23:58:30 Rugxulo: My main workstation is the one that had the SSD as a system disk, so I don't have much to test it with right now. I'll check once I've finished dd'ing a backup on a spare HD so that I get a usable computer back. 23:58:37 sorry, optical mouse is quite squirrelly sometimes, it jumped to corner and closed my Opera :-( 23:58:42 Rugxulo: going to answer? :-) 23:58:44 oops 23:58:59 fizzie, no pressure, didn't want to bug you, just found it weird that it's twice as slow on "modern" cpus :-P 23:59:19 alise, just guess, you have a 2% chance of being right ;-) 23:59:49 Rugxulo: north or south?