This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Messages - Levak
Pages: 1 ... 5 6 [7] 8 9 ... 68
91
« on: August 10, 2013, 03:30:39 pm »
Possible: Yes, but probably not for me. Maybe someone who is better at reverse engineering could do it I'll make a GUI where it will be possible to remove packages.
On TI-Nspire CX CAS, somewhere between 0x102167A8 and 0x102167F8 you have in [R4] (char **) a pointer to the char sequence containing the name of the currently confirmed deleted file.
92
« on: August 10, 2013, 11:38:42 am »
You don't seem to have read : [...] nor [...] But I have to say it's difficult to keep up for new posts in this topic while writing
Yeah, I skipped an entire page ... damn me. Then, yes, for MyLib Basic/Lua programs, there is an interest, but how many are they exept Make3D demo and FormulaPro ? On another topic, talking about web hosting, what should differ from the existing if there is no PC-side client ? I mean what will be the differences between TI-Planet hosting and the pretty concept posted earlier ?
93
« on: August 10, 2013, 11:10:34 am »
But as said, before, whatever the type, lua, basic, or ndless, it should not have to matter to the program (both computer and calc side)
As said by other people earlier, there is no interest in making pacspire support Lua nor Basic program, since they are only one-file-made.
94
« on: August 10, 2013, 04:23:45 am »
Will hiding them fix the speed issue? [...] who knows? >.< Experiments have shown that hiding files solves the big delay encoured when accessing the My Document view, so we know.
95
« on: August 10, 2013, 02:51:51 am »
Should I add my 2 cents ? Only from what I can see in the topic (i.e. I never tested anything), something that bother me is the number of files/folders created. Remember how slow the TI-Nspire is on generating the MyDocument view, and here with only one project it creates dozens of files. Maybe pacspire should hide those files and offers a way to unhide them, such as Hide Manager (by renaming the files/folders such that they do not appear in the MyDocument view). On the other hand, as for the user-friendly part, as hoffa said, remember its only a calculator, and imagine yourself explain to this type of guy (no offense here) how to use pacspire : I doubt it would be easy, but who knows if pacspire comes included with Ndless package ? Also, I know nFrame is not yet ready, but would it help for the userfriendly part ? Anyway, as for the others, I really like this project and would like to push it beyong its limits !
96
« on: August 05, 2013, 05:16:15 pm »
And what methods are there for changing that "minimal
[...] and only Ndless programs (such as nsNandMgr) or the OS itself can access [...]
97
« on: August 05, 2013, 01:54:36 am »
I really don't understand why you're struggling with scoped-variables-overriding.
What I mean :
local foo = 42 { -- new scope, it can a function, for, while, etc .. local foo = 69 print(foo) -- prints 69 } print(foo) -- prints 42
Is that a new concept for you ?
Because here, "self" is the object itself, it won't colide with current scope variables.
Thus, this is valid :
Foo = class() function Foo:init(x, y, z) self.x = x self.y = y self.z = z end
And this is invalid :
Foo = class() function Foo:init(xx, yy, zz) x = xx y = yy z = zz end
But obviously, this is also valid :
Foo = class() function Foo:init(xx, yy, zz) self.x = xx self.y = yy self.z = zz end
98
« on: August 05, 2013, 12:27:20 am »
Sorry to cut you in your dreams but ... modifying TINCLS is only part of the problem. Indeed, the OS of the calc itself includes checks, checks based on an area in memory you can't erase with a "reformat all" from the Diagnostic menu and only Ndless programs (such as nsNandMgr) or the OS itself can access, not even the computer software.
The anti-downgrade protection sets a "minimal-version" field in that memory area. Then, on boot, the boot2 will check that version with the current installed OS, if it is an older one, it won't boot at all (even deleting that OS, IIRC), if it is a newer or same one, it will allow boot. The OS 3.2.4 sets the minimal-version to 3.2.4. The OS 3.2 sets it to 3.1. Same for other older OSes up to 2.0.
Also, without modifying TINCLS, look at TiLP, a free, open source and multi-platform all-TI-device-communication-program designed by the community. If such feature would have ever been possible and added to TiLP, be sure that every Nspire user would use it instead of using TINCLS.
99
« on: August 04, 2013, 04:23:49 pm »
thank you... Is the call and the structure in LUA for NSpire the same?
Yes, the same. TI did not reinvented the Lua, they only turned it event-based and added their API. Do you have a short example?
The example given in the second link will work local status, err = pcall(function () a = 'a'+1 end) print(err) --> stdin:1: attempt to perform arithmetic on a string value
local status, err = pcall(function () error("my error") end) print(err) --> stdin:1: my error
100
« on: August 04, 2013, 03:20:01 pm »
you have added a jar-file. Do I need java or how can i use the file without java?
Yes, you do need Java to run the Windows Builder. On an other topic : I was not the one who uploaded the file on TI-Planet
You may create an account so that I can attach it with the archive : you will then be able to update it when you want.
102
« on: August 01, 2013, 11:59:02 am »
Bar = class(Foo)
So this will also call Foo:init() after it assigns the table of Bar? That's interesting.
No, this is not what I've written : What's the difference then ? Foo() will call Foo:init() after the copy (the constructor). class() does not call init().
103
« on: July 31, 2013, 02:18:08 pm »
Ah, I'm making stupid mistakes again, I go back and look at it again and see that that line is within the function BallClass:init(x, y, radius)
Oh of course, I get what ipairs is now. Takes all the indices in numbered order (ones that can be ordered anyway), and has the indicies and keys from the table in pairs. Ok.
Oh wow I didn't know that _ could be used as a variable. Kinda like a wild card. Is it?
No, "_" is just a valid char as a variable name such as _a, _foo, ________bar, foo_bar or even _ or _____, etc ... Futhermore, "_" is in the Lua's culture (same in OCaml for example) a junk variable. It is then used when you know you don't want to use it. But this doesn't mean it has a special meaning for the Lua's interpretor, for example this works : local _o = 42 for _=1, _o do print(_, _+1, _o/_) end
":" is just a shortcut for a.b(self)
So PointClass:init(x, y) is a shortcut for PointClass.init(PointClass, x, y)
I'm trying to work through in my mind the connections between all this stuff, and I still don't quite get it. I even drew a diagram, draft version, probably some mistake in there . To describe what i'm not getting, it's the syntax that's getting me. I'm having trouble understanding the meaning of certain parts of the syntax lua classes use.
Yes ":" is a shortcut to "." + self, you understood that well. Where you're going "too far" in the understanding is that you substitude "self" as the ClassName which is not always the case. "self" is a dynamic variable, its meaning is determined at running time. Just remind that "self" refers to the first argument when using the ":" notation. For example, these 3 calls are differents : Toto = class() function Toto:init() print(self) end
Toto:init() -- equivalent to Toto.init(Toto) lol = Toto() -- equivalent to Toto.init(temp) where "temp" will be stored in "lol" lal = lol.init({}) -- here we force "self" to be "{}", an empty table
How does that translate to something in a table? This is an intersting deep question. Jim will maybe better explain than me, but I'll try something : In Lua, table have a "prototype" table that describe their content and how to access an element. This inner table is called "metatable". You can get/set the metatables using getmetatable(tbl) or setmetatable(tbl, meta). There are special elements of the metatable that changes the meaning of tbl[a] for example, or t1 + t2. It's like operator overloading. Metatables in classes are used to transfert all the links to the functions from the "template" (the class) to the "instance" (the object) without copying them. This means that when you're doing foo = Foo(), you end up with a new table (foo) that has the metatable of Foo (the class) that refers to every single function you defined in Foo (Foo.bar() for example). Using the same principle, when doing Bar = class(Foo), you end up with a new table (Bar) that has the metatable of Foo (the parent class) that refers to every single function you defined in Foo. What's the difference then ? Foo() will also call Foo:init() after the copy (the constructor).
104
« on: July 29, 2013, 07:15:57 pm »
Understand this, you'll understand everything :
Declarations :
PointClass = class() function PointClass:init(x, y) self.x = x self.y = y end
BallClass = class(PointClass) function BallClass:init(x, y, radius) PointClass.init(self, x, y) self.radius = radius end
function BallClass:paint(gc) gc:fillArc(self.x, self.y, self.radius*2, self.radius*2, 0, 360) end
Usage :
local ball1, ball2 ball1 = BallClass(0, 0, 10) ball2 = BallClass(50, 50, 15) ball_tbl = {ball1, ball2}
function on.paint(gc) for _, ball in ipairs(ball_tbl) do ball:paint(gc) end end
105
« on: July 29, 2013, 03:41:26 pm »
Hmm, I looked in the nspire_emu source code and it has a bool value break_on_warn, which is set to true if you have a /W. But break_on_warn is not set to false in the first place! So I guess it could have true or false, randomly.
Global variables should default to 0 (false in this case).
It totally depends on the compiler. For example, clang++ does initialize global variables whereas g++ does not : Already had this behavior on a project where it worked using clang++ but not with g++. Initializing this var to something solved the problem.
Pages: 1 ... 5 6 [7] 8 9 ... 68
|