Search lua-l
This index contains 143,604 documents and
1,774,497 keywords. Last update on
2023-03-08 .
- 61. Re: Embedding LUA/Multithread (score: 1)
- Author: "John Belmonte" <jvb@...>
- Date: Mon, 15 Jan 2001 18:56:29 +0900
- Hi, As Dolfi kept his example simple there isn't much state in the characters (firing and firing_counter in enemy). But in a real game there is a lot of state and complicated timing. Implementation a
- 62. fun with table constructors (score: 1)
- Author: "John Belmonte" <jvb@...>
- Date: Tue, 30 Jan 2001 18:54:02 +0900
- In Lua the f{...}syntax (syntactic sugar for f({...})) is useful for data description: SomeType { 1, 2, 3, } What if we want to allow the user to name this list data? One way is like this: SomeType {
- 63. Re: Son of Lua - Sol (score: 1)
- Author: "John Belmonte" <jvb@...>
- Date: Wed, 31 Jan 2001 12:16:38 +0900
- That's a lot of neat stuff, wish I had time to play with it... It's also a lot of code to maintain. Do you plan on tracking Lua releases? -John
- 64. 4.0 manual error, Character Class (score: 1)
- Author: "John Belmonte" <jvb@...>
- Date: Thu, 1 Feb 2001 12:37:30 +0900
- In the gsub library function description: x (where x is any magic characters ^$()%.[]*+-?) - represents the character x itself. should probably read: x (where x is not one of the magic characters ^$(
- 65. Re: Son of Lua - Sol (score: 1)
- Author: "John Belmonte" <jvb@...>
- Date: Thu, 1 Feb 2001 17:29:29 +0900
- Why do we have this restriction in Lua? Shouldn't "function var(...)" just be sugar for "var = function(...)"? -John - In a function definition the name may be an arbitrary sequence of names separate
- 66. workaround for nil is false & arg defaults (score: 1)
- Author: "John Belmonte" <jvb@...>
- Date: Thu, 1 Feb 2001 19:05:51 +0900
- It's not fun that nil and false are the same thing... it's been debated well enough on this list. Anyway here is a common problem along with a workaround. Let's say we want a function to have an opti
- 67. Re: Son of Lua - Sol (score: 1)
- Author: "John Belmonte" <jvb@...>
- Date: Fri, 2 Feb 2001 16:47:30 +0900
- I don't need the full sugar (the embedded function call), just one more teaspoon to cover a very common case: function mylib.MyClass:method() ... end Let's try the "accepted syntax": -- oops, you can
- 68. Re: Son of Lua - Sol (score: 1)
- Author: "John Belmonte" <jvb@...>
- Date: Sat, 3 Feb 2001 15:13:57 +0900
- Yeah I found this out myself and made a patch. I chose to only allow the ':' token before the last name because it's the only way that makes sense to me. I will post the patch to http://lua.swiki.net
- 69. Re: co-routines [was Re: Unicode] (score: 1)
- Author: "John Belmonte" <jvb@...>
- Date: Sat, 3 Feb 2001 15:27:55 +0900
- Self-modifying code seems scary to me (I think the last time I did it was on my Vic-20). However being able to generate code from within a program is quite useful. I'm using this now to generate Lua
- 70. Re: Re[2]: Using LUA for Configuration Files (score: 1)
- Author: "John Belmonte" <jvb@...>
- Date: Mon, 5 Feb 2001 13:59:23 +0900
- If you don't mind a little CPU churning, something like the following is nice and simple. Just prefix the value you want to retrieve with "return ": lua_dostring(L, "return character.startPositions.p
- 71. Re: .. garbage collection... (score: 1)
- Author: "John Belmonte" <jvb@...>
- Date: Tue, 6 Feb 2001 15:53:35 +0900
- I just got burned by this also, by having a small lua_dostring in a main loop that just accesses a variable or calls a function that uses no memory. In fact if you want to make your computer very unh
- 72. binary data as string snag (score: 1)
- Author: "John Belmonte" <jvb@...>
- Date: Tue, 6 Feb 2001 19:54:49 +0900
- Maybe this is obvious but... I started implementing Perl-style pack/unpack functions using Lua strings for binary data but ran into a snag. Using strings is fine if you're just looking to write data
- 73. Re: binary data as string snag (score: 1)
- Author: "John Belmonte" <jvb@...>
- Date: Wed, 7 Feb 2001 15:36:11 +0900
- Somehow this seems unfortunate. Lua is supposed to interface with C well. Yet it cannot load binary data for C without converting it to a userdata type which requires a memory copy. Then if you want
- 74. implicit parameters (score: 1)
- Author: "John Belmonte" <jvb@...>
- Date: Thu, 8 Feb 2001 18:56:58 +0900
- from Sol Diffs2Lua: - Removed the implicit self parameter in function definitions of the special form function foo:bar(...)...end. You have to name _all_ arguments. function foo:bar(a,b,c) --> functi
- 75. Re: semantics (score: 1)
- Author: "John Belmonte" <jvb@...>
- Date: Sat, 10 Feb 2001 14:38:25 +0900
- from this, you're Are you saying we shouldn't program with side effects? That is ironic for a language where variables default to the global scope. I think any language that allows side effects shoul
- 76. index tag method (score: 1)
- Author: "John Belmonte" <jvb@...>
- Date: Mon, 12 Feb 2001 17:31:59 +0900
- The index tag method is a sub-case of gettable and can be removed, reducing the complexity of tag methods and slimming down luaV_gettable in the virtual machine. If the user wants to treat a previous
- 77. Re: index tag method (score: 1)
- Author: "John Belmonte" <jvb@...>
- Date: Wed, 14 Feb 2001 14:23:24 +0900
- I see your point about that being a common use. Tag methods represent very low level events (after all they are called from the VM), so my view is if one even thinks the word "performance" you have t
- 78. Re: index tag method (score: 1)
- Author: "John Belmonte" <jvb@...>
- Date: Wed, 14 Feb 2001 21:15:56 +0900
- Hi Reuben, Perl?). I think Python's way could be implemented with Lua's extensions (again with improvements). There is nothing special to do when writing modules. The globals of an imported file beco
- 79. dream garbage collector (score: 1)
- Author: "John Belmonte" <jvb@...>
- Date: Thu, 15 Feb 2001 21:07:02 +0900
- Hello, There has been talk about alternate Lua implementations, but what I'd really like to see is just an alternate garbage collector for the TeCGraf implementation. For example there is an incremen
- 80. Re: dream garbage collector (score: 1)
- Author: "John Belmonte" <jvb@...>
- Date: Fri, 16 Feb 2001 12:42:52 +0900
- API I don't think it would be easy... especially not before we have experience plugging in a few different GC's. For example the incremental collector I mentioned uses write barriers, meaning some bo
Search by
Namazu v2.0.21