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