00:00:19 mycroftiv: what i want is copy-on-write, basically 00:00:23 even if /env/foo = $home/env/foo 00:00:26 if I write to /env/foo 00:00:29 it should 00:00:33 cp $home/env/foo /env 00:00:36 and modify it 00:00:37 see? 00:01:07 not exactly, i see what you are saying but i think you are misunderstanding the semantics of bind a bit 00:01:18 I know what they are in this instance 00:01:25 give me a sec to do a couple tests locally so i can make sure to give you accurate response 00:01:29 it's impossible 00:01:31 I'm 90% sure 00:01:38 it SHOULD be possible 00:01:42 mycroftiv: to explain WHY 00:01:50 /blah/env is on disk 00:01:52 it is just some files 00:01:52 the problem with what you described doing was that you didnt have a 'poop' in /env previously, right? 00:01:53 for instance 00:01:58 /blah/env/cc is 8c 00:01:59 now 00:02:03 this is bound to /env 00:02:08 if you then do 00:02:16 echo -n gcc >/blah/env/cc 00:02:21 then /env/cc is gcc, too 00:02:22 BUT 00:02:27 if you do, in a shell session 00:02:31 % cc=somecciwanttouserightnow 00:02:34 it'll modify /env/cc 00:02:38 so, /env/cc will be a new file 00:02:42 contents somecciwanttouserightnow 00:02:46 and /blah/env/cc stays as gcc 00:02:52 modifying /blah/env/cc now does nothing to /env/cc 00:02:57 because you've overridden it 00:03:00 see? 00:03:15 id agree with you, i was still trying to analyze the example you gave above and explain its behavior 00:03:29 i understand it, it's very simple 00:03:35 but for this case it's wrong :P 00:03:39 oh, i thought it was something unexpected 00:04:41 see i think the issue is that you are wanting to make bind 'synchronize' different files, but it doesnt do that, its basically just rewriting a path name 00:05:56 i know that 00:06:00 i'm not trying any synchronisation 00:06:01 sigh 00:06:04 this is pointless 00:06:16 why? 00:06:24 because you never understand :| 00:06:37 you should be more patient with people who arent as smart as yourself, im sorry 00:06:45 i dont even understand what it is im not understanding, though 00:06:54 i didn't ever claim you weren't as smart 00:07:02 im making that claim 00:08:33 anyway - there is the core issue of /env not synchronizing, which i understand and is lame - im not following exactly what you need/want bind to do that it isnt 00:09:22 meh 00:09:24 anyway 00:09:36 -!- pikhq has quit ("Java user signed off"). 00:09:54 mycroftiv: i'm itching to make my own plan 9-alike 00:10:01 because plan 9 doesn't go far enough :P 00:10:06 not nearly far enough 00:10:15 specifically, I'd totally redesign the c language 00:10:18 so it's filesystem based 00:10:25 files uber alles, memory must die! 00:10:46 yeah i have similar ideas, trying to recreate most of an OS environment via synthetic 9p fileservers 00:11:02 int foo() { return 42; } → /proc/##/procs/foo 00:11:04 the plan9 kernel doesnt use 9p to talk to itself internally 00:11:10 you could execute that via the shell 00:12:00 mycroftiv: did you see that i'm writing some plan 9-inspired core utilities for linux? 00:12:02 in go 00:12:12 part of uriel's project 00:12:27 yeah i noticed that and was gonna ask if you are hosting that code anywhere 00:12:40 also, tracking your example above, are you sure the behavior you want isnt bind -b rather than bind -a? 00:12:43 not yet, but i can send you a tarball of the finished commands and a mkfile if you want 00:12:46 mycroftiv: dunno 00:13:02 i have cat, echo, false, mkdir, pwd, seq and true done and am working on ls and vis, fwiw 00:13:05 i think when i told you that you wanted bind -a i was misunderstand what you meant by 'writes go to /env' 00:13:23 i can send along ls too, but vis is totally broken atm 00:13:37 because once you bind -b something on top of /env you still read and write from /env as usual within that namespace 00:13:39 ls works, i just need to implement another gob of functionality before it's complete 00:13:51 i have no version control atm, should prolly add some but meh 00:15:27 oh, i didn't explain what vis is 00:15:32 it's from later unices 00:15:39 basically it's cat -v/-e as a separate program 00:15:54 yeah its mentioned in the cat -v paper isnt it? 00:15:56 yeah 00:16:02 for 'visible' 00:16:04 for some reason it's file ... there 00:16:07 with mine it's [ file ] 00:16:16 just as cat shouldn't make things visible, surely vis shouldn't concatenate? 00:16:22 heh 00:16:42 (welcome to rebuttals to that, btw — a lot of unix progs take a variable number of files and it's mostly a bad idea) 00:17:09 my mkdir does it because there's no "cat" there, it's creating; my ls does it because once it works properly, it'll prepend the path to each entry in the listing like plan 9 ls; you can't duplicate that without it 00:17:12 but vis? 00:17:18 its amazing how much you find even in the core basics of something like unix/C stdio how much weird shit and corner cases there are 00:17:32 like? 00:17:42 (i'm curious of your opinion on the implicit catting, btw) 00:17:43 behavior of stdio buffers and whether they need to be fflush() 00:18:36 im not much of a purist, i guess it seems to me that allowing vis to take multiple file inputs is basically just making it analogous to the fact that lots of command line tools do, as you mentioned 00:19:22 but it also doesnt seem to make much of a difference because after all you can always cat foo bar biz | vis 00:19:37 yeah, but can you think of a good reason to take multiple files? 00:19:55 a priori 00:20:07 only that random users may attempt to use it that way 'by instinct/analogy' with cat 00:20:13 a priori, I said 00:20:24 philosophically, i dont believe in synthetic a priori propositions 00:20:28 so i ignored that 00:20:31 neither does your mom. 00:20:38 i just meant "without reosrting to historical justification" 00:20:40 *resorting 00:21:40 um, slightly greater flexibility for use in some scripting contexts? nothing that strikes me as actually important or worth changing your mind over 00:23:05 :| 00:23:12 i was expecting a justification based on unix style 00:23:13 honestly i think the 'antisymmetry with cat' argument from historical context is a pretty good reason to stick with your idea 00:24:55 ok, from unix style: cat, grep, sed, and probably several others all accept multiple files as input 00:25:04 on the command line that is 00:25:15 no, modern cat/grep/sed do 00:25:24 i quoth 00:25:26 also 00:25:28 cat doesn't count 00:25:33 cat is meant to concatenate files duh 00:25:34 http://man.cat-v.org/unix-1st/1/ 00:25:39 go find me a non-cat, non-cp example 00:26:10 um, and non-mv 00:26:38 i totally disagree with what i interpret to be your implicit premise 00:26:46 eh shaddup 00:26:53 namely, that unix 1st edition implements the unix design principles more thoroughly than the later unices 00:27:02 unix style 00:27:04 is not unix implementation 00:27:06 is my point 00:27:22 i would say unix style is defined by the evolved practices, and certainly with say unix v7 having the heaviest weighting 00:27:32 because at&t unix v7 is imo the most important OS release ever probably 00:27:40 no way dude, v7 has pcc 00:27:51 it has chroot 00:27:51 it introduced the Bourne Shell and C stdio library 00:27:54 ioctl 00:27:56 IT HAS IOCTL, mycroftiv 00:27:59 i o c t l 00:28:01 i rest my fuckin' case 00:28:09 v7 was the death of unix. 00:28:20 well, in that case id take Plan 9 as the definitive model of unix style 00:28:27 look 00:28:29 stop using implementations 00:28:35 i'm asking for arguments from the principles of unix style 00:28:40 since after all it was Pike who wrote the book, and was the main designer of plan 9 00:28:43 by analogy to their judgement on other aspects 00:28:57 principles are implicit in implementations 00:29:02 stfu 00:29:07 implementations are always imperfect 00:29:18 so are principles 00:29:28 which is irrelevant, but was GREAT as a snappy debating point 00:30:00 can you just argue from analogy to principles or stfu :P 00:30:26 ok, heres a semiprincipled argument 00:30:38 many unix command line tools are basically 'stream' tools 00:30:50 the operate on a stream of input and produce a stream of output, and they dont care about the origin 00:31:06 the files given on the command line just determine 'what the stream is' 00:31:14 by that argument no cmd should take file args 00:31:16 just do cmd and so being able to specify several files fits with thta model 00:31:29 this fails for one reason: some cmds need files, not streams; seeking etc 00:31:32 thus, for consistency 00:31:38 all cmds need a file arg, at least one 00:31:39 well remember what the inventor of unix pipes said about them 00:31:58 he pointed out that everything you can do with pipes, you can do with just file redirections, which had been around forever 00:32:27 yet somehow, creating the very simple shortcut of the pipe as a nice abstraction had this kind of transformative effect 00:32:59 so the fact that theoretical arguments can make you talk about 'never taking file arguments, or always taking at least one' is beside the point I think 00:33:08 as you say, brainfuck isnt as good as haskell just because they can do the same things 00:33:16 it is false btw 00:33:19 foo >a 00:33:20 bar != 00:33:22 foo | bar 00:33:28 * one the former involves the fs 00:33:34 two 00:33:36 the former is batch 00:33:38 not stream 00:33:57 anyway what you said is totally irrelevant to what i said 00:34:20 not at all 00:35:02 i was trying to show what you said was an irrelevant argument in the first place, because it was of the form 'you can do the same with ...', but that isnt necessarily a valid critique of how the semantics of stuff should work 00:35:33 this is hopeless 00:35:36 more importantly however, i am only inventing arguments that i dont even fundamentally believe because you demanded that i do so 00:35:55 you said you wanted an argument from unix design principles to prove point X, so im doing my best to come up with them 00:36:03 meh fine :P 00:36:08 * ehird ponders compiler design 00:36:46 * ehird makes his vis take multi files 00:36:46 meh 00:36:58 interrupt your ponderings to give me your critique of knuth's literate programming paradigm 00:37:05 do you want a tarball of these btw? 00:37:11 yup 00:37:42 mycroftiv: My critique: Great for reading code as documentation... terrible for reading code as code, or writing code. The reordering breaks it and makes it a pain to find the code nestled in the overly-verbose documentation. 00:38:02 im currently obsessed with a small knuth program for doign arithmetic with arbitrarily large integers, it is so fucking awesome it makes my cry 00:38:06 Fundamentally simply unnecessary: good commenting style obsoletes it. 00:38:27 (such as http://doc.cat-v.org/bell_labs/pikestyle) 00:38:47 see, im very familiar with that, but honestly, i think it presumes too much intelligence and skill 00:39:08 maybe in 5 more years ill have changed my mind because ill have developed that skill 00:39:15 If you don't presume such things, you end up with a result that only those without intelligence or skill enjoy. 00:39:25 (See Java, which was specifically created to be lowest-common-denominator.) 00:39:41 i think knuth himself stands as a pretty good counterexample to that 00:40:17 i could use some more comments when reading some of the plan 9 source code 00:40:33 and i think they would help me improve my skills 00:41:18 im not totally convinced by the actual literate programming implementation of CWEB, although i think its great for some things, not sure if I could really work that way though 00:42:57 and java i think is more of an example of a failed attempt to be least common denominator, because they seemed to assume that memorizing 500 billion things was easier than even a small amount of coding work 00:43:08 Anyway. 00:43:15 I'm thinking about compiling and linking and stuff. 00:44:53 Specifically, I'm wondering if separating compiling and linking makes sense. 00:44:54 got any unique twists or insights on what goals you think are important and how to implement? 00:45:03 i think it does, i like how it works in plan 9 00:45:08 Yes, BUT 00:45:13 I have an additional corollary idea 00:45:19 In most systems, 00:45:26 ld :: [Object] -> Binary 00:45:28 What if I had 00:45:40 ld :: Object -> Object -> Object (isomorphic to [Object] -> Object) 00:45:41 ? 00:45:52 That way, I could have compiling and linking in one stage, and still link files of separate languages. 00:46:02 That is, cc foo.c bar.c -o blah.o 00:46:08 You could then do ./blah.o if it has main() 00:46:12 Or 00:46:15 -!- AnMaster has quit (Network is unreachable). 00:46:19 go foo.go bar.go -o blahgo.o 00:46:22 Then 00:46:31 ld blah.o blahgo.o -o final.o 00:46:34 $ ./final.o 00:46:36 sweet! 00:46:36 $ 00:46:59 that sounds cool, i have no clue what the technical details/issues of implementation are though 00:47:00 cc would of course be able to link in other objects, too (using library functions from ld) 00:47:05 so, you could do 00:47:14 $ cc foo.c bar.c /lib/blah.o -o prog.o 00:47:22 All object files, libraries and binaries are of the same format. 00:47:27 -!- FireFly has quit ("Later"). 00:47:36 So you have one simple format and some functions to create that format, provided by ld. 00:47:56 ld itself is just a thin wrapper for making a new object, adding n objects to it, and finalising it. 00:48:32 that sounds sensible enough i feel there must be a catch 00:48:35 An "unld" would also be fun: if ld writes out where the individual symbols are from, you could split it into N .o files 00:49:07 mycroftiv: normally libraries are archives full of multiple .o files; using a symbol from one .o includes that whole .o in the linked program 00:49:23 yeah, im aware of that 00:49:25 mycroftiv: with this system, either it'd have to include the whole library even if you just use a function, or the linker would have to analyse the machine code 00:49:32 to see what other symbols each symbol references 00:49:32 that causes some annoyances in plan9 porting because it uses static linking 00:49:40 so huge libraries cause annoying binaries 00:49:44 -!- BeholdMyGlory has quit (Remote closed the connection). 00:49:56 You could have the object format store the list of symbols each symbol uses 00:49:59 also, unless the library files include tags to denote data/function (bad bad bad) 00:50:05 and only link in symbols needed 00:50:08 it'd have to use a heuristic to do dependency analysis 00:50:16 coppro: oh, that's a good solution 00:51:55 lies. It came from me :P 00:52:35 another thought is: from conway's law, we can derive that the fewer passes in a compiler the better 00:52:47 because an N-pass compiler is-as-if produced by an N-group team 00:52:57 and behemoth teams famously produce terrible software 00:53:28 so the question is, can we make the c dialect compileable simply and elegantly with one pass? 00:54:02 and since cc uses object-functions to "link" (basically it just compiles every file to one, adding as it goes along), you'd be able to compile and link an entire program in one single paass 00:54:06 *pass 00:54:15 A C file can be compiled in a single pass 00:54:27 yes, but it's more convenient to have multiple passes, generally 00:55:15 i wonder how fast a one-pass, self-linking c-sideset (subset and superset) compiler could be 00:55:20 almost certainly faster than Go's fast compiler 00:55:36 i bet something like 100 kloc in, oh, 3 seconds? 00:55:43 on a moderately fast machine that is 00:55:52 ignoring io, prolly 00:56:14 just checked, clang is single-pass 00:56:42 coppro: so clang can compile /dev/stdin without reading all of it first? 00:56:48 theoretically 00:57:35 ehird: It actually waits for the whole file for code generation 00:57:49 right, but theoretically 00:57:55 there's no obstacle to it other than it operating on a string 00:58:00 but parsing and semantic analysis are one pass, and could be done without the whole file 00:58:05 right 00:58:07 erm 00:58:10 that sounds like 2-pass, then 00:58:26 parsing and code generation, loosely 00:58:38 It only passes over the actual text once 00:58:47 that doesn't really count 00:58:53 imo 00:58:58 but it won't give you anything until it's done (note, however, that there is some work towards a REPL) 00:59:07 a true 1-pass compiler does all its work without looking over the code twice 00:59:14 how does this relate to the goal of producing the best quality (by whatever metric) output from the compiler? 00:59:27 each block of code comes in, it's parsed, analysed, and it generates the code 00:59:29 and goes onto the next bit 00:59:37 ehird: The problem with that is that it loses optimization opportunity 00:59:44 mycroftiv: it doesn't, but the compiler would be much simpler and elegant 01:00:00 optimising the libc and the like is far more rewarding than trivial compiler optimisations 01:00:07 I heard a really good quote from rob pike or someone about this 01:00:08 lemme find it 01:00:45 eh 01:00:47 i'll paraphrase 01:01:28 "(some unoptimised, redundant code; trivially optimised) This can be optimised by the compiler into: (the optimised version of this code) The latter snippet runs faster and is easier to read. Optimisation only gets you the former, and it makes the compiler more complex." 01:01:48 -!- calamari_ has joined. 01:01:49 the only worthwhile optimisation is that with a big gain that can't be done easily by the programmer 01:02:07 = very few 01:02:59 -!- calamari_ has changed nick to calamari. 01:03:38 ive never actually seen any meaningful benchmarks of the efficiency of code output by various compilers 01:04:08 a truly 1-pass c compiler would be interesting, it'd probably be written in yacc+c or whatever 01:04:14 possibly a yacc derivative that's "lighter" 01:04:23 i.e. meshes better with C, for heavier processing programs 01:04:30 it'd be almost literate in a way (@mycroftiv :P) 01:04:46 "here is some syntax, and here is the corresponding code' 01:04:49 *code" 01:04:53 ehird: There's another type of useful optimization 01:05:37 Do continue. 01:05:38 An optimization that depends on the platform 01:05:48 Like? 01:05:59 You mean like substituting some instructions for a faster one on the CPU? 01:06:04 sure 01:06:08 That should be done when generating the instructions in the first place, really. 01:06:10 or loop unrolling may be good on some platforms and bad on others 01:06:21 Irrelevant; it's mostly useless. 01:06:40 The gains aren't very large, and when they are this is clearly ugly performance code; unrolling it explicitly would show the intent. 01:07:10 also, c isn't compilable in one pass, if you mean cpp+c, which most people do 01:07:27 ehird: Why not? 01:07:36 because the standard says that cpp MUST be done as a separate pasas. 01:07:38 *pass 01:07:48 ehird: No, it says they must be done as if they were separate passes 01:08:19 There's the wonderful "as-if" rule 01:08:34 Hooray, tangled logic ahoy. 01:08:47 Basically it'd end up reading the file and storing it, then going over the results. 01:08:49 Not really 1 pass. 01:09:20 No, a compiler can run the preprocessor at the same time that it does normal tokenization, like clang does 01:09:38 if it sees an identifer during lexing, it checks it against macros and possibly does substitution 01:09:52 same goes for directives 01:10:12 Well, eh. 01:10:13 Maybe. 01:10:17 how are you going to handle a forward goto in one pass? 01:10:39 If we say one pass as generating asm, then simply use a label. 01:10:50 Otherwise, let the linker do it. 01:10:55 If it includes linking? 01:10:58 I'll have to think. 01:11:07 you can't do it truely in one pass 01:11:24 Actually, maybe you could... hmm. 01:11:54 (The simple answer is, of course, to simply leave a note and tie them up at the end; that's not "really" 2-pass, and it'd be such a minor step.) 01:11:54 but you can simply put it in a list of "unknown labels" and then when you see the label, adjust all the forward gotos 01:12:02 Or that, yep. 01:12:17 Either way, you still have to wait a little past the goto to generate code 01:12:38 Well, sure; you can't generate code for every character, either. 01:12:44 C++ templates work similarly (/me ducks) 01:12:51 Just as you have to parse ahead. 01:13:06 ehird: point taken hehe 01:13:06 Anyway, any forward goto more than about 20 lines from its destination is eek! 01:13:13 ehird: Esoteric language coming on... :P 01:13:26 Code for each character? 01:13:31 yeah 01:13:32 That's called Brainfuck with a different looping structure. 01:13:40 yeah, that's what I was thinking too :/ 01:13:47 Like, say, any ascii char above n has n taken away from it 01:13:49 and is the same as 01:13:52 [ the next n chars ] 01:14:03 actually, you could do it in regular BF 01:14:04 since every char is one instruction... 01:14:09 coppro: what would [ compile to? 01:14:21 ehird: A conditional jump to a thunk 01:14:26 heh 01:14:31 cheating 01:14:36 you could do the same with forward gotos, actually 01:14:45 that incurs a runtime penalty 01:14:51 backwards and forward gotos should be the same in the result 01:15:04 ehird: That's just unecessary optimization :P 01:15:10 no, it's not 01:15:16 it's not deliberately incurring a penalty when it's quite simple not to 01:15:19 note the sarcasm 01:15:26 it was invisible 01:15:27 brb 01:15:35 how was it invisible? There was a :P 01:25:55 back 01:28:28 Anyway. 01:28:58 So! 01:30:00 That light yacc sounds fun. 01:31:54 Also: Grr include files including include files is irritating. 01:32:58 "In practice, #if is almost always followed by a variable like ‘‘pdp11.’’ What it means is that the programmer has buried some old code that will no longer compile." 01:32:58 —A New C Compiler, Ken Thompson 01:33:46 heh 01:34:34 hmm, that paper warns against using the cpu's call instruction 01:34:48 but then: "The first three compilers built were for the National 32000, Western 32100, and an internal computer called a Crisp. These compilers have drifted into disuse. Currently there are active compilers for the Motorola 68020 and MIPS 2000/3000 computers." 01:34:53 so who knows what the situation is on x86 01:35:01 although 01:35:04 mycroftiv: does 8c do that? 01:35:07 same compiler suite 01:35:31 umm lemme scan back 01:35:44 mycroftiv: does 8c produce the x86 CALL instruction 01:35:48 or does it just JMP 01:36:06 8c + an x86 dissembler will answer this 01:36:16 *disassembler 01:36:17 fuck if i know, i can make it spit out ASM though, got a test case? 01:37:02 foo() 01:37:03 { 01:37:03 return 42; 01:37:03 } 01:37:04 01:37:04 main() 01:37:05 { 01:37:07 return foo(); 01:37:09 } 01:37:11 compile with -N 01:37:13 or it might be inlined 01:37:17 /kick ehird 01:37:26 coppro: were you trying to talk over those lines? 01:37:29 no, i didn't think so either. 01:38:01 pastebins are useful when there is channel activity or when there are so many lines that it'd obstruct the channel and be slow to send 01:38:19 nine lines in an at the moment very slow channel is not either 01:40:14 man, I've been reading too much bad grammar when I start to get annoyed at people on IRC :( 01:40:33 coppro: what, for bad grammar? what error did i make? 01:40:41 "in an at the moment very slow channel"? 01:40:49 that's a stylistic choice, descriptivist! 01:40:51 erm 01:40:52 prescriptivist 01:40:54 ehird: yeah, that twigged me somewhat. I honestly don't care though, it's IRC. 01:41:14 it's just that I'm reading Internet short stories at the moment, and it can be a bit of a slog 01:41:19 CALL,foo+0(SB) 01:41:23 when i say it out aloud it's rhythmed like that, and "in an, at the moment, very slow channel" doesn't convey this well 01:41:28 mycroftiv: right 01:41:38 * mycroftiv resisted the urge to paste the whole ASM output ;) 01:41:40 so maybe CALL beats handling JMPs yourself on 386 01:41:44 or maybe they just got lazy 01:41:50 coppro: why are you doing that? 01:42:07 ehird: That's a good question :/ 01:42:08 you should read my short story, 'cept i haven't wrote it yet 01:44:12 i'm sure call does a bunch of needless shit on x86 though 01:44:46 all you really need is to push a return address and jmp (caveat: you can't assume registers have the same value afterwards) 01:45:24 (common solution: save the registers elsewhere and restore them; my suggested solution: use registers as a cache and temporary calculation area, not the sole place to find a value) 01:49:24 >;e 01:49:27 speak you fools 01:49:29 *>:e 01:50:18 my level of expertise on compiler theory is limited to reading source code for the plan 9 compiler and vaguely understanding it, and a few hours fucking with some x86 emulator and simple asm programs 01:50:37 there's no 8i which is phooey 01:50:38 aka not enough bits to make a byte of useful information 01:50:46 yea but just make shit up 01:50:47 and guess 01:50:49 and theorise 01:52:10 um, theres a great ken thompson interview which might have some ideas for you 01:52:20 let me see if i can find it and then pretend its me having them 01:53:11 ug, google just found me: 01:53:23 www.realitywanted.com/.../1738-exclusive-interview-with-ken-thompson-of-make-me-a-supermodel 01:53:33 404 01:53:34 clearly someone is invading ken thompson's namespace 01:53:48 let's call ken kent hompson in future 01:53:52 kent@hompson 01:53:52 i didnt follow the link, just appalled by the description 01:54:00 paste it 01:54:52 'ken thompson of make me a supermodel', that is all 01:54:58 right 01:55:03 Kent Hompson 01:56:16 ok, found the interview at least - heres something he references, a paper that talks about creating optimization by testing all the possible algorithms that are equivalent he can discover randomly 01:57:01 he says that it generates 'indescribable and inhuman' code 01:57:30 eviiiiil 01:57:33 and he says he used the trick for some crazy optimizations himself, like precomputing multiplication shortcuts 01:57:37 anyway 01:57:56 short paste: 01:58:04 mycroftiv: theorise with me about a "lighter" yacc, good if the code related to some syntax is long and involved; i.e. a full program, not just a parser 01:58:04 On one case I used it for a compiler I’m writing for 68000 um, multiply takes thirty-two seconds no matter what. So, if you multiply something by three, thirty-two cycles. Those same thirty-two cycles, thirty-two adds, on this machine. 01:58:16 lighter syntax (maybe mark yacc bits, not c bits), adds less cruft, etc 01:58:21 So, what a combination if you change a multiply into shifts and adds. Multiply by a constant with shifts and adds of, you know, the original thing. You’re going to always beat the multiply because, the multiply is implemented so badly on this chip and so what I did is write super optimizer, which tries all combinations of shifts and adds to generate, to simulate a multiply by constants between one and ten thousand or 01:58:32 "takes thirty-two seconds no matter what" 01:58:36 lawl transcription error 01:58:48 yeah for cycles 01:58:51 "and ten thousand or" 01:58:53 got cut off 01:59:08 [01:59] ehird: mycroftiv: theorise with me about a "lighter" yacc, good if the code related to some syntax is long and involved; i.e. a full program, not just a parser 01:59:08 [01:59] ehird: lighter syntax (maybe mark yacc bits, not c bits), adds less cruft, etc 01:59:42 um well what is the minimum task? 01:59:48 ? 01:59:50 handling backaus naur forms or some shit? 01:59:57 yacc 02:00:46 um, isnt that basically what yacc does? 02:01:44 i thought parsing languages was basically about mapping them to backaus naur forms that define their grammar? 02:01:56 i'm talking about a yacc derivative 02:02:01 the actual syntax parsing stays the same 02:02:11 mainly the syntax differs 02:02:15 of the yacc files 02:02:31 to make it nicer to do things like c compilers as yacc files 02:02:34 for long blocks of c 02:02:54 ok, so not a ground up rewrite of yacc 02:03:07 no 02:03:12 lemme come up with an example 02:03:37 what is the file ext of yacc files in plan 9 02:04:14 y.various stuff if thats what you mean 02:04:45 y.tab.c is what you give to the compiler 02:05:28 ooh, cool idea me has 02:05:43 you know my 1-pass-including-linking idea? 02:05:50 let's say you give it multiple c files, now 02:06:07 it compiles all of these (and thus links them in, as soon as it compiles a given bit) in parallel 02:06:18 as long as the functions that operate on an object in the ld library are thread-safe 02:06:27 we can actually literally compile and link multiple c files in parallel 02:07:51 interesting 02:09:23 one issue here is when you have two symbols of the same name 02:09:27 trivially solved, however 02:09:32 when one conflicts, list all of them 02:09:38 don't say which one was first 02:09:55 one issue is if a symbol gets declared first 02:10:00 then it is used by something expecting the other one 02:10:03 and this causes a type error 02:10:10 perhaps on every type error, we should check for conflicts first 02:10:12 you know, i think there is an interesting general principle about how parallelization can be aided by serialization of an orthogonal element 02:10:19 that'd be simple and incur not much of a penalty 02:10:25 and penalties on error conditions are irrelevant anyway 02:10:31 mycroftiv: agreed? 02:10:57 im convinced but im not competent as an expert witness on compilers, as ive said 02:11:19 shaddap 02:11:31 if i can figure out how to get my #includes right and my mkfile works, im happy 02:11:46 mycroftiv: Poor you, then; no #include in mine. 02:11:47 Probably. 02:12:07 #include might work, but probably something like #include stdio will be recommended. 02:12:12 Almost certainly no actual c preprocessor. 02:12:17 i have no objection to that kind of simplification 02:12:27 -!- Asztal has quit (Success). 02:12:27 so #include "foo.h" might not work 02:12:31 or it might just scan for declarations 02:12:32 not sure 02:12:41 but almost certainly not rampant inclusion of the contents 02:13:47 ehird: If there's multiple symbols of the same name there, are three possibilities: 02:14:03 coppro: Note that one may be added, code meaning to use the other one will be processed, then the other will be added. 02:14:09 And the middle step may break horribly. 02:14:22 Wait. 02:14:24 1) All but one or all of the symbols are static. This is probably the most difficult case 02:14:36 I could just check for conflicts before adding any symbol, but that's a lot of overhead for such a common operation. 02:14:38 And it's an exceptional case. 02:14:46 coppro: static as in static linking? 02:14:56 ehird: No, as in C static 02:14:59 ah, right 02:15:00 limited to a file 02:15:07 2) The non-static ones are inline symbols. You can freely use any one, because if they aren't identical it's UB 02:15:08 hmm, how are those linked? 02:15:11 renaming them? 02:15:13 to like __file__foo 02:15:19 ehird: yeah, that would work fine 02:15:22 no i mean 02:15:25 how is it done in practice 02:15:39 ehird: Not 100% sure. They get a special type of linkage 02:15:47 weird. 02:16:24 A UUID prefix would work fine 02:16:30 or similar 02:16:33 since you'd be doing the whole file at once 02:16:41 and they don't need to be seen from outside 02:17:04 since you are making a compiler, are you going to put in the classic 'ultimate back door' described by thompson in his 'reflections on trusting trust' paper? you should 02:17:18 3) There is a conflict between non-static, non-inline symbols. This is an error as well 02:17:35 mycroftiv: no. 02:17:48 ehird: It's possible static symbols are simply linked prior to the emission of the object file, but I don't think that's it 02:17:54 http://sprunge.us/jdXj ;; what hello world will probably look like in Plan Y (which I am tentatively naming my OS) C 02:18:10 thingies: void is implicit, to make writing procedures nicer 02:18:15 io lib is different, simpler 02:18:22 #include syntax 02:18:33 (procedures as opposed to functions) 02:18:43 ehird: I know you're going to hate me, but you could go the C++ route for library headers e.g. #include 02:18:45 no extension 02:18:52 click the damn link :) 02:18:56 ehird: I did 02:19:04 coppro: re linkage, doesn't apply to my case ofc when you're linking all things into one object 02:19:10 coppro: why include the needless <> 02:19:27 ehird: It does; the question is whether the symbol is visible in the .o or not 02:19:39 ehird: Because then you're compatible with standard C 02:19:40 coppro: ah, as opposed to just having an address? 02:19:46 ehird: yeah 02:19:47 also, i don't care 02:19:53 i'm already not compatible by making void implicit 02:19:59 and probably removing the parens in control structures 02:20:01 it's int, and it is implicit 02:20:16 nope 02:20:18 it's void. 02:20:24 because i said so 02:20:28 it's more logical that way 02:20:36 a procedure has no return value; so there is no return type to specify. 02:20:39 no one will use your OS if you don't ship standard C :/ 02:20:48 feel free to ship a modified version as well 02:20:50 coppro: don't ship standard C; you mean like plan 9 doesn't? 02:21:00 it's mostly backwards compatible... "mostly" 02:21:05 maybe in the c itself 02:21:08 but definitely not in the libs 02:21:22 you could argue that nobody uses plan 9 either, i could argue that i don't care; i'm a researcher 02:21:48 coppro: most "real" c is in ansi c anyway 02:21:49 btw, using clang may provide another headache for you 02:21:52 in which case it will explicitly specify void 02:21:55 that's okay, i'm not going to 02:22:03 ok 02:22:41 removing parens from control structures is a rather obvious and totally backwards compatible extension, surprised it isn't more common 02:22:43 I'd say that 02:22:46 if validsize(x) 02:22:50 is better than 02:22:52 if(validsize(x)) 02:23:01 (example shamelessly stolen from Notes on Programming in C) 02:23:06 ehird: No, it's int in standard C++ 02:23:08 *C 02:23:21 (it's also int in C++, how coincidental) 02:23:23 coppro: you've already said that 02:23:31 i already replied 02:23:38 I know 02:23:47 but then you said that most "real" C will explicitly specify void 02:24:18 btw, I'm not a fan of implicit int, implicit void, or implicit anything else 02:24:45 most real c will say 02:24:46 void foo() 02:24:48 oh, you mean main is int 02:24:51 yes, most things will do that 02:25:08 main is void in mine because there's no reason for it not to be; exit(1) vs return 1; is a dilemma that shouldn't exist. 02:25:15 also, void isn't really a return type 02:25:18 you don't do 02:25:21 return ; 02:25:25 and falling off the end is valid 02:25:25 you can! 02:25:28 there is simply: 02:25:31 no return value 02:25:37 retval name(args) { 02:25:38 yes 02:25:40 there is no return value 02:25:46 so there is no return value type 02:25:57 so we take the simplest, most terse route and omit the type for returnless functions 02:26:00 name(args) { 02:26:03 if you want my honest advice, don't make a C dialect. Either make something better than C, or standard C 02:26:08 this also makes writing procedures, as opposed to functions to be used in expression context, nicer 02:26:18 c is pretty nice for kernel programming. 02:26:19 C has such great features as C declaration syntax and the C preprocessor 02:27:06 Perhaps you could try the proposed new C++ declaration syntax instead of the C one (yes I'm 100% serious) 02:27:21 anyway, I'll disregard that advice as I've thought for surely at least a full weeks worth (i.e. 7*24 = 168 hours of thought) on OSs andp rogramming languages 02:27:25 *and programming languages 02:27:33 C is the best language in which to write a Unix OS. 02:27:37 coppro: elaborate 02:27:47 Trying to find the paper 02:28:11 I think I'll do debugging symbols by simply having a key/value set attached to each symbol 02:28:53 that way stripping debug info is easy to boot 02:29:04 as well as any other auxiliary data 02:29:32 ehird: the declaration syntax put all the declarators in a linear order so that you could clearly see that something was, say a pointer to pointer to function returning pointer to array 02:29:48 -!- Slereah has joined. 02:29:55 coppro: Just like Go, SPECS, etc. 02:30:04 ehird: yeah 02:31:06 ehird: ah, they hadn't fully fleshed it out before it was dropped 02:31:12 don't care 02:31:14 summarise 02:31:24 note that i don't want to deviate too much from c in the actual meat of things 02:31:33 it's very un-c-like 02:31:35 but far more readable 02:31:37 http://sprunge.us/jdXj just accentuates the differences, is all 02:32:24 * ehird wonders what's a better way to express pointer-to-anything than void *, which is just a kludge 02:32:29 but you could probably do it with i : int; j *-> int; k (int, char) -> int; // i is an int, j is a pointer to int, k is a function returning int 02:32:41 probably needs some fiddling 02:33:16 the issue of typeless objects is something i think deserves a huge amount more attention 02:33:23 coppro: my eyes tried to parse that 02:33:26 and they glazed over 02:34:02 mycroftiv: Indeed. If I ever get around to making a "real" language, typing will be the #1 concern 02:35:00 my experience indicates that typing is overemphasised 02:35:27 the main thing missing from most systems that spurs research into behemoth type systems is a generic-type capability 02:35:36 true enough 02:35:36 so you can define a hash table working on any type, strongly-typed, etc 02:35:36 i really started thinking about this more from learning 9p, because all of the real 'meat' of what goes on in a fs all happens in whatever is attached to the void* aux pointer 02:35:41 if you add that to something like C 02:35:44 it's pretty close to being fine 02:36:01 i would wager that most type errors are caught by a very simple system 02:36:07 true enough 02:36:12 and the ones that aren't are very rare 02:36:16 at least compared to other errors 02:36:25 But the trick is to make a complex and strong type system that is easy to use and does The Right Thing 02:36:29 mycroftiv: elaborate 02:36:39 coppro: why? 02:36:44 complexity is never a virtue. 02:36:45 Never. 02:37:07 ehird: Not complexity for the sake of complexity; complexity as needed to reduce type errors while preserving ease of use 02:37:22 ok the 9p protocol and its implementation in the standard libraries, all the 9p related structures are basically there for 'bookkeeping' on the protocol, they determine nothing about the content and behavior of the fs really, all of that is implemented... 02:37:38 coppro: But I postulate, and experience backs this up, that non-trivial type errors are rare. 02:37:43 via whatever structs and functions you create that manipulate the obects that the file->aux pointer points at 02:37:54 Certainly time should be diverted away from catching them to more useful areas. 02:38:31 ehird: In a simple language like C, most typing errors are trivial 02:39:26 But the triviality of typing errors decreases as the complexity of the type system increases, unless some of that complexity is directed at making errors more trivial 02:39:42 -!- Slereah_ has quit (Success). 02:40:51 -!- oerjan has quit ("leaving"). 02:41:07 coppro: I've used Haskell, dude. 02:41:25 That's pretty high at the top, and I can tell you that the type system hindered and bothered me a lot, and helped me surprisingly few times in comparison. 02:41:37 And I'm not just some noob; I'm pretty damn good at Haskell's type system, and know how it increases expressivity. 02:41:47 ehird: and likewise for myself and C++ 02:41:50 how does it increase expressivity? 02:41:56 C++'s type system has nothing on Haskell's. 02:42:11 facsimile: type classes let you do things you can't do without it, for one 02:42:15 I had a really good example, but I've forgotten it 02:42:23 ehird: It's getting there. 02:42:27 basically, the static dispatch they do lets you condition on them (remember, I forgot) 02:42:33 increasing expressivity 02:42:52 coppro: In complexity; not in power. Haskell's type system's power is derived solely from its pure functionality. 02:43:00 C++ will never be purely functional; it cannot compete. 02:43:10 ehird: Oh yes 02:43:30 Oh yes what? 02:43:40 Oh yes, as in "Oh, I misunderstood" 02:44:11 though C++'s type system is rather orthogonal to the fact that it generally doesn't have purely functional code 02:44:53 coppro: isn't that normally rendered "Oh, yes" 02:44:59 s/$/?/ 02:45:04 mycroftiv: hey, does plan 9 ed let you do "a" inline? 02:45:10 as in a full a with text on one line 02:45:12 or do you have to do 02:45:12 a 02:45:13 foo 02:45:13 . 02:45:33 ehird: Yeah, usually. But this is IRC and I've had too much bad grammar lately 02:45:42 You've "had" it? 02:45:42 ill check, i always do it on separate lines but i havent tested 02:46:00 ehird: I've received too much of it. 02:46:35 It strikes me that if http://doc.cat-v.org/bell_labs/pikestyle was about English, not C, it would be one of the best essays on style and typography ever written. 02:46:41 (the joys of trying to determine whether a set of quotes is an actual quotation, emphasis, indicating a character thinking to themselves, or a badly-misplaced apostrophe know no bounds) 02:46:43 need to use separate lines 02:48:40 mycroftiv: darn 02:48:51 that makes ed unsuitable as an irc correction language :) 02:49:26 well, thats why sed was invented, wasnt it? time travelling irc-er wanted a good way to express revisions on the stream 02:49:55 I've actually considered writing a script to apply sed corrections automatically 02:50:53 type class dispatch 02:51:25 mycroftiv: how would you delete the last character of a line with sed? 02:51:32 My non-trivial sed is rusty. 02:51:48 s/.$//? 02:51:51 Not s. 02:52:03 oh 02:52:07 Who uses anything but s? 02:52:20 Shush, you. 02:53:35 d is the delete verb if thats all you needed to know 02:53:41 mycroftiv: Nope. 02:53:47 I don't know how to select just the last char of a line. 02:53:57 .$ ? 02:54:32 as a regexp? 02:54:36 well, yeah :P 02:54:46 I will henceforth attempt to use sed commands other than s to apply corrections to my messages.§ 02:54:49 /.$/d 02:55:17 How do you append inline with sed? 02:55:24 I don't think you can easily... with sam it's easy. 02:55:26 i/hello/ 02:55:58 Wait, that /.$/d doesn't work. 02:55:59 Queer. 02:56:05 Meh. 02:59:59 Anyway. 03:00:42 * ehird wonders if a better alternative to the 8c convention is arch/c. e.g., 386/c, mips/c. 03:00:51 (Along with 386/l, mips/l, etc.) 03:01:05 Seems less distinctive and more verbose. 03:04:44 * mycroftiv is still poking at sed 03:06:43 i dont think you can operate on objects smaller than a line using the basic pattern space operations, have to use regexp 03:06:53 "Name servers don’t scale well, for precisely the reason that the ARPANET name scheme doesn’t scale well: the name server must understand all possible name syntaxes." 03:06:53 — The Hideous Name, Rob Pike & P.J. Weinberger 03:06:54 Shoot and a miss. 03:07:17 "Name servers have problems on other levels, too. Who administers a name server’s database? If the database is not audited frequently much of the data will be obsolete, while if the controls are too onerous, people won’t bother keeping the database current. What does the database contain? Most name servers produce network addresses, but no single network reaches everywhere." 03:07:28 mycroftiv: no biggie 03:07:51 if I can append stuff after some other stuff or at the end of a line, if I can delete stuff anywhere in the line and if I can replace stuff I'm fine 03:07:59 all in one line, preferably with multiple operations per line possible 03:13:34 "The algorithm proceeds in two steps. First, we need to generate a number of equations to solve, then we need to solve them." ~Wikipedia 03:14:47 i like the 2-step 'generate equations, then solve them' algorithm 03:15:36 A parable on the uselessness of find 03:15:39 find . -name *.c 03:15:40 du -a | grep '\.c$' 03:16:01 (Admittedly the latter gives you a bunk column. You could trivially make a "tree" command to do the same as "find .".) 03:16:13 mycroftiv: any progress on sedliness? 03:16:48 hm? was there a topic left open in relation to it? 03:17:40 [03:08] ehird: if I can append stuff after some other stuff or at the end of a line, if I can delete stuff anywhere in the line and if I can replace stuff I'm fine 03:17:40 [03:09] ehird: all in one line, preferably with multiple operations per line possible 03:17:49 I haven't figured out how to append inline, and I haven't totally sussed deletion 03:17:53 oh, ok 03:17:58 /.$/d doesn't seem to work 03:18:17 no it doesnt do what you want 03:18:28 that deletes everything 03:19:15 what i was saying was that the operations in sed other than s and y work on the whole-line level, they dont dig inside the line 03:20:20 That's shit. 03:20:25 In sam, /.$/d works fine. 03:21:53 well, the stuff in sed that isnt using the s regexp substitution verb isnt supposed to be the same thing as what sam is doing 03:22:10 Phooey. 03:22:25 For five points, figure out how to use sam to script /dev/stdin→/dev/stdout. :P 03:24:21 * ! cat /fd/0 >>/fd/1 03:24:35 mycroftiv: nono, I mean as a command 03:24:37 so I can do 03:24:50 $ echo 'butt' | samscript 'i/hello/' 03:24:56 *echo butt 03:29:04 why not just 0,$ p 03:29:24 ? 03:29:42 what's that do 03:29:47 prints everything 03:30:34 $ printf 'i/hello\\n/\n0,$p\n' | sam -d 2>/dev/null 03:30:34 hello 03:30:34 $ 03:30:35 that works 03:31:57 thats a very strange hello, world 03:32:03 {{ 03:32:03 #!/usr/bin/env rc 03:32:03 echo $1' 03:32:03 0,$p 03:32:04 ' | sam -d >[2]/dev/null 03:32:04 }} 03:32:35 does sam let you put multiple commands on a line at all? 03:32:55 i dunno, i never use sam 03:33:02 loser :P 03:34:04 seems like not, the manpage says you can group multiple commands with { } but they go one per line 03:34:33 annoying 03:34:39 despite using plan9 fanatically, there are still major pieces of it that i haven't explored 03:34:48 * ehird has an idea 03:34:52 i dont even have plan9 handling my email 03:35:02 which lots of plan9 users swear by 03:35:11 i just use gmail :P 03:35:16 yeah exactly 03:35:22 and of course i could use plan9 as a client for gmail 03:35:31 gmail's ui is the only reason to use gmail 03:35:35 but ive never felt motivated 03:35:50 i dont particularly like the gmail ui, but im very ui indifferent 03:35:52 erm what's the rc thing to concatenate a list into one 03:36:00 oh right 03:36:03 mycroftiv: conversations. QED 03:36:09 nothing else has 'em 03:36:18 lemme check, i should know that rc question but i always forget 03:36:54 $"var i think 03:37:07 darn, i knew you had to assign a var 03:37:09 that should turn a list into a simple string 03:37:53 what what do you mean? 03:38:02 if you have a list, dont you already have a var? 03:38:14 (a b c) 03:38:20 {{ 03:38:21 #!/usr/bin/env rc 03:38:21 ifs=' 03:38:21 ' echo $"*' 03:38:21 0,$p' | sam -d >[2]/dev/null 03:38:22 }} 03:38:23 behold, samscript 03:38:29 samscript i/hello/ i/world/ 03:38:35 untested :P 03:38:41 and the shebang is for plan9port only 03:38:54 wait, ifs is \n normally 03:38:59 so $"* mustn't use ifs? 03:39:09 indeed it doesn't 03:43:14 i will get 5.5 hours sleep. sigh 03:49:50 Gawd, OSs and libraries are so stupid. 03:50:21 Why on earth do people fuck so much with compiler optimisation when some simple sanity in OS and library design would speed things up immensely and simplify them in the process? 03:50:58 -!- mycrofti1 has joined. 03:51:18 my irc box just died 03:51:40 http://tunes.org/~nef/logs/esoteric/09.11.22 03:51:42 you're welcome 03:51:45 (what irc client do you use?) 03:52:53 i use irssi in gnu/linux and irc7 in plan9 03:53:19 mycroftiv: incidentally, how do you feel about my decision that what comes after "name:" isn't a sentence; "name:" starts the sentence? 03:53:44 mycroftiv: thus, even when capitalising the first letter of sentences, this should only be done when addressing people on the second line onwards. Like this. 03:53:45 does that decision have any notable consequences? 03:53:52 mycroftiv: IMO, it flows better. 03:54:12 I find that decision mostly interesting on the meta-level 03:54:27 I rarely decide to make decisions of that type 03:54:52 mycroftiv: i change my style all the time. 03:55:02 I'm also considering not capitalising "i". 03:55:10 There doesn't seem to be any particular reason to. 03:55:22 I will try to pay more attention now that I know you put a lot of signal into your typography and it isn't merely noise. 03:55:22 You could, however, make an argument that it's less noisy than I, because it's a more complicated shape. 03:55:45 mycrofti1: stop that; you're deliberately talking with capitalisation and punctuation :) 03:56:07 I tend to put signal in it for a while and then it degenerates into noise. I have trouble sticking to a style. 03:56:08 Shit, busted. 03:56:20 mycrofti1: you don't sound anything like mycroftiv at all like that :D 03:57:08 In general, I find that paying attention to the surface niceties of my text causes disruption of my general train of thought. 03:57:23 mycrofti1: STOP IT STOP IT STOP IT STOP IT STOP IT STOP IT STOP IT 03:57:42 mycrofti1: i need to be up at around 9:30; tell me that I'm crazy and need to sleep urgently 03:57:48 *i'm 03:58:21 It's clearly a sleep emergency and you should sleep with as much force and vigor as possible. 03:58:30 If you're not sweating, you're not sleeping hard enough. 03:58:42 -!- mycroftiv has quit (Read error: 110 (Connection timed out)). 03:59:08 -!- mycrofti1 has changed nick to mycroftiv. 03:59:16 mycroftiv: what is this i don't even 04:02:03 mycroftiv: please, just tell me that i need to sleep 04:02:34 Not only do you need to sleep, there is a hired bounty hunter who will hunt you down if you do not sleep asap. 04:03:12 mycroftiv: at least capitalise "ASAP" you lazy bugger 04:03:39 This from someone who isn't capitalizing "I" :P 04:03:53 "I" is not an acronym. 04:04:04 I need to work out pointer semantics for referencing English words and the like... 04:04:52 Anyway, I can resume my OS and compiler thoughts tomorrow, I guess, and the longer I wait the worse I'll be at thinking about them tomorrow. So I will head off to bed now; cheerio. 04:05:07 (And with that line I have decided that capitalised "I" is more aesthetic.) 04:06:04 I BID YOU FAREWELL, HEATHENS! 04:06:07 -!- ehird has quit. 04:15:02 http://en.wikipedia.org/wiki/Toffoli_gate 05:16:46 -!- Gracenotes has joined. 06:04:52 -!- oklofok has joined. 07:05:26 i am getting drunk 07:08:00 -!- FireFly has joined. 07:15:45 -!- puzzlet has quit (Remote closed the connection). 07:15:56 -!- puzzlet has joined. 07:16:20 bsmntbombdood what about quantum theory? 07:16:31 ? 07:16:32 ethanol 07:16:37 is amazing 07:17:10 I don't know how to got it 07:17:43 mapl syrup is amazing 07:26:37 -!- kar8nga has joined. 07:29:42 -!- madbr has joined. 07:35:17 -!- calamari has quit ("Leaving"). 07:35:28 -!- facsimile has quit ("Leaving"). 07:41:01 -!- oklofok has quit (Read error: 104 (Connection reset by peer)). 07:42:03 -!- oklofok has joined. 07:45:14 -!- AnMaster has joined. 07:46:30 I hate my shitty ADSL modem! 07:46:32 had locked up 07:46:34 in the middle of the night 07:47:10 -!- oklokok has joined. 07:58:14 bbl, university → 07:58:15 -!- FireFly has quit ("Later"). 07:58:17 -!- Pthing has joined. 07:59:59 -!- clog has quit (ended). 08:00:00 -!- clog has joined. 08:08:32 -!- oklofok has quit (Read error: 113 (No route to host)). 08:24:28 -!- madbr has quit ("Radiateur"). 08:53:32 -!- ais523 has joined. 10:00:28 AnMaster: Speaking of the "replace a 's/c/d/' regex with 'secede' for obfuscation points", turns out that while sed gleefully accepts "-e secede", Perl won't take "$x =~ secede;" -- it has to be a "non-alphanumeric, non-whitespace delimiter". 10:01:25 yep, because otherwise you couldn't give any functions names starting with s 10:01:53 well, unless you wanted to prefix them with & all the time 10:06:39 Perl parsing is such a hack, they could've easily done an "after =~ if it starts with s or m, at least try to make a regex out of it if the delimiters match sensibly and there's no cruft after it" kludge there too. 10:07:16 Besides, there are not so many words starting with s that have the correct structure for a s///-style regex. 10:07:43 fizzie: no, the issue is that the =~ is optional 10:07:45 so you'd just type 10:07:47 secede; 10:08:05 and it would be ambiguous whether it meant $_=~s/c/d/; or &secede(); 10:08:18 Sure, it might not work there; but it could be that =~ induces a "we really expect a regex here" mode-of-thinking. 10:08:20 (or even "secede"; but Perl never uses that interpretation, as it would make no sense) 10:10:54 Uh.. are you sure it won't use that last interpretation? Perl -e 'secede;' doesn't complain, and with 'use strict' the error looks like it's thinking of it as a bareword; and perl -e '$a = secede;' sticks the string "secede" to $a. Assuming there's no sub secede { ... } seen, of course. 10:12:34 oh, right 10:12:38 I turn "use strict" on all the time 10:12:51 which disallows barewords that aren't subs, except in a couple of specific contexts 10:13:02 so yes, it will use that last interpretation if it's the only one available, unless you tell it not to 11:08:04 -!- kar8nga has quit (Remote closed the connection). 11:08:43 -!- puzzlet has quit (Remote closed the connection). 11:08:54 -!- puzzlet has joined. 11:21:25 I just received reports that "$a = 'foo'; $a =~ s ofobo; print $a;" prints out 'boo'. Now *that*'s tricky. And not mentioned in my perlop doc page. 11:37:11 fizzie, how does that work? 11:37:21 $a =~ s ofobo makes no sense to me 11:37:24 what does it mean 11:38:00 It seems to mean s/f/b/, of course, but we have no idea why adding a space there makes the alphabetic delimiter work. 11:38:28 fizzie, hm that seems wrong. After all space is not alphanumeric 11:38:37 so space should be the delimiter 11:38:47 Whitespace is not an allowed delimiter. 11:38:58 But neither should be alphanumerics, so... 11:39:28 it's DWIMmery 11:39:37 ais523, meaning? 11:39:46 It's a bit weird even for DWIMmery. 11:39:48 AnMaster: instead of throwing syntax errors, Perl guesses 11:39:57 you only get a syntax error if it had no idea what you meant 11:39:58 ah 11:40:01 but what does it stand for? 11:40:06 Do What I Mean 11:40:08 ah 11:40:36 there's some great DWIMmery in C-INTERCAL, where it guesses whether you meant C-INTERCAL or CLC-INTERCAL notation by which character set you're using 11:41:02 ais523, heh 11:41:16 ais523, oh some issues on mac: stdout is fully buffered, stderr is line buffered 11:41:29 can you override it with setvbuf? 11:41:45 ais523, if it is an mpw tool that seems to mess up MPW badly 11:41:50 haven't tried for SIOW 11:42:01 ais523, and the error codes 1, 2 and 3 have reserved meanings for MPW tool 11:42:02 for example 11:42:08 1 = syntax error (command line) 11:42:17 user defined ones should be 4 or higher 11:42:30 C-INTERCAL error codes are just the INTERCAL error number 11:42:36 which is fun, because that's normally out of range on UNIX (it wraps it) 11:43:00 ais523, as far as I can see from the docs the range should be somewhat larger than that, 24 bits it seems 11:43:11 well I don't have them on screen atm 11:43:22 but from what I read yesterday it looked like that 11:43:39 ais523, another thing, it turns out you share stack with the shell. Oh and heap of course 11:43:48 so any mem leaks = bad 11:43:58 Even with a "sub s { ... }" defined above, "$a =~ s ecede;" is interpreted as a regex; you need "$a =~ s(ecede);" to make it actually call s. So as long as that's the case, IM(ns)HO they could as well have made $a =~ secede; work too. 11:44:24 ais523, except it seems MPW tries some heuristics to find such leaks. The docs contradict itself on this point however 11:44:40 heh 11:44:49 you could write a deliberate leak to see what happened 11:44:56 fizzie: s is an operator 11:45:01 ais523, well it is a bit hard to tell what with the Mac OS memory model 11:45:08 what does $a =~ s(ecede)(fcede) do? 11:45:13 if a function s is defined? 11:45:43 What you'd expect; substitutues ecede with fcede. 11:45:58 heh, LR(infinity) 11:46:04 Well, what I'd expect; I don't know what you'd expect. 11:46:07 fizzie, wait, does ( match )? 11:46:12 heh 11:46:18 that's some special casing... 11:46:18 Yes, that's another of Perl's specialities. 11:46:29 Parentheses-style delimiters have to be used in pairs. 11:46:30 fizzie, does it work for <> {} and [] too? 11:46:34 yep 11:46:36 At least {} and []. 11:46:41 and in perl6, it works for all the parentheses in Unicode 11:46:41 and what about various unicode parens? 11:46:55 ais523, such as «» ? 11:47:03 I think the French use those or something 11:47:04 yep 11:47:13 "the four sorts of brackets (round, angle, square, curly) will all nest". 11:47:15 in fact, «» has a predefined meaning in Perl6 11:47:23 it's equivalent to perl5's qw() 11:47:43 * AnMaster arges that s→abc←→def← should work 11:47:54 argues* 11:50:55 Wasn't there something with «X» and »X« and such to do [something] to just about any operators? 11:51:37 Perl 6 has an *awesome* set of operators; http://glyphic.s3.amazonaws.com/ozone/mark/periodic/Periodic+Table+of+the+Operators+A4+300dpi.jpg (warning: a bit big image, 3477x2456 pixels). 11:52:13 fizzie: yep, they're basically the different possible ways of currying map with the operators in question 11:52:15 fizzie, heh 11:52:19 very nice image 11:52:24 also, «X« is valid sometimes as well, I think 11:52:35 as well as X« for unaries (or was that X»? I know only one is meaningful) 11:52:55 op« and »op are listed in that table. 11:53:43 -!- puzzlet has quit (Remote closed the connection). 11:53:47 I like the ":iffy", ":diffy" and ":fiddly" tags there, too. 11:53:54 -!- puzzlet has joined. 11:54:32 also, I love the ... operator 11:54:52 you know how it's usual in code examples to write /* ... */ or whatever to show that there is code there, you just haven't written it yet? 11:55:00 Perl6 has an actual ... operator for that 11:55:07 which throws an exception if it's ever actually run 11:55:38 fizzie, question: what is the diff between those listed as metaops and those not? 11:55:50 AnMaster: Don't ask me, I'm not a Perl 6 scholar. 11:55:56 Hah, a "p5=>" operator. 11:56:07 fizzie: it means almost exactly the same thing as "," 11:56:19 AnMaster: metaops are basically functions that take operators as arguments and return other operators 11:56:20 in fact I'm wondering why ! is listed as metaop? 11:56:28 isn't that just negation? 11:56:32 You can apply ! to many other operators. 11:56:46 fizzie, you mean like == != but instead writing !==? 11:56:55 (where the ? is NOT part of the op) 11:57:17 yes, it's more useful for other things though 11:57:23 Yes, the unary prefix ! is there also listed separately. 11:57:25 fizzie, what about good old negation, like you would write if (!foo) in C 11:57:28 is that the same !? 11:57:37 fizzie, ah can't find it 11:57:37 In the "Complementary" column (IV). 11:57:49 ah there 11:58:01 fizzie, how does perl tell them apart? 11:58:12 AnMaster: you can always use quoting 11:58:21 quoting operators?? 11:58:32 yep 11:58:43 ais523, what sort of quotes? 11:58:45 The other is an infix operator and always applied to some other operator; that doesn't sound "hard", but it probably is messy. 11:58:52 e.g. !{=} is not-assignment, as opposed to !{==} which is not-equality 11:58:55 at least, I think you quote with {} 11:59:00 Oh, ???, !!! and ... are all these "stub" operators. 11:59:05 ais523, does "not assignment" even make sense? 11:59:21 isn't that same as commenting out the relevant part? 11:59:36 if (!(in = fopen("/etc/passwd","r")) { /* ... */ } 11:59:45 or, is it same as: x = !y 11:59:47 that sort of thing (although the above line was C, in Perl it would be a lot simpler) 11:59:52 AnMaster: no, it's !(x = y) 11:59:53 I think 11:59:58 Anything with the ":iffy" tag is listed as "can be used with !op". I don't see assignment there. 12:00:04 ais523, should be "do not assign to this variable" 12:00:05 ;P 12:00:09 would be more esoteric 12:00:13 In fact, there are very few :iffy-tagged ones. Though the table might not be the last word in this. 12:00:14 fizzie: ah 12:00:18 AnMaster: no, that would be INTERCAL 12:00:35 ais523, true, but isn't intercal esoteric? 12:00:38 $ perl6 12:00:40 > $a = 5 12:00:41 Segmentation fault 12:00:47 does not fill me with confidence 12:00:50 Modulus (%) is listed as :iffy, so !% should be legal... it's not exactly clear what the "negated modulus" is. 12:00:59 fizzie: "is divisible by" 12:01:09 ais523, seg fault? 12:01:10 huh 12:01:18 sounds like a bug in a high level language like perl 12:01:34 AnMaster: a bug in Rakudo, almost certainly 12:01:41 I'm just amused it happened on the first command I tried 12:01:56 ais523, Rakudo? Is it related to Parrot in any way? 12:02:31 yes, Parrot is the VM that Rakudo targets 12:02:34 (Must be off to a lecture/lecture-alike.) 12:02:37 * ais523 updates Parrot and Rakudo 12:02:41 ais523, so perl6 is compiled? 12:02:47 bytecode? 12:02:50 it's bytecode-compiled 12:02:51 like Java 12:02:57 -!- kar8nga has joined. 12:03:05 except, it's probably possible to compile Parrot to native code, but then you can do that with Java bytecode too 12:03:13 ais523, do you have to do it explicitly like in java, or does it happen automatically like in python? 12:03:22 probably either 12:03:30 how perlish 12:03:58 well, you can do it explicitly for python too. IIRC there is some script called during the python build process to do that for the standard library 12:05:18 * AnMaster reads /usr/lib/python2.6/compileall.py 12:06:21 hm /usr/lib64/python2.6/py_compile.py 12:06:30 MAGIC = imp.get_magic() 12:06:33 that's a nice line 12:08:03 oh and I have a vague memory of there being something like "compile byte code by interpreting a string as the source of a module" in the Python C API 12:08:07 or something like that 12:10:32 ais523, wait, did you say you could compile perl6 to native code in theory? 12:10:43 probably 12:10:48 wouldn't that imply being possible to parse it without running it? 12:10:54 perl6 is meant to be better-behaved than perl5 12:10:56 apparently quite some effort has gone into making it compilable 12:11:02 and even to be able to have more than one parser 12:11:12 I think you can nest compile-times inside runtimes, or something like that 12:11:18 rather CLC-INTERCALlishly 12:11:40 ais523, so you can't do that thing to make it undecidable? 12:11:55 I suspect the syntax is probably decidable, now 12:12:25 wouldn't matter if it wasn't, though; it would just send the compiler into an infinite loop in the undecidable case 12:12:27 as that's what the undecidable case did /anyway/ 12:16:10 true 12:18:27 ais523, but how does it execute code at compile time if it needs to compile it to bytecode first? Does it JIT-compile to bytecode, or does it switch to interpreting? 12:18:38 I'm not sure 12:18:51 Perl5 has enough magic as it is, I suspect in Perl6 the magic is recursive 12:19:11 (you can even change the grammar on the fly, again CLC-INTERCAL style; in fact, CLC-INTERCAL is looking more and more like a Perl6 tech demo) 12:19:18 with magic you mean obscure code? 12:19:45 yep 12:19:52 ais523, or perl6 tech demo is looking more and more like CLC-INTERCAL 12:19:54 preferably, which works for no reason at all 12:20:03 AnMaster: CLC-INTERCAL is pretty magical too 12:20:21 I'm pretty confident that the number of people who understand how it works is less than 10 12:20:25 and possibly just 1. or 0. 12:20:31 maybe even negative, if that makes sense 12:20:52 AnMaster: CLC-INTERCAL is pretty magical too <-- Of course, it's INTERCAL. 12:20:58 it's given that it is magical 13:26:06 -!- BeholdMyGlory has joined. 13:39:16 bbl 13:58:37 -!- FireFly has joined. 14:02:30 -!- Gracenotes has quit (Remote closed the connection). 14:11:46 -!- augur has quit (Read error: 60 (Operation timed out)). 14:19:45 -!- Gracenotes has joined. 14:25:13 -!- Gracenotes has quit ("Leaving"). 14:37:48 -!- MigoMipo has joined. 14:48:18 -!- Pthing has quit (Remote closed the connection). 15:26:52 -!- kar8nga has quit (Remote closed the connection). 15:47:45 -!- coppro has quit (Success). 15:49:22 -!- MigoMipo has quit ("Page closed"). 16:12:31 -!- kar8nga has joined. 16:32:55 -!- facsimile has joined. 16:39:17 -!- augur has joined. 16:52:23 -!- Pthing has joined. 17:05:01 -!- kar8nga has quit (Remote closed the connection). 17:42:12 -!- BeholdMyGlory has quit (Remote closed the connection). 17:45:16 -!- BeholdMyGlory has joined. 17:48:12 -!- iamcal has quit (Read error: 104 (Connection reset by peer)). 17:49:47 -!- ais523 has quit (Remote closed the connection). 17:56:13 -!- cal153 has joined. 18:11:19 fizzie, there? 18:11:54 or anyone else that might happen to know if there is any ipv6 range that is reserved for examples (same way as example.org is or such) 18:12:31 -!- Asztal has joined. 18:12:55 never mind, found one reserved for documentation 18:14:00 Right, 2001:DB8::/32. 18:15:07 -!- puzzlet has quit (Remote closed the connection). 18:15:10 -!- puzzlet has joined. 18:17:04 -!- pikhq has joined. 18:56:21 Quiet today, ne. 18:56:48 ne 18:58:09 -!- augur_ has joined. 18:59:10 -!- augur has quit (Read error: 104 (Connection reset by peer)). 19:03:12 -!- MigoMipo has joined. 19:10:25 -!- kar8nga has joined. 19:15:08 -!- ais523 has joined. 19:17:08 wb ais523 19:17:15 thanks 19:17:31 * AnMaster is irritated as SQL DBs 19:17:58 there doesn't seem to be a portable way to get the value of an auto incremented column, when you need to use that value later in the same transaction 19:19:15 SQL is sort-of like Scheme or JS in that you can't expect it to be portable 19:19:22 also the syntax for it in the dbms used by this module is just hideous: (select current_value of ObjectID_SEQ from MIMER.ONEROW) 19:19:27 but it's even worse than those two languages, as it doesn't even have a portablish core 19:19:33 assuming the sequence is ObjectID_SEQ 19:19:54 ais523, SQL does have a core... At least in theory 19:20:05 this SQL 2003 standard thingy 19:20:05 there's a standard, IIRC 19:20:08 ais523, yeah 19:20:12 but most SQLs don't comply with it by default 19:20:12 that was my point 19:20:19 true 19:20:24 I mean, they don't even agree on what quoting operators to use 19:20:27 "" vs. '' vs. `` 19:20:44 ais523, this one uses "" for quoting strange table/column names and '' for strings 19:20:48 I thought that was standard? 19:21:00 mysql uses `` for table/column names, at least 19:21:00 in fact I'm pretty sure postgresql does it like that too 19:21:07 which definitely isn't what the standard says 19:21:10 well ok, mysql is crap however 19:21:33 postgresql or sqlite are the ones I would use if I had the choice 19:21:51 (note sqlite is good for small embedded, but standard support is quite bad) 19:21:55 note:* 19:23:16 ais523, also how would one declare a temp variable in sql? Basically I need to store the last inserted row id somewhere, and then insert two other things in the same table that refers to the first row 19:23:30 thus I can't just use that "(select current_value of ObjectID_SEQ from MIMER.ONEROW)" both times 19:23:49 -!- augur_ has quit (Read error: 60 (Operation timed out)). 19:23:53 (this would be for the initial schema creation and data importing file) 19:24:10 -!- pikhq has quit (Read error: 104 (Connection reset by peer)). 19:25:04 AnMaster: I don't think that's standardised either 19:25:08 damn 19:25:09 -!- augur has joined. 19:28:19 ais523, hm some testing indicates it needs to be inside a begin ... end; block, however the command line sql client thingy seems to have problems handling that (it gives a syntax error if any line inside that contains a semicolon, only way to make it work is to put the entire block on one line, which makes the sql file in question rather unreadable) 19:28:34 -!- Gracenotes has joined. 19:31:31 -!- ehird has joined. 19:32:12 Vel helo dar. 19:32:19 bbl 19:32:28 -!- bsmntbombdood has quit (Read error: 113 (No route to host)). 19:34:44 AnMaster: We should do shifts like that. 19:37:13 -!- facsimile has quit ("Leaving"). 19:37:44 -!- iamcal has joined. 19:39:12 -!- bsmntbombdood has joined. 19:39:38 04:10:48 wouldn't that imply being possible to parse it without running it? 19:39:38 this is possible 19:39:39 it's just TC 19:39:57 mycroftiv: hey are you there 19:43:23 ehird, well I didn't know they dropped that thing from perl5 *shrug* 19:43:25 bbl again 19:43:32 AnMaster: they did not. 19:43:46 Parsing Perl has always been possible; just not without potentially executing Perl. 19:45:23 ehird: size[4] Tauth tag[2] afid[4] uname[s] aname[s] 19:45:31 you confuse me 19:45:35 you confuse me with your words 19:45:43 whats up? 19:46:11 not much tbh 19:47:33 go-nuts (205) 19:47:37 should probably read-all that 19:47:46 i was just reading some lkml controvery about something gcc was doing, putting 16-byte alignment where it wasn't wanted 19:49:38 -!- zzo38 has joined. 19:49:52 mycroftiv: i'm musing on c derivativery, OSs, plan 9 and yacc 19:49:57 and compiler architectures 19:51:19 something worth thinking about in that regard is the relation of on-disk filesystems to synthetic filesystems 19:51:48 are you kidding me, i've probably thought about that at least 70 times 19:51:49 theres really no connection between 9p synthetic filesystems and on disk stuff like fossil, it would be nice to change that 19:51:52 hi zzo38, quiet today 19:52:03 mycroftiv: just implement fossil as a 9p server? 19:52:08 is the boring, simple, and probably correct solution 19:52:09 well fossil does serve 9p 19:52:14 well, then. 19:52:33 thats not quite the same as what i was referring to, i was thinking more about the way the data is structured 19:52:40 huh? 19:52:50 btw, you said the p9 kernel doesn't use 9p to talk to itself. 19:52:54 what does it do? just pass structs? 19:53:09 it would be nice if the in memory content of a 9p fs could be snapshotted to disk in a way that naturally fits the disk filesystem 19:53:33 i think that's a bit vague to meaningfully discuss; define naturally fits and justify how fossil doesn't achieve that 19:54:06 well, fossil ties into venti and uses a tree of pointer blocks pretty much 19:54:21 imo dumb deduplication probably works well enough. 19:54:37 whereas 9p uses this big set of structures like fcall and the internal stuff the libraries use to provide the public interfaces 19:54:58 i always have this idea you should be able to basically dump bytes straight from memory onto the disk, and have it be structured so that it fits the disk storage format 19:55:11 I am writing a real assembler called 888ASM, which I will use for writing operating systems 19:55:22 Have you ever tried to write operating systems 19:55:34 Okay. Yes. 19:56:03 No, I mean, for making program in real-mode. 19:56:21 I haven't tried to write a real-mode OS, if that's what you mean. 19:56:33 Yes, that's what I mean. 19:56:44 -!- cal153 has quit (Read error: 113 (No route to host)). 19:57:30 mycroftiv: do you know why plan9port doesn't include a drawterm rio? 19:57:36 i'd love to use its rio in an os x window 19:58:36 what exactly do you mean a 'drawterm rio' ? when you run drawterm rio is being executed by the cpu server you connect to, drawterm is just providing a /dev/draw for it 19:59:41 its analogous to the plan9 cpu command, which basically just runs processes on the cpu server with their namespace structured so that the devices are provided by the terminal 19:59:59 i meant drawterm as in the way plan9port runs the graphical apps like acme 20:00:07 rio uses the same widgets, so surely it uses the same lib? 20:00:18 -!- zzo38 has left (?). 20:00:19 so why can't we have actual rio, instead of an x11 wm that imitates rio? 20:01:16 well rio is a fileserver 20:01:58 er, I am talking about the WM 20:02:05 look at plan9port's rio(1); it's an x11 wm 20:02:09 maybe rio technically isn't that 20:02:10 yes i know 20:02:12 and it's implemented elsewhere 20:02:16 but who cares 20:02:35 i mean a little plan 9 wm that i can use as if i had rio running in plan 9, in a window 20:02:47 yeah that would be cool 20:03:09 is there any technical obstacle other than porting the code from plan 9 c to posix c? 20:03:13 i was just explaining that in plan9 rio is a fileserver that multiplexes access to the plan9 kernel files like #c (/dev/cons) and #i (/dev/draw) 20:03:17 it uses the same graphical lib all the progs do, right? 20:03:24 so that doesnt translate in a direct way to *nix 20:04:00 plan9port can't do fileservers? 20:04:31 yeah it can 20:04:47 but the linux or other standard *nix kernel doesnt provide underlying devices that work the same way 20:04:51 ok, so only the kernel bits would need to be changed. /dev/draw is already handled for progs like sam/acme/etc 20:05:00 and /dev/cons is "sort of" easy to do 20:05:10 im sure it would be a not-that-hard project to implement 20:05:34 and i agree that you could use drawterm code for a lot of it 20:05:40 because drawterm provides those devices i was talking about 20:05:53 * ehird tries to find a cruftless source of Rob Pike's "Notes on Programming in C" to give it some nice typographical lovin' 20:06:03 so basically you would run rio in plan9 port and have it available for drawterm to dial into 20:06:35 that could really work i think 20:07:02 not that rio is very good, tbh 20:07:05 might need to wire them together to start at the same time, rio doesnt know how to sit around and wait with no display for a client to show up unless you patch it 20:07:12 is it possible to write "other wms" for plan9? it is right? 20:07:16 just hijack /dev/draw and remap it 20:07:20 yeah plan9 user interface is kinda cool but not perfection or the OS strong suit 20:07:24 oh of course 20:07:36 as you know you can run any app right on the framebuffer, no need to put rio in there 20:08:09 as a matter of fact someone is working on a plan9 wm alternative who actually has the skill to deliver something technically solid, i think its a grad school project for them or something 20:08:24 mycroftiv: do you know the source of the bell labs-area quote that replacing a snippet with a better equivalent one gets you speed and clarity, and machine optimisation only gets the first? 20:08:28 i think it was on cat-v or sth 20:08:50 i think making acme be able to embed /dev/draw windows would be kickass 20:08:59 all other plan 9 interfaces would instantly become obsolete 20:09:02 its familiar to me but all the rob pike ive read is all smushed together in my brain, i cant recall what line comes from what 20:09:13 well, apart from letting you hide acme windows and recall them later like rio 20:09:20 add that and acme is one of the best WMs in existence 20:09:25 mycroftiv: i think it was rob pike, yeah 20:09:34 yeah the 'rio inside an acme panel' thing has been talked about a fair amount, again, not too hard to do 20:09:48 nonono not rio 20:09:50 fgb understands the issues well since abaco is his project and it integrates acme with some graphical display 20:09:51 as in a panel is a window 20:10:02 i just meant as an example 20:10:06 right 20:10:27 since thats something some people think 'should work' already, as a matter of design principle and general coolness 20:10:34 run anything in an acme panel 20:10:52 maybe inferno acme-sac already does that? 20:10:57 i dunno 20:11:10 rio is a pretty useless wm 20:11:16 acme is very good at efficiently organising things 20:11:36 rio isnt great but it has some things i really like, i like how it and rc work together 20:12:01 the awesomely purist backscroll of text that you can edit in, how the execution point works, 'send' option 20:12:40 and the basic mechanic of 'new' sweeping out a window, and apps 'taking over' the window they were started in 20:12:42 i find revising the most recent flawed command, my most common editing operation by far, is needlessly tedious with the system 20:12:48 and i know that's heretical 20:13:06 also, the not scrolling by default just makes me disable it until i want to read a manpage 20:13:15 as it's completely useless to have to scroll every time all the time 20:13:21 can change that in your profile 20:13:22 mycroftiv: now, acme's terminal 20:13:24 (Win) 20:13:26 that's good 20:13:28 purist yet usable 20:13:37 mycroftiv: i don't care, it's a shitty default 20:13:50 its not useless, it can be used to control execution and have a buffer of upcoming commands that you edit in response to what is going on - and yeah i agree it sucks as a default, i usually change it in my profile 20:14:40 http://www.lysator.liu.se/c/pikestyle.html is quite a clean source for NOPIC 20:15:02 I wonder where it was originally published, so that I can examine the formatting of the original. 20:15:18 http://www.csl.cornell.edu/courses/ece314/tutorials/pike_C.html is devoid of stylistic markup 20:15:52 does bwk/pike's book The Practice of Programming include it? 20:16:04 dunno 20:16:08 [[I've long recommended Pike's "Notes on Programming in C" on my web page. This book includes most of the content from that essay and much more, but is still thin and concise.]] 20:16:09 nope. 20:17:10 http://doc.cat-v.org/bell_labs/pikestyle seems to retain the formatting of the first one I linked, so either uriel got it from there, it's canonical, or some common ancestor used it 20:17:17 well, common ancestor source or just source 20:18:07 and that's the last i can find 20:18:20 i think im going to start lobbying for tex as the best long-term document storage format 20:18:31 Please, no. 20:18:52 well, fortunately for you, my lobbying wont affect anyone at all since nobody cares 20:19:20 but it makes sense, the output is quite well defined and the program is 'finished', nothing will be changing in the future in the core program 20:19:24 If you want to champion a hopeless cause, roff is better than TeX. Of course, both are monumental tortures to write in (roff slightly moreso). 20:19:38 But TeX has many flaws, especially as it does not store *documents*. 20:19:48 It stores typesettings. 20:19:51 oh no, semantics! 20:19:58 Semantics are all there is. 20:20:02 And it is IMPORTANT. 20:20:16 Cruft around the content is not the content (although typography is part of it). 20:20:34 People sometimes write their document within the confines of the typesetting language, but this is certainly not a good long-term practice for document storage. 20:20:41 At least roff encourages that. 20:20:50 -!- Pthing has quit (Remote closed the connection). 20:20:59 (And enables a dabbling of typography while leaving the rest to itself.) 20:21:51 i was intending to refer to the case where people are trying to preserve or recover specific formatting 20:22:03 since the context was you trying to find what the 'original' of pikestyle looked like 20:22:15 Sure, and roff would have worked here for the typography I want. 20:22:21 TeX would have been more of a pain to extract it from. 20:23:09 i guess i just was thinking of tex as being valuable because its output is so precisely specified 20:23:36 Except for complete devoidness of support for Unicode. 20:23:53 Which makes it useless for a great many things where formatting is very important indeed. 20:24:24 (btw, by roff I meant including n and troff) 20:24:53 I wonder if http://repo.cat-v.org/troff-slider/ is any good. 20:24:57 well, obviously tex isnt a solution for everyone or everything, but im still pretty impressed with it 20:25:40 using TeX directly is a good thing if, uh… you are Knuth 20:26:35 incidentally, a thought i had about my 1-pass compiler idea: what about portability? 20:26:50 should every compiler really rewrite all the c processing code? that's insane 20:27:03 I think the way I'll do it is to have the main cc 20:27:13 and then you write some functions that it calls 20:27:16 for each type of node 20:27:22 to generate the code, given loads of context and stuff 20:27:30 then you just link 'em together to produce that compilerer 20:27:33 *compiler 20:29:16 but the architecture-specific files will be confusing 20:29:25 just a series of unrelated snippets 20:30:07 [[Unfortunately, Ossanna's troff was written in PDP-11 assembly language and produced output specifically for the CAT phototypesetter. He rewrote it in C, although it was now 7000 lines of uncommented code and still dependent on the CAT. As the CAT became less common, and was no longer supported by the manufacturer, the need to make it support other devices became a priority. However, before this could be done, Ossanna died.]] 20:31:20 im forgetting what your primary motivation for a 1 pass compiler was - simplicity of creating the compiler itself, parallelization of operation, just because its an interesting possibility, all of the above? 20:32:04 simplicity of the compiler code, speed of the compiler, and from what i derived from conway's law (gimme a sec to find it) 20:32:26 16:52:35 another thought is: from conway's law, we can derive that the fewer passes in a compiler the better 20:32:26 16:52:47 because an N-pass compiler is-as-if produced by an N-group team 20:32:27 16:52:57 and behemoth teams famously produce terrible software 20:32:27 16:53:28 so the question is, can we make the c dialect compileable simply and elegantly with one pass? 20:34:06 yeah i remember the conway's law thing, i thought that was clever but not rigorous 20:35:28 indeed, it's just an idea 20:35:36 does p9 have an alternate way to middle click 20:35:43 mine fails in 9vx and plan9port 20:35:55 try clicking both left and right at the same time 20:36:06 i think theres also a key to hold down while you click also 20:36:13 i really oughta make a note of this since it comes up a lot 20:37:08 since you are talking about doing stuff like ditching preprocessor, any other notable deviations from C standards you think are worth doing to maximize the efficiency/elegance goals? 20:37:21 dual click magixxx is what i tried 20:37:24 and it phails o no 20:37:35 mycroftiv: not too much. probably very similar to plan 9 c 20:37:53 void will probably be implicit 20:38:04 main() {} returning void, as you've seen 20:39:08 prolly different io lib 20:39:16 i don't really know 20:39:34 you familiar with plan 9's bio library? 20:41:12 ehird, wait, are you suggesting that cpp should be dropped? 20:41:31 AnMaster: indeed i am, and C's creators agree. 20:41:31 ehird: emulate middle button by holding down shift key while pressing right button 20:41:36 and it was mostly eliminated in plan 9 20:41:45 now remember what i said about shifts? you left right after i arrived 20:41:50 let's enact that system, it'll be wonderful 20:41:52 ehird, okay I agree too. Just one question: 20:41:57 what will you replace #include with? 20:42:10 for getting prototypes for library functions and such 20:42:21 mycroftiv: doesn't work (i'm using 9vx) 20:42:37 ehird, and system defines, or rather enums now I guess? 20:43:01 AnMaster: #include foo can simply look at /lib/foo 20:43:12 annotated with signatures, for instance 20:43:19 that's the immediate first idea i had, one of many options 20:43:25 ehird, and the library will contain definitions of stuff like protypes and structs and such? 20:43:31 in some magic way 20:43:57 Not prototypes; as I said, the symbols are annotated with them. 20:44:07 Some magic way like having a standardised format to define structures? Oh, how magical and crazy. 20:44:13 ehird: http://9fans.net/archive/2009/04/495 20:44:24 This is just one idea; I'd think for longer about it, but I'm too lazy. I'll come to that problem when I come to it. 20:44:31 ehird, wait, why are you using sarcasm? 20:44:44 Well, magic is usually used disparagingly in this context... 20:44:53 Perhaps #include will simply parse the file, which must contain only declarations. 20:45:02 ehird, in this case I just meant "some yet to be defined meta data format" 20:45:33 AnMaster: Well, yes; just as my object format is yet to be defined. Did you read that my computer will actually link every symbol into the object as soon as it compiles them? 20:45:52 ehird, you mean static linking? Well no news 20:45:54 And I'm using the same object format for objects, binaries and libraries. ld is just a composer. 20:45:57 AnMaster: I didn't say that. 20:45:59 Read it again. 20:46:10 ehird, are you going about your distro or your OS? 20:46:15 os. 20:46:21 ah, well then all bets are off 20:46:21 cc actually produces a $universal_object_format increementally. 20:46:25 Not just an .o 20:46:29 but an .o too 20:46:33 same as an .a and an (executable) 20:46:54 And it doesn't assemble machine code, and then generate the object file; it does it as part of the code generation process, which is in the single pass like every other step. 20:47:13 It literally parses a chunk of code, generates the machine code for it, and adds it to the object (probably stored in memory until exit by default). 20:47:13 ehird, weren't you going to use forth + smalltalk for your OS iirc? 20:47:21 You can run it as-is if it has a main(). 20:47:31 Executing foo just loads the object foo and calls main(); very simple. 20:47:52 Or you can do "$ld myccode.o myotherlangcode.o -o combined.o". 20:48:01 (which just merges the two objects) 20:48:05 etc. 20:48:17 AnMaster: I can have more than one OS project, can't I? 20:48:19 It's not like anyone will use them/ 20:48:21 *them. 20:48:22 oh ok 20:48:32 ehird, can you name them differently so we can keep them apart? 20:48:34 ;P 20:48:46 ehird, by the way, on your distro you realise you will still be stuck with a special form of dynamic linking whatever you do? 20:49:06 ehird, and that is the form called "system call" 20:49:13 sure your OS might get rid of it ;P 20:49:20 AnMaster: (1) The one I'm talking about with this architecture will probably be called Plan Y. (2) That is one idiotic definition of dynamic linking. 20:49:25 Very strawmanesque. 20:49:44 (Free joke: Y Plan Y? Y not?) 20:49:51 sure, you could consider it IPC to kernel I guess 20:50:24 * ehird just disables scrolling button so he can middle-click for a few seconds 20:50:28 AnMaster: that is exactly what it is, more or less. 20:50:44 Anyway, none of the problems with dynamic linking apply to system calls. 20:51:10 System calls don't incur a runtime penalty to load the library; the kernel is the one running it! 20:51:25 System calls very, very, VERY rarely break compatibility. 20:51:32 are you using 9vx with a full plan9 distribution or are you using just the stripped down microdistro that is part of the 0.12 tarball 20:51:43 etc. 20:51:54 And system call users are portable; 20:51:58 you are never without the kernel. 20:52:01 mycroftiv: latter. 20:52:27 fuck shittingbugger i forgot what i was going to do in this plan9 :D 20:52:41 you should, in my opinion, download the plan9 .iso image and then mount it and copy it over to your disk, and run 9vx using that copied full plan9 distribution as your root 20:52:52 i'm not too fussed about 9vx. 20:52:57 it's slow. meh. 20:53:02 at least for graphical shit 20:53:10 wait, are you using it in os x? 20:53:14 yes. 20:53:20 oh yeah ive heard its awfully slow in os x 20:53:34 its fast as fuck (and fuck was measured at 496.5 mph) in leenooks 20:54:17 fucking at 496.5 mph? intriguing concept. 20:54:20 * ehird adds to todo list 20:55:10 a n y w a y 20:58:15 mycroftiv: you can trivially make a plan 9 / that boots on multiple architectures right? 20:58:46 sure thats why its set up the way it is 20:58:51 thought so 20:58:57 mycroftiv: is that used for clusters? 20:58:58 no reason a file server couldnt have stuff for every arch 20:59:23 probably so in the case of the blue gene project as a modern example 20:59:39 ooh, install everything from /n/sources 20:59:42 and the core distro 20:59:46 for every arch supported 20:59:47 -!- puzzlet has quit (Remote closed the connection). 20:59:51 -!- puzzlet has joined. 20:59:52 it is literally all of plan 9 21:00:00 it would be COMPLETE FOREVER 21:00:04 System calls very, very, VERY rarely break compatibility. <-- that is because the kernel developers go to great lengths to avoid it 21:00:11 AnMaster: No shit, sherlock 21:00:15 more or less, although there are a fair amount of projects that never got loaded onto sources for one reason or another 21:00:36 i wonder if anyone has a plan 9 cluster with every supported arch 21:00:38 that would be hardcore 21:01:00 ehird, you know how many variants of the stat() system call linux have had? 21:01:07 it would be, however, a couple things - i think some of the supported arches may be moribund, in the sense that they were last actively used circa 1999 and need to be saved from bitrot 21:01:09 *has 21:01:10 *HAS 21:01:16 PLURALISATION! LEARN ITTTTTTTT 21:01:27 ehird, "had" because it was past tense 21:01:34 *has had 21:01:34 duh 21:01:37 well ok 21:01:38 have is plural. 21:01:41 linux: singular. 21:01:43 Linux has had things. 21:01:55 -!- bsmntbombdood has quit (Network is unreachable). 21:01:58 Anyway, yes, it's not handled perfectly, but it still works in practice, and all my other notes still apply. 21:02:03 and secondly, i get the sense that apart from the HARE/blue gene project and los alamos and related, and coraid, and the lsub, and a few crazed hobbyists like me, there arent that many medium to large scale grids out there really 21:02:14 It's more a criticism of Linux, but at least it works in practice. 21:02:15 ehird, anyway around 6 or so I think 21:02:35 -!- bsmntbombdood has joined. 21:02:48 mycroftiv: how many archs does plan9 support? every one has a *c right? 21:03:03 so 10 archs 21:03:15 10 machines isn't such a big investment, esp as things like ARM only come in little, cheap form 21:03:25 And system call users are portable; <-- you have to make sure to not use ones added recently, if you want backward compatibility 21:03:29 sparc, though, that'd be an investment 21:03:41 AnMaster: The relevant issue is forwards compatibility. 21:03:49 im sure the biggest investment is in the time required to get something like 68000 up and running from whatever remains of the code for it 21:04:25 mycroftiv: personally i think dropping spim, 68000, 68020 and alpha would be smart 21:04:33 perhaps even mips and arm 21:04:35 as a practical matter indeed 21:04:42 that'd leave amd64, 386, sparc, power 21:04:47 ehird, both apply somewhat if you need to support users on older systems too (like, in software that handles upgrading for example) 21:04:47 all of which are probably quite used 21:05:03 the amd64 code isnt publicly released yet much to a lot of people's annoyance 21:05:14 AnMaster: but you can't dynamically link to a function 21:05:16 then have it work in the past either 21:05:37 i was listing how the important issues of dynlinking don't apply to syscalls 21:05:49 and forward breakage is (no, the way glibc etc solve this by having old versions isn't really a solution) 21:05:53 anyway 21:05:54 ehird, I didn't say that. Was just saying backward compat also mattered with system calls 21:05:58 just ignore it ffs, i'm tired of talking about this one point 21:06:02 as well as forward compat 21:06:02 pretend i only made my other points 21:06:08 ehird, sure 21:06:08 ok 21:06:16 mycroftiv: it isn't? why not? 21:06:23 eh, drop amd64 then (is it new? i don't recall seeing it earlier) 21:06:34 that'd leave 386, sparc, power 21:06:42 i imagine sparc is "quite" popular 21:06:45 and power is probably used a bit 21:06:50 plan 9 development model isn't conventional open source (doesnt work like lkml) and they have an idea about releasing stuff when its 'ready' 21:07:09 wait, no amd64? argh 21:07:10 i do that too except i don't release binaries until it's ready either. 21:07:16 AnMaster: amd64 is supported; not open source. 21:07:17 so apparently amd64 still has some bugs or something 21:07:23 ehird, that's crazy 21:07:23 everyone uses 386, anyway. 21:07:39 AnMaster: then the fact that plan 9 was closed source until the 90s is sheer lunacy death-defying mayhem 21:07:41 ehird, I might be getting a system with 8 GB ram soon 21:07:43 just fyi 21:07:44 or, wait, no, it's called being closed source 21:07:49 AnMaster: why should I care? 21:07:55 AnMaster: anyway, plan 9 is used in clusters 21:08:08 ehird, sure, but nothing says each system has to be weak 21:08:09 Blue Gene/L looks at your 8 GiB of RAM and laughs. it laughs. 21:08:11 does it? 21:08:15 ehird, I'm aware 21:08:21 a cluster with each node having 8 GiB of RAM is called a folly. 21:08:29 ehird, what arch is blue gene? 21:08:39 custom iirc. 21:08:39 ehird, also road runner looks at blue gene and laughs :P 21:08:46 i think its basically power64 isnt it? 21:08:49 road runner has a shit architecture 21:08:53 ehird, sure. 21:08:59 it's not interesting at all it's just a bunch of computers lopped together 21:08:59 mixed arch 21:09:00 boring 21:09:03 blue gene is magic 21:09:06 good magic 21:09:06 actually the plan9 blue gene stuff just got released as a matter of fact 21:09:14 and sheevaplug too 21:09:18 furthermore 21:09:18 http://upload.wikimedia.org/wikipedia/commons/d/d3/IBM_Blue_Gene_P_supercomputer.jpg 21:09:19 ehird, road runner still beats it 21:09:21 is roadrunner this beautiful? 21:09:23 i don't think so 21:09:29 AnMaster: if your only metric is marginal amounts of computing power. 21:09:31 ehird, I think it is 21:09:41 dude, roadrunner is just a bunch of grills with computers in them 21:09:49 you just have a roadrunner fetish 21:10:10 ehird, http://en.wikipedia.org/wiki/File:Roadrunner_supercomputer_HiRes.jpg 21:10:20 i stand by what i said 21:10:24 ehird, so do I 21:10:35 roadrunner has an uninteresting architecture, building it is trivially easy (routers, computers and link cable? ok, just stick them up!), and it required no rea thought or innovation 21:11:00 all it has is slightly more computing power than the competition, and furthermore it's being used on military stuff which is lame 21:11:18 ehird, actually road runner uses Cell and Opetron iirc 21:11:32 did i contradict that 21:11:32 No. 21:11:34 Opteron* 21:11:37 (blue gene otoh is innovative, made real bounds in computing power compared to previous supercomputers and cleverly designed) 21:11:44 *and is 21:11:50 ehird, mixing two architectures doesn't sound trivial to me 21:11:59 It's not like their CPU boards are mixed together......... 21:12:18 You just compile each program for both architectures and they communicate with a common protocol. 21:12:25 No thought involved whatsoever, it's exactly what you do with any cluster. 21:13:44 ehird, so what is so great with blue gene exactly? 21:13:48 apart from that it can run plan9 21:13:54 wikipedia is that way 21:14:01 btw, not can; does 21:14:10 plan 9 is used on blue gene/L for actual use 21:14:21 ehird, are you saying it can't but still does‽ ... 21:14:28 21:14:49 I hereby direct you to http://xkcd.com/169/. 21:15:08 ehird, and I don't care shit about it 21:15:18 You continue to fail at grammar forever. 21:15:28 ehird, so does your mom 21:15:30 mycroftiv: quick, say something interesting before I off myself due to tedium. 21:15:36 also, give me a gun. 21:15:47 * ais523 wonders how much missing the point "meagry" would be 21:15:50 probably quite a lot 21:15:57 -!- augur has quit (Read error: 145 (Connection timed out)). 21:16:17 ais523, context? 21:16:24 AnMaster: ehird's link 21:16:28 it's the traditional answer to the riddle 21:16:45 I like how AnMaster knew he didn't "care shit about it" when he clearly didn't even click. 21:16:48 $ grep gry$ /usr/share/dict/words 21:16:50 angry 21:16:51 hungry 21:17:00 although, the dictionary here disagrees with the riddle in question 21:17:03 He has a black-box of link→doesCareShitAboutIt 21:17:06 (it's not perfect, though) 21:17:19 ais523, I get more words: 21:17:21 aggry 21:17:21 ahungry 21:17:21 angry 21:17:21 anhungry 21:17:22 hungry 21:17:24 unangry 21:17:28 huh 21:17:30 "unangry" 21:17:32 "ahungry"? 21:17:39 ehird: do you agree that the center of the 'average person' computing experience is shifting to mobile devices (phones blah blah) - if so, what are the implications for what systems designers such as yourself need to be doing? 21:17:53 mycroftiv: fuck all because people are idiots and i do research 21:17:53 ais523, complete webster 1934 edition 21:17:57 mycroftiv: next question :D 21:17:58 says /usr/share/dict/README 21:18:02 AnMaster: heh 21:18:06 ais523, selected because copyright has elapsed 21:18:16 double heh, even though I vaguely guessed that 21:18:25 the one here's a compilation of various open-source word lists 21:18:30 most of which seem remarkably unsystematic 21:19:05 ais523, oh? 21:19:33 AnMaster: I can't remember the details, nor can I be sufficiently bothered to look them up 21:19:43 ais523, anyway "aggry" seems to be a valid answer to the riddle 21:20:03 It's not a riddle, it's a joke/prank. 21:20:22 As a riddle it's an uninteresting literal interpretation; as a joke/prank it's infuriatingly idiotic. 21:20:22 according to Google, it's only used in the combination "aggry beads" 21:20:33 But the former is definitely derived from the latter; probably by idiots who can't even annoy correctly. 21:20:38 Google will back me up on this. 21:20:40 ehird: the original riddle isn't a trick question and has "meagry" as the actual answer 21:20:46 it isn't a particularly interesting one, though 21:20:51 IIRC the Straight Dope disagrees with you 21:20:56 and it is infallible, after all. 21:20:58 also, I love your "can't even annoy correctly" 21:21:27 It is a refined antitalent. 21:21:41 it reminds me of the modern decline in the quality of trolls 21:21:51 really good Usenet trolls I actually enjoy watching, it's a performance art 21:21:55 although you rarely see them nowadays 21:22:04 (an ideal troll leaves you wondering if they were a troll or not) 21:22:05 usenet trolls of the late 90s were indeed the all time highwater mark of trolling I must say 21:22:15 that late? 21:22:21 was that before or after the Eternal September? 21:22:25 id say so because the audience was large 21:22:29 1993 is early september. 21:22:33 late 90s is just flooding and spam. 21:22:39 wait, I mean before or during 21:22:44 no, because web boards hadnt taken over by then 21:22:47 during 21:22:49 DSL standard: ADSL2+ Mode 21:22:49 near-end bit rate: 18601 kbps 21:22:49 Wooo, that was some good service. I sent an email two hours ago to their support service, complaining that my modem's saying "DSL standard: Error" and speeds are <= 8Mbps; now it's magically fixed. (Now if they'd just bother also replying to that email... still, admittedly it's not exactly office hours right now -- ~2325 localtime.) 21:23:02 i read on encyclopedia dramatica about a totally epic-sounding usuenet war, lemme see if i can dig it up 21:23:09 fizzie, heh 21:23:17 from 95-98 usenet was where the 'entire damn internet' had its conversation 21:23:27 well, mailing lists also of course, although lots of overlap there 21:23:44 was after the arrival of 'the general public' and before web based discussion forums took over 21:23:49 ehird: encyclopedia dramatica's one of those sites I never knowingly click on links to 21:24:12 yeah, the deluge of ads and offensive language may hard-reboot your brain. 21:24:17 * ais523 vaguely wonders about blocking it at the /etc/hosts level, and wonders what's the actually correct way rather than just redirecting it to 127.0.0.1 like everyone else does 21:25:25 ED should be shut down by the president of the united states of USA, i hear they mocked lilo AFTER HE DIED 21:26:24 eh, can't find the article. 21:27:13 ais523, is there any other way? 21:27:44 well I redirect to 127.0.0.2 21:27:46 well,* 21:27:53 There are some IPs reserved as invalid, I believe. 21:27:57 because I sometimes run a development web server locally 21:28:01 ehird, good point 21:28:11 AnMaster: 127.0.0.2 should map to 127.0.0.1 21:28:18 -!- puzzlet has quit (Remote closed the connection). 21:28:20 in theory, the whole of 127.0.0.0/8 is loopback 21:28:21 IIRC 21:28:22 -!- puzzlet has joined. 21:28:38 ais523, well, that depends on what ips the web server is set up to listen to 21:28:41 128.0.0.0/16Reserved (IANA) 21:28:41 191.255.0.0/16Reserved (IANA) 21:28:41 192.0.0.0/24Reserved (IANA) 21:28:42 223.255.255.0/24Reserved (IANA) 21:28:42 240.0.0.0/4Reserved (former Class E network) 21:28:51 Not "invalid", but reserved and unlikely to be released nonetheless. 21:28:53 AnMaster: Wrong. 21:28:58 I'm not sure that the whole 127/8 *has* to be, but that's the usual. 21:28:58 127.0.0.0/8Loopback 21:28:58 ehird, sure? 21:29:04 Per RFC 3330. 21:29:30 ehird, well, I don't know but on my ubuntu laptop: 21:29:33 lo Link encap:Local Loopback 21:29:33 inet addr:127.0.0.1 Mask:255.0.0.0 21:29:33 inet6 addr: ::1/128 Scope:Host 21:29:39 anyway, "skugry" is a great word, I should use it more often, as in at all 21:29:44 well yes 21:29:45 So Ubuntu is breaking the IP standard. 21:29:46 indeed 21:29:46 * mycroftiv rings the Sacred Bell that announces the arrival of 'Per RFC #' 21:29:46 That's not news. 21:29:50 ehird, wrong 21:29:51 "This is ordinarily implemented using only 127.0.0.1/32 for loopback, but no addresses within this block should ever appear on any network anywhere [RFC1700, page 5]." 21:29:52 read it again 21:29:56 skugry: 16th-century spelling of the dialect word scuggery meaning 'secrecy' (the faint echo of 'skulduggery' is quite accidental!). 21:29:57 that mask should make it work 21:29:59 I think 21:30:07 Erm, are you sure? 21:30:26 ehird, no 21:30:27 ehird: Mask:255.0.0.0 21:30:29 I suck at networking 21:30:33 implies that loopback handles the whole range 21:30:34 but I suspect that is how it works 21:30:35 right should work 21:30:59 ehird, still you can bind to exactly one of the ips that is bound to a specific interface 21:31:08 ais523: That's not really true. It just means that's the network it's in. It's not like the "inet addr:10.102.76.2 Bcast:10.102.76.255 Mask:255.255.255.0" in my eth0 implies it should handle the whole network. 21:31:32 lets start an urban myth that somewhere is an ultra secret computer designated as the TRUE 127.0.0.1 and secretly it gets to eavesdrop on everyone's loopback 21:31:34 I thought it did 21:31:41 mycroftiv: no 21:31:43 as in, route to our gateway for that network if we get something in range 21:31:57 mycroftiv: that one is vaguely plausible for people who don't understand computing 21:32:18 mycroftiv, lets not 21:32:27 oh, btw, 850*77.1 is actually 100000, there's a conspiracy amongst mathematicians and calculators to make people think it's 65535 21:32:31 there need to be more urban myths of computing though 21:32:41 only Microsoft accidentally leaked the correct answer and were forced to hush it up by the CIA 21:33:06 i want an hp calculator 21:33:12 non-rpn is so efficient with calculator buttons 21:33:17 oh, btw, 850*77.1 is actually 100000, there's a conspiracy amongst mathematicians and calculators to make people think it's 65535 <-- I have yet to see a calculator that gave that answer 21:33:18 ais523: Well, "yes", in that sense that it gets routed to the lo device whenever it's in the network; "no" in the sense that the mask doesn't mean the device would normally accept any packets except the ones that actually have the destination address it has, namely, 127.0.0.1. 21:33:22 and have you used a modern calculator? 21:33:24 those buttons are useless! 21:33:33 mushy useless pieces of shit 21:33:36 barely ever register 21:33:40 fizzie: OK, I agree with you there 21:33:41 slam them and still make errors 21:33:47 what does loopback do to the ones that aren't aimed at 127.0.0.1? drop them? 21:33:52 * ais523 ping 127.0.0.2 21:33:57 http://upload.wikimedia.org/wikipedia/commons/9/95/HP48G.jpg ;; the 48g is prettier than the TI-83 to boot 21:34:04 mushy useless pieces of shit <-- what are you talking about 21:34:04 In fact the lo device magic makes them handled anyway. 21:34:06 although less capable for programming stuff 21:34:10 I'm getting replies, at least 21:34:10 AnMaster: read context. 21:34:19 probably from myself based on the ping times 21:34:19 I wonder if it'd be feasible to port rfk to the HP48G. 21:34:20 ehird, yes and it doesn't make sense to me 21:34:26 AnMaster: Why not? 21:34:37 It's a bit like the lo device is always in promiscuous mode, and... uh, something else so that the packets are even processed by the relevant stacks. 21:34:40 and http://127.0.0.2/ is /var/www/index.html 21:34:49 ehird, well, I used TI-84 and I didn't find it's keys "mushy" 21:34:54 ehird, my own is a TI-83+ 21:34:54 AnMaster: I said "modern". 21:35:04 ehird, TI-84 is modern, TI-83+ isn't 21:35:08 Especially the cheaper ones. 21:35:15 Of course if you pay a lot you get good buttons. 21:35:17 ehird, such as? 21:35:29 Anything from 0 to 30 dollars? 21:35:36 Maybe >30. 21:35:42 ehird, you mean non-graphing calc? 21:35:50 I said "calculator". 21:36:01 But I'm sure you can get a graphing calculator that cheap; it'll just be shitty, is all. 21:36:04 ehird, sorry, I haven't owned any sort by graphing calculator for *years* 21:36:11 so I didn't think of the other type at all 21:36:14 It doesn't take much to go from simple table calculation and display to graphs. 21:36:18 Debian's installer -- at least at one time -- adds into /etc/hosts "127.0.0.1 localhost" and "127.0.1.1 host.domain host", where "host.domain" are the values you provide during the installation; this is so that things don't get confused -- you still have 127.0.0.1 == localhost, and still get locally delivered packets if you use the computer name itself. 21:36:26 A bit higher-res screen, a slightly faster CPU, a little more RAM and some routines. 21:36:34 ehird, when someone says calculator, I first think of a TI-83+ 21:36:38 I'm not sure they do that nowadays, since it sort of breaks things if you change the hostname but don't remember that /etc/hosts entry. 21:36:39 just so used to it 21:36:51 ehird, also, TI-83+ is low res 21:36:54 not high res 21:37:00 by any definition 21:37:01 Read what I said. 21:37:03 I never claimed otherwise. 21:37:23 Cheaper calculators just show tables in smaller font; they normally manage one line of input and one of results. 21:37:28 Or maybe a bit more. 21:37:29 Whatever. 21:37:36 Haha, wow; the HP-48 series calculators have a hierarchical filesystem and a real-time clock. 21:37:52 ehird, well did you mean one of those that is just [-+*/%0-9] plus "remember number" and "recall number"? 21:37:53 basically 21:38:00 No. 21:38:07 ehird, there is a segment in between? 21:38:10 I never seen those 21:38:10 Yes. 21:38:33 tables you said? hm 21:38:37 That + sin/cos/etc + a few variables + display settings + simple table calculation (one variable, limited range). 21:38:46 ah 21:38:49 I have one that's the above but without table calculation lying around somewhere. 21:38:50 ehird, multi-line screen? 21:38:54 or single line? 21:38:56 One or two lines. 21:39:02 Yes; "function calculator" (literal translation) is the name for that segment in Finnish. 21:39:08 how can you make a table with 1-2 lines? 21:39:15 well two I guess 21:39:17 but 1? 21:39:18 They display the expression before evaluation, have history and recall, let you use the previous result as a variable and have one line for result. 21:39:20 AnMaster: Smaller font. 21:39:31 hm okay 21:40:07 Since you can't use graphical calculators in most of our high-school exams, those things were pretty popular in the sense that everyone had one at exam-time. I'm not sure how the rules go in other places. 21:40:08 ehird, and those have mushy buttons? 21:40:33 Yes, although less so than cheaper ones. 21:40:34 speaking of calculator's, i think something like knuth's tcalc for arithmetic with arbitrarily large integers should be available in all calculators and computing environments 21:40:35 Cheaper calculators let you spell 5319009 and turn it upside-down and you get a dirty word, eh-ee-hee. 21:40:41 oh god i apostrophed forgive me 21:40:42 mycroftiv: *calculators 21:40:47 fizzie, luckily graphing ones are fine at university. And at high school it was usually "no calculators, or school provided ones" at exams 21:40:49 Also, arbitrarily large integers are rarely useful. 21:41:09 64-bit covers most of all calculations you want to do, 128-bit most of the rest, and anything else should be done on a real computer. 21:41:31 ehird, I needed 10^94 once iirc on my calc. It goes to 10^99 btw 21:41:32 AnMaster: Oh, and you get enough electricity from a small solar cell to provide power for a device that simple, so you don't need to worry about stale batteries. 21:41:34 ehird: i disagree, dont you realize that the VAST MAJORITY of integers are very, very large? 21:41:45 mycroftiv: Nothing I said contradicts this. 21:41:51 Or do you not think calculator environments are intended for humans? 21:41:56 fizzie, oh? I don't need to on my TI-83+ either. Because it's batteries last for years 21:42:06 I think I replaced like 4 years ago now last time 21:42:13 and still working fine, has been used a lot 21:42:29 AnMaster: 2^64 is a little bit over 10^94. 21:42:35 *10^99 21:42:59 ehird, err what? 21:43:00 I find it very suspicious that a^b would be over c^d when both a Erm, wait. 21:43:10 Wow my brain is dumb today. 21:43:11 that math looks pretty shoddy to me 21:43:14 Need more than 5 hrs sleep in futture. 21:43:25 ehird, anyway calculators use floating point usually 21:43:29 True. 21:43:36 128-bits should be enough for a calculator, anyway. 21:43:41 For integers. 21:43:59 well yeah, but since they use floating point that doesn't matter 21:44:00 also 21:44:05 AnMaster: Oh, and the batteries won't last long if you use rechargeable NiMH cells; those things leak a lot even when not used. 21:44:25 fizzie, normal alkali ones 21:44:28 wow, I just got spam in Turkish 21:44:28 AAAA I think 21:44:59 Triple-A is the usual. Is there even quadruple-A? 21:45:00 that's new, for me 21:45:09 double-A is the usual, triples are rather smal 21:45:12 *small 21:45:23 perhaps designations differ between countries 21:45:36 well AAA then maybe 21:45:37 Oh, there *is* a quadruple-A; it's in the "less common" list. 21:45:42 "Obscure type sometimes used in 'pen flashlights' or electronic glucose meters. Most common use is as an internal component of PP3 ("9-volt") batteries." 21:45:43 sure, let me find it 21:46:03 mycroftiv: HOW DO YOU FEEL! about the kernel being a regular program with flags and the like 21:46:04 AAA 21:46:10 that is, no special kernel options, and it's in full object file format 21:46:18 what happens if you run it? 21:46:24 it's just /bin/kernel -b -x -f 258 -t 2 -r /foo 21:46:27 or whatever 21:46:27 And http://en.wikipedia.org/wiki/Scientific_calculator seems to be the term for the "mid-range" calculators. 21:46:35 i absolutely think that is the right way to go 21:46:39 (of course, running it while the system is booted wouldn't really work) 21:46:45 why not 21:46:45 fizzie: that's the standard for school exams in the UK 21:46:50 user mode linux exists 21:46:54 because basic calculators don't have things like sin and cos 21:46:56 mycroftiv: because it'd try and take control of the already-controlled hardware. 21:47:04 and there is an active project to get plan9 kernel able to run as a userspace program 21:47:10 mycroftiv: It means that the bootloader has to be a bit more clever, though. 21:47:15 It'll have to wade through the object file format a little bit. 21:47:15 sure i understand that you cant do it 'naively' 21:47:19 and programmable ones are both considered to make the exam too easy, and rather easy to hide information on 21:47:22 ehird, I believe my key ring uses A23 btw 21:47:30 mycroftiv: It can't link the ld library, because that'll depend on, well, the kernel's facilities. 21:47:31 but in plan9 already you can run /boot/boot in a running environment and the results are pretty wacky] 21:47:47 ais523: It's the sort-of standard for school exams in Finland, too, in the sense that everyone goes and buys one. I'm not sure what sort the school-provided "emergency calculators" are. 21:47:49 (it has a built in LED "torch") 21:47:53 ais523: it irritates me to no end that mathematics is equated with mental arithmetic in the pre-university segments of education 21:47:54 what are the technicalities of how user mode linux does things? ive never used it 21:48:03 mycroftiv: it's just a forked linux kernel, I think 21:48:14 mycroftiv: anyway, thoughts on the need tto look through the object file? 21:48:17 right but obviously it has to deal with the multiplexing access to hardware issue 21:48:22 ehird: IIRC, at GCSE there was a mental arithmetic test that was separate from the main maths tests 21:48:24 *to 21:48:25 ais523: it irritates me to no end that mathematics is equated with mental arithmetic in the pre-university segments of education <-- me too 21:48:32 my thought is that the bagel i just toasted is going to be delicious 21:48:36 It doesn't access hardware; the UML kernel has most of the drivers stripped off. 21:48:40 ais523: Still, disallowing calculators is far more commonplace than reasonable. 21:48:42 mycroftiv: it's just a forked linux kernel, I think <-- part of official kernel sources 21:48:44 not a fork 21:48:54 (if that is the sense you meant it in) 21:48:55 I think the non-calculator bits are to do with things like asking people what sin 30 is and wanting them to work it out from first principles rather than just putting it into their calculators 21:49:06 see /usr/src/linux/arch/um 21:49:07 iirc 21:49:09 but yes, they do it for an entire exam even when half of it would be irrelevant 21:49:17 ais523: I'd much prefer you to simply have to explain what sin is and how it's calculated rather than trivial menial work. 21:49:29 ehird: but then people might not get full marks 21:49:33 at least sin 30 is easily memorisable 21:49:36 ehird: IIRC, at GCSE there was a mental arithmetic test that was separate from the main maths tests <-- was using paper and pen allowed? 21:49:41 AnMaster: Um, duh. 21:49:42 AnMaster: not really 21:49:45 meh 21:49:49 ais523: really? 21:49:49 heh 21:49:50 I couldn't have managed then 21:49:53 you had to answer on a piece of paper that only had just enough space for the answers 21:49:55 none for working 21:50:06 it was, after all, a /mental/ arithmetic test 21:50:08 Anyway, as I was saying; but then schools have a culture of rote memorisation, copying and menial work. 21:50:11 ais523, I can't keep numbers in my head. paper and pen I can manage 21:50:14 also, you had about 5 seconds for each question 21:50:16 mental arithmetic is just useless 21:50:17 Ridiculous crap, the lot of it. 21:50:18 the questions were read out from tape 21:50:19 ais523, horrible 21:50:21 ais523: 5 seconds? 21:50:24 ais523, what was the point 21:50:29 I can't add two two-digit numbers in five seconds 21:50:29 AnMaster: to test mental arithmetic 21:50:36 well, okay 21:50:38 yes i can 21:50:41 exaggerated slightly there :P 21:51:03 ais523, and who had to take this test? 21:51:16 mental arithmetic is useless...until you are piloting a starfreighter that gets struck by an asteroid and you have to rapidly calculate an emergency trajectory to save your desperately needed cargo of medical supplies for the orphans on Zarbulus 4 21:51:18 AnMaster: it was part of the maths GCSE when I did it 21:51:25 ais523, GCSE = ? 21:51:41 Mental arithmetic is indeed totally useless. 21:51:41 AnMaster: major exam at about 15 years old 21:52:01 basically the lowest qualification that makes you eligible for any job that requires any thought at all, nowadays 21:52:06 mycroftiv, ah, that is why I have a backup computer in *my* starship ;P 21:52:34 mental arithmetic is useful when you have a reputation for being good at maths and all the other students in the school muddle maths and mental arithmetic 21:52:35 ais523, mhm, good think I didn't live in UK 21:52:55 AnMaster: the mark for the top grade is rumoured to be somewhere between 20 and 30 percent 21:53:50 AnMaster: Uhh, but the Swedish educational system is worse by far. 21:53:56 ais523, since I completely fail at mental arithmetics. I can manage with paper and pen and time. But I couldn't add any except trivial two digit numbers in my head in 5 seconds (I could manage stuff like: 50+50 or 20+2) 21:54:02 allegedly (according to a Murdoch-owned news source found via Google) 16% was enough for a C in maths in 2005, 47% for an A* 21:54:06 (23+19 I couldn't for example) 21:54:13 42 21:54:20 ais523, huh 21:54:20 Murdoch-owned sources: the most reliable kind! 21:54:24 Wait, no, the opposite. 21:54:35 Hey kids, let's learn our TIMES TABLES 21:54:38 ehird: it's ironic because of the big row between him and Google 21:54:40 ehird, sure it is. But it isn't doing such stupid tests 21:54:43 ONE TIMES TWO IS TWO 21:54:45 ehird: I had to sit through that for months in school! 21:54:46 TWO TIMES TWO IS FOUR 21:54:50 THREE TIMES TWO IS SIX 21:54:54 there was even a little tape that set times tables to music 21:54:54 FOUR TIMES TWO IS EIGHT 21:54:58 AAAAAAAAAAAAAAAARGH MAKE IT STOP KILL ME NOW 21:55:34 * AnMaster usually goes "lets see, which one is the closest one I remember, how much to substract/add from that" 21:55:47 yes I'm talking about the times table too :P 21:55:51 hmm... theory: part of the reason the pass marks are so low is due to competition between exam boards 21:56:08 ais523, what's an exam board? 21:56:18 AnMaster: an organisation responsible for setting and marking exams 21:56:30 ais523, isn't that some part of the gov? 21:56:35 schools get to choose which one to use for each individual exam, within reason 21:56:39 it is in Sweden at least 21:56:41 and it's not directly part of the government 21:57:08 here's an example news story: you can see 21:57:10 umm, wrong paste 21:57:18 here's an example news story: http://www.guardian.co.uk/education/2008/oct/24/science-grades-changed 21:57:36 basically, Ofqual are a government body that tell the exam boards what to do 21:57:46 "here's an example news story: you can see" 21:57:52 Couldn't I before? 21:58:03 And surely it's self-evident? 21:58:08 ais523, is there a "this article does not reflect a worldwide view" template on wikipedia *but for a single section*? 21:58:30 I'm unable to find one 21:58:40 it may be the same one with a param 21:58:48 ais523, huh. 21:58:55 ehird: for AnMaster, who doesn't live in the UK and for whom it therefore isn't obvious 21:59:10 [21:59] ehird: "here's an example news story: you can see" 21:59:10 [21:59] ehird: Couldn't I before? 21:59:10 [21:59] ehird: And surely it's self-evident? 21:59:13 You super fail 21:59:32 ais523, ah indeed it seems so 21:59:32 AnMaster: {{globalise-section}}, anyway 21:59:35 right 22:04:43 http://domino.research.ibm.com/comm/research_projects.nsf/pages/hare.index.html "Hare" = "Holistic Aggregate Resource Environment" and there is the plan9 "bunny" there too. 22:04:45 Reviving for a moment the calculator conversation fork, what I had for exam-time and other unsorted needs, was http://education.ti.com/educationportal/sites/US/productDetail/us_ti30x_iis.html 22:04:45 is it just me 22:05:02 or does that "hare" seem like a bacronym? 22:05:09 +spelling 22:05:15 AnMaster, you are practically of infinite genius. 22:05:19 "backronym" is the usual spelling, though 22:05:24 umm, why did I say "though" 22:05:24 ais523, yes I said +spelling 22:12:06 dfghjkl; 22:14:04 -!- MigoMipo has quit. 22:23:30 abcdeghj 22:23:31 hi 22:25:37 mycroftiv: can you summarise plan b for me? 22:26:03 is that like an upside-down plan 9? 22:26:17 no, it's an operating system implemented on top of plan 9 22:26:24 at least the 4th edition is 22:26:32 i gather that older ones were independent 22:26:41 or perhaps not, ,who knows 22:26:43 *not, who 22:31:44 -!- bsmntbombdood has quit (Read error: 110 (Connection timed out)). 22:32:42 -!- BeholdMyGlory has quit (Remote closed the connection). 22:32:56 -!- BeholdMyGlory has joined. 22:37:29 -!- pikhq has joined. 22:38:34 -!- adam_d has joined. 22:39:08 -!- kar8nga has quit (Remote closed the connection). 23:02:14 -!- BeholdMyGlory has quit (Remote closed the connection). 23:15:39 mycroftiv: how are syscalls done in p9? 23:18:16 -!- adam_d has quit ("Leaving"). 23:20:08 -!- Sgeo has joined. 23:21:38 mycroftiv: how are syscalls done in p9?mycroftiv: how are syscalls done in p9?mycroftiv: how are syscalls done in p9?mycroftiv: how are syscalls done in p9?mycroftiv: how are syscalls done in p9?mycroftiv: how are syscalls done in p9? 23:21:44 :P 23:22:44 * Sgeo loves laying down in bed with his computer 23:22:48 23:23:02 Yeah, uh, thanks for imparting that... information. 23:23:30 You know what I meant, non-pervertedly, right? 23:25:28 Yes... "non-pervertedly"... 23:25:40 -!- bsmntbombdood has joined. 23:28:08 -!- ais523 has quit (Remote closed the connection). 23:28:09 WHEEEEEEEEEEEEEEEEEEEEEEEEE 23:28:11 x 23:28:30 :-S 23:28:40 SimonRC: What. 23:29:36 why /WHE*/? 23:29:46 Why not? 23:30:08 "When libc is built, it generates a set of small assembly functions that move the system call number to a register and perform interrupt 0x40." 23:30:13 Boring and expected! 23:30:50 Would you rather have "clever"? 23:32:37 Lying in bed is fun, but there's no way I'm coding like this. Moving to the den 23:36:00 I tell untruths in bed aaaaaall the time. 23:36:29 What/ 23:36:39 BRB, disconnecting from wireless 23:37:00 Lie. 23:37:01 In bed. 23:37:06 -!- Sgeo_ has joined. 23:37:49 mycroftiv: how easy and cheap is it to assemble a box that can run plan 9 perfectly, with the least fuss in operation; using more modern components where possible (i.e. not a 486) as long as it doesn't cause problems? 23:38:00 roughly 23:38:05 (assume a combined cpu server/graphical console; i can extrapolate from that) 23:38:09 would be fun to have a native p9 23:39:50 -!- augur has joined. 23:43:24 the diagrams I have seen seem to be recommending things like seperate file servers 23:43:30 -!- Sgeo has quit (Read error: 60 (Operation timed out)). 23:44:25 SimonRC: yes 23:44:52 if i know what a "full box" is, though, then I can take a bit away from it and add a little bit to it to get each machine 23:45:22 Hey, my school has a den, too. 23:46:02 It contains wolves, making it obviously similar to Sgeo's. 23:47:59 uh, what? 23:48:34 -!- FireFly has quit ("Later"). 23:49:28 -!- augur has quit (Read error: 60 (Operation timed out)). 23:50:18 SimonRC: who was that to? 23:51:17 was wondering what Warrigal was writing, WRT "wolves" 23:52:06 Who knows :P 23:52:19 In this case, the wolves are all powerful computers. 23:52:34 Why they're called wolves, only Professor Wolffe knows for sure. 23:52:39 ah 23:53:27 How powerful, exactly? 23:56:52 I don't know. More powerful than your average desktop computer. Not necessarily more powerful than your average desktop computer five years from now. 23:57:34 How huge are they, what kind of casing are they in, how loud are they, and how many are there? The four heuristics of computing power! 23:58:43 also applicable to other areas of life 23:59:06 * SimonRC goes 23:59:52 Well, um... yeses. 23:59:53 *yes