←2009-11-21 2009-11-22 2009-11-23→ ↑2009 ↑all
00:01:23 <ehird> pikhq: Personally, in the tools I'll write I'll support a really shitty thing if usage of it is ubiquitous.
00:01:35 <ehird> But I don't really mind breaking a few things; my distro does enough of that already.
00:01:58 <pikhq> ehird: I wonder what ps will look like.
00:02:10 -!- augur has joined.
00:02:14 <pikhq> Particularly since GNU ps has 3 or 4 different *types* of arguments...
00:02:15 <ehird> You can't make ps(1) portable, can you?
00:02:31 <pikhq> Not really.
00:02:39 <ehird> Then it won't go in.
00:03:47 <ehird> pikhq: But the answer is probably: the most common stuff like [-Aaux], -G/-g/-u/-p/-t/-U, and a hack that prepends a - to the first argument without one before flag parsing.
00:04:50 <ehird> pikhq: But it'd involve traversing /proc, wouldn't it?
00:04:57 <ehird> I've certainly never come across a ps syscall.
00:05:03 <pikhq> On Linux, yeah.
00:05:10 <pikhq> On other OSes, I haven't a clue.
00:05:17 <ehird> Then it won't go in due to sheer nonportability.
00:05:31 <ehird> In the same category as e.g. mount.
00:05:44 <ehird> Hmm, I wonder where Linux mount comes from.
00:07:25 <pikhq> It's in util-linux. So, probably at least originally a Linux Torvalds creation...
00:08:57 * ehird looks at the list in http://en.wikipedia.org/wiki/Util-linux
00:09:06 <ehird> /bin/arch? Seriously? You can make that pretty portable; it's just uname.
00:09:15 <ehird> kill?! Why isn't this in coreutils?
00:09:18 <ehird> ... Wait... MORE?
00:09:37 <ehird> Shit, half of this stuff should belong in coreutils, and a quarter of it should be removed.
00:09:41 <ehird> *stuff belongs
00:09:52 <pikhq> util-linux is everything that coreutils didn't have that a decent Unix system should have.
00:10:05 <ehird> /usr/bin/rev
00:10:08 <ehird> are you fucking joking
00:10:17 <ehird> /usr/bin/ddate
00:10:17 <ehird> i am cutting myself
00:10:31 <ehird> I like ddate and all, but putting it in the "OMG CRUCIAL LINUX-SPECIFIC STUFF" bin?
00:10:44 <pikhq> coreutils also has arch...
00:10:57 <ehird> I mentioned that before :P
00:11:02 <ehird> TECHNICALLY uname() isn't portable
00:11:15 <ehird> (on ddate:
00:11:15 <ehird> "People with more traditional moral values might not
00:11:16 <ehird> appreciate a reference to or advertisement for this movement
00:11:16 <ehird> being present on their system."
00:11:16 <ehird> I wonder if the bug reporter ever considered that this might be an advantage.)
00:11:33 <ehird> Oh, and they mixed up Discordianism and the Church of the SubGenius to boot.
00:11:42 <pikhq> XD
00:13:14 <ehird> Hey, I just realised that my complete lack of caring about internationalisation and locales is saving me work.
00:13:14 <ehird> Sweet.
00:14:12 <ehird> (non-English unix-like users who use internationalisation of the command-line tools: Oh, shut up. Do you want me to rename cat to ket, zany Germans?!)
00:14:36 <ehird> Note: Scientific renaming derived from taking the sixth to ninth letters of "verketten", meaning "concatenate".
00:14:59 <pikhq> XD
00:30:46 * ehird notes that not using dd is shorter than using it a lot of the time
00:31:09 <ehird> dd if=/dev/zero of=foo bs=8192 count=8192
00:31:09 <ehird> vs
00:31:09 <ehird> head -c $((8192*8192)) /dev/zero >foo
00:31:21 <ehird> UNIX IS CRYING THE BLOOD OF HOW MUCH YOU HATE IT
00:31:30 <ehird> Every time you use dd, Ken Thompson kills a kitten.
00:32:06 <sarek_> anyone good with java/OO
00:32:13 <sarek_> i had a programming generic question
00:32:18 <sarek_> writring procedural code in java is bad?
00:32:22 <sarek_> or should it be OO
00:32:24 <ehird> Writing code in Java is bad.
00:32:30 <sarek_> ok....
00:32:32 <ehird> OO is braindead but if you must use Java, you should use it.
00:32:38 <ehird> Don't use Java.
00:32:45 <sarek_> no i mean using procedural code to oo code
00:32:56 <ehird> If you're writing Java, write in OO.
00:33:04 <ehird> But really; don't write in Java unless you must.
00:34:12 <sarek_> i must
00:34:18 <sarek_> its sort of an interview assignment
00:34:20 <sarek_> ive written it
00:34:26 <sarek_> but some say procedural code in java is wrong
00:34:29 <ehird> For a company? Or do you mean "homework"...
00:34:39 <sarek_> for a company
00:34:55 <ehird> I wouldn't work for a company if I had to write Java.
00:35:03 <ehird> But then I value my sanity and such.
00:36:02 <sarek_> why would OO be right here
00:36:03 <ehird> ($ time cat foo >/dev/null
00:36:03 <ehird> 0m0.34s real 0m0.00s user 0m0.33s system
00:36:04 <ehird> $ time ./cat foo >/dev/null
00:36:04 <ehird> 0m0.94s real 0m0.18s user 0m0.71s system
00:36:04 <ehird> Oh noes!!11 How will I compete in the fast-paced arena of catting 640 MiB files?)
00:36:08 <sarek_> or why do you think its better
00:36:17 <ehird> sarek_: because java is oo all around
00:37:01 <sarek_> im lost
00:37:09 <sarek_> so i should add objects in java?
00:37:14 <sarek_> basically add oo in java?
00:37:52 <ehird> sarek_: Java has objects..
00:37:55 <ehird> *...
00:38:09 <pikhq> ... If you're lost, maybe you shouldn't be applying for a programming job.
00:38:10 <sarek_> http://pastebin.com/d376562ec
00:38:12 <sarek_> best i show you code
00:38:13 <sarek_> :D
00:38:16 <sarek_> in there
00:38:22 <sarek_> adding objects would make things cleaner?
00:38:44 <ehird> That code is perfectly fine from a quick read of it.
00:39:00 <ehird> sarek_: Although...
00:39:06 <ehird> /* Dequeue operation */
00:39:06 <ehird> queue.remove();
00:39:10 <ehird> I wouldn't add such an obvious comment.
00:39:16 <pikhq> Yeah, looks reasonable.
00:39:33 <pikhq> ... For Java, at least (which enforces verboseness).
00:39:41 <ehird> Plus, that line is indented a lot; I would create a function with the body of the while (true) { that starts on line 211.
00:39:44 <ehird> And turn it into:
00:39:48 <ehird> while (true) {
00:39:49 <sarek_> ok
00:39:50 <sarek_> cool
00:39:57 <ehird> whateveryoucallit();
00:39:57 <ehird> }
00:40:21 <fizzie> When in Java, do as the Javans do. (I think that might involve all kinds of curious religious beliefs, for example. Oh, and you should speak Indonesian as a second language, most do)
00:40:34 <sarek_> k ehird
00:40:37 <sarek_> coolt
00:40:37 <ehird> Isn't it Javacs, fizzie?
00:40:44 <sarek_> thanks fot the input
00:41:13 <sarek_> but although
00:41:15 <ehird> sarek_: Basically, how to write good code: Avoid indenting too much. It's a sign you have a function that's too complex; split it up. Make the flow of logic clear. And finally, if your language has conventions, follow them.
00:41:15 <sarek_> ehird what is the need of objects in this example
00:41:21 <ehird> There is none in that example.
00:41:33 <fizzie> ehird: It might be. Though that sounds a bit... bovine. (Maybe it's the "yak" resemblance.)
00:41:47 <ehird> sarek_: Only add a class if you have a specific self-contained thing that doesn't interact much with other stuff.
00:41:55 <sarek_> no i mean
00:41:56 <ehird> And don't make it abstract; only add a class for an actual thing, not a FactoryFactoryFactory.
00:42:01 <sarek_> adding objects would make any difference?
00:42:08 <ehird> Make any difference how?
00:42:12 <ehird> It'd overcomplicate the code for no real reason.
00:42:36 -!- adam_d has quit ("Leaving").
00:43:13 <sarek_> ah ok
00:47:37 <sarek_> i guess i'll add a sliding window too
00:47:42 <sarek_> so there's no heavy queueing
00:47:51 <sarek_> but thanks for the input guys
00:48:05 <sarek_> so let me guess you guys are tired with other languages and moved to esoteric ones?
00:48:40 <pikhq> Nope.
00:49:09 <pikhq> Though most of us find that Java sucks quite horribly.
00:50:30 <sarek_> wait i cant use a sliding window
00:50:32 <sarek_> i need to queue it
00:53:02 -!- FireFly has quit ("Later").
01:00:12 <ehird> hmm
01:00:21 <ehird> i wonder if rmdir has any use vs rm -f
01:00:40 <ehird> sarek_: I'm tired with other languages so I go to the fringe.
01:00:48 <ehird> Esoteric, though?
01:00:54 <ehird> Nah; that's just for fun.
01:00:57 <ehird> Though good ideas have come out of esolangs.
01:01:15 <sarek_> heh
01:01:20 <sarek_> golang is fun
01:01:22 <ehird> Haskell is one of my favourite languages... recently I had a kick of using minimalist C as an applications programming language, but I've moved onto Go.
01:01:24 <ehird> Ha, snap.
01:01:47 <ehird> I'm skeptical of all languages that come out, but the people who created C, Unix and Plan 9 kinda negate that.
01:02:20 <pikhq> Well-done C is actually quite nice. The main thing with C is, of course, that it's easy to write very, very bad C.
01:02:39 <pikhq> And freaking hard to write C well.
01:02:43 <ehird> Hmm... What's the bit that sets directoriness in Unix permissions?
01:05:22 <sarek_> haskell is real nice
01:05:29 <sarek_> my assignment in haskell would be a one liner
01:05:29 <sarek_> :D
01:05:33 <ehird> Oh, ls just pretends there's one.
01:05:43 <ehird> Yeah, Haskell is nice.
01:06:01 <sarek_> does this look efficient http://www.nomorepasting.com/getpaste.php?pasteid=30275
01:06:09 <sarek_> too many non-referenced strings will exist?
01:06:15 <sarek_> everytime u do S+=receiver()
01:06:21 <ehird> += is efficient in Java.
01:06:48 <sarek_> how so?
01:06:53 <sarek_> on-referenced strings will exist
01:07:01 <sarek_> lots of non-referenced string objects
01:07:04 <ehird> It's not a big deal.
01:07:10 <sarek_> garbage collection is indeed there but still
01:07:21 <sarek_> would it be better to use a stringbuilder?
01:07:28 <sarek_> and then append
01:07:35 <ehird> If it goes slowly, optimise your algorithm; then optimise it some more; only then should you micro-optimise.
01:07:40 <ehird> StringBuilder is probably more idiomatic here.
01:07:45 <ehird> It is likely to be marginally faster.
01:08:07 <pikhq> Premature optimisation. Go with the most clear thing, and optimise later if it's slow.
01:08:10 <sarek_> whats marginally faster?
01:08:13 <sarek_> the code
01:08:16 <sarek_> or using stringbuilder?
01:08:21 <ehird> StringBuilder.
01:08:32 * ehird writes touch(1)
01:08:51 <sarek_> but does the code look efficient besides using a stringbuilder?
01:09:02 <sarek_> considering there is lots of non-referenced string objects
01:09:38 <ehird> sarek_: Is it going slowly?
01:09:51 <ehird> [[ The -m flag sets the permissions to be used when creating
01:09:52 <ehird> the directory. The default is 0777.]] —plan9 mkdir(1)
01:09:52 <ehird> Wonder why, when chmod works just fine...
01:10:24 <sarek_> it sort of runs ok
01:10:27 <sarek_> not too fast
01:10:29 <sarek_> not too slow
01:10:54 <ehird> Rewrite it with StringBuilder; if it's faster and not hideously ugly, use thaat.
01:10:55 <ehird> *that
01:11:05 <sarek_> what about a string pool?
01:11:47 <sarek_> all non-referenced string in java are left in string pool for some time till garbage collector takes up the job right?
01:12:04 <ehird> Is it slow?
01:12:12 <sarek_> yeah
01:12:18 <ehird> Have you tried StringBuilder?
01:12:19 <sarek_> it has tobe without a stringbuilder
01:12:22 <sarek_> because ot the string pool
01:13:03 <sarek_> ok let me try
01:28:43 -!- oerjan has joined.
01:30:46 -!- BeholdMyGlory has quit (Remote closed the connection).
01:40:21 -!- iamcal has joined.
01:40:59 -!- facsimile has left (?).
02:00:18 -!- cal153 has quit (Read error: 113 (No route to host)).
02:00:43 -!- augur has quit (Read error: 60 (Operation timed out)).
02:05:11 -!- Asztal has quit (Remote closed the connection).
02:08:14 -!- ais523 has quit (Remote closed the connection).
02:47:52 -!- rodgort has quit (leguin.freenode.net irc.freenode.net).
02:47:53 -!- lifthrasiir has quit (leguin.freenode.net irc.freenode.net).
02:47:53 -!- fungot has quit (leguin.freenode.net irc.freenode.net).
02:47:53 -!- Deewiant has quit (leguin.freenode.net irc.freenode.net).
02:47:53 -!- Ilari has quit (leguin.freenode.net irc.freenode.net).
02:48:44 -!- rodgort has joined.
02:48:44 -!- lifthrasiir has joined.
02:48:44 -!- Ilari has joined.
02:48:44 -!- Deewiant has joined.
02:48:44 -!- fungot has joined.
03:01:16 -!- fungot has quit (leguin.freenode.net irc.freenode.net).
03:01:17 -!- Ilari has quit (leguin.freenode.net irc.freenode.net).
03:01:17 -!- Deewiant has quit (leguin.freenode.net irc.freenode.net).
03:01:17 -!- lifthrasiir has quit (leguin.freenode.net irc.freenode.net).
03:01:17 -!- rodgort has quit (leguin.freenode.net irc.freenode.net).
03:03:15 -!- lifthrasiir has joined.
03:03:15 -!- lifthrasiir has quit (Killed by sagan.freenode.net (Nick collision)).
03:03:26 -!- rodgort has joined.
03:03:26 -!- lifthrasiir has joined.
03:03:26 -!- Ilari has joined.
03:03:26 -!- Deewiant has joined.
03:03:26 -!- fungot has joined.
03:05:33 -!- lifthrasiir has quit (Read error: 131 (Connection reset by peer)).
03:11:18 -!- facsimile has joined.
03:13:15 -!- lifthrasiir has joined.
03:16:55 -!- facsimile has quit ("Leaving").
03:25:58 -!- zzo38 has joined.
03:26:12 <zzo38> A simple program to check if your computer is Intel or AMD:
03:26:19 <zzo38> 31 C0 0F A2 B8 24 24 66 50 66 51 66 52 66 53 89 E2 B4 09 CD 21 31 C0 CD 21
03:27:02 <zzo38> Use of the program is self-explanatory.
03:31:12 <pikhq> No it's not.
03:31:59 <oerjan> "you keep using that word. i do not think it means what you think it means"
03:32:03 <pikhq> What's the entry point? Does it expect an initialised stack? Does it expect any sort of segmentation scheme?
03:32:27 <zzo38> Yes, it's DOS, of course it will work (I tested it)
03:32:33 <pikhq> Which mode should it execute in?
03:32:40 <zzo38> Real-mode
03:32:54 <zzo38> Just make a file called CPUID.COM and you can see if it works OK
03:33:24 <pikhq> Okay, so it's a COM file. That's sufficient information to at least execute it.
03:37:14 <pikhq> (namely, it expects real mode, entry point at 0x1000:0x0000, stack initialised... Oh, and it presumes the existence of the DOS interrupt table)
03:37:42 <pikhq> zzo38: Does it use any of the interrupts added by DOS?
03:37:59 <zzo38> Yes, it uses INT 21 (which is DOS interrupt)
03:46:07 -!- sarek_ has quit (Read error: 110 (Connection timed out)).
03:46:25 <ehird> oh hi zzo38!
03:46:28 <ehird> didn't realise you were here
03:46:57 <ehird> zzo38: how recent intel/amds does it work on?
03:47:05 <ehird> can it distinguish a core i7 from an opteron?
03:47:13 <Gregor> And what if it's Cyrix, VIA or Transmeta?
03:47:28 <zzo38> Well, just try it and see if it works.
03:47:40 <zzo38> I don't really know, but I believe it will work on all Pentium and newer
03:48:00 <oerjan> fry, fry, fry your board...
03:48:16 * oerjan whistles innocently
03:48:35 <zzo38> It works in virtual mode too
03:51:05 <ehird> wonder what it thinks $vm is
03:51:11 <ehird> also, lol transmeta
03:55:26 <zzo38> If you want to do so, you can try to convert it to a 32-bits protected mode program that works on Linux, but I don't know how
03:56:54 <ehird> want to do what?
03:57:02 <ehird> Incidentally, writing ls(1) is a pain.
03:57:08 <ehird> So many intertwixing little logics.
03:57:31 * oerjan discovers that "satanovsky" is a real surname
03:58:03 <zzo38> Then don't write ls(1) if you don't like to write ls(1)
03:58:12 <ehird> My fuckin' dispatch-on-type-of-file function is 30 lines just to handle the case that it's a symlink that points to a directory and we haven't been given -P
03:58:18 <ehird> zzo38: But I do want to, it's just a pain.
03:59:03 <zzo38> ehird: OK, then learn to pain. Pain is not too bad, as long as it isn't someone else making pain to you
03:59:21 <ehird> `addquote <zzo38> ehird: OK, then learn to pain. Pain is not too bad, as long as it isn't someone else making pain to you
03:59:29 <ehird> HackEgo?
03:59:30 <ehird> Gregor!
03:59:33 <ehird> E's dead!
04:00:05 <pikhq> zzo38: Got assembly for that?
04:00:16 <pikhq> ehird: ls(1) is probably a pain.
04:00:24 <ehird> Not probably; I can assure you it is.
04:00:27 <zzo38> Assembly for what, do you mean, please?
04:00:35 <oerjan> pain au chocolat
04:00:36 <zzo38> `addquote
04:00:38 <ehird> 75 lines and that's just the flags and initial dispatch.
04:00:51 <pikhq> I'd be writing some coreutils in Haskell for kicks ATM if I had my computer here.
04:00:54 <ehird> At least my ls(1) has significantly fewer options than thee common fare.
04:00:57 <ehird> -dhlrtFP
04:01:24 <pikhq> zzo38: The AMD/Intel thing.
04:01:31 <ehird> list directories, not their contents; show file sizes as kilo/mega/gigabytes; show more informaation in columns; sort in reverse; sort the most recently modified files first; show sigils for directories/ executables* symlinks@ sockets= FIFOs|; list symlinks, not their referents.
04:01:34 <ehird> That's "it".
04:01:43 <ehird> "Only" seven options.
04:01:46 <ehird> *information
04:02:19 <zzo38> Just a minute while I disassemble it
04:02:36 <ehird> Lemme guess — by hand
04:02:42 <pikhq> ...
04:02:48 <ehird> It's zzo38, dude :P
04:02:55 <pikhq> zzo38, it's not like a 16-bit assembler is hard to find.
04:02:59 <ehird> pikhq: I'm pretty sure writing this ls(1) would be a pain in Haskell.
04:03:09 <pikhq> Even on a modern Unix system.
04:03:17 <pikhq> ehird: Maybe.
04:03:30 <ehird> The logic is twingly and would become a nested mass without some imperativeness, I think.
04:03:33 <pikhq> How do you have to go about getting the file directory listing, anyways?
04:03:37 <zzo38> XOR AX,AX CPUID MOV AX,2424 PUSH EAX PUSH ECX PUSH EDX PUSH EBX MOV DX,SP MOV AH,09 INT 21 XOR AX,AX INT 21
04:03:41 <zzo38> There, there is the code
04:03:47 <oerjan> pikhq: he'd have to write his own fork of it then, you know ;D
04:03:54 <ehird> pikhq: Uh, just readdir(). Well. file.Readdir().
04:03:57 <ehird> Since it's in Go.
04:03:57 <pikhq> oerjan: Oh, right.
04:04:18 <pikhq> ehird: Okay. It'd be a bit of a pain, then.
04:04:25 <ehird> pikhq: How else would you do it?
04:04:45 <pikhq> ehird: I'd forgotten what the function was is all.
04:04:52 <pikhq> xor functions.
04:05:06 <zzo38> pikhq: OK, how I has the disassembled code, so that you can understand what it is
04:05:11 <oerjan> Xorax the terrible
04:05:46 * ehird needs to make a function for if err != nil { errorCode = 1; fmt.Fprintln(os.Stderr, err); return; }
04:05:52 <pikhq> zzo38: ... EAX? EBX? Those registers exist only in protected mode.
04:05:58 <pikhq> ... Oh, and long mode, and unreal mode.
04:05:59 <ehird> Say, `if handleError(err) { return }`.
04:06:06 -!- coppro has joined.
04:06:19 <zzo38> No, they exist even outside of protected mode. You just need to add the prefix for 32-bit instructions in 16-bit mode
04:06:47 <pikhq> ... Sorry, I should restate that: those registers only exist on 32-bit processors.
04:06:53 <zzo38> The 66 prefix makes it do that
04:07:01 <zzo38> Yes, this program works only on 32-bit processors
04:07:10 <zzo38> But it runs in 16-bits mode
04:07:25 <pikhq> *facepalm8
04:07:37 <Gregor> Why oh why does hackego sometimes disappear
04:07:55 <zzo38> Gregor: For no reason
04:08:03 <pikhq> Because hackego hates all that is Ego.
04:08:11 <ehird> pikhq: it's a dos program, don't expect sanity
04:08:15 <ehird> unreal mode is fun btw.
04:08:32 <pikhq> Unreal mode is pretty... Crazy.
04:09:07 <zzo38> I have never used unreal mode
04:09:29 <pikhq> It's pretty simple.
04:09:48 <pikhq> You jump to protected mode. You set up the segment table. You jump to real mode without clearing the segment table.
04:09:51 <pikhq> Voila.
04:09:58 <ehird> http://sprunge.us/XFLT
04:10:01 <ehird> Fuck yeah!
04:10:07 -!- HackEgo has joined.
04:10:07 <ehird> The first directory listing ist print.
04:10:12 <ehird> printt. :P
04:10:22 <ehird> Oddly enough it's pre-sorted.
04:10:24 <ehird> Wonder if that's portable.
04:10:55 <zzo38> What is .go
04:11:05 <coppro> ehird: are you honestly doing what I think you're doing?
04:11:13 <ehird> Implementing core utilities?
04:11:21 <ehird> Yes; in Go, for the Goblin project (not mine).
04:11:29 <coppro> :(
04:11:30 <pikhq> zzo38: The Go postfix.
04:11:36 <ehird> It's not mere folly; no tools with a similarly minimalist, Plan 9-inspired philosophy exist.
04:11:50 <ehird> Except maybe plan9port, and that doesn't gel too well with normal Unices.
04:12:20 <ehird> ":(" all you want; you can enjoy your shit-filled, bloated-to-the-max GNU rubbish and I'll continue banging away contributions to Goblin.
04:12:46 <ehird> pikhq is right; it's the suffix for the Go programming language.
04:13:14 <zzo38> OK
04:13:35 <coppro> ehird: I hate GNU. I'm :(ing Go
04:13:58 <ehird> coppro: What, do you think I use Go because it's "OMG GOOGLE"?
04:14:07 <ehird> No, I use it because it's from the people who brought us C, Unix and Plan 9.
04:14:14 <ehird> And the toolchain architecture is Plan 9's, which is wonderful.
04:14:29 <ehird> And it's a cleaned up C with garbage collection, a truly wonderful sort-of-OO system and a good concurrency model.
04:14:54 <ehird> (I'm not joking by the people thing — you may have heard of Ken Thompson... :P)
04:16:41 <ehird> Seems that readdir() returning in alphabetical order isn't portable.
04:16:51 <ehird> So time to write my happy happy fun fun magical sorting routinee.
04:16:58 <ehird> Need to sleep soon.
04:18:04 <coppro> ehird: I find it interesting that you consider Go minimalist.
04:18:10 <coppro> That is all.
04:19:14 <ehird> I find it interesting that you apply your usual holier-than-thou attitude to something you clearly haven't researched beyond a cursory glance (probably ending in "It looks like Pascal and I vomited!" or something equally inane and incorrect) or, if you had, entered in with a strange bias. Go *is* minimalist.
04:19:39 <ehird> I'd say that is all, but I don't use cheap tricks to make the other party think that they are unable to reply.
04:20:48 <coppro> ehird: I was merely stating that I find it interesting that you consider it to be minimalist, which I do.
04:21:12 <ehird> Ohh, I was meant to call the "interpret line hyper-literally while ignoring blatantly obvious implied meaning" routine on that line.
04:21:21 <ehird> I see, it is all clear now.
04:21:46 <ehird> Why don't you just stfu, because all you ever say to me is condescending bullshit one-liners? Thanks.
04:23:56 <pikhq> "Cleaned up C with garbage collection". Bam, instant decent language.
04:23:57 <pikhq> :)
04:24:09 <zzo38> Do you have any idea of rule for disorientation on D&D game?
04:24:16 <pikhq> No.
04:24:20 <ehird> Bam, below average sized language. Wait, what?
04:24:22 <pikhq> It rarely comes up.
04:24:31 <pikhq> Check out www.d20srd.org .
04:24:34 <pikhq> ehird: Heheheh.
04:25:15 <zzo38> It is not the standard rule I am looking for (I don't think there is a standard rule). The rule is for if you changed form in the wrong way and have to be disoriented for 24 hours
04:25:23 <zzo38> There is no standard rule for that
04:26:22 <pikhq> Ask your DM, since it is clearly a house rule.
04:27:30 * ehird wonders whether to bother with symbolic permissions
04:27:32 * coppro notes that he does not consider garbage collection to be panacea... yet
04:27:42 <ehird> Would be more convenient to have "755" in the dir listing imo.
04:27:54 <ehird> coppro: Hello, 80s to 90s person!
04:28:18 <zzo38> The DM doesn't have a idea, I need to make up a idea to suggested to the DM, which is what I would require some idea that someone has of this idea of this rule. (And, yes, it does apply to my character)
04:28:24 <zzo38> (temporarily)
04:28:26 <ehird> As the fields of computer science and practical language design have not both almost entirely conclusively decided that garbage collection is a Good Thing, your opinion carries more than absolutely zero weight! Because this is the 80s to 90s!
04:28:27 <pikhq> coppro: Manual memory management is a dying art.
04:28:34 <ehird> Art, I question the word art.
04:28:38 <ehird> May I substitute "waste of time".
04:28:49 <pikhq> ehird: Some arts are also a waste of time.
04:29:01 <ehird> Yes, but the result of manual memory management isn't artful.
04:29:03 <coppro> It still has its uses (for starters, implementing GCs :P)
04:29:08 <pikhq> Manual memory management is only *mostly* a waste of time.
04:29:10 -!- Asztal has joined.
04:29:35 <zzo38> I still do manual memory management, depending on which program language I am using, in some program language, it is more useful, in others it isn't as much useful
04:29:53 <coppro> the main problem I have with modern garbage collection is it tends to be non-deterministic
04:29:59 -!- Slereah_ has joined.
04:30:11 <pikhq> Boehm GC is my favorite C library.
04:30:13 <zzo38> O, that's the problem
04:30:54 <coppro> Which means that it cannot reliably be used to perform other cleanups like can be done with manual memory management
04:31:22 <pikhq> OH NOES HAVE TO MANUALLY CLOSE FILE.
04:32:36 <ehird> http://sprunge.us/JVPI It's a start...
04:32:47 <ehird> coppro: RAII is bad.
04:33:02 <ehird> It simply leads to program bugs and spooky action at a distance due to its implicitness.
04:33:31 <ehird> Besides, for the situations in which it is useful, often a GC finaliser does the trick due to its non-urgency.
04:33:39 <ehird> And anything that needs to be deterministic? Should be stated.
04:33:57 <coppro> SBRM is an excellent idiom (I refuse to call it RAII)
04:35:02 <pikhq> I had almost forgotten there were idioms involved in memory management.
04:35:13 <pikhq> I spend so much time letting the computer do it for me.
04:35:23 <coppro> see, the problem most people have with the C++ memory management model is that it's generally done incorrectly by inexperienced coders
04:35:26 <pikhq> (since I am a programmer: my job is to let the computer do things for me.)
04:35:28 <coppro> You don't manage memory directly
04:36:03 <pikhq> coppro: ... The problem with the C++ memory management model is that it is C's memory management model with un-C-like features added on. Poorly.
04:36:14 <coppro> pikhq: I disagree
04:36:16 <Gregor> ... are we seriously having a GC-vs-no-GC argument in here?
04:36:20 <Gregor> To this I say, lawl.
04:36:21 <ehird> And -F works too, apart from symlinks.
04:36:34 <ehird> Gregor: your signature is just to complain about the current argument, you know
04:36:37 <pikhq> coppro: The same is true of everything else in C++.
04:36:42 <Gregor> ehird: I'm aware.
04:36:45 <Gregor> ehird: And I'm OK with that.
04:36:58 <ehird> pikhq: However, I agree with Gregor on this one piont.
04:37:00 <ehird> *point
04:37:01 <pikhq> Gregor: Yes, yes we are. We're doing 20 year old debates. Hooray!
04:37:03 <coppro> pikhq: sing a smart pointer class, you already have a basic GC system
04:37:05 <ehird> coppro is just a deluded, insane C++ fanboy.
04:37:08 <coppro> *using
04:37:15 <ehird> Conversation with him on any of C++'s beloved "idioms" is worthless.
04:37:16 <coppro> ehird: In this case, I'm a control fanboy
04:37:23 <ehird> #bdsm is that way.
04:37:27 <ehird> Thank you, please come again.
04:37:31 <pikhq> ... Then why do you use C++ instead of C?
04:37:39 <ehird> pikhq: Because he's fucking insane.
04:37:45 <coppro> ehird: By the way, I do not insist that C++ is supermagical
04:38:02 <coppro> pikhq: Because it has a real type system.
04:38:18 <ehird> coppro: You do; you say you're oh, not really a C++ fanboy, then go ahead and defend every damn retarded aspect of it.
04:38:22 <ehird> That's exactly what a fanboy is.
04:38:24 <pikhq> ... Lawl*wut*?
04:38:34 <pikhq> No, it doesn't.
04:38:34 <coppro> ehird: I don't defend every aspect of it
04:38:43 <coppro> pikhq: Compared to C, it does
04:39:00 <coppro> Many major C projects end up hacking together some nasty type system, often with macros
04:39:19 <ehird> Because
04:39:23 <pikhq> ... So pointers aren't all aliased to (void *) on demand.
04:39:31 <pikhq> That does not make a real type system.
04:39:32 <ehird> see, the problem most people have with the C type system model is that it's generally done incorrectly by inexperienced coders
04:39:42 <coppro> ehird: Very true also
04:39:45 <ehird> Oh snap, I just repurposed your quote, except now it's not retarded.
04:39:54 -!- Slereah has quit (Read error: 110 (Connection timed out)).
04:39:58 <ehird> Your argument is invalid, please try again.
04:40:10 <pikhq> That makes a type system that is very slightly less hackish than C's.
04:40:13 <ehird> C's type system is realer than C++'s; it has a coherent philosophy.
04:40:17 <ehird> C++'s is just a halfway point of insanity.
04:40:24 <pikhq> However, C++
04:40:29 <pikhq> 's type system adds new features.
04:40:31 <coppro> ehird: Also, allow me to list some things I hate about C++: iostreams, most C compatibility features, the overload resolution mechanism, and a bunch of template nastiness
04:40:32 <pikhq> Crazy features.
04:40:41 <pikhq> Ones that make parsing the longest pass in C++ compilation.
04:40:47 <ehird> MULTI-COLUMN "LS -L": A FEATURE NOBODY HAS EVER WANTED
04:40:48 <ehird> AND YET
04:40:52 <ehird> $ bin/ls -l -F | mc
04:40:52 <ehird> 040755 bin/ 100644 echo.go 100644 ls.go 100644 mkfile 100644 seq.go
04:40:52 <ehird> 100644 cat.go 100644 false.go 100644 mkdir.go 100644 pwd.go 100644 true.go
04:40:52 <ehird> BEHOLD
04:41:02 <coppro> ah yes, I should add that too: the grammar is horrible
04:41:09 <ehird> (Admittedly mc will just decide to put them on separate lines once I've fleshed out -l.)
04:41:10 <Gregor> ehird: ls -lol
04:41:18 <ehird> Gregor: There is no flag lol, good sir!
04:41:26 <ehird> We in Plan 9-derived-thingies do not do such uncouth -mixing.
04:41:35 <coppro> I hate C++'s grammar even more than the next guy.
04:41:35 <ehird> We are -s -e -r -e -n -e and -c -a -l -m.
04:41:44 <pikhq> coppro: The type system itself is *why* the grammar takes so long to parse.
04:41:54 <pikhq> You literally have to evaluate templates in order to parse.
04:41:55 <coppro> ehird: error: duplicate option -i
04:41:59 * Gregor huggles JavaScript and then runs away.
04:42:13 <pikhq> Gregor: Smart choice.
04:42:29 <ehird> js' scoping almost ruins the entire thing.
04:42:38 <coppro> pikhq: It's more fundamental than that. It's because it fundamentally uses C's grammar, which has the same problem. It's just less noticeable because C is simpler.
04:42:39 <ehird> also, the verbose closure syntax and some other baroque syntax warts
04:42:55 <Asztal> coppro: even worse, C++ overload resolution gets a whole lot nastier when templates or partial template specialization are involved :(
04:43:00 <zzo38> The reason it's slow, it isn't Forth. Forth is much more simple to parse than most others
04:43:04 <coppro> Asztal: Yeah :(
04:43:06 <ehird> $ bin/ls -d
04:43:06 <ehird> .
04:43:07 <ehird> Yup... thanks for that...
04:43:07 <pikhq> coppro: ... YOU ARE FREAKING EVALUATING LAMBDA CALCULUS AT RUNTIME FOR YOUR TYPESYSTEM.
04:43:14 <pikhq> YOU FAIL AT TYPES FOREVER IF YOU THINK THATS A GOOD IDEA.
04:43:20 <pikhq> </flame.
04:43:20 <pikhq> >
04:43:28 <ehird> $ bin/ls -d $(bin/pwd)
04:43:29 <ehird> goblin
04:43:29 <ehird> Also thanks for that.
04:43:32 <pikhq> zzo38: Teehee.
04:43:35 <coppro> pikhq: at compile time, I think you mean?
04:43:40 <ehird> Forth isn't simple to parse
04:43:42 <ehird> It's TC to parse
04:43:46 <pikhq> coppro: ... Yes.
04:43:47 <Gregor> Nope, evaluating a TC language at runtime is bad.
04:43:48 <ehird> Words can take over parsing entirely
04:43:49 <Gregor> :P
04:44:29 <pikhq> C++ is also TC to parse, and you don't even get much flexibility from it.
04:44:51 <ehird> I bet coppro read through the C++ FQA Lite, nodding at the FAQ quotes and disagreeing with the response.
04:44:55 <zzo38> Yes, words can take over parsing entirely, which makes it powerful, however it is still simple to write a simple parser that works. There is no syntax. Just read each word, that's all you need to parse a Forth program. The other parts of the program can parse some parts themself, too, if that is what needed
04:44:57 <ehird> A fun way to spend an afternoon for a fanboy.
04:44:59 <pikhq> We should go on to easier-to-parse languages... Like Haskell.
04:45:03 <ehird> zzo38: False.
04:45:05 <ehird> zzo38: For instance, you can do
04:45:19 <ehird> PARSE-C-NOW int main() { return 0;} $$END-OF-C
04:45:29 <ehird> You can only parse that by running PARSE-C-NOW's compile-time word.
04:45:37 <ehird> If you just split on spaces, then you are lexing it.
04:45:41 <ehird> Although, actually, there's an exception to that.
04:45:43 <pikhq> ehird: That would be a pretty awesome couple of words.
04:45:46 <ehird> I think +2 or something is actually + 2
04:45:46 <coppro> pikhq: I'm ambivalent on that issue. Performing TC evaluation at compile-time has advantages, but as you pointed out, it makes the language far more complex, to the point where it probably isn't worth it, and I'm undecided on whether it is
04:45:48 <ehird> pikhq: One word.
04:45:49 <zzo38> Well yes. I don't quite mean exactly as I meant
04:45:54 <ehird> $$END-OF-C is just handled by PARSE-C-NOW.
04:46:06 <pikhq> ehird: Alright.
04:46:17 <zzo38> PARSE-C-NOW would enter a different parser, not part of the main Forth parser.
04:46:27 <coppro> how are we having a parsing discussion without mentioning Lisp and friends?
04:46:42 <zzo38> coppro: Then you can mention Lisp if you prefer to do so
04:46:42 <Gregor> I wish JSMIPS was tolerably fast, but I'm unwilling to figure out exactly why it's so slow and fix it, mostly because I suspect that the reason why it's so slow is because it can't be done fast.
04:46:47 <ehird> Because we're more advanced than simple categorising pattern-matching machines.
04:46:52 <pikhq> coppro: There's also this nasty bit about having to have code in a header if you want to use templated things in multiple files...
04:47:05 <coppro> pikhq: Oh yeah, that's truly nasty.
04:47:06 <ehird> AnMaster combined vaguely related things and thinks it's a new idea, but the rest of us generally don't.
04:47:25 <zzo38> Of course, you can't parse Forth codes without executing it, but if you do execute it, it is simple for the main parser to be written. That is what I mean.
04:47:28 <coppro> pikhq: that one has an interesting legacy...
04:48:13 <pikhq> There's also also this nasty bit about the headers randomly changing from <stdio.h>, say, to <cstdio>.
04:48:20 <pikhq> ... For no particularly good reason.
04:48:28 <coppro> pikhq: Namespaces
04:48:40 <zzo38> pikhq: Maybe it is because it is C++
04:48:43 <coppro> pikhq: C does not have them. The <c*> versions of the headers are in namespace std;
04:48:50 <zzo38> I don't use C++ so I wouldn't be sure
04:49:02 <coppro> Of course, it's rather irritatingly moot because
04:49:02 <zzo38> I prefer plain C
04:49:17 <coppro> *because C standard library functions are reserved in the global namespace
04:49:49 <pikhq> coppro: Oh, right.
04:49:59 <pikhq> And the depressingly poor implementation of namespaces.
04:50:16 <coppro> namespaces != packages, sadly
04:50:22 <coppro> (or modules, whichever you prefer)
04:50:35 <coppro> I think they're looking to add that in 10 years or so :/
04:51:04 <ehird> & 1 || & 10 || & 100 (in octal)
04:51:08 <ehird> Rather annoying to check for executableness
04:51:24 <ehird> Oh, and add a !directory in there too.
04:51:32 <coppro> huh?
04:51:41 <pikhq> Really, why did they keep things like "headers" around?
04:51:52 <pikhq> It's an archaicism at best.
04:52:14 <pikhq> At bear minimum, should've deprecated #include for a proper module system.
04:52:20 <pikhq> s/bear/bare/
04:52:34 <coppro> pikhq: As I said, they're looking for modules for the next iteration in 10 or so years :/
04:52:55 <coppro> Standardized languages have benefits, but they also are slooooow to change
04:53:03 <zzo38> I still think #include and #define are useful commands. But, there is still a few things missing
04:53:20 <coppro> yeah, I don't think they should recommend removing #include
04:53:43 <pikhq> They should nuke the entire C preprocessor in favor of a proper macro system.
04:54:08 <pikhq> ... Oh, and nuke C++ from orbit. :P
04:54:17 <ehird> Erm. Huh.
04:54:22 <ehird> Passing /foo to stat() gets you ./foo.
04:54:26 <coppro> pikhq: Have you ever seen Boost.Preprocessor? (note: I don't condone it)
04:54:29 <pikhq> Huh.
04:54:33 <coppro> (and it applies to C as well)
04:54:40 <ehird> $ bin/ls -F /
04:54:40 <ehird> open : no such file or directory
04:54:42 <ehird> and /bin gets ./bin
04:54:48 <pikhq> coppro: I'm not saying it's useless.
04:54:48 <ehird> Wait, how is my / being stripped?
04:54:51 <ehird> WHAT IS THE MEANING OF THIS
04:54:56 <pikhq> I'm saying it's piss-poor.
04:55:03 <coppro> pikhq: Right.
04:55:13 <coppro> pikhq: And I'm saying, look at Boost.Preprocessor if you want a lesson in esoteric programming
04:55:49 <coppro> pikhq: The C preprocessor is horrible (though really, adding a more complex macro system just gives C++ another level of execution besides templates and runtime...)
04:56:09 <pikhq> ... Nuke templates, too.
04:56:21 <pikhq> Really, nuke all of C++. It's an abortion.
04:56:38 <coppro> I do not believe that word means what you think it means.
04:57:14 <pikhq> Implausible!
04:59:06 <pikhq> Seriously, though, consider C++ aborted.
04:59:06 * pikhq puts away the wire coat hanger
04:59:08 <ehird> ...You can't get the filename a symlink points to without open()ing it?
04:59:38 <ehird> And I am tired? Yawn. Sleep soon.
05:03:24 <ehird> http://www.youtube.com/watch?v=nah3nMStXV4
05:03:24 <ehird> in which bears play ice hockey
05:03:24 <ehird> INTERESTING FACT: this video is exactly the same no matter what drugs you are on
05:07:07 * ehird estimates that the final ls.go will be ~300 lines when complete
05:07:23 <ehird> i need a break; i could sleep, but i could also code a different tool!
05:07:56 <pikhq> Code cc.go.
05:07:58 <ehird> blah cp is so boring, it's just cat in >out
05:08:10 <ehird> pikhq: that's $O^c
05:08:15 <ehird> the plan 9 c compiler :P
05:08:19 <ehird> (ships with go)
05:08:23 <ehird> (since the go compilers are written in plan 9 c)
05:08:39 <pikhq> Go compilers are written in Plan 9 C? That's quite nice.
05:08:42 <ehird> yep
05:08:45 <pikhq> Plan 9 offers a very nice C environment.
05:08:47 <ehird> using functions from plan 9's stdlib to boot
05:08:53 <pikhq> Much nicer than that of UNIX.
05:08:57 <ehird> pikhq: and the compiler compiles to plan 9 linker files
05:09:00 <ehird> and uses the plan 9 linker
05:09:17 <ehird> russ cox is one of the main people on the go team, and also the author of plan9port
05:09:23 <ehird> it's very much a plan 9 environment
05:09:32 <pikhq> That's quite nice.
05:10:36 -!- zzo38 has quit (Remote closed the connection).
05:10:50 <ehird> i wonder why cp was created
05:10:54 <ehird> when you can just do cat foo >bar
05:11:36 <coppro> why is there cat when there's dd?
05:11:49 <pikhq> cp -r
05:11:55 <pikhq> coppro: dd predates UNIX.
05:11:57 <ehird> coppro: no, dd is an awful import from other systems
05:11:57 <pikhq> Yes, really.
05:11:59 <coppro> why is there chgroup when there's chown?
05:11:59 <ehird> and totally un-unixy
05:12:06 <coppro> (I know that)
05:12:15 <ehird> cat is simple and unixy, so it should be there (dd should not be there)
05:12:28 <ehird> pikhq: cp -r should just be called cptree or something
05:12:37 <coppro> cattree
05:12:40 <ehird> besides, plan 9 has no cp -r
05:12:45 <ehird> so clearly cp doesn't exist because of -r
05:12:56 <coppro> what about mv? Why is there a mv when there's cp and rm
05:12:58 <coppro> *?
05:13:06 <ehird> because mv has different semantics
05:13:11 <ehird> it merely changes the filename of an inode
05:13:18 <ehird> it doesn't copy any data at all
05:13:38 -!- coppro has quit (Remote closed the connection).
05:13:52 <ehird> incidentally,
05:13:52 <ehird> http://man.cat-v.org/plan_9/1/fedex
05:13:55 <ehird> talk about obscure usecase
05:14:02 <ehird> part of plan 9 :-D
05:14:22 -!- coppro has joined.
05:14:39 * ehird implements fmt
05:15:23 <ehird> uh oh, my thinking is going fuzzy
05:15:25 <coppro> ehird: cat has different semantics from cp
05:15:25 <ehird> better sleep sooon
05:15:31 <coppro> cat works on its input immediately; cp canl do buffered reads
05:15:35 <coppro> *can
05:19:54 <ehird> coppro: no, cat could do buffered too
05:20:01 <ehird> in fact that used to be default
05:20:04 <ehird> cat -u sucka
05:21:22 <ehird> ok not awake enough to do fmt
05:21:27 <ehird> worrying
05:22:55 <coppro> why don't you go to sleep then?
05:24:54 <ehird> i wish i knew the answer to that myself
05:25:02 <ehird> $ bin/seq -f %c 32 126 | tr -d '\n'
05:25:02 <ehird> !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
05:25:14 <ehird> the power of printf!
05:25:29 -!- pikhq has quit (Read error: 104 (Connection reset by peer)).
05:25:42 <ehird> quite a beautiful little pipeline actually
05:26:33 <ehird> amusing how tr foo '' would have the same semantics as tr -d foo, but tr instead decides to complain about it and make you use -d
05:29:07 -!- augur_ has joined.
05:30:23 <ehird> More fun with printf: http://sprunge.us/hXFQ
05:30:54 <ehird> I guess %2v is kinda silly there (v = any value, but of course 2 is number-only). Feel free to mentally substitute %2d.
05:33:45 -!- augur has joined.
05:34:08 <ehird> It's funny how the main "meat" of that trick is totally outsourced to another function; it doesn't really have any corresponding code in the command.
05:37:25 -!- augur_ has quit (Read error: 145 (Connection timed out)).
05:38:44 <ehird> My seq is faster than plan9port's seq; I feel so special.
05:40:28 -!- augur_ has joined.
05:40:30 -!- augur has quit (Read error: 60 (Operation timed out)).
05:44:02 -!- augur has joined.
05:45:39 -!- augur_ has quit (Connection reset by peer).
05:49:01 * ehird writes cal.go
05:49:17 <ehird> "The calendar produced is that for England and her colonies." —Plan 9 cal(1)
05:49:40 <ehird> September 1752
05:49:40 <ehird> S M Tu W Th F S
05:49:40 <ehird> 1 2 14 15 16
05:49:41 <ehird> 17 18 19 20 21 22 23
05:49:41 <ehird> 24 25 26 27 28 29 30
05:49:54 <ehird> (Gah, the week starts with monday! MONDAY!)
05:50:06 <Gregor> That time travel between Tuesday and Wednesday is a doozie.
05:51:05 <ehird> "The British Calendar Act of 1751
05:51:05 <ehird> Declared the day after Wednesday
05:51:05 <ehird> September 2nd, 1752
05:51:06 <ehird> Would be Thursday, September 14"
05:51:49 <Gregor> Interesting.
05:52:12 <ehird> YOU KNOW YOU'RE A PRETENTIOUS ASSWIPE WHEN
05:52:12 <ehird> ...you know a song about the British Calendar Act oof 1751.
05:54:22 <ehird> *of
06:00:56 -!- puzzlet has quit (Remote closed the connection).
06:00:59 -!- puzzlet has joined.
06:02:06 -!- augur_ has joined.
06:04:35 -!- augur__ has joined.
06:07:11 -!- augur___ has joined.
06:07:17 <Gregor> THE AUGURS ARE ATTACKING
06:07:35 <ehird> FLEE TO THE ROCH
06:07:49 -!- augur_ has quit (Connection reset by peer).
06:07:49 -!- augur has quit (Success).
06:07:52 -!- augur__ has quit (Read error: 54 (Connection reset by peer)).
06:08:03 <oerjan> `define roch
06:08:09 <HackEgo> * Saint Roch (Rochus; Roc; Rocco; Roch; Rokku; Spanish and Portuguese: Roque; Rochus; Slovenian and Croatian: Rok; Dalmatian: Roko; c. ... \ [22]en.wikipedia.org/wiki/Roch \ * The Return of the Condor Heroes (; Jyutping: San4 Diu1 Haap6 Leoi5) is a classic Wuxia novel by Louis Cha, who is better known as Jin Yong. ...
06:11:02 -!- oerjan has quit ("Good night").
06:14:05 -!- augur___ has quit (Read error: 104 (Connection reset by peer)).
06:14:17 -!- augur has joined.
06:19:57 -!- augur has quit (Success).
06:20:05 -!- augur has joined.
06:43:29 -!- fungot has quit (leguin.freenode.net irc.freenode.net).
06:43:29 -!- Ilari has quit (leguin.freenode.net irc.freenode.net).
06:43:29 -!- Deewiant has quit (leguin.freenode.net irc.freenode.net).
06:43:29 -!- rodgort has quit (leguin.freenode.net irc.freenode.net).
06:44:28 -!- rodgort has joined.
06:44:28 -!- Ilari has joined.
06:44:28 -!- Deewiant has joined.
06:44:28 -!- fungot has joined.
06:46:04 -!- augur has quit (Connection timed out).
07:02:14 -!- Pthing has joined.
07:38:46 -!- kar8nga has joined.
07:44:01 -!- ehird has quit.
07:51:37 -!- augur has joined.
07:59:59 -!- clog has quit (ended).
08:00:00 -!- clog has joined.
08:13:13 -!- kar8nga has quit (Remote closed the connection).
08:39:25 -!- bsmntbombdood has quit (No route to host).
08:40:10 -!- bsmntbombdood has joined.
08:41:27 -!- MigoMipo has joined.
08:42:15 -!- kar8nga has joined.
10:23:10 -!- Asztal has quit (Read error: 110 (Connection timed out)).
10:48:45 -!- puzzlet_ has joined.
10:58:06 <AnMaster> <ehird> opendns are making you pay to remove their shit nowadays
10:58:07 <AnMaster> <ehird> use other, really open, pure-dns servers.
10:58:07 <AnMaster> ouch
11:01:25 -!- puzzlet has quit (Read error: 110 (Connection timed out)).
11:04:44 -!- Leonidas has quit (Remote closed the connection).
11:08:06 <SimonRC> why is ehird writing basic unix utilities?
11:12:56 -!- Leonidas has joined.
11:31:13 -!- MigoMipo has quit (Read error: 54 (Connection reset by peer)).
12:08:14 -!- puzzlet has joined.
12:08:54 -!- puzzlet_ has quit (Remote closed the connection).
12:23:29 -!- kar8nga has quit (Remote closed the connection).
12:33:49 -!- BeholdMyGlory has joined.
13:00:21 <AnMaster> SimonRC, for that distro he plans maybe?
13:22:41 -!- kar8nga has joined.
13:30:46 -!- adam_d has joined.
14:17:37 -!- Pthing has quit (Remote closed the connection).
14:23:22 -!- facsimile has joined.
14:50:36 -!- MigoMipo has joined.
15:11:02 -!- facsimile has quit ("Leaving").
15:24:32 -!- oerjan has joined.
15:25:29 -!- adam_d has quit (Read error: 145 (Connection timed out)).
15:42:34 -!- oerjan has quit ("leaving").
15:57:40 -!- Asztal has joined.
15:59:39 -!- facsimile has joined.
16:08:37 -!- Pthing has joined.
17:11:39 -!- kar8nga has quit (Remote closed the connection).
17:18:38 -!- ehird has joined.
17:50:43 -!- ehird_ has joined.
17:51:30 -!- FireFly has joined.
17:52:43 -!- adam_d has joined.
18:07:24 -!- ehird has quit (Read error: 110 (Connection timed out)).
18:07:24 -!- ehird_ has changed nick to ehird.
18:49:28 -!- fizzie has quit (Read error: 60 (Operation timed out)).
18:55:33 -!- fizzie has joined.
19:12:29 -!- facsimile has quit ("Leaving").
19:27:00 <AnMaster> ehird, how is internet nowdays? Slow ADSL? Or are you still on that mobile internet thingy? I forgot.
19:27:14 <ehird> 1.5 Mb adsl
19:27:17 <AnMaster> ah
19:27:33 <ehird> why?
19:28:12 <ehird> also, dayum ls(1) is a complex beast.
19:28:32 <ehird> even if you only have six flags.
19:29:08 <ehird> (that's less than busybox's 12...)
19:29:23 <AnMaster> dayum?
19:29:37 <fizzie> Meeeh. I used to get a perfectly reasonable ~19000 kbps / 1020 kbps ADSL here, but now the ADSL modem is saying first 8704 kbps / 1020 kbps, then 8571 kbps / 1020 kbps. That's the sucky.
19:29:39 <ehird> damn but more... dayyyum
19:29:51 <AnMaster> ehird, what is dayyyum?
19:29:54 <ehird> fizzie: i hate you and i hope you die while choking on lava
19:30:07 <AnMaster> fizzie, agreed.
19:30:07 <ehird> AnMaster: damn but more... dayyyyyyyyyum
19:30:23 <AnMaster> ehird, assume I have no clue what you are talking about
19:30:38 <AnMaster> ehird, and POSIX ls has way more flags than 6
19:30:58 <AnMaster> 23 unless I miscounted in man 1p ls
19:31:07 <ehird> AnMaster: Dayum is like damn but you pronounce it as dayyyyum because it's so daaaaayumu.
19:31:08 <AnMaster> SYNOPSIS
19:31:08 <AnMaster> ls [-CFRacdilqrtu1][-H | -L ][-fgmnopsx][file...]
19:31:09 <ehird> *daaaayum
19:31:14 <AnMaster> ehird, aha
19:31:26 <ehird> [-dhlrtF] for mine
19:31:37 <AnMaster> ehird, well, that's not POSIX then :P
19:31:42 <ehird> -d=false: list directories, not their contents/ -h=false: show file sizes as kilo/mega/gigabytes/ -l=false: show more information in columns/ -r=false: sort in reverse/ -t=false: sort the most recently modified files first/ -F=false: show sigils for directories/ executables* symlinks@
19:31:46 <ehird> AnMaster: care amount: 0
19:31:53 <ehird> actually -10
19:31:56 <AnMaster> ehird, ouch you use -d=false as syntax?
19:31:59 <ehird> no.
19:32:01 <ehird> go's flag parser does.
19:32:03 <ehird> just do -f
19:32:04 <ehird> erm
19:32:05 <ehird> -d
19:32:09 <ehird> = just means default
19:32:15 <AnMaster> ehird, also I'm sure this will break some shell scripts
19:32:16 <ehird> although admittedly -d=true is acceptable, who cares
19:32:20 <ehird> AnMaster: care amount: 0
19:32:31 <ehird> care amount for posix is -10 because the closer something is to posix the more it's likely to suck
19:32:32 <AnMaster> ehird, you don't use coloured output as an option?
19:32:39 <AnMaster> I always found that rather useful
19:32:48 <ehird> no, i'm not raving so i'm not interested in bright colours
19:32:48 <AnMaster> easier to read
19:32:51 <ehird> ls --glowsticks
19:32:58 <ehird> it's unlikely to break many scripts anyway
19:33:14 <AnMaster> ehird, well known fact that colours make output easier to read. That is why we have syntax highlighting too
19:33:15 <ehird> it has the basic stuff and I might make an effort to put extra columns in -l to make the commonly used ones at the same position
19:33:24 <ehird> "well known fact". Ha!
19:33:31 <AnMaster> ehird, well, I don't know the source
19:33:37 <fizzie> I still don't feel like paying for 24M/1M when I could pay less for 8M/1M, if the difference is just 0.5Mbps.
19:33:42 <ehird> Coloured ls is not easier to read.
19:33:43 <AnMaster> but don't you use syntax highlighting too?
19:33:50 <AnMaster> ehird, I find it easier to read
19:33:51 <ehird> Yes, I do. It's useful sparingly.
19:33:52 <AnMaster> *shrug*
19:33:57 <ehird> Some colour highlighting is helpful, some is not.
19:34:10 <ehird> AnMaster: No, you think you find it easier to read. Humans are notoriously bad at measuring their own efficiency over a variable.
19:34:16 <AnMaster> ehird, it's like making $PS1 have colours, easier to tell apart from output then
19:34:40 <AnMaster> ehird, easier to read as in "getting really annoyed and using ls -l to see anything unless it is coloured"
19:34:58 <AnMaster> you are however free to believe whatever you want
19:35:13 <ehird> I'm not really interested in your "arguments" because they consist of finding examples that are "similar" but not analogous and restating your original assertion in different words.
19:35:34 <AnMaster> sorry? I'm not having an argument with you
19:35:36 <ehird> It's not even like uriel would accept an ls with colour highlighting anyway.
19:35:41 <AnMaster> that would be a waste of time
19:35:52 <ehird> AnMaster: would you like a dictionary? I believe it will demonstrate you are.
19:35:55 <AnMaster> ehird, who cares about him?
19:36:10 * AnMaster goes back playing vegastrike
19:36:30 <ehird> AnMaster: I care about him because I'm writing these tools for Goblin...........
20:12:40 <ehird> "boot logically a command, and is kept in /etc only to lessen the probability of its being invoked by accident or from curiosity. It reboots the system by jumping to the read--only memory, which contains a disk boot program."
20:12:40 <ehird> — 1st Edition Unix boot(1), 11/3/71
20:12:58 <ehird> "The mechanism invoked by jumping to the ROM loader is sensitiveto the contents of the console switches, which makes the whole procedure even more dangerous."
20:13:30 <augur> :|
20:13:33 <augur> hey.
20:14:35 <ehird> DIAGNOSTICS "?", in case of any difficulty. The most common problem is inability to find the given command.
20:14:37 <ehird> — sh(1)
20:14:46 <ehird> ED OR SH
20:14:47 <ehird> you decide
20:15:18 <ehird> "su allows one to become the super--user, who has all sorts of marvelous powers." —su(1)
20:20:06 -!- kar8nga has joined.
20:20:14 * SimonRC didn't realise ehird was writing this linux distro in Go.
20:20:24 <ehird> Well, sort of.
20:20:33 <ehird> I'm writing core system utilities in Go for uriel's Goblin project, which I will use for my distro.
20:21:30 <ehird> I have cat, echo, false, mkdir, pwd, seq and true done and am working on ls and vis (make VISible; existed in later editions of Unix — basically, it's what cat -v/-e does, except in a separate program where it belongs)
20:21:56 <ehird> The size of the binaries is rather worryingly, though; about 600 KiB for most of them.
20:21:59 <ehird> *worrying
20:22:22 <ehird> But 32-bit instead of 64-bit, a lighter libc statically linked and a non-ELF object format should cut that down to size.
20:22:26 <SimonRC> Time for busybox-style!
20:23:17 <ehird> heh
20:23:22 <ehird> I don't think that would help
20:23:26 <ehird> well, it might
20:23:31 <ehird> since every lib func would just be included once
20:23:37 <ehird> but I'm not too much a fan of busybox style
20:23:47 <ehird> it's just a hack, really
20:23:51 -!- Pthing has quit (Remote closed the connection).
20:23:58 <ehird> well-crafted static binaries are small enough, I just need to beat these down to size
20:24:13 <ehird> static linking of a non-glibc is often smaller than dynamically linking to glibc
20:24:25 <ehird> go binaries don't use much libc, but that'd help a bit, I imagine
20:24:43 <ehird> plus all pointers being half the size, and an object format less crufty than Mach-O (which has loads of overhead)...
20:24:47 <ehird> (on osx atm)
20:24:48 <SimonRC> how can dynamic linking be that big?
20:25:05 <ehird> It's quite seemingly paradoxical indeed.
20:25:13 <ehird> Thankfully static linking is better in other aspects, too, so it's pretty win-win.
20:25:29 <ehird> (note: all go programs statically link the stdlib parts they use, just not the libc)
20:27:18 <ehird> http://man.cat-v.org/unix_8th/1/vis ;; i think i'll deviate from this a bit, end-of-line marking isn't normally very useful, and i don't think tabs should be turned into \t by default
20:27:53 <ehird> so maybe: -t treat tabs as invisible, -n treat newlines as invisible, -s strip, don't translate
20:28:07 <ehird> and using ^x format instead of \xxx, prolly
20:36:20 * ehird wonders why lots of unix commands have an implicit cat
20:36:27 <ehird> e.g. in that vis manpage, vis a b c = cat a b c | vis
20:36:37 <ehird> would seem like "vis [ file ]" would be better than "vis file ..."
20:43:23 <SimonRC> reading the ed man mage, it seems that there should be very clever ways to parse commands very simply
20:44:03 <SimonRC> some way of just doing stuff without needing much lookahead
20:44:27 <fizzie> Anything written in Perl has an implicit cat if you use the magic <>; that reads lines from any files given in @ARGV, or if that's empty, from stdin.
20:47:27 <adam_d> yeah i mean petrol plus ferry could easily end up being similar price
20:47:46 <adam_d> oops...
20:52:35 -!- ehird_ has joined.
20:56:07 <ehird_> SimonRC: ed is cool
20:56:15 <ehird_> actually I wonder why sed exists when we have ed
20:56:18 <SimonRC> "When reading a file, ed discards ASCII NUL characters and all characters after the last newline." :-c
20:56:19 <ehird_> i mean, sure, stdin support
20:56:20 <ehird_> phooey to you
20:56:43 <ehird_> SimonRC: ooh that'd be fun
20:56:46 <ehird_> metadata after the closing newline
20:57:42 <SimonRC> there are some seriously oomphy combinations available in that command list...
20:57:57 <ehird_> SimonRC: like?
20:57:59 <SimonRC> g and A for example
20:58:06 <SimonRC> oops
20:58:07 <SimonRC> no
20:58:17 <SimonRC> g and W
20:58:23 <ehird_> Make sure you are using http://man.cat-v.org/plan_9/1/ed, instead of GNU ed.
20:58:26 <ehird_> *reading, not using
20:58:50 <ehird_> as gnu ed just has a bunch of shit added because why not, plan 9 ed is the updated official, original ed...
20:59:07 <ehird_> well, reimplemented for plan9 after they replaced unix with it ofc but still
20:59:52 <SimonRC> I was looking at http://man.cat-v.org/unix_8th/1/ed
21:00:23 <ehird_> close enough :P
21:00:29 * SimonRC wonders if cat-v.org is a reference to catb.org
21:01:03 <SimonRC> also the way you can chain addresses is rather nifty
21:01:18 <ehird_> it's a reference to cat -v Considered Harmful http://harmful.cat-v.org/cat-v/
21:01:28 <ehird_> rob pike's canonical paper on unix style
21:02:02 <ehird_> well, bwk too
21:02:16 <ehird_> (the k in awk)
21:02:26 <ehird_> well, also the k in k&r :P
21:02:58 <ehird_> not to be confused with Brian Kerninghan, expert on the kerning of Han characters
21:03:50 <SimonRC> lol
21:05:29 <ehird_> SimonRC: anyway, how are g and W oomphy?
21:05:34 <ehird_> i should probably look up their definitions :P
21:05:55 <ehird_> right, g is the g in g/re/p
21:06:06 <ehird_> i.e. globally filter for /re/, print
21:06:46 <ehird_> erm is W a command?
21:07:01 <SimonRC> like w, but it appends
21:07:10 <ehird_> SimonRC: incidentally, http://man.cat-v.org/plan_9/1/sam is a sort of "successor" to ed meant for user usage
21:07:35 <ehird_> with a graphical interface with an ed window above and the file below (showing selections and stuff)
21:07:37 <ehird_> it's quite cool
21:07:40 <ehird_> (and the command language is different)
21:08:04 <ehird_> ken thompson, brian kernighan, tom duff and bjarne stroustrup all use sam as their editor, and only the last one isn't an endorsement
21:08:47 <ehird_> (plan 9's other editor/generalised user interface, acme, is used by dennis ritchie, rob pike (it and sam's creator) and russ cox (plan 9 guy, creator of plan9port, member of the Go team))
21:08:53 <ehird_> (well, ken thompson is also a member of the Go team, whatever)
21:09:08 -!- ehird has quit (Read error: 110 (Connection timed out)).
21:09:08 -!- ehird_ has changed nick to ehird.
21:10:59 <SimonRC> Oh c'mon, the only thing Stroustrup has "done wrong" is trying to create a language with every feature ever except GC and compile-time code execution.
21:12:16 -!- adam_d_ has joined.
21:12:48 <ehird> SimonRC: And the only thing I ever did wrong was rape and murder kittens!
21:13:19 <ehird> ("C++: Literally as bad as kitten rape-murder." They should put that endorsement in the C++1x preface.)
21:13:44 <ehird> SimonRC: btw they're adding gc and closures to c++1x
21:13:46 -!- adam_d__ has joined.
21:13:51 <ehird> and templates let you execute tc code at compile-time
21:13:58 <ehird> YOUR EXCEPTIONS WILL SOON BE ENTIRELY INVALID
21:15:57 <SimonRC> ok, every feature except proper macros
21:17:33 <ehird> don't give The Committee any ideas
21:19:29 -!- adam_d has quit (Read error: 145 (Connection timed out)).
21:21:32 -!- ais523 has joined.
21:21:56 -!- adam_d_ has quit (Read error: 60 (Operation timed out)).
21:22:48 <AnMaster> hi ais523
21:24:08 <ais523> hi
21:25:25 <AnMaster> ais523, It seems this issue http://bugzilla.kernel.org/show_bug.cgi?id=14049 affects karmic. Do you happen to know what the ubuntu way is for patching one of the kernel modules locally is?
21:25:40 <AnMaster> (not that I have upgraded yet)
21:25:55 <AnMaster> (I had to patch my gentoo kernel for it, but that I already compile manually, so trivial)
21:26:24 <ais523> AnMaster: not offhand; I remember vaguely that I saw what it was once, but not what it is
21:26:41 <AnMaster> basically I need to replace the joydev module
21:26:44 <AnMaster> ais523, hm ok
21:31:17 <AnMaster> night →
21:31:59 <ehird> SimonRC: so what did you mean by oomphy? useful?
21:32:12 <ehird> g/foo/W would append all lines matching foo in the file to the file, I think
21:32:36 <SimonRC> well, they have a feeling of being able to do quite com[plex stuff despite being very simple in concept
21:32:50 <ehird> that's called unix
21:32:51 <SimonRC> I think chaining of addresses is good for that too
21:32:54 <SimonRC> yup
21:34:14 <ehird> SimonRC: it's quite unintuitive though, in practice: http://sprunge.us/UUWg
21:34:20 <ehird> since it sees the changes after each W
21:34:33 <ehird> if you used a instead of W or whatever it'd probably help
21:35:27 <SimonRC> I was thinking that you'd W to a different file than the one ou were editing
21:35:33 <ehird> ah, well, yes.
21:36:06 <ehird> SimonRC: but that makes the current file what you W'd
21:36:08 <ehird> so it doesn't help
21:36:17 <SimonRC> ah
21:36:19 <ehird> SimonRC: you could do this with a pipe, I think
21:36:22 <SimonRC> that sucks a bit then
21:36:28 <ehird> simple:
21:36:40 <ehird> $ ed foo > bar \n g/re/p \n
21:36:43 <ehird> see what i mean?
21:36:46 <ehird> or >>bar
21:36:48 <ehird> for exact results
21:36:51 <SimonRC> so ed keeps re-reading the file whenever W touches it? Odd
21:37:09 <ehird> erm, yes, if you save a file you get the latest version
21:37:11 <ehird> just like every other editor
21:37:13 <SimonRC> would -o help?
21:37:26 <ehird> If -o is present, ed writes all its interactive
21:37:26 <ehird> output on the standard error file instead of the standard
21:37:27 <ehird> output file, starts with /dev/stdout as its default output
21:37:27 <ehird> file, ignores any input file argument, suppresses printing
21:37:27 <ehird> of character counts, and simulates an initial a command.
21:37:28 <ehird> Maybe?
21:37:34 <SimonRC> hm
21:38:49 <ehird> note, "9 ed" for me is plan 9 ed
21:38:49 <ehird> http://man.cat-v.org/plan_9/1/ed
21:38:58 <ehird> -o (for output piping) Write all output to the standard
21:38:59 <ehird> error file except writing by `w' commands. If no file
21:38:59 <ehird> is given, make /fd/1 the remembered file; see the `e'
21:38:59 <ehird> command below.
21:39:04 <ehird> that has no implicit a, seems a bit cleaner
21:39:44 <ehird> `ed -o file <foo.ed` runs the ed script foo.ed on ffile
21:39:46 <HackEgo> No output.
21:40:29 <ais523> is ed TC, by the way?
21:40:30 <ais523> I know sed is
21:41:07 <ehird> sed is just ed that doesn't need to load the whole file
21:41:17 <ehird> EDitor, Stream EDitor
21:41:33 <ehird> (this is why running sed on a file is kinda silly)
21:41:54 <ais523> sed isn't quite identical to ed, IIRC
21:41:59 <ais523> for instance, does ed have flow control
21:42:57 <ehird> they were almost identical at the start.
21:43:17 <ais523> I can believe that
21:43:21 <ehird> And — http://man.cat-v.org/plan_9/1/ed feel free to see if that's TC; it's a pretty short manpage.
21:43:24 <ais523> but I can also believe that they evolved in different ways
21:43:39 <ehird> apart from !cmd, ofc
21:43:44 <ehird> ais523: Only in useless derivatives like GNU.
21:43:55 <ehird> http://man.cat-v.org/plan_9/1/ed
21:43:55 <ehird> http://man.cat-v.org/plan_9/1/sed
21:43:55 <ehird> Pretty daadmn similar.
21:43:56 <ehird> -
21:43:58 <ehird> *damn
21:44:25 <ehird> sed is almost exactly ed with less editing commands repurposed for editing streams instead of files
21:44:39 <ehird> *fewer
21:44:53 <ais523> sed has the t command, ed doesn't
21:44:57 <ais523> this is important because it's t that makes it TC
21:45:03 <ais523> (even on those man pages)
21:45:14 <ehird> because sed isn't meant to be used interactively, ed is
21:45:15 <ais523> (ed has a command called t, but it's a different one)
21:45:21 <ais523> yes, that makes sense
21:45:26 <ehird> and jumping like that is only really useful as a script
21:45:31 <ais523> again, makes sense
21:46:18 <ais523> hmm... isn't cat -v exactly the option that plan 9 doesn't support, with a big long justification as to why?
21:46:25 <ais523> (it makes sense, it should indeed be a separate command)
21:46:37 <ehird> It's not Plan 9.
21:46:40 <ehird> It's Unix.
21:46:48 <ehird> Unix Edition N has never had -v. Ever.
21:47:04 <ais523> ah, aha
21:47:06 <ais523> again, makes sense
21:47:11 <ais523> as it's really the wrong place to put it
21:47:20 <ehird> http://harmful.cat-v.org/cat-v/unix_prog_design.pdf is Rob Pike and Brian W. Kernighan's seminal paper on UNIX program design, prelude to the book Unix Programming Environment.
21:47:25 * ais523 vaguely wonders if Plan 9 has ed at all
21:47:36 <ehird> It covers commands other than cat -v, though.
21:47:41 <ehird> ais523: Uh, those man pages I linked are Plan 9 ed and sed.
21:47:46 <ehird> (the latest official versions)
21:48:04 <ais523> wait, you're confusing me
21:48:09 <ehird> *covers commands other than cat -v additionally, though
21:48:17 <ehird> ais523:
21:48:18 <ehird> http://man.cat-v.org/plan_9/1/ed
21:48:20 <ehird> http://man.cat-v.org/plan_9/1/sed
21:48:22 <ehird> see that path?
21:48:24 <ehird> /plan_9/
21:48:27 <ehird> they're plan 9 manpages
21:48:28 <ais523> ah, aha
21:48:30 <ehird> plan 9 = successor to unix
21:48:37 <ehird> ergo, plan 9 ed and sed = official ed and sed
21:48:41 <ais523> I noticed it doesn't say "the standard" any more
21:48:48 <ais523> just "a venerable"
21:48:58 <ehird> because plan 9 has two standard editors :-)
21:48:59 <ehird> http://man.cat-v.org/plan_9/1/sam
21:49:00 <ehird> http://man.cat-v.org/plan_9/1/acme
21:49:10 <ais523> yes, thought so
21:49:16 <ehird> although acme is a "universal interface" too
21:49:22 <ehird> like emacs done right
21:49:35 <ehird> http://doc.cat-v.org/plan_9/4th_edition/papers/acme/ explanatory paper
21:49:50 <ehird> note: those screenshots are inaccurate, acme has colours in plan 9 :P
21:49:55 <ehird> (although no syntax highlighting)
21:50:27 <ehird> a lot of plan 9 programs like irc clients and the like are made for acme
21:50:37 <ehird> although nothing's stopping you from using them with something eles, technically
21:51:09 <ais523> emacs is not fundamentally a bad idea, just the implementation's a bit complex
21:51:37 <ehird> It's a bad idea; if you take the idea at one simpler level, i.e. with less detail, repeat that a few times — acme is then the right idea one step down from that.
21:51:44 <ais523> well, yes
21:51:48 <ehird> emacs has a relation to a good idea, is more the thing to say
21:51:51 <ais523> it depends on where you put the scope of an emacs-like idea
21:52:04 <ehird> i'm contractually obligated to quote a nice quote now
21:52:09 <ehird> "cat came back from Berkeley waving flags" — Rob Pike
21:52:32 <ais523> ehird: have the contract annuled because you can't make most sorts of contract with a minor
21:52:46 -!- MigoMipo has quit.
21:52:48 <ehird> what kinds can you make?
21:53:09 <ais523> sales contracts (i.e. if you pay money for something in a shop, they have to give you what you paid for rather than refuse to on the basis that they can't make contracts with children)
21:53:23 <ehird> any others?
21:53:39 <ais523> possibly, I'm not sure
21:53:55 <ehird> well then, clearly it's a sales contract!
21:54:25 * ehird opens plan9port's acme and notes that it isn't very useful outside of plan 9
21:55:25 <ehird> hmm, acme actually includes sam
21:55:32 <ehird> the command "Edit" takes sam commands
21:55:49 * SimonRC goes
21:56:08 <ais523> ehird: is sam command-line, and ACME GUI?
21:56:15 <ehird> *Acme
21:56:24 <ehird> sam is both textual and graphical
21:56:42 <ehird> samterm, the graphical sam, is basically a sam command window with many windows showing file contents below
21:56:59 <ehird> you can do basic editing operations in the file window, but that's not very useful; however, the window shows selections that you're operating on in the command window and the like
21:57:03 <ehird> and there's useful menu commands
21:57:13 <ehird> acme is purely graphical, although it's quite textual and command-based as well
21:57:19 <ehird> there isn't really much of a distinction in plan 9 :P
21:57:26 <ehird> (on [gk(etc)]dm)
21:57:26 <ehird> [21:55] Capso: it's meant for the whole family to use
21:57:26 <ehird> [21:55] Capso: your sister, brother, mom, dad
21:57:26 <ehird> [21:56] Capso: linux interfaces were created with low-income family computing in mind
21:57:31 -!- pikhq has joined.
21:58:21 <ehird> ais523: "su allows one to become the super--user, who has all sorts of marvelous powers." —1st edition unix su(1)
21:58:32 <ehird> (http://man.cat-v.org/unix-1st/1/su; a goldmine of fun manpages apart from some formatting errors with spaces)
21:58:39 <ehird> well, http://man.cat-v.org/unix-1st/ is the goldmine technically
21:59:18 <ehird> bonus fact: sh(1)'s only diagnostic was "?", unless you were globbing
21:59:19 <Gregor> Surely 1st edition Unix must be out there on the tuberwebs somewhere.
21:59:30 <ehird> in which case the globbing command printed one of, I think two errors
21:59:32 <ehird> that's in sh(1)
21:59:33 <ehird> http://man.cat-v.org/unix-1st/1/sh
21:59:45 <ehird> Gregor: ais523 knows where to find V[567]
21:59:53 <ehird> and they work
21:59:55 <ehird> with a pdp11 emulator
22:00:04 <ehird> but 1st edition? geez
22:00:12 <ehird> good fuckin' luck
22:00:13 <Gregor> This is the tuberwebs, damn it!
22:00:18 <ais523> unfortunately, I haven't found any way to transfer files onto them at any decent speed
22:00:30 <pikhq> UUCP?
22:00:34 <ais523> V5 and V7 both use # as the backspace character
22:00:42 <ehird> let's put it this way, the first few editions went by really fast
22:00:47 <ais523> pikhq: the issue is trying to transfer stuff into the emulator, which is rather slow
22:00:49 <ehird> 1st edition is 1971
22:00:54 <ehird> 6th is 1975
22:00:58 <ehird> *went by
22:01:04 <ais523> my guess is the only way that'll take a reasonable length of time is to somehow mount the emulator's disk image on a modern system and just copy the file over
22:01:07 <ehird> I think 5th was like 1973 or something
22:01:26 <pikhq> ais523: Ah.
22:01:37 <SimonRC> UUCP?
22:01:47 <pikhq> Unix to Unix CoPy.
22:01:56 <SimonRC> I know
22:02:20 <SimonRC> ehird has the problem of copying something from one unix system to another, so I suggested UUCP
22:02:33 <ehird> no, ais523 does.
22:02:54 <ehird> uucp is probably post-1980
22:02:54 <SimonRC> ok
22:03:04 <ais523> SimonRC: issue is trying to connect it from inside the emulator to outside
22:03:08 <SimonRC> it predates TCP/IP doesn't it?
22:03:12 <ais523> my current plan involves using one of the simulated tape drives, and tar
22:03:14 <ehird> UUCP was originally written at AT&T Bell Laboratories, by Mike Lesk, and early versions of UUCP are sometimes referred to as System V UUCP.
22:03:24 <SimonRC> ah nvm then
22:03:26 * SimonRC goes
22:03:27 <ehird> system v = 1983
22:03:43 <ehird> ais523: here's what i suggest
22:03:47 <ehird> tar your files on the host
22:03:48 <ehird> find out how big it is
22:03:54 <ehird> create a file full of A in the unix
22:03:58 <ehird> of that many bytes
22:04:08 <ais523> ooh, clever
22:04:10 <ehird> then s/A{size}/$(cat foo.tar)/
22:04:16 <ais523> in that case, I should transfer uncompressed
22:04:26 <ehird> why?
22:04:40 <ais523> to save the huge length of time it would take to uncompress it on an emulated PDP-11
22:04:46 <ehird> true
22:04:51 <ehird> why is it so slow, I wonder?
22:04:58 -!- kar8nga has quit (Remote closed the connection).
22:05:04 <ehird> we can emulate ppc and the like at near-native speeds of high-end computers on modest computers
22:05:08 <pikhq> Probably just an unoptimised emulator.
22:05:10 <ais523> my guess is that it isn't JITting or, well, optimised at all
22:05:22 <ehird> yes, but..
22:05:25 <ehird> *but...
22:05:33 <ehird> our cpus are so fast, and pdp11s were so slow
22:05:35 <pikhq> Just going for direct interpretation.
22:05:36 <ehird> so they would have conserved cycles
22:05:40 <ehird> even with direct interpretation
22:05:49 <ehird> sheer brute force and their optimisation culture should surely make it zippy
22:05:52 <pikhq> The PDP-11 is a bit weird...
22:05:57 <pikhq> 36-bit words.
22:06:05 <Gregor> Yeah, even if you wrote an interpreter in PHP for the PDP-11, I have to think it would run faster than full-speed on a modern system.
22:06:07 <ehird> ahh
22:06:11 <ehird> maybe ais523 needs to run the emulator as 64-bit
22:06:26 <ehird> that's likely the bottleneck
22:06:34 <ehird> ofc somehow I doubt ais523 has 64-bit
22:06:37 <ais523> Gregor: uncompressing a file of several megabits would take ages on the original
22:06:40 <ais523> and no, I don't even have dual-core
22:06:48 <ehird> Core 2 Solo is 64-bit and 1-core.
22:06:53 <pikhq> That could actually make interpreting it much faster.
22:06:55 <ehird> probably you're on Core Solo
22:06:57 <ehird> or Pentium M
22:06:59 <ehird> which are 32-bit
22:07:14 <ais523> the sticker saying what this was fell off
22:07:19 <ais523> but I think it's one of the laptop-specific CPUs
22:07:21 <ehird> ais523: /proc/cpuinfo
22:07:27 <pikhq> Just do normal arithmetic and check for overflow, rather than having to do weird stuff to get 36-bits in two 32-bit words...
22:07:35 <ais523> model name: Intel(R) Celeron(R) M CPU 520 @ 1.60GHz
22:07:40 <ehird> 32-bit
22:07:45 <ehird> sux 2bu
22:07:46 <ais523> yes, I know it's 32-bit
22:07:50 <ais523> I don't have to look it up to determine that...
22:07:54 <ehird> the pdp11 was really simple wasn't it?
22:08:04 <ais523> hey, it means I can fit twice as many pointers in memory!
22:08:15 <pikhq> It was middle-endian.
22:08:23 <ehird> pikhq: that's like two helper functions to fix
22:08:36 <ehird> i'm wondering whether it'd be feasible to hack up a pdp11 emulator in a few hundred lines of c
22:08:44 <ehird> and another few hundred for the attached peripherals
22:08:48 <pikhq> It's not very complex, it's just freaking odd.
22:09:23 <ehird> too lazy to actually do it, though :)
22:09:41 <ehird> someone port unix to the pdp-1
22:09:55 -!- puzzlet has quit (Remote closed the connection).
22:10:00 -!- puzzlet has joined.
22:10:09 <ehird> 18-bit word, 4 kw memory (9 kB)
22:10:16 <ehird> upgradable to 64 kw (144 kB)
22:11:09 <ehird> note: those are kilobytes, not kibibytes
22:11:14 <ehird> but they're close enough
22:11:17 <pikhq> Well, the peripherals would actually be easy to add support for.
22:11:20 <ehird> anyway, that's enough ram to use unix
22:11:23 <pikhq> They were just mmapped devices.
22:11:30 <ehird> The magnetic core memory's cycle time was 5 microseconds (corresponding very roughly to a "clock speed" of 200 kilohertz; consequently most arithmetic instructions took 10 microseconds (100,000 operations per second) because they had two memory cycles: one for the instruction, one for the operand data fetch. Signed numbers were represented in one's complement.
22:11:35 <ehird> 200 kHz is enough for unix, surely
22:12:19 <pikhq> Barely, but enough.
22:12:27 <pikhq> I don't think the PDP-1 had a MMU, though.
22:12:54 <ehird> so?
22:13:17 <ehird> if you dereference null that's your problem and if you shit on other processes memory you are a dung bat
22:13:29 <ehird> and there is no swap, deal with it
22:13:34 <ehird> mmap? well mmap reads in the whole file of coursees
22:13:37 <ehird> *course
22:13:47 <ehird> fork? COW says moo
22:14:16 <pikhq> It doesn't make UNIX impossible, just a pain.
22:14:54 <ehird> http://swtch.com/unix/
22:15:00 <ehird> you are not expected to understand UNIX
22:16:07 <ais523> I thought it was specifically the way it implemented fork() that you weren't expected to understand
22:16:51 <ehird> nope, swtch()
22:16:53 <ehird> the process switcher
22:17:17 <ehird> i love "The value returned here has many subtle implications."
22:17:18 <ehird> it's 1
22:18:34 -!- facsimile has joined.
22:44:34 <ehird> hmm
22:44:41 * ehird realises that there's no real reason for rio to exist in plan 9
22:44:47 <ehird> acme can run a shell
22:44:52 <ehird> so if it could embed any window
22:44:55 <ehird> you wouldn't need any other UI
22:55:03 <ehird> haha plan 9 is so awesome
22:55:29 <ehird> term% fn hello {hello $1}
22:55:32 <ehird> term% hello a b c
22:55:33 <ehird> a
22:55:44 <ehird> term% cat '/env/fn#hello'
22:55:47 <ehird> fn hello {echo $1}
22:56:06 <pikhq> Oh, it's actually got introspection in shell? Hmm.
22:56:21 <pikhq> Hooray, rc.
22:56:59 <ehird> pikhq: That's not part of the shell.
22:57:04 <ehird> /env is actually part of the filesystem.
22:57:21 <ehird> Thus why cat(1) can look at it.
22:57:41 <ehird> /env/foo is also the value of $foo
22:58:04 <ehird> although writing to it doesn't seem to work, unfortunately
22:58:31 <pikhq> That's actually pretty spiffy.
22:58:40 <pikhq> So, in Plan 9 *everything* is a file.
22:58:59 <ehird> pikhq: The whole architecture of Plan 9 is based around every process having its own namespace.
22:59:07 <pikhq> Freow.
22:59:11 <ehird> For instance...
22:59:14 <ehird> /bin is not a real directory.
22:59:22 <ehird> It's /386/bin, probably plus some other things.
22:59:31 <ehird> acme binds /acme/bin and /acme/bin/$cputype to /bin too
22:59:34 <ehird> http://man.cat-v.org/plan_9/1/bind
22:59:41 <ehird> Bind and mount modify the file name space of the current
22:59:41 <ehird> process and other processes in the same name space group
22:59:41 <ehird> (see fork(2)).
22:59:56 <ehird> / = the file name space
23:00:18 <ehird> Sure, some of it is simply mapped to the disk... but it's much more than that.
23:03:39 -!- oerjan has joined.
23:06:38 <ehird> One annoying flaw of acme is that in a win(1) (shell window in acme) you can't call acme commands. I think there's something in /proc for it, but still.
23:06:45 <ehird> It'd be nice to be able to go "Edit foo" in a shell.
23:07:55 <ehird> Erm, not Edit.
23:08:01 <ehird> I forget what the command's called.
23:08:10 <ehird> mycroftiv!
23:09:40 <ehird> mycroftiv: Stop pretending you're asleep or away, you have no physical manifestation.
23:11:30 -!- adam_d__ has quit ("Leaving").
23:13:24 <ehird> I wonder if there are any people who do use acme instead of rio.
23:30:02 -!- ais523 has quit (Remote closed the connection).
23:36:56 <mycroftiv> ehird: sure, especially the acme-sac users, though thats inferno
23:37:24 <ehird> mycroftiv: my main problems are interfacing with acme in the shell (does acme have a /proc thingy to run a command?) and somehow embedding rio windows
23:37:27 <ehird> rio itself is pretty crappy
23:37:31 <ehird> but acme's window management is niiiiiiiice
23:38:17 <mycroftiv> ehird: acme does maintain a fs, im not up on the particular techniques for interacting with it though
23:38:36 <ehird> how do you get to /proc/$pid?
23:38:38 <ehird> what's the var
23:38:46 <ehird> wait no
23:38:51 <ehird> that'd be rc
23:38:56 <ehird> mycroftiv: there's a prog to get pid of clicked window right?
23:39:14 <mycroftiv> there is? there should be
23:39:26 <ehird> mph
23:39:41 <ehird> mycroftiv: ok, how do i get the cmd of a process in /proc
23:39:57 <mycroftiv> um, its in one of the files, let me check which one
23:40:33 <ehird> /args
23:40:34 <mycroftiv> is /proc/$pid/args what you want?
23:40:53 <ehird> yeah
23:40:58 <ehird> hmm, so will it be /ctl?
23:41:13 <mycroftiv> context, what is your goal precisely?
23:41:57 <ehird> echo 'Edit /usr/glenda/poop.c' >/proc/$acmepid/something
23:42:06 <ehird> erm not edit
23:42:08 <ehird> i forget the command
23:42:08 <ehird> w/e
23:42:10 <mycroftiv> oho, you want the plumber, dont you?
23:42:18 <ehird> yes and no
23:42:22 <ehird> i want to be able to execute any command
23:42:26 <ehird> (btw does file(1) use the plumber?)
23:43:17 <mycroftiv> no, file just checks file type and doesnt interact with anything
23:43:31 <ehird> no db file?
23:43:33 <ehird> hmm
23:43:36 <mycroftiv> you can execute acme commands from shell windows the same as any, with a middle mouse click on the command
23:43:41 <ehird> can you ask the plumber what type a file is?
23:43:43 <ehird> mycroftiv: no shit
23:43:47 <ehird> mycroftiv: i want to do it with a file
23:44:03 <mycroftiv> have you looked at man 4 acme?
23:44:06 <ehird> nope :P
23:44:08 <mycroftiv> that describes the control fs
23:44:21 <mycroftiv> as opposed to man 1 acme which is the standard user interface etc
23:44:39 <ehird> hmm /mnt/acme and also /dev? why?
23:44:44 <ehird> which should I use, me wondereth
23:45:01 <mycroftiv> so yes you can control acme via its ctl file
23:45:18 <ehird> mycroftiv: meh, I just wish acme had a more process-oriented design
23:45:24 <ehird> so a command is just a file in /acme/bin or whatever
23:45:33 <ehird> that'd be cleaner+cooler+more usefu
23:45:37 <ehird> s/$/l/
23:45:43 <ehird> instead of the current special case
23:47:00 <mycroftiv> sadly there isnt much standardization on exactly how plan 9 software using a 9p fs for stuff works, people have implemented a lot of approaches
23:47:34 <ehird> new could just be `touch /dev/new/ctl`
23:47:37 <ehird> *New could just be
23:47:43 <mycroftiv> for instance rio creates a new window via the mount operation, which sort of makes sense, but at the same time, it has always seemed to me that it would make more sense as creating a file
23:48:06 <ehird> I'm sorely disappointed that if you do
23:48:10 <ehird> term% foo=a; echo $foo
23:48:10 <ehird> aa
23:48:11 <ehird> erm
23:48:13 <ehird> term% foo=a; echo $foo
23:48:13 <ehird> a
23:48:17 <ehird> term% cat /env/foo
23:48:18 <ehird> a
23:48:22 <ehird> term% echo -n hi >/env/foo
23:48:26 <ehird> term% echo $foo
23:48:27 <ehird> hi
23:48:31 <ehird> term% cat /env/foo
23:48:31 <ehird> hi
23:48:34 <ehird> ↑↑↑ TOTALLY SHITTY
23:48:47 <mycroftiv> whats the problem with that?
23:48:59 <ehird> because normally, /env reflects the environment
23:49:05 <ehird> except you can change it and it gets desynchronised, totally counterintuitively
23:49:07 <ehird> BUT
23:49:10 <ehird> if you change the same variable again
23:49:12 <ehird> it resynchronises????
23:49:18 <ehird> it's very flimsy and teh suck
23:49:40 <mycroftiv> did you omit a step from your example above? it doesnt seem to match what you just said
23:49:59 <ehird> i wrote it out by hand
23:50:06 <ehird> i'm using 9vx
23:50:10 <ehird> how do you make an http POST?
23:50:12 <ehird> i'll make a paste
23:51:09 <ehird> there's no hput
23:51:21 <mycroftiv> ok, im testing, in your example above you actually showed synchronization, but i see the desync you are talking about
23:51:48 <mycroftiv> the variable didnt actually follow the change to the file in /env
23:52:13 <ehird> oops
23:52:13 <ehird> yeah
23:52:17 <ehird> every "hi" output
23:52:19 <ehird> pretend it's "a"
23:52:29 <ehird> anyway yeah, uber shitty
23:52:34 <ehird> THIS IS FUNNY BECAUSE
23:52:36 <mycroftiv> yeah i have plan9 always up, so i just tested and i see what you mean, the identity of the two things isnt maintained
23:52:42 <ehird> just before I was musing about an "environment server"
23:52:51 <ehird> which would be basically a daemon that maintains an /env fs with the vars in it
23:52:52 <ehird> and i thought
23:52:59 <ehird> hey, this would be good for environment configuration
23:53:06 <ehird> things like autoconf (spit) could be replaced with doing $cc
23:53:11 <ehird> and to update your settings you could just do
23:53:11 <mycroftiv> clearly rc pushes shell variables out to /env but it doesnt read them from it
23:53:13 <ehird> echo foo >/env/cc
23:53:24 <ehird> and the env daemon would manage the environment variables for all processes
23:53:29 <ehird> now
23:53:31 <ehird> you could say
23:53:43 <ehird> bind /etc/env
23:53:44 <ehird> to /env
23:53:48 <ehird> so if you write /etc/env/cc
23:53:50 <ehird> it'll persist
23:53:53 <ehird> and I was like cool awesome
23:53:55 <ehird> tried out 9vx
23:53:56 <mycroftiv> yeah, that would be a nice patch to rc
23:53:58 <ehird> saw /env
23:54:01 <ehird> went "OMGOMGOMGOMOMG <3"
23:54:05 <ehird> tried the example
23:54:08 <ehird> and was filled with rage
23:54:15 <mycroftiv> the reason it doesnt work like that sadly is that rc is actually a general purpose shell with nothing really plan 9 specific in it
23:54:19 <ehird> yeah :(
23:54:22 <ehird> mycroftiv: well
23:54:27 <ehird> you get /env/fn#foo made
23:54:30 <ehird> which is fucking awesome
23:54:41 <mycroftiv> so it would be a relatively easy thing to adjust rcs behavior
23:54:43 <ehird> mycroftiv: anyway, plan 9 retard here — how would I bind a dir into /env?
23:54:49 <ehird> so that $dir/foo is accessible as /env/foo
23:54:57 <ehird> bind(1) yeah?
23:54:58 <mycroftiv> you want it to replace env, or to be a union with it?
23:55:01 <ehird> union
23:55:09 <ehird> with /env taking priority for e.g. creating files
23:55:25 <mycroftiv> ok in that case you want bind -ac /my/env /env
23:55:30 <ehird> and, preferably, if there's $dir/foo accessible accessible as /env/foo
23:55:36 <ehird> then modifying /env/foo would create /env/foo
23:55:38 <ehird> not modify $dir/fo
23:55:40 <ehird> *foo
23:55:50 <mycroftiv> that makes your env a union and it will give the original /env the place 'in front'
23:55:53 <ehird> i.e. /env is checked before $dir
23:56:05 <ehird> and modification causes copying to /env first
23:56:10 <ehird> will bind -ac do that?
23:56:14 <mycroftiv> yes
23:56:41 <mycroftiv> the -a flag puts the new directory added to the union 'behind' the other one, whereas the -b flag puts it 'on top' when it comes to reading and writing files
23:57:00 <ehird> not true, it doesn't do that
23:57:05 <ehird> if I create $home/env/poop
23:57:07 <ehird> then modify /env/poop
23:57:10 <ehird> it modifies $home/env/poop
23:57:23 <mycroftiv> ok try bind -a without the -c flag
23:57:29 <ehird> how do i unbind first?
23:57:38 <mycroftiv> unmount /home/env /env
23:58:07 <ehird> no dice
23:58:12 <ehird> term% bind -a $home/env /env
23:58:15 <ehird> term% echo hi >poop
23:58:18 <ehird> term% cat /env/poop
23:58:19 <ehird> hi
23:58:23 <ehird> term% echo bar >/env/poop
23:58:25 <ehird> term% cat poop
23:58:26 <ehird> bar
23:58:30 <ehird> (cwd is $home/env)
23:58:39 <mycroftiv> wait wait wait
23:58:48 <mycroftiv> if you are already in $home/env then of course your stuff gets created there
23:58:57 <mycroftiv> do you mean you want the bind created the other way?
23:59:03 <ehird> look at that carefully
23:59:07 <ehird> the problem is in the last two lines
23:59:10 <ehird> everything before that is great++
23:59:16 <ehird> but the last cat poop should produce hi
23:59:21 <ehird> and then if I did cat /env/poop
23:59:23 <ehird> it should produce bar
23:59:25 <mycroftiv> if you are in $home/env, then you arent making use of the bind
23:59:28 <ehird> >_<
23:59:31 <ehird> READ MY SNIPPET FFS
23:59:36 <ehird> read it CAREFULLY
←2009-11-21 2009-11-22 2009-11-23→ ↑2009 ↑all