--- Log opened Sun Nov 15 00:00:57 2009 |
--- Day changed Sun Nov 15 2009 |
00:00 | | You're now known as TheWatcher[T-2] |
00:08 | < SmithKurosaki> | That is totally true and we all know iit |
00:09 | | You're now known as TheWatcher[zZzZ] |
00:15 | < simon`> | I haven't wanted to make games for a long time. |
00:15 | < simon`> | my motivation was mainly that my hobby programming was getting one-sided |
01:08 | | Derakon[AFK] is now known as Derakon |
01:29 | | * Derakon bows. |
01:29 | <@Derakon> | Ahem. Wrong channel, though thank you for that heartwarming welcome nonetheless. |
01:42 | | AnnoDomini [farkoff@Nightstar-990b578a.adsl.tpnet.pl] has quit [[NS] Quit: Why is there a jalapeno in the Aegean Sea?] |
02:18 | | Derakon is now known as Derakon[showah] |
02:25 | | Vornicus-Latens is now known as Vornicus |
02:31 | | GeekSoldier [Rob@Nightstar-e86e3e0d.ip.cablemo.net] has joined #code |
02:57 | | Derakon[showah] is now known as Derakon |
03:15 | | Reiver [reaverta@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: I ATENT'T DEAD] |
03:25 | | gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [[NS] Quit: Z?] |
03:45 | | Attilla [The.Attilla@FBC920.480E8C.B52869.4211C4] has quit [Connection reset by peer] |
05:02 | | Syloqs-AFH [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Connection reset by peer] |
05:12 | | Reiver [reaverta@ServerAdministrator.Nightstar.Net] has joined #code |
05:32 | < Rhamphoryncus> | SmithKurosaki: am I weird? I want to make compilers and general architecture x_x |
05:36 | < SmithKurosaki> | I'm not sure |
05:38 | <@ToxicFrog> | Mmmm, compilers |
05:38 | <@ToxicFrog> | Delicious |
05:57 | < Reiver> | Question: I have a drive on a SATA-E cable. |
05:58 | < Reiver> | How the hell do I eject it so I can unplug the thing? Or does that demand a restart? |
06:09 | | Reiver [reaverta@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: I ATENT'T DEAD] |
06:24 | < Rhamphoryncus> | little late, but I think you just need to unmount the partitions |
06:34 | | * Vornicus looks at his calculator thing. This would be less horrific if he made it a class. |
06:37 | | * ToxicFrog flails |
06:37 | <@ToxicFrog> | I can see how this is going to end |
06:37 | <@ToxicFrog> | I'm going to have to implement my own language |
06:38 | <@Vornicus> | TF: what's going on? |
06:38 | <@ToxicFrog> | It will taste like Lua, but have the type system of Haskell and lexical conventions of Scheme |
06:38 | <@ToxicFrog> | And it will take me forever to implement, if my other projects are anything to go by ;.; |
06:38 | <@Vornicus> | Heh |
06:39 | < Rhamphoryncus> | ToxicFrog: .. why? |
06:39 | <@ToxicFrog> | Rhamphoryncus: because no matter what language I'm using, I always end up with...dissonance. |
06:39 | <@ToxicFrog> | This happens less in Lua than in most other languages, which is why it's my favorite language. |
06:40 | <@ToxicFrog> | But I still find myself trying to use idioms from other languages, or other language-classes, no matter what I'm using. |
06:40 | <@Derakon> | Write a meta-language that supports inline language switching tags. |
06:40 | <@ToxicFrog> | It's only a matter of time before I go to the madness place again and come out with a new language. |
06:41 | <@Derakon> | So you can switch from Lua to Python to C in the same source file~ |
06:41 | | * Rhamphoryncus notes that he's done some hefty mods to python, and thus is no position to argue against new languages >.> |
06:41 | <@Derakon> | (And it automatically "ports" all your scoped variables as you do) |
06:41 | <@ToxicFrog> | Rhamphoryncus: in practice I'd probably implement it on top of Scheme, or upgrade Metalua and use that. |
06:41 | < Rhamphoryncus> | Derakon: I've actually pondered how best to embed near-arbitrary languages in python.. |
06:41 | <@ToxicFrog> | ...hmm. |
06:42 | | * ToxicFrog makes a note: research use of Scheme macros to bend parser to my nefarious will |
06:42 | <@ToxicFrog> | (I actually find Metalua upshift/downshift operators easier on the eye, but Metalua seems to have stalled forever, and it's messy enough that I'd want to reimplement it from scratch rather than take it on as is) |
06:45 | < Rhamphoryncus> | you mean leftshift/rightshift? |
06:45 | <@ToxicFrog> | No. |
06:45 | <@ToxicFrog> | upshift and downshift apply to code regions. |
06:45 | <@ToxicFrog> | upshift turns it into a piece of data you can manipulate at runtime - an AST. |
06:45 | < Rhamphoryncus> | google cannot find it |
06:46 | <@ToxicFrog> | downshift causes it to execute at compile time and be replaced with its return/evaluation value. |
06:46 | <@ToxicFrog> | (which is typically an upshifted code fragment) |
06:46 | <@ToxicFrog> | They're metalua-specific, and I don't recall if that's what it actually calls them |
06:46 | <@ToxicFrog> | They represent as +{ }+ and -{ }- if that helps. |
06:47 | | crem [moo@Nightstar-8ca3eea7.adsl.mgts.by] has quit [Ping timeout: 121 seconds] |
06:49 | < Rhamphoryncus> | Haven't found it, but interesting nonetheless |
06:50 | <@ToxicFrog> | They're functionally equivalent to the code-quoting facilities in Lisp dialects. |
06:50 | < Rhamphoryncus> | +{...} and -{...} |
06:50 | < Rhamphoryncus> | metalevel shifters |
06:53 | < Rhamphoryncus> | hrm. If you're going to modify the syntax I think using a `myoper` b is really missing the boat. You might as well have a statement at the top like "lang mylang" that adds myoper directly to the parser for the rest of the file |
06:54 | < Rhamphoryncus> | That'd let you do unicode operators.. and something like numpy would benefit greatly |
06:55 | <@ToxicFrog> | Yeah, I'm not that fond of `infix` |
06:56 | < Rhamphoryncus> | Something like a ?+ b as your vector add |
06:56 | < Rhamphoryncus> | or a ? b |
06:57 | <@ToxicFrog> | Well, what I really want is the infrastructure to reshape the lexer and parser in pretty much arbitrary ways at runtime |
06:57 | <@ToxicFrog> | Once I have that, adding operators like that is eassy |
06:58 | < Rhamphoryncus> | For totally different languages though my thoughts are something like this: |
06:59 | < Rhamphoryncus> | embed sql as result: |
06:59 | < Rhamphoryncus> | select blah from whatever |
07:00 | | Derakon is now known as Derakon[AFK] |
07:02 | < Rhamphoryncus> | sql would be a function that's called with the multiline string ("select blah from whatever\n") and the local scope (so it can read but not modify local variables). The first time it's called it'd compile the string, then typically (but not inherently) cache it in that function somewhere. Then it'd run what it compiled and save the result in result |
07:02 | < Rhamphoryncus> | The idea is you want to bridge the two languages, but with a clear boundary between them |
07:02 | <@ToxicFrog> | How goes local scope imply read but not modify? |
07:03 | <@ToxicFrog> | Also, personal experience suggests that cacheing is something you need to be able to disable~ |
07:03 | | crem [moo@Nightstar-8ca3eea7.adsl.mgts.by] has joined #code |
07:03 | <@ToxicFrog> | ("Hey, my test suite that dynamically generates code is causing [your compiler] to use hundreds of megabytes of memory") |
07:04 | < Rhamphoryncus> | For performance you want to minimize what sort of manipulations they do. Also, for general sanity you don't want them implicitly creating variables in the outer scope |
07:04 | <@ToxicFrog> | What's the Python __name__ for "return a string representing code that, when executed, will construct a copy of this object"? |
07:05 | < Rhamphoryncus> | Although come to think of it, python now has a nonlocal statement. It can't create variables, but it can replace ones that already exist |
07:05 | <@ToxicFrog> | Rhamphoryncus: yes, I understand that; it's just that to me "in local scope" implies both read and write. |
07:05 | <@Vornicus> | There is no function with that as the actual /contract/ |
07:05 | <@ToxicFrog> | Vornicus: the convention, then? |
07:05 | <@Vornicus> | however __repr__ should try if possible. |
07:05 | <@ToxicFrog> | Thank you. |
07:06 | <@Vornicus> | (a great many kinds of object you just plain can't do that with.) |
07:06 | < Rhamphoryncus> | The cache is supposed to be attached to the containing scope, and only apply when actually using the embed statement (which implies the code is a literal). If you use the underlying API directly you'd have to provide your own caching hook, or just turn it off |
07:06 | <@ToxicFrog> | (I know, I'm wondering what I should call it in this code) |
07:07 | <@ToxicFrog> | (which isn't actually python) |
07:07 | < Rhamphoryncus> | ToxicFrog: it's supposed to be a nested scope, which therefor has limited access to the containing scope |
07:07 | <@ToxicFrog> | Rhamphoryncus: see, to me, the former doesn't imply the latter at all; nested scopes can both read and write upvalues. |
07:07 | <@ToxicFrog> | ...or, well |
07:08 | <@ToxicFrog> | It implies "limited" in the sense of "new locals go in the innermost scope" |
07:08 | <@ToxicFrog> | But not in the sense of "outer scopes are read only" |
07:08 | < Rhamphoryncus> | Right |
07:08 | < Rhamphoryncus> | As I said, python changed on me. Last time I thought about this it didn't have the nonlocal statemen |
07:09 | < Rhamphoryncus> | The default for assignments is to create a new local variable. There was the global statement, but that put you all the way out. There was no half way |
07:10 | < Rhamphoryncus> | What I'm really opposed to is creating new variables in the containing scope. That forces you to use a dict to contain them, rather than offsets into an array |
07:13 | < Rhamphoryncus> | And you should always be able to see where a variable came from |
07:14 | <@ToxicFrog> | Aah. |
07:14 | <@ToxicFrog> | What I'm used to is: assignment assigns to the innermost existing variable with that name (which is the global with that name, if there are no locals upscope of you); the local keyword declares a new local in current scope. |
07:15 | < Rhamphoryncus> | isn't that the same way as javascript? >.> |
07:15 | <@ToxicFrog> | Probably. |
07:15 | < Rhamphoryncus> | yeah, not gonna earn any positive comments from me ;) |
07:15 | < Rhamphoryncus> | Too fragile |
07:16 | < Rhamphoryncus> | Good chance of accidentally using globals when you wanted locals |
07:16 | < Rhamphoryncus> | And in my experience locals are by far the most common |
07:18 | | * Vornicus always prefers locals. |
07:19 | <@ToxicFrog> | require "strict-scoping" -- now undeclared local accesses are an error |
07:19 | <@ToxicFrog> | Er, undeclared global accesses. |
07:20 | <@ToxicFrog> | That said, while I disagree that it's too fragile, I do agree that it might be nice to have to declare scope in all cases. |
07:20 | <@ToxicFrog> | (requiring globals and not locals runs into some issues) |
07:21 | < Rhamphoryncus> | like what? |
07:21 | <@ToxicFrog> | a = 1; -- implicitly local |
07:21 | <@ToxicFrog> | do a = 2 end; -- did I want to update the upvalue 'a', or create a new local 'a' ? |
07:22 | < Rhamphoryncus> | Python rarely creates new scopes, so it'd be the same one |
07:23 | <@Vornicus> | do a = 2 end;? I'm not sure what you're doing there. |
07:26 | <@ToxicFrog> | Vornicus: explicitly creating a new scope, performing an assignment, and closing the scope. |
07:26 | <@ToxicFrog> | In a real program the new scope would probably be a local function or flow-control block. |
07:26 | < Rhamphoryncus> | Nested functions are new scopes in Python, but flow-control blocks aren't |
07:26 | < Rhamphoryncus> | thus, you can do this: |
07:26 | <@ToxicFrog> | But in those cases where need to create a new scope without implying other behaviour, "do...end" is analogous to C's {} |
07:26 | < Rhamphoryncus> | if blalblahblah: |
07:27 | <@ToxicFrog> | I don't know what the python equivalent is, if any. |
07:27 | < Rhamphoryncus> | a = 42 |
07:27 | < Rhamphoryncus> | else: |
07:27 | < Rhamphoryncus> | a = 7 |
07:27 | <@ToxicFrog> | Rhamphoryncus: yeah, see, I like lexical block-granular scope. |
07:27 | < Rhamphoryncus> | why? What benefits does it have? |
07:27 | <@ToxicFrog> | And consider the inability to create variables local to a block rather than a function to be a problem. |
07:27 | <@Vornicus> | I don't think it works in non-manifestly-typed languages. |
07:27 | <@ToxicFrog> | Loop locals, for a start. |
07:27 | <@ToxicFrog> | "maifestly-typed"? |
07:28 | <@Vornicus> | C is manifestly typed; you have to declare a type for a variable before you can use it at all. |
07:28 | < Rhamphoryncus> | Python lets them survive past the loop. Not a real problem. Kinda useful if you want to do "for obj in container: if obj matches criteria: break; use obj" |
07:28 | <@ToxicFrog> | How does this differ from "statically typed"? |
07:28 | <@ToxicFrog> | "statically typed without type inference"? |
07:29 | <@ToxicFrog> | Rhamphoryncus: AFAICT, this isn't "python lets them survive past the loop", it's "python requires them to survive past the loop" |
07:29 | <@Vornicus> | Essentially, yes |
07:29 | <@ToxicFrog> | Lua is dynamically typed with lexical block scope :) |
07:29 | <@ToxicFrog> | (Javascript, like Python, uses function scope) |
07:30 | < Rhamphoryncus> | ToxicFrog: yeah, but we rarely care |
07:30 | <@Vornicus> | I have never once actually used block scope. |
07:31 | <@ToxicFrog> | I use them all the time. |
07:32 | < Rhamphoryncus> | Got an example? |
07:32 | < Rhamphoryncus> | The only difference I can think of is object lifetime. You may keep large objects alive longer than you wanted |
07:32 | <@Vornicus> | But then any time I end up with a function that I cannot take in all at once even at 18 point, I get the jibblies |
07:33 | <@ToxicFrog> | Rhamphoryncus: http://lua.pastey.net/128655 - although this isn't actually a good example, because the semantics of the program don't change if I lose block scope (it just happens to be what I'm working on at the moment) |
07:33 | < Rhamphoryncus> | Vornicus: I've got a 54 line function that computes scopes of python variables.. and I need to add some special cases to it x_x |
07:34 | < Rhamphoryncus> | ToxicFrog: that's exactly why I want an example, so I can see if there is a case where it matters |
07:34 | <@ToxicFrog> | I just find leaving those variables around once I no longer need them to be...untidy |
07:34 | <@ToxicFrog> | Yeah. |
07:34 | < Rhamphoryncus> | Yeah, that I'll concede |
07:35 | | * ToxicFrog ponders. Clearly what I need to do is write a program to analyze my code and find out where the use of block scope affects program behaviour. |
07:35 | <@ToxicFrog> | That's more interesting than searching it by hand. |
07:36 | < Rhamphoryncus> | Could have some optimization rules, but java has those and Bad Stuff(TM) results |
07:37 | < Rhamphoryncus> | Stuff like.. "a = obj(); w = weakref(a); process(w) #Hey, why is the weakref already cleared?!" |
07:37 | <@ToxicFrog> | Hah! LP store contents generation is working. |
07:37 | <@ToxicFrog> | Now I just need to add the item-pricing code. |
07:38 | < Rhamphoryncus> | The insanity of that outweighs the conceptual cleanliness of early deletion |
07:42 | < Rhamphoryncus> | And consider: you could explicitly delete every object at the end of its intended usage. It'd be a bit worse than declaring them (as some are implicitly declared), but accomplish the same thing. Would you do it though? |
07:43 | | mode/#code [-r] by ChanServ |
07:43 | < Rhamphoryncus> | ie like this: http://lua.pastey.net/128656 |
07:44 | <@Vornicus> | uh... |
07:45 | <@ToxicFrog> | ...the whole point of having block scope is that I don't have to do that |
07:46 | < Rhamphoryncus> | But you pay for it by having to declare half the time (in that example) |
07:46 | < Rhamphoryncus> | And if the limited lifetimes is worth so much then what's a little more? |
07:49 | | * Rhamphoryncus worries his argument is not quite logical.. block scoping is easier to read, more predictable than explicitly deleting |
07:58 | <@ToxicFrog> | Part of it, I think, is that regardless of how often it comes up, the option is there |
07:58 | <@ToxicFrog> | That is to say, you can do function scope in terms of block scope, but the converse is not true. |
07:59 | <@ToxicFrog> | (unless you make every block a local function) |
08:00 | <@ToxicFrog> | From a compiler-design perspective, block scope lets you reuse more registers/stack slots. |
08:01 | < Rhamphoryncus> | I disagree. You can delete explicitly to get the same effect, just as with block scope you can explicitly use outer scopes |
08:01 | < Rhamphoryncus> | How would you translate "if foo: a = 42; else: a = 7"? |
08:03 | < Rhamphoryncus> | and I really hate "more powerful" arguments. They basically advocate perl... which is reductio ad absurdum ;) |
08:03 | <@ToxicFrog> | But then it's not function scope, it's function scope + explicit deletion |
08:03 | <@ToxicFrog> | (and it also requires explicit deletion to delete the variable, not just free its value) |
08:04 | < Rhamphoryncus> | I don't care what you name it, it's the same effect |
08:04 | < Rhamphoryncus> | What's the difference? |
08:04 | <@ToxicFrog> | function scope is "variables are in scope throughout the entire function, regardless of where in the function they are declared" |
08:04 | <@ToxicFrog> | What you are describing is "variables are in scope for however long I please, because I control scope on a per-variable basis" |
08:05 | <@ToxicFrog> | At which point it isn't really "function scope" anymore, even if function scope equivalent behaviour is the default. |
08:05 | < Rhamphoryncus> | I mean between deleting a variable and freeing a value. I don't think those line up with python |
08:05 | <@ToxicFrog> | Oh. |
08:06 | < Rhamphoryncus> | That's because you're using an explicit mechanism to delete at the end of each block. It's not block scope. It's *more powerful* than block scope ;) |
08:06 | <@ToxicFrog> | Yes. It is. |
08:06 | <@ToxicFrog> | The point I'm making is that you can't say "function scope with explicit deletion" is still function scope. |
08:06 | <@ToxicFrog> | re delete: depends on the language, I suspect. In, say, Java it would be the difference between "value is null" and "undeclared variable". |
08:07 | <@ToxicFrog> | In Lua it's more subtle (since undeclared isn't an error, it's just nil); it comes down to what scope(s) it searches. |
08:07 | <@ToxicFrog> | (and how the compiler/VM allocates registers and stack slots) |
08:07 | < Rhamphoryncus> | python has None, which is a specific value, or a variable may be unset |
08:07 | <@ToxicFrog> | In Python, I have no idea. |
08:07 | < Rhamphoryncus> | You get an exception for reading an unset variable |
08:09 | < Rhamphoryncus> | You're arguing that function scope+explicit deletion is bad because it's not simply function scope and it's not block scope.. but that's not arguing any features of it |
08:09 | <@ToxicFrog> | I'm not arguing that it's bad. |
08:10 | <@ToxicFrog> | I'm saying that your argument "function scope is just as powerful, because you can add explicit deletion to get the same effect" is flawed, because at that point it's not function scope anymore. |
08:11 | < Rhamphoryncus> | Being able to delete when necessary is a key feature of function scope, at least in python |
08:12 | < Rhamphoryncus> | it's not a straightjacket |
08:13 | <@ToxicFrog> | Then - as you pointed out! - it's not function scope, it's something more powerful than either function or block scope. |
08:13 | < Rhamphoryncus> | Then what do you call what python has? |
08:14 | <@ToxicFrog> | I don't know, because I didn't know it had explicit deletion. |
08:14 | <@ToxicFrog> | Although, just to make sure we're talking about the same thing |
08:14 | <@ToxicFrog> | Python's 'explicit deletion' deletes the variable, not just the value? That is to say, after deleting something, the variable is no longer in scope? |
08:15 | < Namegduf> | ToxicFrog: Yes. |
08:15 | < Rhamphoryncus> | It unsets that variable name. The object it formerly referenced may still live on if still reachable. It does not reset the scoping for that name, so if you already declared it global any further assignment in this scope will also treat it as global |
08:16 | <@ToxicFrog> | ...so the variable still behaves as if declared? It's functionally equivalent to 'foo = None' or similar? |
08:16 | <@ToxicFrog> | If not, what did you mean by "it does not reset scoping for that name"? |
08:17 | < Rhamphoryncus> | right |
08:17 | < Rhamphoryncus> | err no |
08:17 | < Rhamphoryncus> | It's unset. Keep in mind that accessing an unset variable gets you an exception in python. It does not implicitly give you nil |
08:22 | <@ToxicFrog> | Ok. What's the distinction between a variable that's unset, and a variable that's out of scope? |
08:22 | <@ToxicFrog> | If any? |
08:23 | <@ToxicFrog> | The idea is, in (say) C, the following code: |
08:23 | <@ToxicFrog> | { int foo = 1; delete_var(foo); foo = 2; } |
08:23 | < Rhamphoryncus> | None really. Both a NameError. Might get a different error message though, to help diagnose it |
08:23 | <@ToxicFrog> | Is a compile error ("foo" undeclared in this scope) because after delete_var foo isn't just unset, it doesn't exist. |
08:24 | <@ToxicFrog> | If "being unset" is how python defines "doesn't exist", then this is in fact what I'm thinking of. |
08:24 | < Rhamphoryncus> | It's actually possible to inject globals at runtime, through various means. Used to be possible for locals (still is really, just a little more obscure) |
08:27 | < Rhamphoryncus> | So there's no way to give a compile time error |
08:29 | <@ToxicFrog> | Right. I was illustrating what I meant by the difference between free-value and delete-variable. |
08:29 | < Rhamphoryncus> | So there's really three options |
08:30 | <@ToxicFrog> | Given this, I stand by my statement that Python doesn't have function scope; it has something that, if you don't touch it, behaves like function scope by default but is in practice more powerful. |
08:30 | < Rhamphoryncus> | Python has unset or you can assign None. It doesn't support completely removing the variable |
08:30 | < Rhamphoryncus> | perhaps :) |
08:31 | | * Rhamphoryncus starts singing "I'm too sexy for your scope" |
08:31 | <@ToxicFrog> | Well, after delete, the behaviour of the program is equivalent (from the programmer's perspective) to not having declared the variable, no? |
08:31 | < Rhamphoryncus> | In languages other than python? |
08:32 | <@ToxicFrog> | In python. |
08:32 | <@ToxicFrog> | Since that's what we're discussing. |
08:33 | < Rhamphoryncus> | no, python's "del" statement makes it unset. It doesn't remove the variable entirely |
08:33 | < Rhamphoryncus> | In fact, variable scope is determined at compile time. If you do "print a; a = 7" the entire scope treats a as a local variable |
08:34 | <@ToxicFrog> | ...ok, what are the semantic differences between "unset" and "undeclared"? |
08:34 | < Namegduf> | None, I think. |
08:34 | < Namegduf> | Oh, wait, hmm. |
08:35 | < Rhamphoryncus> | None really, because there's a default scope depending on whether you just read from it or if you assign to it too |
08:36 | < Rhamphoryncus> | A global statement makes it global. A nonlocal statement searches containing scopes for a local. An assignment makes it local. A read makes it nonlocal or global, depending on what it finds. All in that order |
08:37 | <@ToxicFrog> | ...one moment |
08:37 | <@ToxicFrog> | "an assignment makes it local" |
08:37 | <@ToxicFrog> | How do you alter upvalues, then? |
08:37 | <@ToxicFrog> | Or is this only if it wasn't previously declared nonlocal? |
08:37 | < Rhamphoryncus> | right |
08:37 | <@ToxicFrog> | Ok |
08:38 | < Rhamphoryncus> | Which as I mentioned is a new addition to python. Previously you could modify the object (ie append to a list), but couldn't rebind the name (aka reassign it) |
08:41 | <@ToxicFrog> | Ok. |
08:41 | <@ToxicFrog> | Given this I don't know what the hell to call it @.@ |
08:43 | < Rhamphoryncus> | I don't think anybody bothered to name the collective thing. Rather, an individual variable either local (function) scope or global scope or whatever |
08:45 | < Rhamphoryncus> | Same as other languages really |
08:46 | < Rhamphoryncus> | If C can't find a local declaration it looks for a global declaration. If it can't find that either it's an error |
08:47 | <@Vornicus> | Python has nested scope; it will look in higher functions. However, until the "nonlocal" keyword came along, you could call methods on non-local but non-global variables but you couldn't write to them directly. |
08:48 | < Rhamphoryncus> | Right. You could read the names but not write the names |
08:49 | | Vornicus is now known as Vornicus-Latens |
09:33 | | AnnoDomini [farkoff@Nightstar-990b578a.adsl.tpnet.pl] has joined #code |
10:12 | | Rhamphoryncus [rhamph@Nightstar-a62bd960.abhsia.telus.net] has quit [Client exited] |
10:25 | | You're now known as TheWatcher |
10:57 | <@jerith> | So. This Wave text formatting thing is /bloody/ irritating. |
10:57 | <@jerith> | I want to write a little markup language for it. |
10:57 | <@jerith> | I'm thinking along the lines of bbcode. |
10:59 | <@jerith> | Anyone have any better ideas? |
11:09 | <@TheWatcher> | Use Google Telepath to read what you want the formatting to be from your mind?~ |
11:19 | <@jerith> | I'm trying to work around Google here. :-( |
11:23 | | crem [moo@Nightstar-8ca3eea7.adsl.mgts.by] has quit [Client closed the connection] |
11:29 | | crem [moo@Nightstar-8ca3eea7.adsl.mgts.by] has joined #code |
12:53 | | Attilla [The.Attilla@FBC920.480E8C.B52869.4211C4] has joined #code |
12:57 | | GeekSoldier [Rob@Nightstar-e86e3e0d.ip.cablemo.net] has quit [Connection reset by peer] |
13:26 | | You're now known as TheWatcher[afk] |
13:29 | | GeekSoldier [Rob@Nightstar-e86e3e0d.ip.cablemo.net] has joined #code |
14:36 | | AnnoDomini [farkoff@Nightstar-990b578a.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
14:41 | | AnnoDomini [farkoff@Nightstar-5c86a2c8.adsl.tpnet.pl] has joined #code |
14:43 | < AnnoDomini> | Damn it. |
14:43 | | * AnnoDomini struggles with forward substitution. |
14:43 | | crem [moo@Nightstar-8ca3eea7.adsl.mgts.by] has quit [Ping timeout: 121 seconds] |
14:44 | < AnnoDomini> | Mathcad uses 0-indexing, while every algorithm I've found so far uses 1-indexing, and I suspect that it might be that I convert it wrongly that they don't work. |
14:48 | < AnnoDomini> | Theeeeere we go. |
14:48 | < AnnoDomini> | Finally something that works correctish. |
14:48 | | crem [moo@Nightstar-8ca3eea7.adsl.mgts.by] has joined #code |
15:33 | | gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code |
16:04 | <@ToxicFrog> | jerith: troff! |
16:05 | < SmithKurosaki> | TF: Troff? |
16:07 | <@ToxicFrog> | A text formatting/typesetting system and format. |
16:07 | <@ToxicFrog> | It's what man pages use, among other things. |
16:07 | < SmithKurosaki> | o.0 |
16:07 | < SmithKurosaki> | That sounds like a good chouce |
16:07 | | Syloqs_AFH [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code |
16:08 | < dmlandrum> | Back when man pages were real man pages. |
16:08 | | Syloqs_AFH is now known as Syloqs-AFH |
16:12 | <@jerith> | Except my output format looks like this: |
16:12 | <@jerith> | doc.InsertText(startpos, text) |
16:12 | <@jerith> | doc.SetAnnotation(Range(p1, p2), 'style/textWeight', 'bold') |
16:13 | <@jerith> | doc.SetAnnotation(Range(p1, p2), 'style/textStyle', 'italic') |
16:13 | <@jerith> | etc. |
16:14 | < SmithKurosaki> | Whip up a conversion bot/ |
16:15 | <@jerith> | All I want is a simple way to specify text with formatting in the code that figures out the output so that it doesn't have to build unwieldy lists of range annotations. |
16:16 | <@jerith> | And I have no idea what a suitable input markup is. |
16:17 | <@jerith> | Or even if I want markup. |
16:17 | <@jerith> | Maybe I actually need a FormattedString object that I can append stuff to with its formatting. |
16:18 | <@jerith> | But that doesn't really help me a huge amount. |
16:27 | <@ToxicFrog> | Hmm |
16:28 | <@ToxicFrog> | Well, the markup I've been using in my LP generator is: .foo{text}, which has the advantage of being really easy to find with gsub |
16:29 | <@ToxicFrog> | And then I layer some macros on top of that. |
16:29 | < SmithKurosaki> | Yea, it be really shiny |
16:29 | <@ToxicFrog> | The output is either HTML or bbcode but it wouldn't be hard to adjust, i think |
16:30 | <@jerith> | I have a parser in there already for the dice strings. |
16:46 | < simon`> | hrm |
16:48 | < simon`> | my book says that the problem of deciding whether a CFG is ambiguous is undecidable. next I have to construct a bunch of unambiguous CFGs. I'm not sure what strategy is expected. =) |
16:48 | < simon`> | besides trial and error. |
16:52 | | Rhamphoryncus [rhamph@Nightstar-a62bd960.abhsia.telus.net] has joined #code |
17:05 | | Derakon[AFK] is now known as Derakon |
18:15 | | You're now known as TheWatcher |
20:04 | < gnolam> | http://www.phdcomics.com/comics/archive.php?comicid=1219 <- so true. So very very true. |
20:08 | <@jerith> | Story of my life. |
20:25 | < Pinkhair> | likewise |
20:26 | < Pinkhair> | though mine is slightly later |
20:26 | | Derakon is now known as Derakon[AFK] |
21:17 | | crem [moo@Nightstar-8ca3eea7.adsl.mgts.by] has quit [Ping timeout: 121 seconds] |
21:22 | | crem [moo@Nightstar-8ca3eea7.adsl.mgts.by] has joined #code |
21:49 | | Alek [omegaboot@Nightstar-57e80a71.emhril.sbcglobal.net] has quit [Ping timeout: 121 seconds] |
21:54 | | Alek [omegaboot@Nightstar-5fc52a4b.emhril.sbcglobal.net] has joined #code |
22:54 | | Syloqs-AFH [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Connection reset by peer] |
23:01 | | AnnoDomini [farkoff@Nightstar-5c86a2c8.adsl.tpnet.pl] has quit [[NS] Quit: Some people have evil spirits. You, you have stupid spirits. Go see shaman. Get hole in head. Big hole. Very big. Huge!] |
23:03 | | Syloqs_AFH [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code |
23:04 | | Syloqs_AFH is now known as Syloqs-AFH |
23:05 | | Rhamphoryncus [rhamph@Nightstar-a62bd960.abhsia.telus.net] has quit [Client exited] |
23:47 | | Syloqs-AFH [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds] |
23:49 | | Namegduf [namegduf@Nightstar-7ec84b32.bath.ac.uk] has quit [Connection reset by peer] |
23:49 | | Syloqs_AFH [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code |
23:50 | | You're now known as TheWatcher[T-2] |
23:50 | | Syloqs_AFH is now known as Syloqs-AFH |
23:52 | | Namegduf [namegduf@Nightstar-7ec84b32.bath.ac.uk] has joined #code |
23:54 | | Syloqs-AFH [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Connection reset by peer] |
23:55 | | You're now known as TheWatcher[zZzZ] |
--- Log closed Mon Nov 16 00:00:12 2009 |