00:00:07 <AnMaster> not just for the sorting algorithm
00:00:25 <GregorR> They do. It's 2^{word size} :P
00:01:17 <AnMaster> GregorR, seriously, pre-OSX had a good thing then, you could know for sure it would keep within limits
00:01:37 <AnMaster> each app would have a minimum and maximum size set in the info box for the program file
00:01:48 <AnMaster> the OS would give it something between those when the app was started
00:02:05 <AnMaster> to change you would have to quit the app, open the info box and change the values, start the app again
00:02:25 <oklopol> that indeed does sound pretty stupid!
00:03:02 <AnMaster> oklopol, talking about Mac OS 6-9 (and probably older ones, but never used them. and yes it is technically System 6, System 7, Mac OS 8, Mac OS 9...)
00:03:21 <AnMaster> oklopol, it meant you never ran into swap trash
00:03:31 <AnMaster> of course you had to reboot to change virtual memory size
00:03:42 <AnMaster> doesn't windows also force it?
00:03:56 <AnMaster> while linux can change any time you want
00:04:13 <AnMaster> actually not sure about page file size in Windows
00:04:42 <oklopol> i also don't know whether you need to reboot to change the size of virtual memory
00:04:49 <AnMaster> well pretty sure you need(ed) to restart in windows to change the size
00:05:12 <AnMaster> and Mac OS virtual memory == Windows pagefile, == *nix swap
00:05:40 <oklopol> if they chose it badly, i'll just buy a new computer.
00:06:43 <oklopol> if i need to look beneath the abstraction, the abstraction is bad.
00:07:35 <oklopol> i try to keep the abstractions i make and the abstractions i use separate
00:09:39 * AnMaster wonders if he should optionally support using hugepagetlb thing for allocation in cfunge
00:10:05 <oklopol> translation lookaside buffer?
00:10:10 <AnMaster> if tlb cache currently has issues with overflowing it could help speed a bit
00:10:18 <AnMaster> oklopol, yeah it allows you to get larger pages
00:10:28 <AnMaster> than the standard 4096 byte ones
00:10:42 <oklopol> no that's not what a tlb is
00:11:13 <AnMaster> /usr/src/linux/Documentation/vm/hugetlbpage.txt
00:11:47 <AnMaster> too many pages and the cache can't fit all pages used by app
00:12:13 <AnMaster> thus you could save some tiny amount of time by using fewer, but larger, pages
00:12:30 <AnMaster> oklopol, I will use oprofile tomorrow to check tlb misses
00:12:40 <AnMaster> to see if it is worthwhile at all
00:13:17 <AnMaster> ehird. Look above. Insane micro optimising ^
00:13:54 <oklopol> anyway i don't really care for that kinda optimization
00:14:14 <AnMaster> oklopol, well really what would be useful I guess is changing stack direction
00:14:26 <AnMaster> copying strings to it means reversing
00:14:39 <AnMaster> that is what the current bottleneck is
00:14:56 <AnMaster> however making it grow down introduces other issues
00:15:08 <AnMaster> like growing it not being a simple realloc()
00:15:08 <oklopol> but not because it's micro-optimization, caching just doesn't fit my mental calculation model. maybe because the usual computation models don't have anything ilke it.
00:15:35 <oklopol> s/calculation/computation/
00:16:05 <AnMaster> oklopol, that is the difference between "theoretical model" and "model useful in real life"
00:16:43 <AnMaster> oklopol, still I'd say making string copying not have to swap string direction...
00:16:46 <oklopol> meh, no asymptotical difference
00:17:10 <AnMaster> because you can copy in word size
00:17:38 <oklopol> *yawn*, let the compiler worry about that
00:17:39 <AnMaster> to get 128-bit copying on x86/amd64
00:17:51 <AnMaster> oklopol, I will, but it can't do it atm
00:17:59 <oklopol> now that's something i do like.
00:18:03 <AnMaster> and strings need to be *REVERSED*
00:18:28 <oklopol> *WHY* do they need to be reversed?
00:18:47 <AnMaster> oklopol, because they are 0"gnirts" in cfunge and my stack implementation grows upwards
00:18:56 <AnMaster> which is what I want to change
00:19:11 <AnMaster> so I can just memcpy() or such
00:20:46 <AnMaster> 2008-03-21/FreeNode-#esoteric.log.bz2:okt 31 23:20:13 <EhirD`> ah yes -- quoting alice in wonderland. The post-ironic hippy way to be cool on the internet.
00:20:51 <oerjan> AnMaster: What is the big question about the meaning of life, the universe and everything?
00:21:13 <oerjan> well it was worth a shot
00:21:54 <AnMaster> nov 06 02:39:21 <oerjan> "We're all mad here. I am mad. You're mad." "How do you know that I am mad?" asked Alice. "You must be," said the Cat, "or you wouldn't have come here."
00:22:00 <oerjan> oklopol: maybe there aren't any nearby. you were a lizard, right?
00:22:15 <AnMaster> okt 31 23:19:45 <oerjan> "We're all mad here. I am mad. You're mad." "How do you know that I am mad?" asked Alice. "You must be," said the Cat, "or you wouldn't have come here."
00:22:27 <AnMaster> oerjan, you were obsessed with that line?
00:22:34 <AnMaster> okt 31 23:20:13 <EhirD`> ah yes -- quoting alice in wonderland. The post-ironic hippy way to be cool on the internet.
00:22:39 <oklopol> oerjan: i mean i don't have the whole sense. of smelling people.
00:22:54 <oerjan> AnMaster: it fits #esoteric so well
00:23:02 <AnMaster> quoting Terry Pratchett -> <EhirD`> no, that's the post-hippy ironic way
00:23:17 <AnMaster> post-hippy post-ironic way -> <EhirD`> killing yourself
00:24:23 <AnMaster> I have stuff to do tomorrow morning. For values of morning in the range like 11:00
00:24:44 <oerjan> oklopol: your haiku misses the metric a bit
00:26:42 <AnMaster> oerjan, what is the name for stuff like hexameter and pentameter and such
00:28:07 <AnMaster> btw: Iambic pentameter > haiku
00:28:41 <oerjan> http://en.wikipedia.org/wiki/Meter_(poetry)
01:57:50 <GregorR> Blank verse is better than rhyming,
01:57:55 <GregorR> For there's no need to worry of timing,
01:58:17 <GregorR> Is that it's just an excuse for lazy people to write prose and call it poetry.
02:04:28 -!- MizardX has quit (Read error: 104 (Connection reset by peer)).
02:06:27 -!- oklopol has quit ("( www.nnscript.com :: NoNameScript 4.2 :: www.regroup-esports.com )").
02:21:15 <oerjan> Or sometimes // Double slashes // Just for conciseness.
03:05:06 -!- psygnisfive has joined.
05:19:07 -!- oerjan has quit ("leaving").
05:30:46 -!- MizardX has joined.
07:51:48 -!- oklopol has joined.
07:59:59 -!- clog has quit (ended).
08:00:00 -!- clog has joined.
08:10:13 -!- oklopol has quit (Read error: 54 (Connection reset by peer)).
08:10:29 -!- oklopol has joined.
08:36:08 -!- GreaseMonkey has quit ("Client Excited").
09:12:17 -!- MigoMipo has joined.
09:27:46 -!- ais523 has joined.
10:10:00 -!- jix has joined.
10:32:17 <ais523> http://news.bbc.co.uk/1/hi/uk_politics/7908498.stm haha
10:41:21 <AnMaster> ais523, quite interesting speed test: dd if=/dev/zero of=/dev/null& pid=$! ; sleep 30; kill -USR1 $pid; sleep 1; kill $pid
10:41:37 <AnMaster> on FreeBSD replace USR1 with INFO
10:41:52 <ais523> why are you sending sigusr1 to dd?
10:42:00 <AnMaster> ais523, because it dumps stats
10:42:15 <AnMaster> 20219142656 bytes (20 GB) copied, 30.0494 s, 673 MB/s too
10:42:21 <ais523> also, you don't want that to run too much, your /dev will end up running out of zeros
10:45:47 <pikhq> ais523: Also, your bit bucket will fill up.
10:46:04 <ais523> pikhq: most of the parts of this laptop are starting to break, anyway
10:46:08 <ais523> I think the bit bucket is leaky
10:46:20 <ais523> and the more zeros in there, the more pressure on the leaks and the faster they get out
10:47:38 <AnMaster> 2.6.23 and later recycles from /dev/null
10:47:58 <AnMaster> all zeros are sent for using in /dev/zero
10:48:01 -!- ais523 has quit.
10:48:11 -!- ais523 has joined.
10:48:20 <AnMaster> ais523, did you miss what I said?
10:48:32 <AnMaster> <ais523> and the more zeros in there, the more pressure on the leaks and the faster they get out
10:48:32 <AnMaster> <AnMaster> no you are both wrong
10:48:32 <AnMaster> <AnMaster> 2.6.23 and later recycles from /dev/null
10:48:32 <AnMaster> <AnMaster> all zeros are sent for using in /dev/zero
10:48:51 <ais523> I was wondering when someone would think of recycling
10:49:19 <AnMaster> ais523, other bits are used for other stuff, usually /dev/random and /dev/urandom
10:49:42 <ais523> wouldn't that leave /dev/random spewing out more ones than zeros?
10:50:05 <AnMaster> ais523, random gets 0 from the zero buffer when it needs it
10:50:31 * AnMaster wonders what /dev/cpu_dma_latency is
10:50:45 <ais523> that's the sort of thing I'd expect in /proc not /dev
10:50:56 <AnMaster> /dev/network_latency exists too
10:51:04 <AnMaster> cat: /dev/network_latency: Invalid argument
10:51:58 <pikhq> ais523: Obviously, it can toggle 0s to 1s.
10:52:26 <AnMaster> pikhq, and the other way, it does that only if it runs out of the buffers
10:52:38 <AnMaster> to avoid the overhead when possible
11:07:37 -!- BeholdMyGlory has joined.
11:11:45 -!- ais523 has quit ("lunch").
11:30:41 <fizzie> So can you do echo "really really much" > /dev/network_throughput when you want a faster connection?
11:39:26 <fizzie> And /dev/network_{latency,throughput} seems to be intended for processes who want to register/monitor QoS requirements.
11:41:48 <fizzie> That's a funny interface; you open /dev/network_throughput and write in what you want to get, then keep a file handle open as long as you want it to be active. I would have expected some ugly ioctl nastiness.
11:49:42 -!- KingOfKarlsruhe has joined.
11:56:32 <AnMaster> strange, seems like time(NULL) takes a lot of the system time. Ah I guess the HRTI test calling y so often causes that...
12:04:47 -!- oerjan has joined.
12:05:06 <AnMaster> oh right... that is callgrind's time()..
12:10:27 <AnMaster> for (ssize_t i = len; i >= 0; i--)
12:10:27 <AnMaster> stack->entries[top - (size_t)i] = str[i];
12:10:38 <AnMaster> gcc generates very suboptimal code for that, even at -O3
12:10:54 <AnMaster> fizzie, in jitfunge, which way does the stack grow?
12:11:35 <AnMaster> hrrm I just got an idea for fast asm on x86_64 for that stack push...
12:12:21 <AnMaster> oh yes... abusing BSWAP I'm sure should be possible...
12:12:23 <fizzie> Up, I think. To higher addresses. I'm not completely sure how I did the stack-stackery, I think I just keep the topmost stack in the specially handled memory area, and copy things on stack-stack operations.
12:13:28 <AnMaster> fizzie, well up is bad for string pushing on stack
12:13:39 <AnMaster> basically that is the main bottle neck in cfunge atm
12:13:56 <AnMaster> since pushing strings mean reversing every byte to push a 0"gnirts"
12:14:09 <AnMaster> mostly related to all those y in the HRTI test that mycology does
12:14:34 <fizzie> Yes, well, my STRN implementation might not be very optimal anyway.
12:15:44 <AnMaster> fizzie, well STRN isn't a bottle neck in mycology, and my STRN is "not too bad", and actually since it is defined to use strings it isn't well defined how values outside the range of char works in STRN
12:16:15 <AnMaster> in cfunge it depends on which instruction, since some uses unsigned char*, and other ones just copies directly to/from funge space
12:16:47 <AnMaster> should probably implement some sort of fungeCell* pushing thing... would be faster
12:17:17 <AnMaster> (less checks for available stack space, since unlike you I don't mess with catching SEGV and poking registers to avoid checking for stack size)
12:19:09 <fizzie> There's no special reason why I couldn't have a downward-growing stack, except that theoretically it might be a bit more likely to find free pages after the stack than before it. But that's just a guess. And anyway I do that half-assed attempt to stick the stack out there in the wilderness if possible.
12:19:34 <AnMaster> yeah.. down growing stacks means grow isn't a simple realloc() any more
12:21:18 <fizzie> Actually, heh, I don't think current jitfunge even grows the stack at all. Haven't touched that code in a while, but all I'm seeing here are the underflow checks.
12:23:49 -!- ais523 has joined.
12:45:20 -!- MigoMipo has quit ("QuitIRCServerException: MigoMipo disconnected from IRC Server").
13:05:02 -!- KingOfKarlsruhe has quit (Remote closed the connection).
13:14:15 <AnMaster> ais523, is there any way to tell gcc that how a specific memory block is a aligned, I mean I have a pointer to an array of ints and want to tell gcc it is properly aligned for SSE access, since gcc decides to not try to vectorize the loop due to: "note: Unknown alignment for access: *array_25"
13:14:21 <AnMaster> but I know it is properly aligned
13:14:27 -!- jix has quit (Read error: 113 (No route to host)).
13:14:42 <ais523> there's an __attribute__ for it, I'm pretty sure
13:15:47 <AnMaster> ais523, that is for aligning variables yes, but there doesn't seem to be one to tell it how a malloc()ed block is aligned (and gcc can't possible trace this back to the malloc since the pointer has been stored in a struct for quite a while before and passed around)
13:16:21 <ais523> couldn't you put the attribute in the right place in a pointer definition to constrain what it's pointing to, rather than what it is?
13:16:42 <AnMaster> tried that. it seemed to align the pointer itself
13:23:19 <fizzie> There's that "aligned (x)" attribute for types; the example has "typedef int more_aligned_int __attribute__ ((aligned (8)));". Maybe you could (ab)use a similar typedef -- like do "typedef unsigned char sse_aligned_char __attribute__ ((aligned (42)));" and then keep a sse_aligned_char* type pointer.
13:23:31 <fizzie> (There's 42 because I don't really know how many bytes you want there.)
13:23:47 <ais523> I don't think aligning to 42-byte boundaries would be particularly useful...
13:25:12 <AnMaster> I need to align 128-bits probably
13:26:07 -!- impomatic has joined.
13:27:15 <fizzie> char *__attribute__((aligned(8))) *f;
13:27:22 <fizzie> specifies the type "pointer to 8-byte-aligned pointer to `char'".
13:27:26 <oerjan> ais523: but but - clearly that must be the answer
13:27:33 <AnMaster> actually that doesn't help. What I need is to tell it *base* is aligned
13:27:48 <AnMaster> error: alignment of array elements is greater than element size
13:28:17 <fizzie> Yes, well, you can try something like "char __attribute__((aligned(16))) *foo" too.
13:29:19 <fizzie> Oh, maybe I should've read the rest of that paragraph.
13:29:44 <fizzie> "Note again that this does not work with most attributes; for example, the usage of `aligned' and `noreturn' attributes given above is not yet supported." immediately after that char *__.. example.
13:33:51 <AnMaster> fizzie, aligned would cause it to insert padding between each member in array
13:34:11 <fizzie> As far as the "attribute in typedef" is considered, certainly with a "typedef unsigned char auchar __attribute__ ((aligned (16)));" I can't do "auchar foo[10];" without that error, but a "char foo[10]; auchar* bar = (auchar*)foo;" works just fine.
13:34:15 <AnMaster> not tell it that the first member is aligned on even 16 bytes
13:34:58 <fizzie> Not that I have any clue whether gcc would understand that access via that "bar" pointer there would be 16-byte-aligned. Or what auchar[1] would mean. Maybe there would be padding.
13:35:12 <fizzie> Er, I mean bar[1] there.
13:35:19 <AnMaster> fizzie, it can do it for static variables
13:37:56 <fizzie> Yes, well, my interpretation of "typedef foo afoo __attribute__ ((aligned (x))); ... afoo* x = ...;" would be "afoo is a foo-type thing that is aligned at x-byte boundaries, so x is therefore a pointer to a foo-element aligned thusly", but I really can't know how GCC reads it.
13:38:11 <AnMaster> icc seems to understand this with no hints btw...
13:41:03 <fizzie> GCC does have that vector-size attribute, too, for more explicit vectorizablitiesies.
13:42:27 <fizzie> The stuff at http://gcc.gnu.org/onlinedocs/gcc/Vector-Extensions.html I mean. But I haven't really found any concrete examples about "here's how to tell the alignment of a memory block for auto-vectorization purposes".
13:59:46 <fizzie> The basis of all matter.
14:00:32 <ais523> except the matter that doesn't matter
14:00:57 <fizzie> I was this close to adding "at least all interesting matter".
14:01:04 -!- oklopol has quit (Read error: 104 (Connection reset by peer)).
14:01:19 -!- oklopol has joined.
14:02:18 <oklopol> 16:00… fizzie: Well, no matter. ||| 16:00… * Disconnected <<< for second there i perceived this as if fizzie had quit just after that message, and somehow it would've looked like i was disconnecting from my perspective.
14:05:08 <impomatic> Are talk pages on the esolang wiki covered by the same license as the articles pages?
14:07:22 <ais523> there's an agree-to-PD message below the edit box
14:07:26 <ais523> and it's the only way to change them
14:07:46 -!- MizardX has quit (Read error: 104 (Connection reset by peer)).
14:10:12 <impomatic> I wanted to use something from the Underload talk page
14:11:44 <ais523> if I wrote it, it's definitely PD, with my compliments
14:14:32 <impomatic> Thanks, but it's Keymaker's quine :-)
14:14:59 <ais523> what did you want it for, by the way?
14:15:06 <oerjan> i think that's in the article too?
14:15:17 <ais523> no, my quine's the one in the article
14:15:20 <impomatic> I thought I'd include it here with an explanation of how it works http://corewar.co.uk/assembly/underload.htm
14:19:00 <AnMaster> <fizzie> GCC does have that vector-size attribute, too, for more explicit vectorizablitiesies. <-- doesn't do the same thing in this case
14:42:32 -!- dbc has quit (Read error: 110 (Connection timed out)).
14:50:23 -!- dbc has joined.
15:03:35 <impomatic> Just starting my implementation of Forth in Redcode. Still open to suggestions
15:07:26 -!- ehird has left (?).
15:07:28 -!- ehird has joined.
15:08:51 <ehird> see, clearly I'm the most important member of this channel.
15:09:15 <ais523> ehird: I was gone a day too, so no
15:09:19 <ais523> I didn't know you weren't there to miss
15:09:49 -!- upyr[emacs] has joined.
15:10:14 <oerjan> wait, ehird was gone a day? *duck*
15:13:03 <ehird> why the :/? nervous about the goat sacrifice?
15:13:20 <ehird> also, has nobody noticed the logs link is wrong?
15:13:51 <ehird> that could be an issue
15:13:52 <ehird> <oerjan> fucking wiki locking up just as i'm saving :<
15:13:56 <ehird> clog: are you sure you didn't mean oklopol?
15:19:56 <ehird> http://blogs.msdn.com/michkap/archive/2005/09/17/469941.aspx
15:24:10 <ehird> 15:59:55 <AnMaster> IMO all apps should have upper limits on how much they will allocate
15:24:10 <ehird> 16:00:00 <AnMaster> formal upper bounds
15:24:10 <ehird> 16:00:07 <AnMaster> not just for the sorting algorithm
15:24:11 <ehird> 16:00:12 <AnMaster> but for the whole app
15:24:20 <ehird> Alternative solution: don't write memory hogging apps.
15:24:49 <ais523> AnMaster's method looks like a way to make sure you don't write a memory hogging app
15:25:14 <ehird> err, you can easily write a memory hogging app by doing that
15:25:18 <ehird> it gains you approximately nothing.
15:25:36 <ais523> it lets you know exactly how memory hogging it is
15:25:57 <ehird> no, it doesn't, and to boot, even if it did it's a tedious, stupid way of finding that out
15:30:34 <ehird> ubiquite (ubiquiting, ubiquited), v. To make a property more ubiquitous.
15:31:06 <ehird> maybe it should be ubiquit
15:31:14 <ehird> , ubiquiting, ubiquited, ubiquites
15:36:23 <impomatic> Yay, Forth interpreter is working!
15:37:38 <ehird> impomatic: does "SEE" work?
15:38:12 <impomatic> Hmmm... I don't know what SEE is, so probably not!
15:38:48 <ehird> impomatic: prints to screen the forth source code of a defined word, or the disassembled machine code of a primitive
15:39:09 <ehird> also, does IF, ELSE, THEN-style branch control work?
15:41:22 -!- MizardX has joined.
15:41:37 <impomatic> SEE doesn't work and probably won't ever. IF ELSE THEN not yet. BEGIN UNTIL is the only flow control so far.
15:41:58 <ehird> how is BEGIN UNTIL implemented?
15:42:12 <ehird> It's just, you can implement the language Forth conventionally, but it isn't really a forth unless you do it the "proper way"
15:42:17 <ehird> threaded machine code that is
15:42:39 -!- jix has joined.
15:43:55 <impomatic> the following are implemented: u. space * = 1+ - + swap ?dup dup depth abs negate r> >r r@ begin drop until
15:45:13 <ais523> ehird: redcode's all about threaded machine code
15:45:17 <ais523> that, and crazy side effects
15:45:32 <ehird> i mean you have to compile forth to threaded machine code
15:45:42 <ehird> also redcode isn't _threaded_ machine code
15:45:47 <ehird> that makes no sense, you can only compile to that
15:45:53 <ais523> have you not seen the SPL instruction?
15:46:15 <ais523> ehird: well, you're missing the point if you miss the instruction that does machine-code threading
15:46:17 -!- MizardX- has joined.
15:46:34 <ais523> SPL is one of the most important opcodes in redcode, it massively changes the way the language works
15:47:03 <oerjan> "threading" means something different in forth, nothing to do with concurrency
15:47:10 -!- MizardX has quit (Connection reset by peer).
15:47:34 -!- MizardX- has changed nick to MizardX.
15:47:45 <ehird> ais523: so no, you don't know what threaded means
15:47:54 <ais523> oh, ok, one word with two meanings?
15:47:59 <impomatic> threading in Forth means the program is compiled to a long series of subroutine addresses
15:48:08 <ehird> I'm tempted to say forth's meaning came first.
15:48:16 <ehird> impomatic: exactly
15:48:26 <ehird> 2 2 + -> {&LITERAL,2,&LITERAL,2,&PLUS}
15:48:33 <ehird> (where LITERAL looks one ahead in the ip)
15:49:47 <impomatic> Yes, that's exactly how it compiles :-)
15:50:02 <ehird> i was explaining for ais523
15:51:51 <AnMaster> what? ais523 didn't know what threading in forth was? ^_^
15:52:23 <ais523> that's pretty interesting, it's sort-of like coercing an ordinary processor into being a bytecode interpreter
15:52:26 <AnMaster> ais523, ever seen bashforth? string-threaded iirc
15:52:47 <ais523> redcode doesn't have subroutines, so you'd need to implement a stack yourself to do it like that
15:53:48 <ais523> any colour so long as it's red
15:54:58 <AnMaster> ais523, was that a reference to black for t-ford?
15:55:21 <ais523> although it seems Mr. Ford never actually said that
15:55:40 <AnMaster> oh? Another of the "Beam me up, Scotty" famous unsaid lines?
15:56:21 <ehird> [15:52:23] <ais523> that's pretty interesting, it's sort-of like coercing an ordinary processor into being a bytecode interpreter
15:56:28 <ehird> sort of but actually not.
15:56:33 <ehird> in fact, not really sort of,.
15:56:37 <AnMaster> ais523, so what is the origin of it then?
15:56:50 <ais523> probably you could look it up on snopes or somewhere
15:57:32 -!- MigoMipo has joined.
15:57:36 -!- KingOfKarlsruhe has joined.
15:59:29 <oerjan> 'as Ford wrote in his autobiography, "Any customer can have a car painted any colour that he wants so long as it is black"' (WP)
16:00:05 <AnMaster> ok he never *said* it then? but rather wrote it?
16:00:33 <AnMaster> or maybe it is a myth that it is a myth that he never said it!
16:01:47 <oerjan> http://en.wikiquote.org/wiki/Talk:Henry_Ford#Any_colo.28u.29r.2C_so_long_as_it_is_black
16:03:11 <ais523> I love the way the u is parenthesised in that
16:09:33 <ehird> <Slereah> Writing a mathematical function in Brainfuck is as easy to do as a CAT program in Unlambda :D
16:09:37 <ehird> you mean really easy?
16:09:47 <ehird> (2008-03-21, vintage quotes, move along_
16:11:07 <oklopol> anyone can write the former, not everyone can write the latter
16:11:26 <ehird> I think the latter is easier
16:11:57 <ais523> the latter is easier but only if you know how
16:12:01 <oklopol> unlambda is an asymptotically much simpler language, so to speak, so once you know it, should be very easyt
16:12:02 <ais523> also, which mathematial function?
16:12:17 <ehird> ais523: any is the implication
16:12:34 <oklopol> presumably one you can write in some other language already
16:12:55 <ais523> addition's easy enough in BF
16:13:56 * ehird thinks about implementing look_and_say(N) as O(1)
16:14:02 <ehird> where N = iteration number
16:14:45 <ehird> the first digit goes
16:14:51 <ehird> 1 1 2, then 1 1 3 forever
16:15:11 <oklopol> well it has exponential growth
16:15:13 <ehird> the second goes (), 1, 1, 2, then 1 1 3 probably forever
16:15:22 <ehird> the third digit goes 1 1 2 then 1 33 forever
16:15:39 <ehird> the fourth goes 1 2 2 then 1 3 3 forever
16:15:55 <ehird> I'm pretty sure if you had a digits_in_look_and_say(N) you could do it
16:16:18 <oklopol> also where did you get those numbers there?
16:16:29 <ehird> 16:10:44 <oklopol> 1
16:16:30 <ehird> 16:10:44 <oklopol> 11
16:16:30 <ehird> 16:10:44 <oklopol> 21
16:16:30 <ehird> 16:10:44 <oklopol> 121116:10:44 <oklopol> 111221
16:16:30 <ehird> 16:10:44 <oklopol> 312211
16:16:30 <ehird> 16:10:46 <oklopol> 13112221
16:16:38 <ehird> examining the digit at each position downwards
16:16:43 <ehird> I think they're fairly trivial patterns
16:17:02 <ehird> so number of digits in N + some modulo magic should do it
16:17:09 <oerjan> it splits into atoms, naturally, after that it's just substitution
16:17:21 <ehird> I'm trying to do it non-recursively
16:18:11 <oklopol> i bet i can make it like O(½)
16:18:16 <ehird> 16:18:13 <oerjan> after a number of iterations it split into Conway's elements. From there on it is a simple substitution
16:18:33 <oerjan> you mean finding the m'th digit of the n'th iteration, O(1) in n? (but obviously cannot by O(1) in m)
16:19:02 <ehird> oerjan: no, element N of the LAS sequence in O(1)
16:19:06 <ehird> i'm fairly certain it is possible
16:19:14 <oerjan> erm i have that page on my wp watchlist
16:20:11 <ehird> i dream about unicorns.
16:20:45 <oerjan> first of all, nothing can be O(1) if it doesn't have constant size output and requires looking at only finite part of input
16:20:45 <oklopol> usually i'm solving a scrambled version of an exercise i was doing before going to sleep
16:21:48 <oerjan> at least in the usual turing machine sense of O()
16:21:55 -!- ShakespeareFan00 has joined.
16:22:16 <oklopol> i think ehird just means finding the nth element without solving the ones leading up to it first.
16:22:16 <ehird> [16:20:45] <oerjan> first of all, nothing can be O(1) if it doesn't have constant size output and requires looking at only finite part of input
16:22:19 <ehird> not the sense I meant
16:22:27 <ehird> okay, I said it wrongly
16:22:32 <ehird> ShakespeareFan00: Hi.
16:22:44 <oklopol> sometimes you need to say wrongly to be heard.
16:23:48 <ShakespeareFan00> http://scratchpad.wikia.com/wiki/Sigsumeidsi - Anyone think this could be tweaked for programming?
16:24:13 <ehird> you can make any parsable language into a programming language
16:24:26 <ehird> doesn't mean it'll have interesting semantics
16:32:20 <ehird> i wonder if you can implement thue in thue non-trivially
16:37:13 <ehird> ShakespeareFan00: sorry, we can't.
16:37:15 <ehird> our wiki is public domain.
16:38:24 <ShakespeareFan00> A lot of Sigsumeidsi was my idea though... so I'll see if I've got the VERY early form of it
16:51:38 * ehird writes constraint-based language.
16:55:35 <ehird> seems pretty trivial
17:04:36 <AnMaster> well, that page doesn't say anything about how you write conditions or actions
17:06:31 <AnMaster> looks to me like it follows the basic idea of pattern matching in awk or sed style, but matching conditions instead of input stream?
17:11:51 * ehird permutes infinite lists
17:12:17 * ehird wonders how to ubiquit permutations
17:30:14 -!- oerjan has quit ("permutation = reversible operation").
17:32:57 * ehird takes on stupid task
17:37:09 -!- Hiato has joined.
17:49:18 <ais523> wow, what a weird spam
17:49:28 <ais523> Subject: ?spam? [Icfpc08] haemaatocrit postmarked stiffer basswood
17:49:29 <ais523> Date: Thu, 26 Feb 2009 17:45:42 +0000
17:49:32 <ais523> culling suubtilisers retranslated fiction
17:49:45 <ais523> "suubtilisers" isn't even a word...
17:49:51 <ais523> and haemaatocrit is somewhat suspicious
17:49:58 <ais523> and that's all that the messsage is
17:50:01 <ais523> apart from the mailing list footer
17:51:42 -!- ShakespeareFan00 has left (?).
18:00:00 <AnMaster> ais523, I have seen spam looking like the commit mails sourceforge sends... same formatting
18:00:47 <AnMaster> however it would be closer to the type of mail I actually get
18:01:09 -!- sebbu has quit ("@+").
18:02:33 <AnMaster> this makes it easy to find spam btw.... Almost all non-spam I get would match this regex (for subject line): ^(Re: )*\[[-a-zA-z]+\]
18:04:05 -!- Azstal has joined.
18:19:16 <ehird> do you think passing around 40 bits will be efficient.
18:19:28 -!- sebbu has joined.
18:21:20 <ais523> ehird: on a 64-bit system, probably
18:21:37 <ehird> on a 64 bit system, 72 bits.
18:22:05 <ehird> (thinking about passing around struct{char tag; void *data;} to have tagged pointers without losing address space)
18:24:19 <Asztal> how many tag bits do you actually need?
18:25:28 <ais523> ehird: the usual trick exploits the fact that all pointers are even
18:25:36 <ehird> except that's bullshit
18:25:39 <ais523> but that only gives you one tag bit
18:25:44 <ehird> since ... pointers are not always even...
18:25:50 <ais523> ehird: well, it depends on the processor and what you're allocating
18:25:55 <ehird> Asztal: well, char is the smallest type C will give you
18:25:57 <ais523> it's normally easy to /make/ all pointers even
18:26:39 <ehird> ais523: and that halves the addressing space
18:27:09 <Asztal> are you allocating lots of one-byte objects on the heap?
18:28:27 <ehird> but I don't want to put limits like that
18:28:53 <ehird> wonder why % texi2html --nomenu --nonumber --split=section r5rs.txi is taking so long
18:34:15 <ehird> ais523: I guess passing around anything bigger than a machine word is bad?
18:34:23 <ais523> yes, if you're going for speed
18:34:35 <ais523> it generally takes a length of time proportional to the number of machine words you're using
18:34:47 <ais523> and substantially more if you don't have enough free registers to hold the whole thing
18:35:53 <ehird> I guess only being able to address 9223372036854775808 bytes on a 64-bit machine is okay :-D
18:36:33 <ehird> ais523: hm, so passing around `long`s is slow?
18:36:59 <ehird> (more worrying is only being able to address 2147483647 bytes on a 32 bit machine, but I should not worry...)
18:37:03 <ais523> no, well only on a 16-bit architecture
18:37:15 <ais523> also, is this an OS-independent application?
18:37:17 <ehird> who uses 32 bit machines and runs program allocating >2gb anyway...
18:37:21 <ehird> ais523: Yes, hopefully.
18:37:35 <ehird> oh, so longs fit in a machine word?
18:37:35 <ais523> a useful trick to know is that all the main OSes around at the moment reserve half of the available memory addresses for their own use
18:37:41 <ais523> ehird: on 32-bit and 64-bit, yes
18:37:47 <ais523> because long = 32 and 64 respectively
18:37:53 <ais523> on 16-bit, a long is two machine words
18:38:03 <ais523> and on 8-bit, it's 4, but you don't get many 8-bit machines around nowadays
18:38:04 <ehird> wait, on 32 bit and 64 int = long right?
18:38:22 <ais523> int is normally 32 on a 64-bit system
18:38:27 <ais523> because so many programs assume int = 32
18:38:32 <ais523> int /ought/ to be 64, though
18:38:42 <ais523> apparently, even long's 32-bit on 64-bit Windows
18:38:46 <ehird> how can you assure memory is aligned?
18:38:51 <ehird> malloc() doesn't let you ... use mmap?
18:38:59 <ais523> and malloc always returns aligned memory
18:39:10 <ehird> -always- returns even?
18:39:28 <ais523> it guarantees that you can dereference any standard data type through a malloc-returned pointer
18:39:48 <ais523> but I suppose on some processors that doesn't guarantee aligned
18:39:53 <ais523> even though it does on processors like x86
18:40:03 <ehird> I didn't know all pointers are even on x86. Queer.
18:40:09 <ais523> the processors would either need to manage unaligned accesses, or else have a char larger than 8-bit
18:40:19 <ais523> in order for that to screw up
18:40:27 <ais523> and both are unlikely nowadays, although not impossible I suppose
18:40:51 <ehird> ais523: This is all well and nice but I need more than 1-bit of tagging.
18:40:55 <ais523> ehird: all pointers to ints, yes, pointers to chars can be odd for obvious reasons but not if they were obtained from malloc
18:41:13 <ais523> ehird: I was reading up on how OCaml did it last night
18:41:22 <ais523> it tagged integers vs. things more complicated than integers
18:41:28 <ehird> Yes that is common.
18:41:34 <ais523> and the more complicated things were stored as pointers to a tag plus data
18:41:41 <ehird> Well, I guess I could do
18:41:47 <ais523> so the pointers, which were lightweight, could be moved around whilst the tags stayed constant in memory
18:42:17 <ehird> (since those addresses are hardly likely to be allocated)
18:42:52 <ehird> ais523: my eventual plan is to make this compile down to efficient machine code, becoming a compiler
18:42:58 <ehird> but first I'm going to do an interp
18:43:33 <ais523> <ais523> a useful trick to know is that all the main OSes around at the moment reserve half of the available memory addresses for their own use <--- you can free up another bit if you find out /which/ half
18:43:48 <Asztal> what about using the range of [0..256] for #\a constants?
18:43:48 <ais523> and note that half of all addresses != half of memory, generally speaking
18:44:04 <ehird> ais523: finding out which half is presumably not very easy to do in code...
18:44:15 <Asztal> one slight problem is that windows XP can be made to reserve only 1GB for itself ;)
18:44:38 <ehird> Asztal: well, it'd be (map(4+ . <<1, (0...256)))
18:44:54 <ehird> er I said that wrong
18:45:29 <ehird> #\(255, I forget what char it is) would be 514
18:46:08 <Asztal> you could even have 16-bit exact integers, if you didn't mind wasting a bit more ... oh
18:47:25 <ehird> really {char tag; void *data} would be perfect, if only it were efficient
18:55:55 * ehird recurs 4294967295 times.
18:57:41 -!- kar8nga has joined.
19:35:13 <ehird> "When was the last time you saw a 1600-line C program with only 25 assignment statements?"
19:35:18 <ehird> I should write one.
19:36:08 <ais523> I've written C programs with no statements at all...
19:37:22 <ais523> apart from flow control, you can do anything you like in declarations
19:41:15 <Deewiant> surely there was at least one statement
19:44:14 -!- grrlfawkes has joined.
19:44:26 -!- grrlfawkes has left (?).
19:45:51 <Deewiant> ais523: what did main() look like?
19:46:01 <ais523> Deewiant: a function call, IIRC
19:46:18 <ais523> int main(void) {int x = (f(), exit(0));} was the general gist of it
19:46:30 <ais523> int main(void) {int x = (f(), exit(0), 0);}
19:46:33 <ais523> to get the data type right
19:47:15 <Deewiant> aren't variable declarations like that also statements?
19:47:24 <ais523> nope, they're declarations
19:47:25 * ehird thinks about a compiler language
19:47:29 <ais523> you can mix them with other declarations
19:47:32 <ehird> a compiler language that does formal semantics, that is
19:47:34 <ais523> but not inside statements, except in C9
19:47:36 <ehird> and yet does efficient machine code
19:47:50 <ehird> it'll have to be _imperative_ formal semantics :P
19:58:18 <ehird> http://pastie.org/401316.txt?key=dqcm5fjjhuynhxrvj9nwq
19:58:24 <ehird> example of what I imagine it to be like
20:02:36 <ehird> http://pastie.org/401324.txt?key=axr1a9azdlzsjawzet8w compiler output from that, with some tweaks to , due to my original errors
20:02:58 <ehird> should be relatively trivial to make into asm
20:06:03 -!- olsner has joined.
20:12:16 <psygnisfive> he thinks copy(a,b) { a=b; } should be valid haskell
20:12:25 <psygnisfive> and that you need to be able to "copy stuff" in order to be TC
20:12:35 <ehird> psygnisfive: just read the logs
20:12:42 <lament> and people know he's trolling
20:14:18 <ehird> <yohan> Im writing my master thesis about why imperative programming languages are fast
20:14:38 <lament> ehird: you are boring :(
20:15:02 <lament> psygnisfive: he's doing a masters with haskell at chalmers
20:15:11 <lament> he's also a far better troll than ehird
20:15:20 <ehird> I'm not a literal troll.
20:15:26 <ehird> I troll people by getting them to think I'm a troll and being annoying.
20:15:35 <ehird> This annoys lament more than a real troll as you see.
20:16:18 <ehird> [shortly after 'atm? ass to mouth']
20:16:19 <ehird> <yohan> ASM? Ass to mouth?
20:19:39 -!- Hiato has quit ("Leaving.").
20:20:31 <ehird> [20:19:19] <yohan> jkup: python, is that like an include file?
20:26:08 -!- ehird has quit ("Caught sigterm, terminating...").
20:46:36 -!- k2 has joined.
20:46:55 -!- kar8nga has quit (Nick collision from services.).
20:46:58 -!- k2 has changed nick to kar8nga.
21:05:45 -!- kar8nga has quit (Read error: 145 (Connection timed out)).
21:33:08 -!- ehird has joined.
21:49:58 -!- jix has quit (Read error: 113 (No route to host)).
21:51:28 <ehird> i == true swap [] if
21:51:34 <ehird> who wannsa figure out how it works
21:51:43 <ehird> i : 'R ('R -- 'S) -- 'S
21:51:43 <ehird> == : 'R 'a 'b -- 'R bool
21:51:43 <ehird> true : 'R -- 'R bool
21:51:43 <ehird> swap : 'R 'a 'b -- 'R 'b 'a
21:51:45 <ehird> if : 'R bool ('R -- 'T) ('R -- 'T) -- 'T
21:51:47 <ehird> i wrote it ages ago
21:51:49 <ehird> so I don't know how it works :D
21:52:01 <ehird> err, [] would technicaly be 'R -- 'R ('S -- 'S)
22:01:40 -!- MigoMipo has quit ("QuitIRCServerException: MigoMipo disconnected from IRC Server").
22:02:52 -!- KingOfKarlsruhe has quit (Remote closed the connection).
22:04:11 -!- BeholdMyGlory has quit (Remote closed the connection).
22:06:39 <oklopol> looks to me like [] evaluates, and code is just pushed on stack
22:06:49 <oklopol> but i guess if would need to be special.
22:07:51 <oklopol> err... "i == true swap []" => "i true ==" on stack, i guess the if wouldn't actually make any sense, as you're not doing anything.
22:07:56 <oklopol> so forget i said anything.
22:08:34 -!- impomatic has quit (Read error: 104 (Connection reset by peer)).
22:16:23 <ehird> and [] is the empty quotation
22:39:48 -!- olsner has quit ("Leaving").
22:48:53 <ehird> [ehird:~] % port installed|grep xorg-|awk '{print $1}'|xargs sudo port uninstall
22:51:02 -!- ehird has set topic: Don't use rafb.net for pasting because they delete pastes. Think of the log-readers. Logs: http://tunes.org/~nef/logs/esoteric/.
22:52:57 -!- asdasd has joined.
22:53:02 -!- Dewi has joined.
22:53:04 <asdasd> fuuuuuuuuuuuck Your have been using Linkinus for more than 15 days. If you like Linkinus, please purchase it for unrestricted use!
22:55:17 <GregorR> Seeing how it says so on the site, I find myself unsurprised :P
23:04:50 -!- ehird has left (?).
23:04:53 -!- ehird has joined.
23:05:08 <ehird> how many people alive? when I disconnect, please say something in the interim.
23:05:17 <ehird> disconnected... NOW
23:05:20 <ais523> I'm alive, just not saying anything
23:06:26 <ehird> ok, thanks ais523, can you PART/JOIN in 10 seconds? :)
23:06:34 -!- ais523 has left (?).
23:06:35 -!- ais523 has joined.
23:06:47 <ais523> not sure if that was 10 seconds
23:07:58 <ehird> damn, miau doesn't datestamp joins. does parts, though
23:08:27 <ehird> ais523 -- final thing, how about a NOTICE to this channel?
23:11:35 <ehird> ais523 can you say something in 10 seconds? thanks
23:12:41 -!- ais523 has quit.
23:15:15 <ehird> AnMaster: you alive?
23:27:08 <ehird> I go for a compromise:
23:27:34 -!- Dewi has quit ("bbs").
23:28:28 <oklopol> i guess someone should put a notice in my notice now.
23:28:59 unexpected log event :(
23:30:39 <GregorR> /nickserv password ohshitwhoops
23:31:43 -!- asdasd has quit (Remote closed the connection).
23:32:31 <oklopol> GregorR: are you a magic cowboy
23:33:21 <oklopol> well that's pretty okay ;=)
23:33:31 <ehird> pretty okay indeed
23:33:36 <ehird> ;============================================================8D)
23:36:24 <ehird> a magical butt on a tree
23:36:28 <GregorR> 8===PEEEEEEEEEEEEEEEEEEEEEEEEEEEENIS===D