00:01:22 <zzo38> That is, instead of being forced to use CC-BY-SA, I would like to use CC-SA.
00:01:51 <Sgeo> People who want to contribute might not if they know their contributions might not get credited.
00:01:55 <elliott> zzo38: Well, uh, nobody really wants that except you, so I guess nobody really bothered.
00:02:59 <Vorpal> elliott, gah downloading binary pypy since it started swap trashing on my 4 GB RAM thinkpad
00:03:18 <Sgeo> Then again, my Newspeak IDE tweak is so little code I don't think I'd get credit for it
00:03:19 <elliott> Vorpal: Do YOU want to look at my kill and tell me what's wrong with it? :p
00:03:26 <Sgeo> I still need to figure out how to submit a patch
00:03:47 <Vorpal> elliott, not really no, everything is sluggish on both systems atm. minecraft on one, and 90% of userland in swap on the other
00:03:56 <elliott> /* actually send the signal */
00:03:56 <elliott> pid = strtol(argv[i], &endptr, 10);
00:03:56 <elliott> if (!argv[i][0] || *endptr) badusage();
00:04:07 <elliott> Vorpal: Pop quiz: Why does this always give "invalid argument"/
00:04:17 <Vorpal> elliott, which point in the code gives that
00:04:32 <elliott> Vorpal: No, I hate gdb. I've figured out what the problem is.
00:04:39 <Vorpal> elliott, why do you hate gdb?
00:05:08 <elliott> Vorpal: Because I don't have much connection with the code's execution path; I prefer reasoning about the code.
00:05:26 <elliott> Vorpal: The most effective debugging tool is still careful thought, coupled with judiciously placed print statements. -- Brian W. Kernighan
00:05:32 <Vorpal> gah binary pypy (built 2010-11-25) uses cpython 2.5.2
00:05:33 <elliott> At least I am in good company.
00:05:35 <zzo38> Well, I want you to know, that any programs or other works I have written that the license requires attribution, that I give everyone permission to make attribution optional. (The exception is stuff related to things I do commercially; these things will have their own permission)
00:08:51 -!- Mathnerd314 has joined.
00:09:30 <Vorpal> elliott, nailor has been *really* busy I see
00:10:02 <Vorpal> elliott, I can't find the mystery cave though
00:10:19 <Vorpal> elliott, yes I seen the sign
00:10:24 <Vorpal> then just a normal but well lit cavern
00:10:29 <elliott> Vorpal: That's the mystery cave.
00:10:39 <Vorpal> I'm a bit disappointed it is no more mysterious
00:10:39 <elliott> Whether you consider if mysterious or not is entirely dependent on you.
00:10:56 * elliott decides to move most of kill into a new program, signal(1).
00:12:48 <Vorpal> elliott, that is a shitload of glass around that lava
00:14:43 <Vorpal> elliott, the deep lava cavern, the lava fall starting next to the library
00:14:49 <Vorpal> elliott, and going to bedrock or such
00:14:57 <Sgeo> Someone vandalized an UnNews article I wrote in 2007
00:15:08 <Sgeo> They vandalized it in 2010
00:15:15 <Sgeo> That's a bit of a WTF and a Grr
00:15:26 <Sgeo> http://uncyclopedia.wikia.com/index.php?title=UnNews:All_atheists_proven_to_be_Muslims&action=history
00:16:25 -!- perdito has changed nick to hagb4rd.
00:16:27 <elliott> (To quote the esteemed vandal of 2007.)
00:17:43 <elliott> OK, seriously: Why would the barf() code path end up always executing in http://sprunge.us/TYib (unless signal=0 or whatever), with the "Invalid argument" error?
00:17:51 <elliott> EINVAL An invalid signal was specified.
00:17:58 <elliott> Oh, wait, it's not doing that any more.
00:18:01 <elliott> It's just... not doing anything.
00:18:10 <elliott> elliott@dinky:~/code/tools$ bin/kill 1087
00:18:10 <elliott> elliott@dinky:~/code/tools$
00:18:10 <Vorpal> elliott, didn't you see the lavafall?
00:18:11 -!- augur has joined.
00:18:13 <Vorpal> elliott, go do it then
00:18:16 <elliott> And printing a blank line in-between those for no apparent reason.
00:18:26 <Vorpal> elliott, it is inside a 3x3 glass pillar
00:18:44 <Vorpal> elliott, why not log on and check and then log off?
00:18:57 <elliott> Okay... apparently a bunch of }s and a return ret; cause an additional newline to be printed.
00:19:13 <Vorpal> elliott, the server was there a moment ago, if you are far from spawn he could tp you to me
00:19:35 <elliott> Vorpal: Not right now. Later, okay?
00:19:44 <elliott> Aha! Sleep can't kill its parent.
00:19:47 <Vorpal> elliott, well then I will log off
00:19:53 <Vorpal> elliott, I'm going to sleep very soon
00:19:57 <elliott> I clearly have to use setsid.
00:20:19 <Sgeo> http://uncyclopedia.wikia.com/wiki/UnNews_talk:All_atheists_proven_to_be_Muslims
00:20:39 -!- oerjan has quit (Quit: ZZZ).
00:21:19 -!- Phantom_Hoover has quit (Quit: YYY).
00:23:57 <elliott> Vorpal: I was parsing "-9", not "9"
00:23:59 <elliott> so the signal was negative :D
00:27:24 -!- hagb4rd has quit (Quit: hagb4rd).
00:27:42 -!- hagb4rd has joined.
00:30:17 <zzo38> My brother's character in D&D game is afflicted lycanthropy
00:30:57 <elliott> pikhq: So, I currently have cat, date, echo, false, kill, pwd, signal (kill -l, basically), sleep and true in 34K.
00:34:29 <elliott> pikhq: Want a tarball of what I've got so far? Feel free to tell me some programs are utterly hideous; I need advice in that area. :) Also, bin/signals.h is a horrible hack that doesn't do the Right Thing for a few architectures.
00:36:20 <elliott> pikhq: I'm crazy, so here, have a .cpio.Z: http://filebin.ca/rghto/tools.cpio.Z
00:36:40 <elliott> pikhq: The Makefile is very me-specific at the moment. If you actually want to compile them, uh, I can get you the relevant toolchain (bootstrapped pcc/dietlibc)
00:37:36 <elliott> TODO: man pages, all the other useful things out there, testing testing testing.
00:39:57 <Vorpal> elliott, in a proper language that parser bug would have been detected at compile time
00:40:15 <elliott> Vorpal: Not any language where argv is an array of strings. :P
00:40:25 <Vorpal> elliott, well what about coq?
00:40:30 <elliott> Vorpal: "Just use an option parser!" Yeah, I would, except that I'd have to do -n.
00:40:47 <elliott> Vorpal: It's perfectly possible to write programs in Coq just like Haskell. It's just that usually you have the entire library of rich types working against you.
00:40:53 <elliott> You can easily define "dumb" non-dependent types in Coq.
00:41:01 <elliott> And they would readily accept the bug I made.
00:41:19 <elliott> Vorpal: Of course if this wasn't Unix and tools took proper objects instead of an array of strings... yes, there would be no bug.
00:41:26 <elliott> You can't be too much smarter than your environment.
00:42:02 <elliott> Vorpal: Also, when you start using gotos rather than creating a new function, you're crazy!
00:42:21 <elliott> The code in question: http://sprunge.us/GcNO
00:43:43 <Vorpal> elliott, server is on atm.
00:45:51 -!- Sasha2 has joined.
00:46:21 -!- Sasha has quit (Read error: Connection reset by peer).
00:47:50 <zzo38> http://zzo38computer.cjb.net/music_storage/seasonstacker.ogg (Please note I did not write this music; I think Purple Motion did. I do not know what format it was originally made in.)
01:02:52 <elliott> pikhq: Looked at the code?
01:04:12 <elliott> pikhq: The only thing to fear is fear itself and avoiding startup code so that true and false can be 200 bytes!!
01:16:23 <elliott> "Plan 9 is a programmable debugger that understands multiple-process programs, and except at its own console, it doesn't run as an exercise in understanding the principles and mechanisms useful in designing operating systems, and not as a product as such. In this way it is analogous to the Unix operating system. In the most general configuration, it uses three kinds of networks, including Ethernet, Datakit, specially-built fiber networks, ordinary
01:16:23 <elliott> connections, and ISDN. In Plan 9, each network presents itself as a product as such."
01:36:02 <elliott> pikhq: Ugh. Just realised pcc doesn't have warnings.
01:48:44 <elliott> pikhq: Woo, I almost have a vis where "vis ..." = "cat -v ...".
01:59:08 <Vorpal> elliott, painterly sure have a nice cobble texture
01:59:14 <Vorpal> but why turn the torches into candles
01:59:23 <elliott> Vorpal: you can select what parts you want, I think
01:59:37 <Vorpal> elliott, but that is work
01:59:44 <elliott> Vorpal: Doesn't it have a web interface?
01:59:56 <elliott> Vorpal: http://painterlypack.net/customizer.php
02:00:20 <elliott> Vorpal: I thought you were going to bed "very soon"? :P
02:00:47 <elliott> Largest program so far: kill, at 8775 bytes.
02:01:02 <elliott> And most of that is all the errno and signal text. :p
02:02:37 <elliott> Vorpal: if you do "continue" in a for loop, is the i++ part meant to be skipped?
02:04:50 <pikhq> elliott: I like how you do the sane thing with cat's options. :)
02:05:12 <pikhq> (i.e. make a seperate program from them, LIKE IT SHOULD BE.)
02:05:25 <elliott> pikhq: Yep! And this program actually existed in 8th Edition Unix, although it printed out octal instead.
02:05:39 <elliott> pikhq: BusyBox also does this, but it calls its program catv, and why name a program after a mistake?
02:05:48 <elliott> http://man.cat-v.org/unix_8th/1/vis btw
02:06:28 <elliott> <elliott> Vorpal: if you do "continue" in a for loop, is the i++ part meant to be skipped?
02:06:31 <elliott> pikhq: Do you know the answer to that?
02:06:35 <elliott> It seems to be acting that way.
02:06:35 <Vorpal> elliott, which language?
02:06:37 <elliott> But that seems strange to me.
02:06:48 <Vorpal> I believe it shouldn't
02:07:00 <elliott> http://www.wikipl.com/index.php/WPL_Code_Guidelines
02:07:04 <elliott> Good name: CompareTwoTextFilesAndGetTheDifferentLines
02:07:06 <elliott> Bad names: CompareTwoTextFiles, CompareTextFiles
02:07:11 <elliott> this MUST have been written on crack
02:07:17 <elliott> that table is beyond unbelievable
02:07:58 -!- Sasha2 has quit (Ping timeout: 240 seconds).
02:08:28 <elliott> Vorpal: ok it isn't doing that, my program is just KERRAAAZY :)
02:08:39 -!- Sasha2 has joined.
02:09:44 <elliott> pikhq: http://sprunge.us/XRRA PLZ2BE TELLING ME WHY THE CONVERSION LOOP RUNS FOREVER ON /DEV/URANDOM
02:10:24 <Vorpal> elliott, what "CompareTwoTextFilesAndGetTheDifferentLines"
02:10:56 <elliott> Vorpal: CompareTheseTwoTextFilesSpecifiedAsUtfEightFileNamesAndGetEveryLineInOneButNotBothAsAListOfUnicodeStrings
02:11:10 <elliott> Vorpal: CompareTheseTwoTextFilesSpecifiedAsUtfEightFileNamesAndGetEveryLineInOneButNotBothAsAListOfUnicodeStringsAndRaiseAnExceptionIfAnythingGoesWrongDuringTheProcessOfDoingThis
02:11:19 <Vorpal> elliott, int loop_counter_variable_used_in_for_loop_to_count_up_from_0_to_100 ?
02:11:33 <elliott> char *string_entered_by_the_user_that_is_dynamically_allocated;
02:11:53 <elliott> long i_like_muffins_and_also_this_variable_is_a_long_integer_and_it_stores_the_users_current_happiness_level;
02:14:24 <elliott> Vorpal: wait i have an important question
02:14:36 <elliott> Vorpal: if your code starts spewing out bits of the environment when outputting /dev/urandom
02:14:42 <elliott> you probably have a buffer overflow somewhere right :D
02:16:03 <elliott> pikhq: Yo. Can you write vis(1) for me? :P
02:16:14 <pikhq> Not ATM. Perhaps later this weekend.
02:18:35 <elliott> pikhq: I'll just keep hacking at the code then.
02:18:46 <elliott> pikhq: pikhq cal should make its way in basically intact, as writing cal sounds boring.
02:18:58 <elliott> pikhq: Hey, Tcl is in good historical company; Multics used [...] to do what Unix does with `...`.
02:19:03 <elliott> (Source: http://www.multicians.org/unix.html.)
02:22:35 <elliott> pikhq: BTW, I did the same split-option-out-into-separate-command thing with kill.
02:22:49 <elliott> pikhq: -l is meant to print a list of available signals, and also -l $? is meant to print what signal a process with that exit code was killed by.
02:23:03 <elliott> pikhq: But GNU kill has something better: -l TERM prints out the number for TERM, and -l 15 prints out TERM.
02:23:20 <elliott> So I made a signal(1) which can list available signals, and translates signal names/numbers.
02:23:27 <elliott> And got rid of -l from kill.
02:23:53 <pikhq> And if you want POSIXly correct, well, screw you. :P
02:24:04 <elliott> Oh, bin/signal has a bug ...
02:25:04 <elliott> pikhq: I'm going to WhatStuffActuallyUsesly correct. :P
02:25:20 <pikhq> Ah, the GNU way without the stupid.
02:29:08 <elliott> pikhq: [[The precision used may be less than the default six digits of %f, but shall be sufficiently precise to accommodate the size of the clock tick on the system (for example, if there were 60 clock ticks per second, at least two digits shall follow the radix character).]]
02:29:18 <elliott> pikhq: Does that mean... CPU clock?
02:31:03 <pikhq> Clearly it means a grandfather clock attached to the computer.
02:31:24 -!- wareya has quit (Read error: Connection reset by peer).
02:32:24 -!- wareya has joined.
02:39:39 <elliott> pikhq: BTW, I'm going to have probably a separate project moretools that has things like wget, ping, etc.
02:39:44 <elliott> i.e. the bigger, auxiliary stuff.
02:40:53 <zzo38> Does it have netcat?
02:42:17 <elliott> zzo38: No; use Hobbit's original netcat.
02:42:32 <elliott> Whereas things like wget are rather big and could do with shrinking.
02:43:22 <zzo38> The full system, if it is intended to have a connection to the internet, should require netcat.
02:43:34 <elliott> zzo38: Yes, but moretools is my implementations of things.
02:43:39 <elliott> For netcat, I'll use Hobbit's netcat.
02:43:47 <zzo38> elliott: OK. You can do that, then.
02:44:10 <elliott> pikhq: 50K for cat, date, echo, env, false, kill, pwd, signal, sleep, true, vis. signal has some bug that I don't know what it is right now, vis is amusingly broken.
02:44:22 <elliott> date has one bug (-u shows the correct time, but doesn't say "UTC")
02:45:24 -!- baojian has joined.
02:45:27 <zzo38> Use short options (I do not like GNU long options)
02:45:37 <Gregor> elliott: Stop all the downloadin'!
02:45:47 <elliott> zzo38: I do. Well, not for most things, but wget, sure
02:46:00 <Gregor> elliott: Help computer.
02:46:31 <Gregor> elliott: You're doing your part all wrong :P
02:46:43 <zzo38> Use long options if you want to, but in my implementation there will be no long options.
02:46:45 <elliott> Gregor: I have no idea what you are referencing :P
02:47:16 <Gregor> elliott: You don't know of the Fenslerfilm GI Joe PSAs?
02:48:46 <elliott> Well, I googled a minute ago and found http://www.fenslerfilm.com/PSAS.htm.
02:48:56 <Gregor> elliott: Watch them FOREVER
02:49:37 <Gregor> elliott: Watch them once? :P
02:49:39 <elliott> Does this make any more sense when intoxicated?
02:49:53 <Gregor> Idonno, but they grow on you like Charlie the Unicorn :P
02:50:11 <elliott> I liked Charlie the Unicorn first time around.
02:51:54 <Gregor> How 'bout I list the particularly-funny ones? :P
02:52:55 <zzo38> Have you found all of the secrets yet in Godel, Escher, Bach?
02:53:12 <zzo38> (Yes; this book does, in fact, have secret pages.)
02:53:40 <elliott> pikhq: -rwxr-xr-x 1 elliott elliott 26K Dec 4 02:52 box
02:53:40 <Gregor> elliott: 5, 6, 7, 8, 13, 15, 16, 17, 20, 22 and 24 are the funny ones :P
02:54:15 <zzo38> Sgeo: Yes. There are secret pages, as well as secret things and obscure things found on the non-secret pages.
02:54:28 <elliott> pikhq: But I don't like the changes I had to make to the codebase to do that.
02:54:32 <Sgeo> How do secret pages work in a physical medium?
02:54:41 <elliott> pikhq: (I could avoid it if I did each program as an object.)
02:55:06 <zzo38> Sgeo: Figure it out!
02:55:24 <Gregor> Sgeo: Porkchop sandwiches!
02:56:01 <zzo38> (Hint: Some of the things the dialogues discuss are somewhat related to the way the secret pages work in a physical medium.)
02:56:51 <Sgeo> Gregor, those... those can't be derived from the actual cartoon, with stuff dubbed over, can they?
02:57:04 <Sgeo> That's what they LOOK like, but the content of the visuals makes no sense in that context
02:57:39 <Gregor> Sgeo: The cartoon had stupid PSAs in it.
02:58:15 <Sgeo> How TF does some guy vaporizing people in a burning building...
02:58:32 <Sgeo> What was the original PSA. I have to know?
02:59:44 <Gregor> Sgeo: They sometimes modified the video slightly :P
03:01:44 <zzo38> As part of the CGA Collection, I made a variant of the Wumpus game. One difference is there is nine levels on top of each other. You have only one arrow (non-crooked), once used it can never be retrieved. You are usually not told the room number or the direction of the exits. There are other differences, too.
03:02:08 <zzo38> And there is five wumpus instead of just one.
03:02:15 <pikhq> gettimeofday() provides enough bits to accurately measure time from 1970 to 292277026596.
03:02:18 <zzo38> There is also various colored potions.
03:02:25 <pikhq> So very much overkill.
03:04:31 <Sgeo> Y29227702.6597K
03:04:55 <Sgeo> Wait, I put the decimal in the wrong spot
03:05:02 <Sgeo> Meh, correcting jokes ruins them I think
03:08:33 <elliott> pikhq: -rwxr-xr-x 1 elliott elliott 22K Dec 4 03:07 box
03:08:39 <elliott> pikhq: This time with separate object files and no code changes.
03:08:43 <zzo38> I am trying to make a Semi-literate Gforth this is what I have so far: http://sprunge.us/KaMH
03:09:18 <zzo38> Please tell me if it is wrong or any other suggestion and so on.
03:10:02 <elliott> pikhq: Is this the "evil idea" kind of hmm?
03:10:34 <elliott> The box isn't my focus though; the individual programs are.
03:10:37 <pikhq> Perhaps you'd like a shell in there.
03:11:40 <zzo38> Please tell me an opinino of what I have so far this program!!?!. !
03:12:07 <elliott> pikhq: If there is a "shell" it will be one optimised to run init scripts and the like. For an interactive shell just use a ksh.
03:13:30 <elliott> http://uncyclopedia.wikia.com/wiki/UnPoetia:Walking_in_a_Klingon_Wonderland
03:14:33 <zzo38> I will have to add some things, such as explanation section (I can have a TeX macro switching the category codes between both modes), and then make a variant of Computer Modern for typesetting Forth codes, and then add some things for formatting each word.....
03:14:49 <zzo38> I have not quite figure out yet how to make it format each word.
03:15:28 <zzo38> (The only thing this program does so far is indexing! I do need to add the other things in, too.)
03:17:06 <zzo38> This is because I want to make the "Secrets of SoS" roguelike game to be four books in one book (with tabs sticking out of the pages to beginning of each one).
03:18:29 <zzo38> There is a problem with this program the way it works so far; the words NEXT-ARG REQUIRED BYE are indexed, even though they should not be indexed.
03:19:49 <elliott> pikhq: Irritating because I have to join things up with spaces.
03:28:57 <elliott> pikhq: I wish pcc had nicer warnings.
03:29:06 <elliott> (It has very few, and seemingly none if you don't use system headers.)
03:43:15 <elliott> pikhq: I'm going to tackle test; seems like fun.
03:44:06 <elliott> Although actually no, not right now, it has some corner cases that look annoying.
03:44:14 <elliott> Head! Everyone loves getting head in their coreutils.
03:45:13 <elliott> http://www.opengroup.org/onlinepubs/009695399/utilities/head.html
03:51:13 <elliott> pikhq: Man, have you seen how laughably minimalist POSIX head is?
03:51:17 <elliott> pikhq: http://www.opengroup.org/onlinepubs/009695399/utilities/head.html
03:51:22 <elliott> pikhq: No negative argument, no bytes...
03:54:23 <elliott> Man, to hell with head for now.
03:58:16 -!- baojian has quit (Read error: Connection reset by peer).
04:12:41 <pikhq> elliott: It's... Just head.
04:12:53 <pikhq> This from the same people that brought us pax.
04:13:08 <elliott> pikhq: I like how their head(1) is useless and yet they've bloated everything else.
04:13:11 <elliott> Literally useless; I use -c all the time.
04:13:25 <pikhq> Yeah, -c is definitely a useful option.
04:15:16 <elliott> -rwxr-xr-x 1 elliott elliott 23K Dec 4 04:14 box
04:15:53 <elliott> suffixlen = strlen(suffix);
04:15:53 <elliott> if (!strcmp(path + strlen(path) - suffixlen, suffix))
04:15:53 <elliott> path[pathlen - suffixlen] = 0;
04:18:35 <elliott> pikhq: Hey, you did basename too.
04:18:52 <elliott> pikhq: Um, how did it take you 87 lines and various functions? I've done it in 36 lines of main...
04:20:03 -!- Goosey has joined.
04:21:52 -!- augur has quit (Remote host closed the connection).
04:22:01 <pikhq> elliott: I implemented the precise algorithm POSIX specifies.
04:22:59 <pikhq> I must have made it more complicated than necessary.
04:24:16 <elliott> pikhq: I think I'm going to start replacing uses of strtol with atoi i the codebase, because I don't have to check errors and the like and if you pass a stupid non-number that's your problem ...
04:30:45 -!- Wamanuz has quit (Ping timeout: 276 seconds).
04:31:45 <elliott> pikhq: Now I'm doing strings.
04:31:56 -!- Wamanuz has joined.
04:35:32 <elliott> pikhq: Remind me to make these program use mmap sometime.
04:37:56 -!- augur has joined.
04:44:24 <pikhq> elliott: That's not my job, that's AnMaster's job.
04:44:42 <elliott> pikhq: Actually, mmap is just plain nice.
04:44:47 <elliott> pikhq: Think about it: It's orthogonal persistence.
04:44:58 <elliott> "I want this bit of memory to happen to correspond to this bit of disk."
04:45:03 <elliott> Let the OS handle the rest.
04:46:01 <pikhq> mmap is definitely a nice function.
04:48:59 <zzo38> Do you know how to make Where Is My Keys Soup?
04:57:16 <elliott> pikhq: Lol, Wikipedia power abusers: http://en.wikipedia.org/wiki/User_talk:The_last_username_left_was_taken
04:57:23 <elliott> log-reading ais523: http://en.wikipedia.org/wiki/User_talk:The_last_username_left_was_taken
05:03:20 <Sgeo> If the computers were, say, set up by a person who set up the machines identically, and none of the users installed anything...
05:04:56 <Ilari> At least that seemingly isn't case of wikipedia admins abusing their position for advancing agenda (yup, seen that too).
05:08:35 <Sgeo> Me, who doesn't pay attention to Wikipedia politics
05:08:41 <elliott> Ilari: I love how they go from "same IP address and headers" ========> "STOP QUESTIONING ME IT'S YOUR COMPUTER BECAUSE Q.E.D., NEVER QUESTION MY AUTHORITY"
05:08:53 <elliott> They must get a real kick out of it.
05:09:09 <Sgeo> Does XFF even reveal anything beyond IP?
05:10:52 <Sgeo> You know what might work somewhat? Using cookies
05:11:05 <Sgeo> Shouldn't get any false positives from that, I th..
05:14:07 -!- yorick has quit (Read error: Operation timed out).
05:14:24 <elliott> pikhq: Yeah, I have ABSOLUTELY NO IDEA why vis is failing. I've even made it basically identical with the BusyBox logic.
05:14:28 <elliott> I'll look into it tomorrow. For now, sleep.
05:14:31 -!- elliott has quit (Quit: Leaving).
05:17:22 -!- yorick has joined.
05:30:50 <Sgeo> There is Paranoia RPGness that focuses on High Programmers?!
05:39:11 <zzo38> Now, how do I make the formatting work with this literate Forth system I did, do you know anything about this?
05:42:37 * Sgeo has a DreamWriter 500
05:42:43 * Sgeo wonders how hackable it is
05:45:43 -!- Sasha has joined.
05:46:35 -!- Sasha2 has quit (Ping timeout: 272 seconds).
05:49:26 -!- hagb4rd has quit (Ping timeout: 245 seconds).
05:56:12 -!- evincar has joined.
06:04:46 <zzo38> Sgeo: I have dealt with the DreamWriter before. I do not have one, but I have been able to support copying files to another computer by the serial port and printing them. (Someone else who had it asked me to do that, and having never seen it before, I had to figure it out, so I did.)
06:06:55 <evincar> So...I have a bit of a problem.
06:07:05 <evincar> Good language idea, no idea what to name it.
06:07:53 <zzo38> evincar: What is the idea?
06:09:00 <evincar> zzo38: The language is purely functional in the same sense that Haskell is purely functional (that is, kinda), but instead of abstracting sequential operations using monads, it uses a set of timelines, which may be asynchronous.
06:09:48 <zzo38> evincar: Can you call it "Timehaskell"?
06:09:52 <zzo38> Or, something similar
06:10:21 <evincar> zzo38: Nah, it's not really like Haskell design-wise. I was just drawing a parallel.
06:10:33 <evincar> I was thinking of something related to time, light, a timeline, or speed.
06:11:33 <zzo38> Maybe you can mix up the letters of some words to make a anagram.
06:12:23 <zzo38> Yes, it is bit of a cheap trick.
06:12:29 <evincar> I've looked around in other languages, finding nothing really satisfying.
06:24:47 <evincar> That's how I feel about it...it's not thrilling.
06:30:50 <zzo38> But I think it will do.
06:31:21 <zzo38> If you are unsure, make it as a subpage of your user page just with a title numbered, and then move it when you have a proper title.
06:33:56 <evincar> Oh, it's not an esolang...
06:34:04 <evincar> ...at least, it's not supposed to be.
06:34:14 <evincar> I think "Momentum" is better.
06:37:06 <evincar> Blah, boring topic. It is an interesting language, though.
06:40:34 -!- evincar has quit (Quit: ChatZilla 0.9.86 [Firefox 3.6.12/20101026210630]).
06:40:59 <Sgeo> Haskell is not "kindof" functional
06:41:10 * Sgeo growls at everyone who thinks that IO introduces an impurity
07:15:14 <zzo38> Do you know if there is any way in Gforth to override the prior use of a non-deferred word?
07:36:53 -!- Wamanuz2 has joined.
07:36:54 -!- Wamanuz has quit (Read error: Connection reset by peer).
07:43:17 -!- Sgeo has quit (Read error: Connection reset by peer).
07:59:59 -!- clog has quit (ended).
08:00:00 -!- clog has joined.
08:03:43 <zzo38> I made a override that I almost got it to work.
08:19:15 -!- zzo38 has left (?).
08:53:44 -!- Phantom_Hoover has joined.
09:17:55 -!- Goosey has quit (Ping timeout: 264 seconds).
09:29:27 -!- sebbu2 has joined.
09:31:42 -!- sebbu has quit (Ping timeout: 276 seconds).
09:35:24 -!- oerjan has joined.
09:41:37 -!- MigoMipo has joined.
10:24:17 -!- sebbu2 has changed nick to sebbu.
10:27:46 -!- Phantom_Hoover has quit (Ping timeout: 245 seconds).
10:29:20 -!- nopseudoidea has joined.
10:37:05 -!- kar8nga has joined.
10:41:09 -!- Phantom_Hoover has joined.
10:46:58 -!- nopseudoidea has quit (Quit: Quitte).
10:50:56 -!- aloril has quit (Ping timeout: 264 seconds).
11:04:18 -!- aloril has joined.
11:07:52 -!- FireFly has joined.
11:46:34 -!- FireFly|n900 has quit (Ping timeout: 245 seconds).
12:19:46 -!- MigoMipo has quit (Ping timeout: 240 seconds).
13:16:29 -!- elliott has joined.
13:17:12 <elliott> 04:47:40 <nooga> time to buy minecraft
13:18:22 <elliott> 22:40:59 <Sgeo> Haskell is not "kindof" functional
13:18:23 <elliott> 22:41:10 * Sgeo growls at everyone who thinks that IO introduces an impurity
13:18:28 <elliott> Sgeo: the IO monad is impure.
13:42:29 -!- nopseudoidea has joined.
13:48:55 -!- nopseudoidea has quit (Quit: Quitte).
14:15:50 -!- geo has joined.
14:17:33 <elliott> pikhq: I made true and false smaller but they don't work now. :p
14:25:10 -!- geo has left (?).
14:31:55 <elliott> 77861 bytes for false, true, yes, sleep, pwd, echo, basename, uname, signal, link, cat, date, chroot, env, strings, vis and kill, in ascending order of size.
14:32:41 <elliott> TODO: Figure out some sort of way to only include the subset of error strings that the calls in the program can produce.
14:32:50 <elliott> Probably by manual specification.
14:35:48 -!- aloril has quit (Remote host closed the connection).
14:42:46 -!- aloril has joined.
14:48:20 -!- yorick has quit (Remote host closed the connection).
15:07:25 <elliott> Vorpal: pikhq: cal(1)'s behaviour is not specified to be locale-dependent (POSIX 2004).
15:07:27 <elliott> " The cal utility shall write a calendar to standard output using the Julian calendar for dates from January 1, 1 through September 2, 1752 and the Gregorian calendar for dates from September 14, 1752 through December 31, 9999 as though the Gregorian calendar had been adopted on September 14, 1752."
15:10:03 <elliott> char *shortmonths = "janfebmaraprmayjunjulaugsepoctnovdec";
15:10:08 -!- jcp has quit (Quit: Later).
15:13:02 -!- jcp has joined.
15:14:18 <oerjan> you could probably save the nul byte at the end of that too :D
15:16:51 -!- Sasha2 has joined.
15:18:39 -!- Sasha has quit (Ping timeout: 245 seconds).
15:19:59 <elliott> oerjan: wait, yes i could, just a matter of convincing the C compiler :D
15:26:03 -!- Sasha has joined.
15:26:04 -!- Sasha2 has quit (Read error: Connection reset by peer).
15:29:35 <elliott> oerjan: but hey, I'm not crazy!
15:31:25 <elliott> oerjan: just because I have false, true, yes, sleep, pwd, echo, dirname, basename, uname, signal, link, cat, date, chroot, env, strings, vis and kill in 80204 bytes doesn't make me crazy! nor that I manually call the linker and use Brian "INTERCAL Style Guidelines" "41 byte ELF executable" Raiter's sstrip utility, which renders the file unreadable by the GNU objdump disassembler!
15:31:47 <elliott> oerjan: just because I can link them into one executable of 23231 bytes doesn't make me crazy either! It makes me a genius!
15:32:30 <oerjan> as long as that's settled then
15:32:42 <elliott> WHY ARE YOU LAUGHING AT ME
15:32:54 <elliott> "January", "February", "March", "April", "May", "June", "July", "August",
15:32:55 <elliott> "September", "October", "November", "December", NULL
15:32:57 <elliott> "jan" "feb" "mar" "apr" "may" "jun" "jul" "aug" "sep" "oct" "nov" "dec";
15:33:05 <elliott> i could just use the first three characters of the months array!
15:33:53 <oerjan> why do you need null termination on months?
15:35:08 -!- nopseudoidea has joined.
15:35:43 <elliott> oerjan: alas the code-based solution does *not* seem to help things. well, using tolower().
15:37:23 <Vorpal> <elliott> That is all.
15:37:39 <Vorpal> elliott, I believe all utils should have that
15:37:59 <elliott> Vorpal: no, see http://www.opengroup.org/onlinepubs/009695399/utilities/cal.html
15:38:14 <elliott> Vorpal: it is *expressly* defined, without any mention of locales, to use the 1752-switchover calendar
15:38:24 <oerjan> elliott: apropos locale and cal, if i set it to nb_NO.utf8 the month and day names do become norwegian, although the julian/gregorian jump is still sep 1752
15:38:30 <elliott> oerjan: that's just what GNU does
15:38:38 <elliott> oerjan: which is usually completely uncorrelated with what posix wants :)
15:38:51 <Vorpal> elliott, I believe POSIX has a blanket statement about locales for output months
15:39:00 <elliott> oerjan: but in that case, yes, it is correct
15:39:05 <elliott> Vorpal: [[ The cal utility shall write a calendar to standard output using the Julian calendar for dates from January 1, 1 through September 2, 1752 and the Gregorian calendar for dates from September 14, 1752 through December 31, 9999 as though the Gregorian calendar had been adopted on September 14, 1752.]]
15:39:09 <elliott> Vorpal: it is hard to get more precise than that
15:39:14 <elliott> everything else starts "In the POSIX locale" or the like
15:39:21 <oerjan> but then i'd hazard a guess that most norwegians, just like me, have no f idea when norway switched :D
15:39:26 <Vorpal> elliott, but it doesn't say anything about what the output month names should be
15:39:28 <elliott> Vorpal: ok, find the blanket statement; otherwise I contend you want me to violate POSIX
15:39:34 <elliott> Vorpal: duh, I know *that*
15:39:51 <elliott> Vorpal: but the point is that regardless of what locale you're in, the switchover is in sep 1752 and no other date
15:39:53 <Vorpal> elliott, and that bit is afaik covered by the blanket statement
15:40:17 <elliott> anyway if you want locale support, link these with uClibc or glibc :P
15:40:30 <elliott> although right now date's default formatting string is hardcoded because I can't figure out how to get it from the locale without Pain(TM)
15:41:38 <elliott> Vorpal: um posix specifies that each locale should define its own date(1) formatting string
15:41:53 <elliott> so I would *expect* it to be a standard call or something, but knowing Linux ...
15:42:05 <Vorpal> elliott, it is probably by catgets
15:42:09 <elliott> Vorpal: anyway gettext is *huge* especially for just one string...
15:42:17 <elliott> i could just use an env var or something :P
15:42:18 <Vorpal> elliott, more than that
15:42:32 <elliott> char *fmt = "%a %b %e %H:%M:%S %Z %Y";
15:42:34 <Vorpal> lör dec 4 16:41:54 CET 2010
15:42:37 <elliott> Vorpal: the actual month names etc. are done by strftime.
15:42:37 <Vorpal> Sat Dec 4 16:42:00 CET 2010
15:42:41 <elliott> Vorpal: and so are Not My Problem.
15:42:44 <Vorpal> elliott, so they are localised?
15:42:52 <elliott> Vorpal: in whateverlibc with locales,y es.
15:42:53 <Vorpal> elliott, you still need to make one library call to make that happen
15:42:56 <elliott> Vorpal: it's just the default formatting string that's different.
15:43:03 <elliott> strftime looks at the locale
15:43:22 <Vorpal> elliott, yes but the locale won't be used without that one library call
15:43:27 <Vorpal> trying to remember the name of it
15:43:40 <elliott> The environment variables TZ and LC_TIME are used.
15:43:56 <Vorpal> setlocale(LC_ALL, "");
15:44:04 <Vorpal> "On startup of the main program, the portable "C" locale is selected as default. A program may be made portable to all locales by calling:"
15:44:13 <elliott> well fuck that, i'll add that later
15:44:43 <Vorpal> elliott, I mean it is one call :P
15:44:53 <elliott> Vorpal: yes, but i have a lot of prorgams.
15:45:04 <elliott> Vorpal: I'll do locale support after I implement, say, mount.
15:45:15 <elliott> i want to get it useful first
15:45:24 <elliott> oerjan: patches to add those welcome
15:45:32 <Vorpal> elliott, mount is not POSIX iirc
15:45:39 <elliott> oerjan: EVERY PATCH WELCOME
15:45:51 <elliott> Vorpal: yes, it's useful; usefulness is in fact prohibited by POSIX
15:46:01 <elliott> Vorpal: this is why POSIX still specifies SCCS commands (and in the same list as normal commands, at that)
15:48:29 * elliott decides to steal most of the cal logic from pikhq
15:48:32 <elliott> cal is a very ugly command
15:48:41 <elliott> all the alignment, side-by-side, etc.
15:48:57 <elliott> Vorpal: oh joy, another MC update
15:49:51 <elliott> something just came through supposedly
15:49:52 <Vorpal> elliott, nothing on his blog about it
15:50:03 * elliott dearly hopes that's a legitimate bug in the yellow
15:50:16 <Vorpal> elliott, I think it is intentional
15:50:46 <Vorpal> elliott, it has been there for ages
15:51:59 <elliott> Vorpal: http://en.wikipedia.org/wiki/Charles_Bukowski
15:52:16 <elliott> HAHAHA CROSS-MEDIUM CONVERSATIONS
15:54:17 <oerjan> wait nothing about crossing mediums in that article
15:55:01 <elliott> oerjan: no, I mean my conversation with Vorpal
15:55:27 <oerjan> you mean that link wasn't supposed to be on #esoteric?
15:55:42 <elliott> oerjan: you can't Ctrl+V into minecraft.
15:55:49 <elliott> so i said "IRC" on minecraft and linked it here
15:56:08 <elliott> clearly we need EmacsCraftTalk
15:57:00 <elliott> Why does cal(1) start months with Sunday?
15:57:00 <fizzie> One cannot simply ctrl-V into Mord^H^H^Hinecraft.
15:57:08 <elliott> Is it perhaps because it is an evil instrument of capitalism?
15:57:23 <Vorpal> elliott, what would emacscrafttalk be?
15:57:42 <elliott> Vorpal: Rip out Minecraft's chat input line and replace it with Emacs.
15:58:04 <oerjan> elliott: i think that's locale dependent too
15:58:18 <elliott> oerjan: yeah but fuck you i'm not implementing locales in cal to start with :D
15:58:23 <elliott> it's enough of a mess to begin with
15:59:51 <oerjan> starts with sunday in norwegian locale too
16:02:02 <elliott> oerjan: yeah that's just silly
16:02:05 <elliott> only morons start the day with sunday!
16:02:30 <oerjan> "A future version of IEEE Std 1003.1-2001 may support locale-specific recognition of the date of adoption of the Gregorian calendar.
16:02:39 <elliott> static const int months_offset[] = {0, 3, 3, 6, 1, 4, 6, 2, 5, 0, 3, 5};
16:02:53 <elliott> oerjan: well, i'm quoting from the 2004 standard
16:03:02 <elliott> or at least an indistinguishable draft
16:03:16 <oerjan> well they didn't say how far in the future :D
16:03:18 <elliott> wait oerjan uses unix now?
16:03:23 <elliott> or just googled manpages :P
16:03:38 <oerjan> i _do_ have an nvg shell account you know
16:03:57 <elliott> oerjan: no you use windows on EVERYTHING
16:04:06 <elliott> even if you don't haveone.
16:04:15 <oerjan> my watch has only one window
16:08:08 <Vorpal> <oerjan> starts with sunday in norwegian locale too
16:08:13 <Vorpal> it starts with monday for me
16:14:35 -!- wareya has quit (Read error: Connection reset by peer).
16:15:30 -!- wareya has joined.
16:17:26 <fizzie> If you're speaking of cal's first-day-of-week, using a fi locale does Sun → Mon too: http://p.zem.fi/cal-fi
16:18:03 <elliott> fizzie: I think I'll just make it always Monday to Sunday because that's how everyone worth considering to exist thinks about the week.
16:18:24 <elliott> (Of course, if I bloat this stuff up with locales (probably behind an ifdef), I'll see what I can do about getting the information from there.)
16:18:46 <oerjan> huh, apparently the cal here is BSD ncal
16:19:40 <fizzie> Ubuntu's cal is from bsdmainutils.
16:20:04 <elliott> oerjan: try "dpkg" then "rpm" to determine approx. distro :P
16:20:24 <fizzie> Or "lsb_release -a" instead.
16:20:35 <elliott> fizzie: Here, cal does the rather irritating thing of inverse-videoing the current day. I blamed it on GNU, but no! Nobody is safe from the crazy!
16:20:36 <fizzie> It's S as in Standard!
16:20:46 <elliott> fizzie: Hey, Kitten is non-LSB-compliant. :P
16:21:10 <oerjan> dpkg exists, rpm doesn't (at least in PATH)
16:21:12 <Vorpal> elliott, are you on MC?
16:21:17 <fizzie> Kitten is angry, kitten is offended.
16:21:32 <fizzie> oerjan: And lsb_release?
16:21:35 <elliott> fizzie: How did I get that reference without even double-taking...
16:21:51 <elliott> My brain's random access times are AWESOME.
16:22:13 <elliott> Vorpal: I don't know. Are you doing something interesting?
16:22:45 <Vorpal> elliott, catching fish
16:22:50 <Vorpal> utilising a fishing implemenat
16:23:10 <elliott> Vorpal: there are no fish.
16:23:26 <Vorpal> elliott, they got fixed in MP
16:23:35 <elliott> Vorpal: what, they exist in SP?
16:23:42 <Vorpal> elliott, you don't see any swimming of course
16:23:48 <Vorpal> but you can still catch them
16:24:00 <Vorpal> elliott, 3 sticks + 2 strings = fishing rod
16:24:18 <fizzie> The fishing rod generates fish from otherwise plain water, as in real life.
16:24:49 <elliott> fizzie: Do you always catch a fish -- * this big * -- and then mysteriously lose it seconds later?
16:24:58 <elliott> You know, like in real life.
16:25:22 <fizzie> Well, there is a timing-related catchery you need to perform, I think. I've never really fished.
16:26:35 <elliott> TODO: Make basename and dirname call strlen() only once and then work out the new length from the modifications made.
16:26:56 <oerjan> Linux version 2.6.26-2-486 (Debian 2.6.26-25lenny1) (dannf@debian.org) (gcc version 4.1.3 20080704 (prerelease) (Debian 4.1.2-25)) #1 Thu Sep 16 18:43:30 UTC 2010
16:27:47 <Vorpal> elliott, going to check? Also I want to try something
16:28:02 <Vorpal> you can hit animals and drag them to you with the fishing rod
16:28:07 <Vorpal> I wonder if it works on other players
16:28:14 <elliott> oerjan: I suggest deleting [[WikiPL]] and [[Talk:WikiPL]] to avoid immense confusion
16:28:26 <elliott> Vorpal: unlikely, I'm doing other things right now
16:28:37 <oerjan> elliott: i already made a request to the admins in the article
16:29:54 <elliott> oerjan: oh you're not an admin :D
16:31:37 <elliott> oerjan: I think I'm going to clone WikiPL and make it (1) actually a programming language and (2) esoteric because, really, the concept is too good to pass up.
16:31:39 <oerjan> fizzie: elliott: ^ so it was apparently debian
16:31:47 <elliott> also (3) done in a functional language
16:32:12 <oerjan> elliott: wikiplia was done in ML
16:32:24 <elliott> looks like http://www.wikipl.com/index.php/Main_Page has been updated to s/programming language/programming environment/g
16:32:31 <elliott> oerjan: yes, but ML has untagged side-effects
16:32:38 <elliott> oerjan: with Haskell, I'd just ban IO
16:32:47 <elliott> and limit computations to 30s or whatever
16:33:05 <oerjan> with haskell you can also make your own restricted IO monad
16:33:25 <elliott> oerjan: but usually it's nicest to deal with input as a presumably-lazy list anyway
16:33:29 <elliott> at least for simple esolangs
16:33:34 <elliott> and they rarely have non-stdin inputs
16:35:27 <oerjan> of course only this machine (tyrell) needs to be debian, nvg has other hosts too (i recall there's an OpenVMS somewhere)
16:35:38 <elliott> oerjan: openvms? awesome :D
16:36:17 <elliott> [[As another data point, Squeak forces "Han disunification" by encoding the language in bits 24-31 of each UTF-32 element... it's not a coincidence IMNSHO that Unicode support was added to Squeak by a Japanese.]]
16:38:15 -!- MigoMipo has joined.
16:38:55 <oerjan> elliott: when i first joined nvg back in 1991/2 or something, their main machine was VAX/Ultrix
16:39:12 <Vorpal> <elliott> oerjan: I think I'm going to clone WikiPL and make it (1) actually a programming language and (2) esoteric because, really, the concept is too good to pass up. <-- 1) hackiki 2) hackiki
16:39:33 -!- kar8nga has quit (Remote host closed the connection).
16:39:59 <oerjan> at that time the _main_ university system was VAX/VMS
16:41:15 <Vorpal> oerjan, in 1992 I had recently learned to speak. You are old
16:46:42 <elliott> Vorpal: (1) no (2) you are wrong
16:46:53 <elliott> (3) you don't understand hackiki, or you don't understand what i said, pick one
16:51:26 -!- sftp_ has joined.
16:51:36 -!- cheater99 has quit (Quit: Leaving).
16:51:40 -!- sftp has quit (Ping timeout: 265 seconds).
16:52:06 <oerjan> http://www.vg.no/nyheter/utrolige-historier/artikkel.php?artid=10027789
16:55:36 <elliott> static void repeat_print(const char *s, int n)
16:55:37 <elliott> for(int i = 0; i != n; i++)
16:55:41 <elliott> pikhq: How did you manage to make that a function.
16:56:07 <oerjan> http://translate.google.no/translate?u=http%3A%2F%2Fwww.vg.no%2Fnyheter%2Futrolige-historier%2Fartikkel.php%3Fartid%3D10027789&sl=no&tl=en&hl=&ie=UTF-8
16:56:34 <oerjan> lovely translation, that
16:56:52 <oerjan> (forspiste = over-ate)
16:56:56 -!- sftp has joined.
16:58:08 -!- sftp_ has quit (Ping timeout: 264 seconds).
16:58:45 <Vorpal> <oerjan> http://www.vg.no/nyheter/utrolige-historier/artikkel.php?artid=10027789 <-- fake news?
16:59:00 <elliott> Vorpal: AP from the looks of it, so no
16:59:07 <oerjan> um not that i know of...
16:59:28 <Vorpal> oerjan, what is "sekk"?
16:59:29 <elliott> AP, Reuters and probably others all have sections dedicated to weird stuff.
16:59:55 <elliott> oerjan: "I took the rat in uninvited dogjest" what the hell is dogjest :D
17:00:04 <elliott> is it like... the kind of joking a dog does
17:01:34 <oerjan> do-gjest = toilet guest
17:02:26 -!- sftp_ has joined.
17:03:14 -!- sftp has quit (Ping timeout: 245 seconds).
17:03:16 <oerjan> elliott: it's not AP, it's norwegian news and it says the source is VG itself
17:03:26 <Vorpal> also that translation did 50 cm -> 50 inches
17:03:27 <elliott> oerjan: then google translates VG as AP :)
17:03:33 <elliott> presumably due to statistical translation
17:04:05 <oerjan> elliott: huh that's VG Nett in the original
17:04:21 <oerjan> also i noticed it translated 50 centimeter into 50 inches
17:04:57 <elliott> oerjan: well google translate is all statistical translation
17:05:10 <elliott> oerjan: you're likely to see AP and VG in similar places but in english vs. norwegian texts
17:06:22 <oerjan> amazing stories is not far off though, although "incredible" is closer
17:07:22 <Vorpal> elliott, I really like painterly
17:07:27 <Vorpal> wish there was a high-res one
17:07:56 -!- sftp has joined.
17:08:01 <elliott> oerjan: http://www.pulpworld.com/images/amazing_stories_2808.jpg
17:09:04 <elliott> static const unsigned char sep1752[] ALIGN1 = {
17:11:34 -!- sftp_ has quit (Read error: Connection reset by peer).
17:14:06 -!- sftp has quit (Ping timeout: 240 seconds).
17:14:29 -!- sftp has joined.
17:20:18 <oerjan> ...looks pretty finished to me...
17:22:40 <elliott> oerjan: You also need to handle printing entire years.
17:22:58 <elliott> oerjan: Which are, traditionally, three months side-by-side.
17:23:14 <elliott> oerjan: And I also have to handle Julian dates to be Totally Correct(TM).
17:23:18 <elliott> (different leap year logic)
17:23:28 <elliott> oerjan: pretty much, pikhq's implementation manually does coroutines
17:23:35 <elliott> oerjan: by having one step of the coroutine be a function :P
17:23:39 <elliott> and then building the rest manually
17:23:44 <elliott> if I wasn't using C I could use proper coroutines, but eh.
17:23:54 -!- sftp has quit (Ping timeout: 240 seconds).
17:23:59 -!- sftp has joined.
17:24:13 <elliott> Also I have to clean up pikhq's horrible code ;)
17:26:49 <pikhq> elliott: I previously had it as actual Duff's Device coroutines.
17:27:06 <elliott> pikhq: I believe that I saw that and told you you were crazy.
17:27:26 <pikhq> elliott: Also: my C code there is heavily heavily Haskell-influenced.
17:27:32 <pikhq> elliott: Lots and lots of tiny functions!
17:27:42 <elliott> Functions are the DEVIL, they take up code space :P
17:27:54 <pikhq> Any reasonably optimising compiler will inline them.
17:28:05 <elliott> pikhq: pcc produces smaller code in general than gcc, but it's not very smart, so it's safer to do things by hand.
17:28:23 <elliott> writecentred(months[i], strlen(months[i]), 20); printf(" ");
17:28:24 <elliott> writecentred(months[i+1], strlen(months[i+1]), 20); printf(" ");
17:28:24 <elliott> writecentred(months[i+2], strlen(months[i+2]), 20); printf("\n");
17:30:05 <pikhq> elliott: Look at BSD cal for a bit.
17:30:18 <elliott> pikhq: Plan 9 cal is quite nice. BusyBox cal is pretty horrid.
17:30:18 <pikhq> Aaaaw. I wanted to induce serious trauma.
17:30:28 <pikhq> BusyBox cal is a derivative of BSD cal.
17:30:32 <elliott> pikhq: Does *anyone* actually *use* cal?
17:30:36 <pikhq> And by association, a derivative of UNIX cal.
17:30:50 <pikhq> IT'S JUST REVOLTING
17:31:12 <elliott> pikhq: I'm sorely tempted to split it into two programs, the second being a "columnaterate" one.
17:31:17 <pikhq> elliott: I didn't even know there was a cal before I wrote it. :P
17:32:21 <elliott> pikhq: It reminds me of those olde Unix tymes when people actually used this stuff like they would use an actual calendar. (Except it doesn't show the current day, so it's useful for... figuring out what date a weekday is, and vice versa.)
17:32:27 <oerjan> elliott: i _have_ occasionally used cal in the past
17:32:42 <pikhq> GNU cal, I'm pretty sure, actually shows the current day.
17:32:45 <oerjan> ...for looking up a date?
17:32:51 <elliott> pikhq: but it's a bit ugly
17:32:59 <elliott> and by the time that was implemented everyone stopped using cal :)
17:33:02 <pikhq> And GNU cal's code is probably revolting.
17:33:20 <elliott> pikhq: They probably employ Greenspun's Tenth Law to implement, not coroutines, but continuations.
17:33:27 <elliott> Actually, I hope they do. That would be cool.
17:34:27 <elliott> Surprisingly, it's smaller than cat...
17:34:43 <elliott> for (cal1 = cal2 = cal3 = 0; cal1 || cal2 || cal3; line++) {
17:34:57 <elliott> pikhq: Ooh, I should use termios or something to figure out how wide the terminal is, and, and :P
17:35:42 <elliott> January, February, March, Segmentation fault, April, June, July...
17:35:54 <elliott> pikhq: I done broke it somehows.
17:36:06 <oerjan> elliott: bit of a rough spring, there
17:36:15 <pikhq> Astounding considering my avoidance of memory allocation.
17:36:19 <elliott> oerjan: you'd better swat yourself
17:36:28 <elliott> pikhq: I haven't allocated memory *once* in this entire coreutils yet.
17:36:34 <elliott> pikhq: Malloc is my most-hated function.
17:36:45 <pikhq> elliott: Yeah, I'm just saying it's a whole lot harder to do a segfault without malloc involved.
17:36:55 <pikhq> Well. By accident.
17:36:57 <elliott> Clearly I've overrun some static array.
17:37:02 <pikhq> It's really easy to do segfault intentionally.
17:37:15 <pikhq> int main(){*NULL=0;}
17:37:16 <elliott> for (mo = 0; mo < 11; mo += 3) {
17:37:19 <elliott> writecentred(months[mo], strlen(months[mo]), 20); write(1, " ", 1);
17:37:19 <elliott> writecentred(months[mo+1], strlen(months[mo+1]), 20); write(1, " ", 1);
17:37:19 <elliott> writecentred(months[mo+2], strlen(months[mo+2]), 20); write(1, "\n", 1);
17:37:39 <elliott> "January", "February", "March", "April", "May", "June", "July", "August",
17:37:39 <elliott> "September", "October", "November", "December"
17:37:46 <elliott> pikhq: which is also what yours is
17:37:51 <elliott> pikhq: so how come you didn't overflow that buffer?
17:38:03 <elliott> for(int i = 0; i < 11; i += 3) {
17:38:03 <elliott> output_centered(months[i], strlen(months[i]), 20); printf(" ");
17:38:03 <elliott> output_centered(months[i+1], strlen(months[i+1]), 20); printf(" ");
17:38:03 <elliott> output_centered(months[i+2], strlen(months[i+2]), 20); printf("\n");
17:38:28 <pikhq> I genuinely do not know how.
17:39:02 <elliott> "Age: 12 years" --BSD CVS.
17:39:14 <pikhq> My code is *incorrect* but it works correctly. XD
17:40:13 <elliott> pikhq: that isn't the bug though
17:41:15 <elliott> pikhq: btw, i've changed it to start the week with monday
17:41:19 <elliott> because that's the right thing to do.
17:41:43 <pikhq> elliott: I'm gleefully US-centric except when I'm not. :P
17:41:53 <elliott> static char *shortmonths =
17:41:54 <elliott> "jan" "feb" "mar" "apr" "may" "jun" "jul" "aug" "sep" "oct" "nov" "dec";
17:42:00 <elliott> pikhq: NUL BYTES TAKE UP VALUABLE BINARY SPACE
17:42:43 <elliott> pikhq: You have to understand: right now, cal is *less than 7 decimal kilobytes*.
17:42:53 <elliott> I can achieve these things because I am a lunatic.
17:42:57 -!- nopseudoidea has quit (Quit: Quitte).
17:43:25 <pikhq> I presume you still have the Doomsday algorithm.
17:44:10 <elliott> pikhq: Wait. Your code isn't incorrect.
17:44:20 <elliott> pikhq: Also, what Doomsday algorithm? All the logic is from your code.
17:44:35 <elliott> pikhq: 3*3 = 9, 3*4 = 12. So, in fact, the conditional exits after 9.
17:45:30 <elliott> Note to self, centring is broken.
17:45:47 <pikhq> elliott: I use the Doomsday algorithm for figuring out which day of the week the month starts on.
17:46:17 <pikhq> elliott: Which is an algorithm Conway invented to figure out which day of the week *any day* falls on with mental computation.
17:46:56 <elliott> pikhq: Is that... efficient? :P
17:47:27 <pikhq> elliott: Depends on your opinions of division and modulus.
17:47:48 <elliott> pikhq: Division baaaad. Modulo good.
17:48:01 <pikhq> The algorithm, BTW, is starting_day() in my cal.
17:48:01 <elliott> pikhq: (Division by power of two acceeeeeptable.)
17:48:20 <elliott> /* Thirty days hath September,
17:48:21 <elliott> All the rest have thirty-one,
17:48:21 <elliott> Save February, with twenty-eight days clear,
17:48:21 <elliott> And twenty-nine each leap year. */
17:48:22 <elliott> static int monthdays[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
17:48:29 <elliott> Not only do I improve on your code, I give it nice comments too.
17:48:40 <elliott> pikhq: (That rhyme is really terrible in the last two lines.)
17:48:49 <elliott> It's like, hey, guys, you know those leap years we have now?? WE HAVEN'T UPDATED THE RHYME
17:48:56 <elliott> "Oh well, let's just do it half-assedly."
17:49:13 <elliott> pikhq: You know, monthdays could be a ... bitmask.
17:49:29 <elliott> Just special-case February.
17:50:15 <elliott> pikhq: Question: Am I crazy enough to think that (monthdays & (2<<mo)) is a good idea?
17:51:41 <pikhq> elliott: So now you're making it clever.
17:51:54 <pikhq> elliott: And it'll *still* be better than UNIX cal.
17:52:25 <elliott> NOT IF I HAVE ANY SAY IN THE MATTER
17:53:20 <oerjan> YOU CANNOT ESCAPE YOUR DESTINY
17:54:40 -!- MigoMipo has quit (Ping timeout: 255 seconds).
17:56:58 <elliott> MoMo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su
17:56:58 <elliott> 1 2 3 Mo 1 2 3 4 5 6 7 1 2 3 4 5
17:56:59 <elliott> 4 5 6 7 8 9 10 Mo 8 9 10 11 12 13 14 6 7 8 9 10 11 12
17:56:59 <elliott> 11 12 13 14 15 16 17 Mo15 16 17 18 19 20 21 13 14 15 16 17 18 19
17:56:59 <elliott> 18 19 20 21 22 23 24 Mo22 23 24 25 26 27 28 20 21 22 23 24 25 26
17:57:51 <elliott> pikhq: Would this not be simpler? http://en.wikipedia.org/wiki/Zeller%27s_congruence
17:59:15 <pikhq> Oh, BTW, if you're *really* anal about it, you might want to make it handle Julian dates correctly.
18:00:33 <elliott> pikhq: I'm going to, hopefully.
18:00:44 <elliott> pikhq: Because I want September 1752, the whole calendar before that should look right!
18:01:00 <elliott> pikhq: Anyway, this thing is still, inexplicably, smaller than cat. And link.
18:01:11 <elliott> I think because I don't have the errno strings in there. :p
18:03:49 <pikhq> Yeah, it's probably errno doing that.
18:04:55 * pikhq looks forward to elliot's install disk for kitten.
18:05:03 <pikhq> I will be disappoint if it won't fit on a floppy.
18:05:10 <elliott> pikhq: I was about to say. :p
18:05:26 <pikhq> elliot's insttall disk for kitten.
18:05:48 <Gregor> "<oerjan> I ANAL" "<elliott> Success! Shrinkage!"
18:06:02 <elliott> WHOOPS LOOK AT THAT BASENAME CAL CAT CHROOT DATE DIRNAME ECHO ENV FALSE KILL LINK PWD SIGNAL SLEEP STRINGS TRUE UNAME VIS AND YES IN 26K
18:06:06 -!- Mathnerd314 has quit (Ping timeout: 245 seconds).
18:06:10 <elliott> I GUESS I FORGOT TO WRITE ALL THE CODE THAT MAKES THAT HAPPEN
18:06:15 <elliott> IT IS INSTEAD RELYING ON MAGIC
18:06:17 <pikhq> elliott: And that's before upx.
18:06:29 <elliott> pikhq: I very much doubt UPX will work on this.
18:06:38 <pikhq> Are you sstrip'ing?
18:06:40 <elliott> pikhq: I'm using sstrip, which is like strip except it uses a fucking chainsaw.
18:06:50 <Gregor> elliott: Does it highlight the current day in cal? :P
18:06:55 <elliott> pikhq: If you give one of these executables to objdump, it says it's an ELF, and then just quits.
18:07:13 <elliott> Gregor: No. I don't actually like how that looks, but want me to implement it to prove to you JUST HOW BADASS I AM?
18:07:15 <pikhq> upx compresses it, and then fails to decompress it.
18:07:20 <elliott> Cal doesn't process command-line arguments yet but that's a few bytes of code :P
18:07:39 <Gregor> elliott: Where IS this code? :P
18:07:51 <elliott> Gregor: I can get you the latest .cpio.Z if you want.
18:08:03 <elliott> (Format chosen for ridiculousness. .cpio.lzma (not xz) also available.)
18:08:08 <Gregor> elliott: I only want it if you implemented both cpio and compress.
18:08:15 <elliott> Gregor: Not yet, but soon :P
18:08:29 <elliott> Gregor: I could finish the dd/sharchiver and get you a dd/shar, though!
18:08:34 <elliott> Then you'd only need sh and dd.
18:08:58 <elliott> pikhq: Did I mention I'm calling the linker manually so I can use --gc-sections/
18:09:04 <elliott> That actually has an impact on the resulting size.
18:09:14 <pikhq> elliott: -Wl,--gc-sections?
18:09:39 <elliott> pikhq: OK, looks like pcc does, in fact, have -Wl.
18:09:43 <elliott> pikhq: I'll try that later.
18:09:53 <elliott> pikhq: I wish I could use -ffunction-sections, but that's gcc-only :P
18:10:05 <elliott> pikhq: What, UPX compresses box to 14232 bytes.
18:10:20 <elliott> (I strip -s'd it instead of using sstrip.)
18:10:33 <elliott> ^QÉ^AÛu^H<8b>^^H<83>îü^QÛsíH<81>ý^@óÿÿ^QÁè1ÿÿÿë<83>YH<89>ðH)ÈZH)×Y<89>9[]Ãh^^^@^@^@Zè½^@^@^@PROT_EXEC|PROT_WRITE failed.
18:10:34 <elliott> ^@$Info: This file is packed with the UPX executable packer http://upx.sf.net $
18:10:34 <elliott> ^@$Id: UPX 3.05 Copyright (C) 1996-2010 the UPX Team. All Rights Reserved. $
18:10:34 <elliott> ^@<90><90>^j^B_j^AX^O^Ej^?_j<X
18:10:38 <elliott> Duuuude, that's so wasting space.
18:10:57 <elliott> Quick info for achieving the best compression ratio:
18:10:57 <elliott> · Try upx --brute myfile.exe or even upx --ultra-brute myfile.exe.
18:10:57 <elliott> · Try if --overlay=strip works.
18:10:58 <pikhq> Though you might want to sstrip it and then use a compressed filesystem, instead of upx.
18:11:21 <elliott> upx: packer_c.cpp:43: static bool Packer::isValidCompressionMethod(int): Assertion `0 && "Internal error - LZMA not compiled in"' failed.
18:11:24 <elliott> Okay, not ultra-brute then.
18:12:35 <elliott> Aha, there's a non-free UPX.
18:13:36 <elliott> 26752 -> 13708 51.24% linux/ElfAMD box
18:13:38 <elliott> pikhq: HOW IS THIS WORKING
18:13:45 <pikhq> elliott: MAGIC AND AWESOME
18:13:54 <elliott> ^@$Info: This file is packed with the UPX executable packer http://upx.sf.net $
18:13:54 <elliott> ^@$Id: UPX 3.05 Copyright (C) 1996-2010 the UPX Team. All Rights Reserved. $
18:13:57 <elliott> GET THE FUCK OUT OF MY EXECUTABLE
18:14:19 <pikhq> elliott: strip it!
18:14:27 <elliott> pikhq: Tried that; it gets killed when I start it :P
18:14:44 <elliott> I just sstrip'd the upx'd box.
18:14:56 <elliott> The UPX string is still there though.
18:15:51 <elliott> pikhq: "But any modification of the UPX stub (such as, but not limited to, removing our copyright string or making your program non-decompressible) will immediately revoke your right to use and distribute a UPX compressed program."
18:15:57 <elliott> I do not like these people.
18:16:39 <elliott> pikhq: Hey, you CAN UPX an sstriped executable.
18:16:44 <elliott> -rwxr-xr-x 1 elliott elliott 13508 Dec 4 18:15 box
18:17:15 <elliott> pikhq: Did I mention this box has stupid things like two copies of every signal name?
18:26:52 <elliott> pikhq: Woo! It all works apart from Julian dates.
18:29:49 <elliott> pikhq: I know that the leap year logic is different for Julian dates.
18:30:16 -!- Sasha has quit (Ping timeout: 245 seconds).
18:30:34 <oerjan> unless you want to calculate Easter ;D
18:32:00 -!- Sasha has joined.
18:32:03 <elliott> pikhq: Can I have a failure badge please?
18:35:13 <Vorpal> elliott, why is it so tricky to just skip some days?
18:35:34 <Vorpal> elliott, oh and cfunge has jdn/gregorian conversion code if you need it
18:36:30 <elliott> Vorpal: it isn't tricky to do that at all :P
18:36:34 <elliott> also, i don't need to conevrt
18:36:38 <elliott> just show correct calendars
18:38:29 <elliott> pikhq: Your architecture sucks and I blame you wholly :P
18:39:26 -!- Sasha2 has joined.
18:39:59 <pikhq> elliott: Your architecture sucks and I blame you wholly.
18:40:05 <elliott> pikhq: Your architecture sucks and I blame you wholly.
18:41:17 -!- Sasha has quit (Ping timeout: 240 seconds).
18:41:47 -!- hagb4rd has joined.
18:41:47 <elliott> pikhq: Yay, I have to handle January, February and March 1752 specially too.
18:42:16 <pikhq> elliott: 貴方のアーキテクチャが悪くて、全部貴方之所為です。
18:42:53 <pikhq> elliott: Your architecture sucks and I blame you wholly.
18:43:20 <pikhq> elliott: (anata no âkitekutiȳa kà warukute, sènnhù anata no sei tèsu.)
18:43:30 <elliott> pikhq: Oh jesus christ, 1683 was fucked up too.
18:43:32 <elliott> H S E The body of Tho[mas]
18:43:33 <elliott> the sonn of Tho. Lambert gent.
18:43:33 <elliott> who was borne May ye 13 An[no] Do[mini] 1683
18:43:33 <elliott> & dyed Feb. 19 the same year.
18:44:16 <elliott> pikhq: http://web.mac.com/jac314159/CTC/AllArticles/ShortYear.html
18:44:20 <elliott> pikhq: Fuck everything about this.
18:45:43 <pikhq> elliott: So, proleptic Gregorian calendar?
18:46:15 <elliott> pikhq: Now technically POSIX says that Julian dates must be handled
18:46:15 <elliott> correctly. But then POSIX also said that it loved me, and
18:46:19 <elliott> Problem solved by way of code comment.
18:46:54 -!- Goosey has joined.
18:48:11 <oerjan> elliott: that was just a case of the year starting in March, i believe. i think that varied from country to country (the original julian calendar started in january, although an even earlier roman one did start in march)
18:48:20 <elliott> oerjan: yeah. well. fuck that
18:48:56 <oerjan> actually i'm not entirely sure on the last point
18:49:56 -!- Sasha has joined.
18:50:09 -!- ais523 has joined.
18:51:33 -!- Sasha2 has quit (Ping timeout: 240 seconds).
18:52:31 <elliott> pikhq: BTW, your cal doesn't pad out single months with the extra \ns.
18:54:51 -!- Phantom_Hoover has quit (Ping timeout: 245 seconds).
19:02:33 <pikhq> elliott: I DISBELIEVE IN THAT BEHAVIOR
19:03:14 <elliott> pikhq: I hereby proclaim it a feature because it's probably more trouble to fix than it's worth and why are you even calling cal like that.
19:04:05 <elliott> pikhq: Want the current code?
19:04:30 -!- MigoMipo has joined.
19:06:51 -!- Phantom_Hoover has joined.
19:09:29 <elliott> pikhq: I have devised an even better archive format than last time to give it to you in.
19:10:15 <elliott> pikhq: what do you use when filebin is down like it is now?
19:11:01 <elliott> pikhq: Gregor: BEHOLD: http://filebin.ca/wsszc/tools.minixfs.lzo
19:11:07 <elliott> I dare anyone to come up with a better archive format than that.
19:12:15 <Vorpal> Phantom_Hoover, gave you more cobble, also helped a bit
19:12:27 <elliott> Vorpal: Dude, shut up and behold my archival format.
19:12:32 <elliott> An LZO-compressed Minix filesystem image.
19:12:52 <Vorpal> elliott, you are insane
19:13:34 <Vorpal> Phantom_Hoover, mad scientist
19:14:48 <Gregor> cal: year 1410065408 not in range 1..9999
19:15:44 <oerjan> by year 10000 we're going to need to change the leap year rules anyway unless we want the year to slip
19:16:03 <pikhq> elliott: Insufficient partitions.
19:16:55 <pikhq> oerjan: By the year 10000, we will clearly have eradicated the Earth, making leap years a curious historical artifact.
19:17:14 <oerjan> well that's a possibility
19:18:01 <elliott> Gregor: That's Y10K incompliant.
19:18:15 <elliott> Gregor: Anyway, dude, tools.minixfs.lzo.
19:18:18 <elliott> Gregor: Can you BELIEVE how awesome I am
19:18:18 <Vorpal> Phantom_Hoover, have you abandoned MC?
19:19:08 <elliott> pikhq: Would you like a copy of the pcc/dietlibc toolchain required to build this? It's not very big.
19:19:20 <pikhq> elliott: AHAHAHAH.
19:19:35 <pikhq> elliott: Oracle added ZFS code to GRUB. Which is under GPLv2+.
19:19:48 <elliott> pikhq: But it's a very limited form of ZFS.
19:20:15 <elliott> pikhq: Now do you want the toolchain? :P
19:20:26 <elliott> pikhq: I swear I'll come up with an EVEN BETTER packaging method for it.
19:20:48 <elliott> pikhq: Oh, wait... dietlibc remembers its prefix. You'd have to install it into ~elliott/kitten/stage2.
19:20:58 <pikhq> If only Oracle weren't asshats.
19:21:26 <pikhq> "Here's a ZFS Linux kernel module, under GPLv2. Have at."
19:21:39 <elliott> pikhq: YOU CANNOT AVOID TALKING ABOUT MY COREUTILS :P
19:21:43 <pikhq> elliott: YES I CAN
19:21:53 <elliott> pikhq: Do you not APPRECIATE them?!?!?!
19:24:17 <elliott> Vorpal: lol @ http://www.pcgamer.com/2010/12/03/the-minecraft-experiment-day-8-alive/
19:25:55 <elliott> SHOCKING NOTCH SCANDAL AFFAIR
19:25:55 <elliott> http://twitter.com/dannyBstyle/status/10591046236905472
19:25:57 <elliott> http://twitter.com/notch/status/10592312375644161
19:25:59 <elliott> http://twitter.com/notch/status/10595190087622656
19:26:00 <elliott> http://twitter.com/notch/status/10595258538663936
19:26:11 <Phantom_Hoover> elliott, come to think of it, there's a good chance he'll survive that fall, if he aims for the water.
19:26:28 <elliott> Phantom_Hoover: And a good change he won't :P
19:27:06 <Vorpal> elliott, "So that night, I hatch the most ingenious and original idea any Minecraft player has ever had: I will build a tower! As tall as the clouds! A beacon to guide me home! No-one has ever had this idea before!" <-- idiot. This is well known. Was used a lot before the compass was added
19:27:28 <elliott> Vorpal: HURR I'M SWEDISH SO I CAN'T FUCKING UNDERSTAND SARCASM
19:27:36 <elliott> THEREFORE I WILL CALL FUNNY PEOPLE IDIOTS
19:27:53 <elliott> (AND ALSO IGNORE THE FACT THAT HE'S PLAYING THE GAME WITHOUT READING ANY SPOILERS OR ANYTHING)
19:28:26 -!- impomatic has joined.
19:28:55 <elliott> "I wonder what command I'll implement next, oh, I know; compress(1)! That sounds EASY!"
19:30:04 <Vorpal> Phantom_Hoover, anyway finished one half more layer on the ROU
19:30:06 <Phantom_Hoover> [[I had the idea of making a beacon on my second day, must be two weeks ago now :D sorry to dissapoint you, but you were certainly not the first, I doubt I was either.]]
19:30:55 <oerjan> compress should be a short one
19:31:02 <Vorpal> Phantom_Hoover, from looking at the opposite side
19:31:07 <Vorpal> Phantom_Hoover, which was done
19:31:37 -!- evincar has joined.
19:31:55 <Phantom_Hoover> I've decided that inaccuracy is tolerable since the thing already has tonnes of it.
19:32:43 <evincar> oerjan: If I am an evil car, do you really want to mess with me? Have you seen any campy horror movies involving evil cars lately? They mean business.
19:33:11 <elliott> pikhq: WTF. Unified diffs aren't POSIX.
19:33:46 <oerjan> evincar: not lately. i think i saw parts of christine once.
19:34:42 <oerjan> clearly there is nothing unified in POSIX
19:36:20 <elliott> Phantom_Hoover: in trouble?
19:37:06 <Vorpal> Phantom_Hoover, still you might want to check the thing
19:37:29 <Vorpal> Phantom_Hoover, I also widened walkway to workshop
19:38:10 <Vorpal> Phantom_Hoover, and added drop pool at the bottom of the ladder
19:38:18 -!- Smmick has joined.
19:41:22 <Vorpal> Phantom_Hoover, should I extend the middle floor all the way out?
19:43:34 <Vorpal> oh that was an off topic thing
19:44:03 <Vorpal> Smmick, this channel is about esoteric programming languages, not esoterica btw. Surprisingly many get that wrong
19:46:01 <Vorpal> Phantom_Hoover, I'll default to yes then
19:46:40 <Smmick> you know the programming of computers
19:46:42 <Smmick> are called binary numbers
19:46:56 <Vorpal> uh... in a way I guess
19:48:09 <Smmick> computers is when data is transferred or messages with just 0 and 1
19:48:31 <Smmick> knows that any hacker like me
19:48:47 <Vorpal> elliott, I think this is one for you
19:49:57 <Gregor> "<Smmick> knows that any hacker like me" wow X-D
19:50:28 <elliott> Smmick: Caultrick of the vordemont.
19:50:36 <elliott> Smmick: Dost thou know otooooooooooooooooooooooooooooooooooooo?
19:50:45 <pikhq> elliott: Clearly POSIX be damned.
19:50:51 <elliott> Smmick: I'n your mother crappy -- on the news that mroing -- and everyone died.
19:50:56 <elliott> Smmick: You too shall die soon! Your house I'm at.
19:51:02 <elliott> Haha, , throough! the window you pretty.
19:51:03 <Vorpal> <elliott> Smmick: Caultrick of the vordemont. <-- what
19:51:05 <Gregor> OCTETS? OCTETS ARE EVIL
19:51:10 <elliott> Vorpal: DON'T THE VARIABLE
19:51:15 <elliott> Smmick: YOU DON'T EVEN KNOW ABOUT THE VARIABLE
19:51:28 <elliott> i cry softly but tomorrow revenger
19:52:10 <Smmick> whether the variables in a PHP Code
19:52:28 <Vorpal> elliott, stop acting like an insane markov chain
19:52:29 <elliott> Smmick: Whether they, yes, indeed, but soon such conerns will be none of yours; the cone-shaped nature of velvet will be REAVEALED unto you !!
19:52:35 <elliott> Smmick: and that is when i stab
19:52:46 <Smmick> my uncle just in English or Spanish that if no other language or just know there will be 1
19:53:05 <elliott> Smmick: Your uncle may only be in English or Spanish now...
19:53:07 <elliott> But soon there will be THREE.
19:53:48 <elliott> Gregor: I think "HELP COMPUTER" was an unfortunate choice of topic.
19:54:39 -!- quintopia has set topic: We welcome our new arsenic-based overlords | http://tunes.org/~nef/logs/esoteric/?C=M;O=D.
19:54:55 -!- elliott has set topic: I, for one, am somewhat sparta. | http://tunes.org/~nef/logs/esoteric/?C=M;O=D.
19:55:05 <elliott> I was going to fix quintopia's but then I got A BETTER IDEA half-way through.
19:55:22 -!- Gregor has set topic: I, for one, welcome our new arsenic-based spartans | http://tunes.org/~nef/logs/esoteric/?C=M;O=D.
19:55:43 -!- quintopia has set topic: We, for Legion, welcome our new arsenic-based spartans | http://tunes.org/~nef/logs/esoteric/?C=M;O=D.
19:55:59 <Smmick> look is at least 3 languages ok
19:56:14 <elliott> Smmick: The fourth one is Lojban
19:56:30 -!- elliott has set topic: I, for arsenic, sparta our overlord-based legion. | http://tunes.org/~nef/logs/esoteric/?C=M;O=D.
19:56:45 <elliott> Yes, indeed, the arsenics are coming to sparta the legion of overlords.
19:56:48 <quintopia> okay that's good enough. i'll leave that one
19:56:49 <oerjan> I don't parle pas español
19:56:58 <elliott> `addquote <oerjan> I don't parle pas español
19:58:34 <HackEgo> Runs arbitrary code in GNU/Linux. Type "`<command>", or "`run <command>" for full shell commands. "`fetch <URL>" downloads files. Files saved to $PWD are persistent, and $PWD/bin is in $PATH. $PWD is a mercurial repository, "`revert <rev>" can be used to revert to a revision. See http://codu.org/projects/hackbot/fshg/
19:59:06 <HackEgo> babies \ bin \ paste \ quine \ quotes \ tmpdir.1875
19:59:25 <Gregor> `addquote <oerjan> I don't parle pas español
19:59:34 <HackEgo> 266|<oerjan> I don't parle pas español
19:59:35 <Smmick> Where to go to the \ bin \ pasta \ quine \ quotes \
19:59:51 <HackEgo> babies \ bin \ paste \ quine \ quotes \ tmpdir.2038
20:00:12 <quintopia> huh. apparently changing PWD isn't allowed?
20:00:23 <Gregor> quintopia: There is no cross-session PWD
20:00:27 <Gregor> quintopia: The 'babies' directory was for an unpopular feature that decreed that people had babies every time they said "fuck" :P
20:01:20 <HackEgo> 265|Thanks to nooga for constructive criticism, his ideas and being a constant annoyance. --http://theendisnear.no-ip.info/
20:01:43 <Gregor> Well that's nae good :P
20:02:04 <quintopia> Gregor: your partition has become read-only D:
20:02:38 <Gregor> Probably doesn't support ñ :P
20:02:57 <HackEgo> #!/bin/bash \ DB="sqlite3 quotes/quote.db" \ \ if [ "$1" ] \ then \ ARG=$1 \ ID=$((ARG+0)) \ if [ "$ID" = "$ARG" ] \ then \ $DB 'SELECT id,quote FROM quotes WHERE id='$ID \ else \ ARG=`echo "$ARG" | sed 's/'\''/'\'\''/g'` \ $DB 'SELECT id,quote FROM quotes WHERE quote LIKE
20:03:00 -!- Zetro has joined.
20:03:09 <HackEgo> #!/bin/bash \ DB="sqlite3 quotes/quote.db" \ \ if [ ! "$1" ] \ then \ echo 'Add what quote?' \ exit 1 \ fi \ \ QUOTE=`echo "$*" | sed 's/'\''/'\'\''/g'` \ $DB 'INSERT INTO quotes (quote) VALUES ('\'"$QUOTE"\''); \ SELECT id,quote FROM quotes ORDER BY id DESC LIMIT 1;'
20:03:40 <Vorpal> Phantom_Hoover, get on MC!
20:03:51 <Smmick> That is why part of the DB Table Base date
20:04:02 <Gregor> elliott: Idonno *shrugs* :P
20:04:05 <elliott> Wow, that [ ! "$1" ] actually works.
20:04:30 <quintopia> `addquote < elliott> Wow, that [ ! "$1" ] actually works.
20:04:32 <HackEgo> 266|< elliott> Wow, that [ ! "$1" ] actually works.
20:04:33 <Gregor> elliott: So does your mom.
20:04:41 <HackEgo> 266|< elliott> Wow, that [ ! "$1" ] actually works.
20:05:04 <Gregor> OHHH y'know what, I'll bet the problem is committing with a commit message including unicode to the hg repo 8-D
20:12:24 -!- Smmick has quit (Remote host closed the connection).
20:16:55 -!- Sgeo has joined.
20:17:28 <Sgeo> Is the reason people pushed me away from PLT-Scheme because it called itself a "Scheme" and thus I'd get wrong ideas, or is there something wrong with the language itself?
20:17:39 <Sgeo> (It's now called Racket)
20:24:29 -!- Phantom_Hoover has quit (Remote host closed the connection).
20:26:30 -!- elliott has left (?).
20:26:32 -!- elliott has joined.
20:27:08 -!- Phantom_Hoover has joined.
20:27:20 <elliott> pikhq: I now have mkdir, with everything apart from symbolic modes.
20:28:15 <Phantom_Hoover> Note to self: always change monitors *before* disconnecting the output device.
20:30:50 <elliott> pikhq: I need a profiler except for binary size. :P
20:31:05 <elliott> mkdir is pushing 10k for no apparent reason.
20:31:16 <Sgeo> Any answer to my question?
20:31:24 -!- impomatic has left (?).
20:31:43 <Vorpal> Phantom_Hoover, so, did you check my ROU work?
20:32:59 <elliott> Phantom_Hoover: "So Did You Check My ROU Work?".
20:33:13 <elliott> Phantom_Hoover: Or: "Pushing 10K For No Apparent Reason".
20:36:27 -!- zzo38 has joined.
20:37:00 <zzo38> What does "I, for arsenic, sparta our overlord-based legion." mean?
20:37:54 <Gregor> zzo38: I think it's pretty clear.
20:39:20 <zzo38> They talked about arsenic on the radio today.
20:41:24 <zzo38> They talked about arsenic based lifeform and how it is related to the other elements in the periodic table.
20:41:25 <Gregor> Now You're Cooking with Arsenic-Based Bacteria! A cookbook for those who wish to destroy both rare endangered species and their friends.
20:42:43 <Sgeo> elliott, is your pushing me away from Racket in the past to do with it deviating from Scheme, or other reasons?
20:43:08 <elliott> Gregor: my favourite cookbook.
20:43:20 <elliott> Gregor: Also, as opposed to common endangered species? :P
20:44:20 <Gregor> elliott: I meant rare ... Idonno, in some other way I can't describe. Rare as in they're representatives of a rare style of life, which is distinct from the particular species being endangered.
20:45:06 <elliott> Gregor: What you're saying is, they're not well-done.
20:45:39 <Gregor> elliott: Yes. We need to send them back, they're still red inside.
20:45:57 <elliott> Gregor: That's what happens when you cook with arse-s.
20:46:18 -!- wareya_ has joined.
20:46:34 <Gregor> Their binomial name is Archaea arsedick
20:46:56 <Gregor> (Note: They're not even archaea, and if they were, that wouldn't be their genus :P )
20:48:29 -!- wareya has quit (Ping timeout: 265 seconds).
20:49:28 <zzo38> On Windows I need to run 7z twice to extract a .tar.gz file. On Linux, I can use a pipe command.
20:50:43 <evincar> zzo38: Is this at all surprising?
20:51:39 <zzo38> evincar: No, I do not think so. But I think 7z does not have a option to extract twice?
20:52:04 <Vorpal> arsenic based life? really?
20:52:32 <Vorpal> zzo38, you could use tar -zxf on linux
20:52:55 <zzo38> Vorpal: But I used: zcat < filename.tar.gz | tar -x
20:53:15 <Vorpal> zzo38, seems needlessly complicated
20:53:27 <oerjan> Vorpal: they're bacteria that can (optionally) use arsenic instead of phosphorus in their DNA and stuff
20:53:29 <Vorpal> Phantom_Hoover, oh, still carbon-based then
20:53:29 <zzo38> And if I make Linux distribution, I would also make it work with pipe commands, too.
20:53:32 <elliott> Vorpal: technically, that's simpler than "tar xzf", Unix-wise.
20:53:39 <Vorpal> elliott, longer to type
20:53:45 <elliott> oerjan: They prefer phos., though.
20:53:57 <elliott> Vorpal: Ken Thompson would have something to say about you and it wouldn't be pretty.
20:54:04 <elliott> (Probably me too, but still.)
20:54:22 <zzo38> Arsenic comes directly below phosphorus on the periodic table of elements. This is an important part of this reason.
20:55:17 <oerjan> zzo38: however i also read that unlike phosphorus, arsenic combounds are usually destroyed by water, so it is still surprising
20:55:21 <zzo38> (They did talk about the periodic table of elements, on the radio, today)
20:55:41 <zzo38> oerjan: Yes, then it would make it surprising.
20:57:56 <elliott> pikhq: Symbolic permissions are PAIN
20:58:50 <Vorpal> elliott, are you using POSIX 2008 for this?
20:59:16 <Vorpal> elliott, no such thing
20:59:17 <elliott> Vorpal: I doubt they changed coreutils much, if at all, in the interim.
20:59:25 <elliott> The Open Group Base Specifications Issue 6
20:59:25 <elliott> IEEE Std 1003.1, 2004 Edition
20:59:25 <elliott> Copyright © 2001-2004 The IEEE and The Open Group, All Rights reserved.
20:59:48 <Vorpal> elliott, SUS against POSIX 2001
21:00:06 <Vorpal> elliott, so it is SUS 2004
21:00:12 <Phantom_Hoover> What's the actual advantage of Wikiplia over a VCS with the privileges of which you are very liberal?
21:00:13 <elliott> Vorpal: Okay. So what's the issue?
21:00:23 <Vorpal> elliott, nothing except you not using 2008 edition
21:00:28 <elliott> Phantom_Hoover: Well, it's literate programming.
21:00:30 <elliott> Vorpal: Why is that an issue?
21:00:43 <elliott> Phantom_Hoover: Consider being able to say [[Count words]] (my_file);
21:00:52 <elliott> Phantom_Hoover: (Of course, this requires a Sufficiently Smart Wiki.)
21:01:15 <Vorpal> Phantom_Hoover, add in a browser GUI for it
21:01:17 <elliott> Phantom_Hoover: It's not hyperlinked.
21:01:22 <oerjan> Phantom_Hoover: um did you mean wikiplia or wikipl there?
21:01:32 <zzo38> Literate programming is when you make it is both a computer program and a book, both at once.
21:01:36 <elliott> Also, you could do reordering with a wiki.
21:01:58 * oerjan is starting to regret the move :D
21:02:58 <Vorpal> also the esolang wiki is down for me
21:02:59 <oerjan> Vorpal: after discovering that wikiPL wasn't actually a programming language i sort of deleted the esolang article, except i technically moved it to wikiplia instead
21:03:11 <Vorpal> oerjan, what is wikiplia?
21:03:39 <Vorpal> oerjan, google is nhelpful
21:04:01 <elliott> see esolangs wiki, duh ...
21:04:05 <oerjan> a joke language from 2007 that _actually_ was "The free programming language that anyone can edit"
21:04:34 <oerjan> Vorpal: um the top google hits are quite relevant
21:04:53 <Vorpal> oerjan, maybe if you aren't logged in to gmail
21:05:29 <oerjan> Vorpal: are you maybe getting referred to wikipedia instead?
21:05:52 <oerjan> it's suggested for me that i might mean that instead
21:07:07 <Vorpal> oerjan, hm wikidictionary (sp?) for "plia"
21:07:11 * oerjan once again curses google's use of redirecting urls
21:08:18 <elliott> ugh at the = operation in symbolic modes
21:08:23 <elliott> + is "mode |= bit", - is "mode &= ~bit"
21:08:28 <elliott> but doing = makes me want to die now
21:09:00 <elliott> case '=': mode &= ~(7 << who);
21:09:00 <elliott> case '+': mode |= bit; break;
21:09:00 <elliott> case '-': mode &= ~bit; break;
21:09:26 <oerjan> Vorpal: http://www.cs.cmu.edu/~tom7/sigbovik/wikiplia.pdf and http://radar.spacebar.org/f/a/weblog/comment/1/893
21:09:57 <elliott> fuck! i have to handle "a" too
21:10:03 <elliott> oerjan: whoa, that guy again
21:10:18 <elliott> oerjan: he keeps popping up all over my internets.
21:12:51 <elliott> oerjan: ok this guy wasted *insane* amounts of time on this :D
21:15:51 <elliott> drwxr-xr-t 2 elliott elliott 4096 Dec 4 21:15 x
21:15:57 <oerjan> yeah, "Since I really implemented the latter (I think the only SIGBOVIK paper that comes even close to being real)"
21:16:50 <elliott> oerjan: so the thing was the implementation of a programming language written in that programming language, right?
21:17:45 <oerjan> possibly, as usual i'm too lazy to read the whole thing :D
21:18:03 <oerjan> it was ML at the bottom though
21:19:16 <elliott> oerjan: i've always wanted to maintain one of those "live"; like, you make a chance to add feature X, tell it "yo update compiler!"; then you rewrite the implementation of feature X to use X, tell it "yo update compiler!", and it runs each successive compiler on the source until fixed-point
21:19:20 <fizzie> You could put in the traditional /* fall-thru */ comment at the end of that =; I had to stare at it a moment before noticing that.
21:19:20 <elliott> (or warns you if it doesn't reach one)
21:20:11 <elliott> fizzie: comments take up valuable disk space
21:20:45 <oerjan> elliott: it reminded me a bit of Feather
21:20:47 <elliott> drwxr-xr-t 2 elliott elliott 4096 Dec 4 21:19 x
21:21:21 <fizzie> It's the suid/sgid-bit position except for "other".
21:21:46 <elliott> fizzie: YOU SHOULD WRITE ME A SYMBOLIC MODE PARSER ^__^
21:21:58 <Vorpal> elliott, it should be trivial?
21:22:13 <elliott> Vorpal: it isn't that trivial really
21:22:19 <elliott> Vorpal: a lot easier without "a"
21:22:29 <elliott> Vorpal: also consider that i'm optimising for binary size and mkdir is already the second-largest tool...
21:22:43 <Vorpal> elliott, yes but why is it an issue
21:22:44 <fizzie> Well, you need to handle "ugo+x" anyway.
21:22:53 <elliott> fizzie: oh lawd, i don't right now
21:23:01 <elliott> Vorpal: and then consider that a=xu+g-xoug-r is valid
21:23:08 <fizzie> Also remember to handle +X properly.
21:23:09 <Vorpal> just set the "affects who" bitmask to all 1
21:23:20 <Vorpal> then and with the modes as you see them
21:23:40 <elliott> fizzie: I meant to say X with the a= there.
21:23:53 <elliott> Vorpal: It's not exactly trivial...
21:24:10 <Vorpal> elliott, true but easier if you write it without premature optimisation
21:24:11 <elliott> Vorpal: Especially since a naive implementation will end up interpreting ug+xo+w as ug+xugo+w.
21:24:28 <elliott> Since you have to clear the bitflag on a new "who" iff you've already set some bits.
21:24:45 <Vorpal> elliott, hah, what about the , ?
21:24:57 <Vorpal> u+w,g+w is quite common or such
21:25:05 <elliott> You have to handle the case without htat.
21:25:05 <Phantom_Hoover> What is it with Americans and their crazy equation of higher education with school?
21:25:05 <Vorpal> elliott, but you need to handle it
21:25:12 <elliott> Vorpal: Go on then, show me the ultra-simple trivial code... I'm not prematurely optimising and it's not super-difficult, it's just really irritating.
21:25:21 <Vorpal> elliott, not ultra-trivial
21:25:36 <Vorpal> but not as hard as you seem to indicate
21:25:45 <Vorpal> elliott, yes but maybe "easy" is better
21:26:02 <Vorpal> elliott, indeed not imposisble even on an FSA I believe
21:26:07 <elliott> Vorpal: (If you think I'm just trying to get free code out of you, license it GPLv3 or whatever and I won't touch it with a ten foot pole.)
21:26:07 <Sgeo> <3 Newspeak workspaces
21:26:46 <fizzie> The suid/sgid/sticky bits I would think are especially annoying, since they're not at all logical like the rest.
21:27:15 <elliott> fizzie: Yeah, I'm not even trying to implement those at this point.
21:27:22 <elliott> fizzie: SO HAVE YOU WRITTEN IT YET
21:27:29 <fizzie> No, and I'm not going to. :p
21:28:04 <elliott> You're just afraid. Afraid of the truth.
21:30:14 <fizzie> How does something like u=rwx,g=u work, anyway? Does the g=u use the old or the new permissions of u?
21:30:28 <fizzie> Interestingly, chmod here accepts "o+s" without complaints, but doesn't do anything with it.
21:30:49 <fizzie> The rarely used soid bit.
21:30:50 <Phantom_Hoover> elliott and Vorpal are bickering, Sgeo is obsessing over a language he'll have forgotten in a week and sshc's a pathetic little weed.
21:31:44 <elliott> fizzie: Yes, it sets what the program thinks every other user is.
21:32:20 <oerjan> Phantom_Hoover: not quite, i cannot think of a pun to go with that
21:32:27 <elliott> fizzie: Is it just me, or are octal modes even easier to read and write than this symbolic crap?
21:32:40 <elliott> fizzie: I mean, +r, +w, +x, sure, and their - versions too. But the rest...
21:33:42 <fizzie> For the mkdir case it doesn't matter, but when doing chmod or something, remember that = has to treat files and directories differently.
21:33:51 <oerjan> it's a lot of hate for someone who hasn't spoken recently
21:33:58 -!- Zetro has quit (Remote host closed the connection).
21:34:43 <elliott> fizzie: who invented symbolic modes.
21:35:07 <fizzie> Yes, u=rwx will do the same as u+rwx for a directory, but it will remove the suid bit for a file.
21:35:12 <oerjan> well probably hitler, then
21:35:41 <fizzie> Or in other words, the "= clears unmentioned bits" has an exception that a directory's suid/sgid bits aren't touched, even if you don't specify them.
21:39:21 <elliott> http://d116.com/lispm/3675xmas.gif Christmas discount on a Symbolics 3675!
21:39:23 <fizzie> Actually it seems that what is done to suid/sgid bits on a non-file is implementation-defined, so you could be POSIXly compliant and ignore that distinction.
21:39:56 <fizzie> (But o+s is explicitly defined to be not an error, it just doesn't do anything.)
21:45:40 <fizzie> Incidentally, the "ug+xo+w" and "a=xu+g-xoug-r" you mention up there are not valid. The grammar (for the "actionlist" part of "+xo+w" or such) is a list of "action = op | op permlist | op permcopy", where "op" is [+-=] and "permlist" is a list of [rwxXst] and "permcopy" is [ugo].
21:46:27 <fizzie> With suitable commas they become legal, of course.
21:47:20 <elliott> fizzie: Hmm, so you really do only have to clear it on comma?
21:49:02 <fizzie> Within one clause's action list, you can have an arbitrary list of stuff like +rwx-o+g-t=g, but you can't have both [ugo] and [rwxXst] characters within the same op (+, - or =), and ops that have [ugo] must have only one of them.
21:52:34 <fizzie> Maybe I should try this out. Though I don't quite know what things like mkdir do with the "use current permissions" characters; maybe those refer to the usual umask-derived permissions.
21:53:04 <elliott> fizzie: Oh, all I'm doing is a function to convert a symbolic mode string to the regular octal bits.
21:53:14 <elliott> fizzie: Right now the "base mode" is 0777, but you could easily take that as a parameter.
21:53:27 <elliott> (It also does octal, but that's just strtol and hardly worth mentioning.)
21:53:46 <fizzie> Maybe I should try this out too, after all.
21:53:52 <elliott> fizzie: If you do get it working, a WTFPL license would be nice, since it's much easier to minimise some non-minimised code than to write some small code the first time. :p
21:54:00 <elliott> Or we could have a golfing competition, and there would be no survivors.
21:54:09 <elliott> Unfortunately nobody else here actually codes.
21:56:57 -!- Phantom_Hoover has quit (Ping timeout: 245 seconds).
21:57:40 <fizzie> I'll try it out, but I don't think I have a good test set.
21:58:08 <fizzie> Maybe I could generate all possible productions (of length < K) out of the POSIX grammar, and then compare it with the chmod utility.
21:59:56 <elliott> fizzie: Or you could just try u=x,g-o,o-x,oug-r,a+x. :P
22:00:03 <elliott> (I have no idea what that produces when run on initial mode 0777.)
22:03:15 <zzo38> But everybody else here actually codes!
22:04:52 <Sgeo> The scroll wheel doesn't work AT ALL in the Newspeak IDE
22:05:55 <zzo38> Sgeo: The scroll wheel doesn't work at all on my computer, but that is because I disabled it.
22:06:21 <elliott> <zzo38> But everybody else here actually codes!
22:06:25 <elliott> zzo38: Phantom_Hoover doesn't.
22:09:38 <elliott> fizzie: DO YOU FEEL THE PAIN YET
22:09:45 -!- kar8nga has joined.
22:09:52 <fizzie> Not really, but this will be a bit on the large side.
22:10:44 <elliott> fizzie: I won't hold it against you if you aren't POSIX-compliant with something like mutually-recursive assignments. :p
22:12:00 <fizzie> I think those permcopy ops are actually always resolved against the "old" (as in, completely before any clauses have been applied) mode, if I read the spec right.
22:12:11 -!- evincar has quit (Quit: ChatZilla 0.9.86 [Firefox 3.6.12/20101026210630]).
22:14:25 <elliott> fizzie: I was just using it as a placeholder for [stupid thing nobody really cares about].
22:18:27 -!- Phantom_Hoover has joined.
22:19:03 <Phantom_Hoover> I want to change the topic to "Human slaves / in an arsenic nation".
22:20:00 -!- Sasha has quit (Ping timeout: 260 seconds).
22:20:02 <elliott> Vorpal: In 2004, a new edition of the POSIX:2001 standard was released, incorporating two technical corrigenda. It is called POSIX:2004 (formally: IEEE Std 1003.1-2004) [4].[3]
22:20:05 <elliott> Vorpal: Ha ha, you're wrong.
22:20:25 -!- Sasha has joined.
22:21:37 <elliott> POSIX 2008 is online though, yay.
22:22:03 <Vorpal> elliott, yes since last yeart
22:22:13 <Vorpal> or even since two years ago soon
22:22:28 <elliott> fizzie: http://www.opengroup.org/onlinepubs/9699919799/utilities/chmod.html seems to specify the symbolic modes a little more than 2004, but I may be wrong.
22:22:43 <elliott> compress is still there, god bless it.
22:22:44 <fizzie> elliott: Okay, it does the same thing with u=x,g-o,o-x,oug-r,a+x (for base mode 0600) than chmod, and works with other spot-testing too, but it's hugely long.
22:23:00 <elliott> fizzie: Longer than http://git.busybox.net/busybox/tree/libbb/parse_mode.c?
22:23:09 <elliott> (WARNING: LGPL CODE, YOUR BRAIN WILL VIOLATE THE LICENSE!!11)
22:23:23 <fizzie> http://p.zem.fi/modeparse.c -- there's a plaintext download link there.
22:23:26 <fizzie> Well, maybe not quite that long.
22:23:48 <elliott> fizzie: Can I has that under WTFPL?
22:24:22 <fizzie> Don't use it in a nuclear plant maybe, though.
22:24:30 <elliott> fizzie: Hoorj. So what are you, in "this code is based on code written by" terms? "fizzie" "Heijkyj Kallasojidio"? "That guy over there"? "turgledurd@zem.fi"?
22:24:32 <fizzie> I don't want to be responsible for a glass crater somewhere.
22:25:09 <fizzie> I think I've usually just said "use the real-name", so I guess that.
22:25:26 <elliott> fizzie: Got an email address you want me to put in little angle-brackets to the right of it?
22:25:44 -!- MigoMipo has quit (Ping timeout: 264 seconds).
22:26:35 <elliott> Phantom_Hoover: I'm being silley.
22:26:45 <fizzie> I wonder... I usually use "fis+something@zem.fi" for this kind of stuff, with a suitable +something, but I'm not sure what this could be. Maybe just fis@ then. Unless you figure out a good identifier there, they all go to the same box anyway.
22:26:59 <elliott> fizzie: fis+kludge@zem.fi? :P
22:27:31 <elliott> Out with the old, in with the new.
22:27:39 <elliott> who_mask sounds like the best kind of mask.
22:28:08 <fizzie> It does the suid/sgid stuff somewhat sensibly, but those are partially implementation-defined anyway.
22:28:44 -!- Sasha2 has joined.
22:28:45 <elliott> fizzie: Oh man, you use Allman style. That's perverse, dude.
22:29:02 <elliott> I think it's actually illegal in most civilised countries.
22:29:36 <elliott> And C99! If it didn't work I wouldn't be forever grateful.
22:30:00 <fizzie> Is it accidentally C99? It might be, I wasn't especially careful with it.
22:30:03 <elliott> AND IT GOES OVER 80 COLUMNS OH MY GOD YOU'RE JUST LIKE HITLER
22:30:13 <elliott> fizzie: You declare two variables in a while loop, so yeah.
22:30:16 <elliott> It doesn't matter though :P
22:30:18 -!- Sasha has quit (Read error: Connection reset by peer).
22:30:29 <elliott> fizzie: (But Allman style really is unforgivable.)
22:30:29 <fizzie> You can declare variables at the beginning of a block.
22:30:37 <elliott> I'm just so used to not doing so, you know!
22:31:32 <fizzie> I'd try it out in gcc -ansi -pedantic, but apparently mode_t doesn't exist even with #include <sys/stat.h> under those flags.
22:32:03 <fizzie> Okay, there's C99 in the main function.
22:32:11 <elliott> if (*str == 'u' || *str == 'g' || *str == 'o') {
22:32:12 <elliott> case 'u': bits = (old&04700) | ((old&0700)>>3) | ((old&0700)>>6); break;
22:32:12 <elliott> case 'g': bits = (old&02070) | ((old&0070)<<3) | ((old&0070)>>3); break;
22:32:12 <elliott> case 'o': bits = (old&7) | ((old&7)<<3) | ((old&7)<<6); break;
22:32:26 <elliott> How WASTEFUL! I will convert it into a switch statement, because I'm lovely.
22:33:17 <fizzie> Yes, it certainly could be that, though you'd then have to str++ thrice.
22:33:38 <elliott> fizzie: As far as I can tell, you also have an "ok" variable that is executed iff it wouldn't go to a default clause.
22:33:45 <elliott> Is there some reason that can't just be a default clause?
22:34:00 <fizzie> Well, it has to break out of the while loop.
22:34:01 <elliott> I mean, apart from not breaking out of the for without a label.
22:34:09 <fizzie> Yes, that's the only reason for it.
22:34:24 <fizzie> You can gotoize it or something if you like.
22:36:11 <fizzie> It doesn't do the "don't touch suid/sgid bits of a directory when doing =" thing GNU coreutils chmod does.
22:36:35 <elliott> fizzie: That seems stupid to me, anyway.
22:36:55 <fizzie> And, well... if you have a suid bit set in the old mode and do a "g=u" mode, it doesn't set the sgid bit. That's a bit debatable anyway.
22:36:58 <Vorpal> elliott, fizzie: I'm planning something BIG in MC atm
22:37:02 <Vorpal> feel free to come and watch
22:37:05 <elliott> d--------- 2 elliott elliott 4096 Dec 4 22:36 x
22:37:16 <elliott> fizzie: Technically I use int in mkdir.c rather than mode_t; could it be that?
22:37:21 <elliott> mode = parsemode(optarg, 0777);
22:37:36 <fizzie> Well, that's what my code does.
22:37:54 <fizzie> You get to debug all your minimizations yourself. :p
22:37:56 <Vorpal> elliott, a throne room
22:38:13 <elliott> fizzie: I haven't minimised it at all yet, actually. :P
22:38:16 <elliott> Thus making mkdir the largest utility so far.
22:38:25 <Vorpal> elliott, what I just said
22:38:36 <fizzie> Oh. Well, then. But I'm not instantly sure why mode_t'd matter; but if it did, good for you.
22:38:45 <elliott> fizzie: while (*str == 'u' || *str == 'g' || *str == 'o' || *str == 'a') {
22:38:55 <elliott> fizzie: Now you have no excuse; that's for (;;) with a goto in the default. :P
22:39:23 <elliott> UNFORGIVABLE! Just kidding it's fine, you're cool.
22:39:35 <fizzie> It also has COMMENTS, remember to remove all those.
22:39:36 <elliott> Actually it's a "for (;; str++)" which is now my favourite type of control structure.
22:40:10 <pikhq> elliott: Mmm, for(;;str++)
22:40:14 <elliott> fizzie: Those don't take up binary space :-P
22:40:32 <elliott> -rwxr-xr-x 1 root root 48K Apr 28 2010 /bin/mkdir
22:40:32 <elliott> -rwxr-xr-x 1 elliott elliott 9.0K Dec 4 22:39 bin/mkdir
22:40:35 <elliott> Perhaps I shouldn't worry too much.
22:40:40 <elliott> (And the former one is even dynamically-linked.)
22:40:48 <fizzie> Also you might not exactly want to call abort() there if the mode string has some trailing dirt that was not parsed. :p
22:41:03 <elliott> fizzie: (Made it return -1, i.e. "No! Bad mode! Bad user! You're a horrible person!")
22:41:33 <elliott> fizzie: Actually, got a simple way to check whether something's a valid mode? That high bit has a limited range of values, I think.
22:42:39 <elliott> fizzie: I like how your code readily accepts u-+q.
22:42:44 <elliott> That should be a valid mode.
22:42:52 * Sgeo decides to try DropBox
22:43:31 * Sgeo vaguely hopes that Dropbox doesn't require installation on all computers
22:43:43 <Sgeo> I'm willing to install it on this machine, but not my old machin
22:44:00 <fizzie> I think anything >= 0 and <= 07777 is an okay mode; but in things like struct stat they use a mode_t field where the higher bits are for file type.
22:44:29 <elliott> Sgeo: Of course it does. (Unless you want the web interface.)
22:44:42 <Sgeo> elliott, as long as it has a web interface, I'm ok
22:44:49 <Sgeo> My taskbar just died
22:45:37 <fizzie> Interestingly, the standard explicitly allows the +, - and = operations without any permissions listed, so "g+" and "a+-" are valid no-ops, and "o=" is okay for basically "o-rwx".
22:47:16 <elliott> fizzie: I am having great trouble figuring out where to add "oh hey, something invalid" here. :p
22:47:52 <elliott> fizzie: Hmm, yours accepts u,...
22:48:19 <fizzie> That one might not be quite kosher, that's true.
22:48:29 <fizzie> The "actionlist" part shouldn't be empty.
22:48:31 * Sgeo swears at typo
22:48:58 <fizzie> You could set "actions = 0" at the /* "action = op | op permlist | op permcopy"; always op first */
22:49:13 <fizzie> comment, then actions++ in the loop below, and if (!actions) ... after it.
22:49:21 <elliott> case '+': case '-': case '=': goto afterwhomask;
22:49:48 <elliott> (I really want to get rid of that second switch though! But I don't think I can.
22:49:58 <elliott> i.e. the +-= switch after a condition already proved it true
22:51:02 -!- humanB has joined.
22:51:05 <fizzie> Hmh, right; you can either test for +-= after reading the "who" part -- because any action must start with an op -- or count the actions as you're reading them and test for count>0.
22:51:36 <elliott> fizzie: It's more that I want to replace the outer if with a switch, but there's code common to each action.
22:52:02 -!- humanB has left (?).
22:53:32 <elliott> fizzie: Hrm, does chmod usually have a race condition?
22:53:37 <elliott> i.e. read mode, modify, write
22:54:30 -!- MigoMipo has joined.
22:54:33 <fizzie> I don't think I've ever read the code of any chmod utility, but it doesn't sound very easy to avoid.
22:54:47 <Sgeo> Can't install Dropbox desktop client on the old machine
22:54:59 <Sgeo> And the upload limit for single files from the web interface is 300MB
22:55:42 * Sgeo gos ack to using ... why don't I just use the USB drive?
22:56:23 <elliott> Hmm, my -p option ignores -m for the outer directories. Now why would that be...
22:56:54 <Sgeo> If I can find it :(
22:57:26 <fizzie> Heh, GNU coreutils chmod:
22:57:27 <fizzie> chmod: option '--r' is ambiguous
22:57:39 <elliott> fizzie: What kind of mode is --r?
22:57:57 <elliott> fizzie: That is *valid*? Wow.
22:58:06 <fizzie> Well, it works with the usual "chmod -- --r t" thing.
22:58:33 <Gregor> chmod o+=x is nice and confusing :P
22:59:01 <fizzie> Isn't that just equal to o=x?
22:59:11 <Gregor> Yup, but it sure doesn't look like it to a C programmer 8-D
23:00:27 -!- humanB has joined.
23:01:03 <elliott> false, true, yes, sleep, pwd, echo, dirname, basename, uname, signal, link, cat, date, chroot, env, strings, vis, cal, kill, mkdir.
23:01:25 <elliott> When compiled as one executable.
23:01:47 -!- humanB has left (?).
23:02:06 <elliott> (Would be smaller without that goddamn UPX copyright notice in there.
23:02:50 <Sgeo> Dear old computer: Please do not take two hours to copy a 500MB file from disk to USB drive
23:03:18 * Sgeo wonders if it's actually minutes that I'm seeing
23:04:14 <elliott> Oh yeah, and all of those are on 64-bit.
23:04:16 <fizzie> It's a bit shame that UPX doesn't do anything really clever, like disfilter in kkrunchy: http://www.farb-rausch.de/~fg/code/disfilter/readme.txt ("disassembling binary x86 code preprocessor that increases compressability by LZ-based compressors or context coders")
23:04:18 <elliott> On 32-bit, it'd be even smaller.
23:04:28 <fizzie> (kkrunchy is, of course, Windows-only.)
23:05:03 <Vorpal> elliott, the throne room will be 25x25x7 at least
23:05:11 <elliott> Vorpal: 128x128x128 in your face.
23:05:37 <Vorpal> elliott, yes but try to fit that in mt vorpal. Also mine will be ready long before your
23:05:43 <Vorpal> elliott, also it will not be a single room
23:07:01 <elliott> Heh; mkdir here uses default permissions for -p.
23:07:29 <elliott> For each dir operand that does not name an existing directory, effects equivalent to those caused by the following command shall occur:
23:07:29 <elliott> mkdir -p -m $(umask -S),u+wx $(dirname dir) &&
23:09:28 <Sgeo> Why was I playing Runescape in my dream?
23:09:56 <elliott> fizzie: Is umask implicit?
23:11:58 <Sgeo> What good web browsers are there that work on Win98?
23:12:54 * Sgeo watches the time remaining thingy keep going up
23:15:43 * Sgeo is reading some Win32 tutorial
23:15:45 <fizzie> If you mean the syscalls that take a mode_t (like mkdir, open and such), yes, I think those apply the umask always.
23:16:14 <Sgeo> "hPrevInstance used to be the handle to the previously run instance of your program (if any)
23:16:14 <Sgeo> in Win16. This no longer applies. In Win32 you ignore this parameter. "
23:16:35 * Sgeo is very curious as to what that was used for, exactly
23:17:05 <elliott> mkdir -p -m $(umask -S),u+wx $(dirname dir) &&
23:17:08 <elliott> fizzie: should have mode 0777. Right.
23:17:34 <elliott> What mode would that correspond to?
23:17:37 * Sgeo loses interest
23:17:57 <fizzie> Sgeo: You can go steal already-loaded data by memory-copying from the previously opened instance, to start faster.
23:18:03 <fizzie> Sgeo: See http://blogs.msdn.com/b/oldnewthing/archive/2004/06/15/156022.aspx
23:20:13 * Phantom_Hoover decides he ought to murder the people who are ruining the cool bits of the Museum of Scotland.
23:20:31 -!- kar8nga has quit (Remote host closed the connection).
23:20:56 <fizzie> That is awfully complicated. But "umask -S" seems to return the symbolicized version of what (0777 & umask) ends up like, so "$(umask -S),u+wx" would just mean "like what mkdir without a mode argument usually does, except the user's write+execute bits are forced on always, even if umask would not".
23:21:04 <fizzie> Presumably because otherwise you couldn't create subdirectories under it.
23:21:38 <elliott> fizzie: Right, but as far as the argument to the malloc syscall...
23:21:49 <elliott> fizzie: Okay, I'll just pass 0777.
23:22:14 -!- Sgeo has quit (Read error: Connection reset by peer).
23:22:30 <elliott> Actually, happens with just -p too.
23:23:21 <fizzie> Yes, I think passing 0777 to mkdir(2) is reasonable; if your user gives a -m argument, you're going to have to manually chmod it anyway, unless you really want to do some sort of "okay, here the umask didn't change the mode, so I don't need to" logic.
23:24:01 <elliott> fizzie: Manually chmod it?
23:24:14 <elliott> fizzie: Oh, because of the umask?
23:24:23 <fizzie> Because "mkdir -m a+rwx foo" must set all the bits, not just umask-allowed ones, right.
23:24:23 <elliott> fizzie: You mean I can't just do mkdir(path, mode)?
23:24:33 <elliott> fizzie: You can't see it right now, but I'm vomiting.
23:24:37 <elliott> fizzie: Does chmod really bypass that?
23:25:04 <fizzie> Otherwise you'd have no way of setting any non-umask-allowed modes.
23:25:04 <pikhq> There's a rumor going around that the PS3 master key has been found...
23:26:57 <pikhq> If true, this would probably make the PS3 the single most hacked console of this generation.
23:28:40 -!- Sgeo has joined.
23:31:31 -!- hagb4rd has quit (Ping timeout: 245 seconds).
23:31:50 <Phantom_Hoover> pikhq, wait, there's a single key that gives unbridled access to all consoles?
23:33:31 * Sgeo goes to install Win98
23:34:09 -!- hagb4rd has joined.
23:37:23 <Phantom_Hoover> elliott, more TV Tropes madness: Crowning Moment of Awesome is now just Moment of Awesome.
23:38:25 -!- augur has quit (Remote host closed the connection).
23:38:46 <Sgeo> Awesome Moment of Crowning is less punny now :(
23:39:37 <elliott> Phantom_Hoover: i was right
23:39:58 <oerjan> so i guess it's been taken over by "serious" people?
23:40:57 -!- Phantom_Hoover has quit (Remote host closed the connection).
23:42:34 <Sgeo> Where did I put my Windows 98 license key?
23:42:56 <zzo38> Sgeo: In the microwave.
23:43:07 -!- MigoMipo has quit (Read error: Connection reset by peer).
23:45:32 <Sgeo> An email to myself titled "Random porn" is not helpful here
23:48:52 <elliott> Sgeo: We needed to know that!
23:49:03 <Sgeo> It didn't actually contain any porn
23:50:43 <oerjan> well try the folder named "My Al-Qaeda contacts"
23:51:27 <Gregor> And if not that, steganographically encoded into your PDF copy of "Sodomy and the Pirate Tradition"
23:51:58 <elliott> I need COMPUTER SCIENCE BOOK ADVICE. As in what to buy. 'cuz I wanna binge.
23:52:11 <elliott> Candidates: SICP, Purely Functional Data Structures, Land of Lisp, Real World Haskell, ...?
23:52:33 <Sgeo> Facebook for Dummies //I'm sure that's on a CS bookshelf somewhere due to stupidity
23:52:57 <Sgeo> Didn't you recommend Purely Functional Data Structures to me once?
23:53:14 <elliott> Yes. I have heard extremely good things about it from sources I trust highly, and I have read other things by Okasaki.
23:53:19 <elliott> But the book itself I haven't read.
23:53:51 <oerjan> ...there are sources elliott trusts highly?
23:54:17 <elliott> oerjan: You do know I like people, right? :P
23:54:36 <oerjan> yeah but you never _agree_ with them...
23:55:28 -!- Zuu has quit (Ping timeout: 255 seconds).
23:55:34 <elliott> oerjan: It's not my fault most people are wrong. :p
23:56:00 <oerjan> true, true. i mean NONSENSE
23:56:01 <elliott> oerjan: To be fair though, most people in #esoteric aren't indoctrinated into the same cult I am, so it's only natural that you basically just see me disagreeing.
23:56:35 <elliott> oerjan: your children are all goats!
23:57:01 <oerjan> you were spot on, there
23:58:33 <elliott> oerjan: now *i'm* confused. anyway recommend a CS book to me. (<-- sentence least likely to produce helpful results when directed at oerjan :P)
23:59:03 <elliott> <elliott> suggest a bo-- <oerjan> categories for the working mathematician <elliott> --ok about CS
23:59:06 <oerjan> i am merely confirming that my children are, in fact, all goats.
23:59:26 <Gregor> elliott: http://www.abebooks.com/products/isbn/9780814712368 <-- my advice
23:59:40 <Gregor> Err ... recommendation.
23:59:48 <Gregor> Actually, neither sounds better :P
23:59:58 * oerjan hasn't actually read categories for the working mathematician