Jump to content



Photo

Suggestions


  • Please log in to reply
86 replies to this topic

#41 Tchernoben

Tchernoben

    Casio Fan

  • Members
  • PipPip
  • 42 posts
  • Location:Nice
  • Interests:Calculators, Pc, mangas, warhammer.

  • Calculators:
    Classpad 300
    Ti 89 Titanium

Posted 25 January 2006 - 09:33 PM

but how to use sprites without tables ?

#42 Kilburn

Kilburn

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 491 posts
  • Gender:Male
  • Location:France
  • Interests:Blah

  • Calculators:
    FX-7500 G
    ClassPad 300

Posted 25 January 2006 - 10:02 PM

but how to use sprites without tables ?


I meant Lua tables! :roflol:

#43 Orwell

Orwell

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 777 posts
  • Gender:Male
  • Location:Paris - France

  • Calculators:
    Casio AFX 1.02 / Casio ClassPad 300

Posted 25 January 2006 - 10:32 PM

Not only slow, but that would use too much memory... (~10 bytes for each pixel, argh :o )

#44 MicroPro

MicroPro

    Casio Overlord

  • Deputy
  • PipPipPipPipPipPipPip
  • 640 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    Casio ClassPad 300

Posted 30 January 2006 - 02:24 PM

10 bytes for 1 pixel?

#45 milosz

milosz

    Newbie

  • Members
  • Pip
  • 8 posts

  • Calculators:
    ClassPad 300 OS 2.2

Posted 03 February 2006 - 11:06 PM

I have one suggestion about CPLua editor: there should be something like find and/or find&replace tool. Sometimes it's hard to get thru large code...

BTW, is file size limit (something above 10kB) limit of CP file-system or CPlua?

#46 unique33

unique33

    Casio Freak

  • Possibly hacked
  • PipPipPipPip
  • 229 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    classpad 300 , fx5500

Posted 04 February 2006 - 02:30 PM

CASIO:
If it is possible , add a call to main application from Cplua . It is so needed .( I mean add this possibility to the add-in itself ).


Orwell :
If it is not so hard please add a copy possibility from the output of Cplua . or If CASIO added the call to the main application please add a drag and drop functionality .

thanks .

#47 Orwell

Orwell

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 777 posts
  • Gender:Male
  • Location:Paris - France

  • Calculators:
    Casio AFX 1.02 / Casio ClassPad 300

Posted 04 February 2006 - 08:50 PM

If it is possible , add a call to main application from Cplua . It is so needed .( I mean add this possibility to the add-in itself ).

I don't exactly understand what you need... Is the "Main" bottom (at the bottom of the screen) not working correctly? :huh: It's not possible to start the Main application inside CPLua however.

If it is not so hard please add a copy possibility from the output of Cplua . or If CASIO added the call to the main application please add a drag and drop functionality .

Okay, I will add some functionalities to copy the console output ;)

#48 unique33

unique33

    Casio Freak

  • Possibly hacked
  • PipPipPipPip
  • 229 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    classpad 300 , fx5500

Posted 04 February 2006 - 08:59 PM

I don't exactly understand what you need... Is the "Main" bottom (at the bottom of the screen) not working correctly? :huh: It's not possible to start the Main application inside CPLua however.


No I do not mean the main at the bottom of the screen .
If you press the main at the bottom then you can not use Cplua any more .
I mean having Cplua and main application at the same time .

If you see the Unit converter add-in the is a call to the main application .
but this goes to CASIO who should add this functinality to Cplua (add-in).

#49 Orwell

Orwell

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 777 posts
  • Gender:Male
  • Location:Paris - France

  • Calculators:
    Casio AFX 1.02 / Casio ClassPad 300

Posted 04 February 2006 - 09:26 PM

Actually this is possible, but it's quite difficult and completely unsupported... :/
It would not work on the Windows executable by the way.

But when would you like to have this window? During editing? execution? interactive mode? :unsure:

#50 unique33

unique33

    Casio Freak

  • Possibly hacked
  • PipPipPipPip
  • 229 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    classpad 300 , fx5500

Posted 04 February 2006 - 10:12 PM

Actually this is possible, but it's quite difficult and completely unsupported... :/
It would not work on the Windows executable by the way.

yeah . the current version of SDK is for users and does not support the call to the other applications within another .
I think some one from CASIO should do this for us .I mean CASIO should add this possibility to the add-in
( I mean the add-in not the executable one)

But when would you like to have this window? During editing? execution? interactive mode? :unsure:

during execution , I think the result is the must important portion of a mathematical program , If we could call the main application within Cplua we could use the results from cplua for further calculations in the main application , also the main application contain the call to all other applications so in this way we can have all of classpad at the same time .

#51 Kilburn

Kilburn

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 491 posts
  • Gender:Male
  • Location:France
  • Interests:Blah

  • Calculators:
    FX-7500 G
    ClassPad 300

Posted 04 February 2006 - 10:26 PM

Can you add an horizontal scrollbar? (WSM_AUTOHSCROLL) With tabulations and word wrap you can sometimes have:

if n~=pi/2 then

n=math.floor(math.tan(n))+math.sin(n)... etc...
end

but I want to do this:

if n~=pi/2 then
	n=math.floor(math.tan(n))+math.sin(n)... etc...
end

When the lines are too long, the code becomes awful! :banghead:

#52 Orwell

Orwell

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 777 posts
  • Gender:Male
  • Location:Paris - France

  • Calculators:
    Casio AFX 1.02 / Casio ClassPad 300

Posted 04 February 2006 - 10:50 PM

yeah . the current version of SDK is for users and does not support the call to the other applications within another .
I think some one from CASIO should do this for us .I mean CASIO should add this possibility to the add-in

Hmm... First, "CASIO" has nothing to do with that; if someone (other than myself) should do anything, it would be someone from Saltire, not Casio. Second, they cannot do anything until I gave them the source code. Third, you seem to pretend that only "Casio" can do this, because this is unsupported. Then, they have to change the code to adapt it. But then what, what will they do, since I would not be authorized to "see" those modifications? Continue CPLua by themselves? What would be my situation then? :rant:
The only one who can make something (supported or not) on CPLua right now, that's me. Speaking about Casio's (or anyone else) intervention is just nonsense. I can ask them for help if I don't know how to do something, but I can't say "Do that for me" when I may not know how it should be done, because then I basicaly could not work on the source code anymore :huh: (Actually it's a little bit more subtle than that, we could deal with compiled parts to hide the unsupported features, but still :nonono: ).
But anyway, saying "Casio should do that" is not a solution at all. I could also pray God to change it for me, that would be the same... Who should I ask to do that? How would they know how to adapt CPLua's source code (~6000 code lines for the add-in management only)? When could it be done? What could I do then after their changes? What would be the consequences on the future improvements? Please, try to be a little more realist! <_<

during execution , I think the result is the must important portion of a mathematical program , If we could call the main application within Cplua we could use the results from cplua for further calculations in the main application , also the main application contain the call to all other applications so in this way we can have all of classpad at the same time .

The situation was already the same for Basic programs isn't it? :(

#53 unique33

unique33

    Casio Freak

  • Possibly hacked
  • PipPipPipPip
  • 229 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    classpad 300 , fx5500

Posted 04 February 2006 - 11:48 PM

Hmm... First, "CASIO" has nothing to do with that; if someone (other than myself) should do anything, it would be someone from Saltire, not Casio. Second, they cannot do anything until I gave them the source code. Third, you seem to pretend that only "Casio" can do this, because this is unsupported. Then, they have to change the code to adapt it. But then what, what will they do, since I would not be authorized to "see" those modifications? Continue CPLua by themselves? What would be my situation then? :rant:
The only one who can make something (supported or not) on CPLua right now, that's me. Speaking about Casio's (or anyone else) intervention is just nonsense. I can ask them for help if I don't know how to do something, but I can't say "Do that for me" when I may not know how it should be done, because then I basicaly could not work on the source code anymore :huh: (Actually it's a little bit more subtle than that, we could deal with compiled parts to hide the unsupported features, but still :nonono: ).
But anyway, saying "Casio should do that" is not a solution at all. I could also pray God to change it for me, that would be the same... Who should I ask to do that? How would they know how to adapt CPLua's source code (~6000 code lines for the add-in management only)? When could it be done? What could I do then after their changes? What would be the consequences on the future improvements? Please, try to be a little more realist! <_<

waw.
I,m so sorry . ;)
you are right .
I did not want to make you angry orwell ! sorry .
we have made the improvement without help of casio so we can contiue without it.


BTW:you have made a direct connection between classpad and computer with your handy codes so you may write some other handy codes .


( but casio( or any other who made the SDK) should add the possibility to make the addins with the call of other applications whitin another , they can emit the compiler for the executable one, they can make 2 compiler one for making addins and one for executable one , or any other way that can solve this problem)

#54 Gaumerie

Gaumerie

    Newbie

  • Members
  • Pip
  • 28 posts

Posted 05 February 2006 - 08:40 PM

I don't know what you're searching exactly...but there's a function to call the Main application!!!

#55 unique33

unique33

    Casio Freak

  • Possibly hacked
  • PipPipPipPip
  • 229 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    classpad 300 , fx5500

Posted 05 February 2006 - 10:48 PM

ok. I found it !

PegTextButton* b = new PegTextButton(1,1,"call to Main",ID_MAINWINDOW);
	m_ui->AddToolbarButton(b);

sorry . again.

#56 Orwell

Orwell

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 777 posts
  • Gender:Male
  • Location:Paris - France

  • Calculators:
    Casio AFX 1.02 / Casio ClassPad 300

Posted 06 February 2006 - 05:27 PM

:lol2: Nice try...

... but it's not that simple.
- 'ID_MAINWINDOW' is not defined anywhere. I don't know where you found it btw... :unsure:
- Most likely, it does not mean the Main application of the ClassPad, but rather the main window of the current application. This is quite different.
- You are just creating a button here with a specific ID. When the user clicks on it, the application will just receive a message of type "'ID_MAINWINDOW"... That does not say what the program must do (or rather, how it could create this window) ;)

Sorry for my last post, I was a little bit angry at that time. There's no trouble ;)

By the way, here is the (supposed, unsupported) right function to open a window with the Main application:
#define IDB_MODULE_MAIN_WINDOW			  TYPE_MOD_RUNCAS 
CPModuleWindow *ReplaceModuleWindow(SIGNED iNewWindowID, void *pVoid = 0, BOOL bActive = TRUE);
The problem now is that this function creates a "CPModuleWindow" and returns it. This kind of windows is managed by a CPMainFrame object in the application, which can open 2 windows, show the keypad, or switch and resize the windows etc... And for convenience, CPLua does not use a CPMainFrame. It uses a custom mainframe with its own type for windows; this is why CPLua supports custom keypads, fullscreen, or windows of any size etc. Thus, basically I cannot manage this window like the others :( I don't say that it is impossible, but it is certainly difficult to handle ;)

#57 unique33

unique33

    Casio Freak

  • Possibly hacked
  • PipPipPipPip
  • 229 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    classpad 300 , fx5500

Posted 07 February 2006 - 01:08 AM

I was just copy-pasting the Const & Conv codes. ( the unit converter addin)
#define IDB_MODULE_MAIN_WINDOW			  TYPE_MOD_RUNCAS
CPModuleWindow *ReplaceModuleWindow(SIGNED iNewWindowID, void *pVoid = 0, BOOL bActive = TRUE);
------------------------------------------------
SIGNAL(ID_MAINWINDOW, PSF_CLICKED):
		ReplaceModuleWindow(IDB_MODULE_MAIN_WINDOW);
------------------------------------------------
 PegTextButton* b = new PegTextButton(1,1,"Main",ID_MAINWINDOW);
	m_ui->AddToolbarButton(b);
------------------------------------------------

When modify the code to suit your needs, please note that "call main window" is not supported by the current ClassPad SDK, so they won't work on computer, but be able to work on the ClassPad. Also note that you may recieve the error about "strange" characters while compling, but don't worry, anything will work well despite the error.


I must say that I read this post many times ago and just I was remembering the first part "When modify the code to suit your needs, please note that "call main window" is not supported by the current ClassPad SDK"


Thus, basically I cannot manage this window like the others I don't say that it is impossible, but it is certainly difficult to handle



ok.If it is that hard to handle forget about it. just the copy functionality from the console window can solve the problem .

#58 MicroPro

MicroPro

    Casio Overlord

  • Deputy
  • PipPipPipPipPipPipPip
  • 640 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    Casio ClassPad 300

Posted 13 February 2006 - 01:33 PM

Well... I have two suggestions:
1. In the strings, CPLua must support the "\a" (bell) to control the buzzer of the ClassPad.
2. I found a way to make the text-editor faster, orwell:
You can put a separate CPEditBox in the left side, and a separate vertical scroll-bar in the right. When we open a file, the file contents aren't really loaded into the CPEditBox, they are loaded in a array of strings, imagine that in the CPEditBox we can write 20 lines, When the position of the scroll-bar is 1, the objects in the string array from 1 to 20 are loaded into the CPEditBox, when it's position is 2, the string objects from 2 to 21 are loaded into the CPEditBox, and so on. When you do this, each time only 20 lines exist in the editor, so its speed will never reduce.
Please let me know what do you think about it even if you don't want to do such a thing.

#59 Orwell

Orwell

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 777 posts
  • Gender:Male
  • Location:Paris - France

  • Calculators:
    Casio AFX 1.02 / Casio ClassPad 300

Posted 13 February 2006 - 04:52 PM

1. In the strings, CPLua must support the "\a" (bell) to control the buzzer of the ClassPad.

It's not that easy... I think that there is no C function such as "makeSingleBeep()" for the buzzer, but rather there are functions to make it beep periodically. But if someone can write such a function, then it would be possible ;)

2. I found a way to make the text-editor faster, orwell:

I see what you mean... But unfortunately we could only do that to read the code, not really to edit it. The main problem is when the user wants to insert new lines or remove some other lines from the text: this "array" should then be reorganized, the content of the editbox should be updated, etc... It is certainly not easy to do. Plus, what about the selections? You would only be able to select the part of the text present in the box :(
Maybe I will try to use my first edit box again (like in the very first versions; it was using the same kind of method to manage the text), but it does not support selections or multifont for now :rolleyes:

#60 unique33

unique33

    Casio Freak

  • Possibly hacked
  • PipPipPipPip
  • 229 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    classpad 300 , fx5500

Posted 14 February 2006 - 03:40 PM

fatal error :
require("coroutine")

Is there any reason that the coroutine library is in memory ?
It seems to be huge library ,
so my request is to use such facility like the other libraries ,for example "string" which needs the require function. So it will free lots of memory . Isn,t it so?

thanks.

#61 Orwell

Orwell

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 777 posts
  • Gender:Male
  • Location:Paris - France

  • Calculators:
    Casio AFX 1.02 / Casio ClassPad 300

Posted 14 February 2006 - 06:18 PM

The "coroutine" library is part of the "base" library, which is loaded automatically... It's not that huge, so I don't think that it really matters :unsure:

#62 unique33

unique33

    Casio Freak

  • Possibly hacked
  • PipPipPipPip
  • 229 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    classpad 300 , fx5500

Posted 14 February 2006 - 07:36 PM

It's not that huge, so I don't think that it really matters :unsure:

Ok.

#63 -Tom-

-Tom-

    Casio Freak

  • Members
  • PipPipPipPip
  • 104 posts
  • Location:Poland
  • Interests:Tides, Celestial Navigation, Deadreckoning

  • Calculators:
    Cla$$pad 300

Posted 13 March 2006 - 06:37 PM

Orwell did though about GUI? Soon I think will be good moment to start thinking about it, especially that v 0.8 will be relised soon. Greets!

#64 Orwell

Orwell

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 777 posts
  • Gender:Male
  • Location:Paris - France

  • Calculators:
    Casio AFX 1.02 / Casio ClassPad 300

Posted 14 March 2006 - 12:51 AM

I have some ideas concerning the implementation, but still it would be great if everyone gave me more (concrete) suggestions about the Lua functions that you want to see in this package :)

#65 -Tom-

-Tom-

    Casio Freak

  • Members
  • PipPipPipPip
  • 104 posts
  • Location:Poland
  • Interests:Tides, Celestial Navigation, Deadreckoning

  • Calculators:
    Cla$$pad 300

Posted 14 March 2006 - 01:35 PM

I have some ideas concerning the implementation, but still it would be great if everyone gave me more (concrete) suggestions about the Lua functions that you want to see in this package :)


Maybe You could share with ous Your ideas... we will know then what is possible, and how is possible.
And question: did You tried to write this new function for folder listing in I/O?

#66 -Tom-

-Tom-

    Casio Freak

  • Members
  • PipPipPipPip
  • 104 posts
  • Location:Poland
  • Interests:Tides, Celestial Navigation, Deadreckoning

  • Calculators:
    Cla$$pad 300

Posted 16 March 2006 - 04:59 PM

For me is too late, but for others not!
Autosave to current *.mcs in Lua for Windows needed

:banghead: :angry: :cry:

#67 Orwell

Orwell

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 777 posts
  • Gender:Male
  • Location:Paris - France

  • Calculators:
    Casio AFX 1.02 / Casio ClassPad 300

Posted 16 March 2006 - 05:49 PM

did You tried to write this new function for folder listing in I/O?

Not yet, sorry... I've been busy these last days ;)

For me is too late, but for others not!
Autosave to current *.mcs in Lua for Windows needed

I can't help it... :( But did the emulator crash on your computer? Could you give me more details? :o

#68 -Tom-

-Tom-

    Casio Freak

  • Members
  • PipPipPipPip
  • 104 posts
  • Location:Poland
  • Interests:Tides, Celestial Navigation, Deadreckoning

  • Calculators:
    Cla$$pad 300

Posted 16 March 2006 - 05:55 PM

I can't help it... :( But did the emulator crash on your computer? Could you give me more details? :o


I opened Lua 0.8RC3 Then I saved my newly written program in Main... then clicked Save mcs... I marked a file but then I clicked Cancel... and after this thre was clean screen and my program was by God!!!
:banghead:


After few minutes....
No! I made mistake, really it was so: I clicked "Open mcs" (by mistake), and when I realized that its wrong I clicked "Cancel" and then Lua came back to "Welcome screen" and my program was burned!

#69 Orwell

Orwell

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 777 posts
  • Gender:Male
  • Location:Paris - France

  • Calculators:
    Casio AFX 1.02 / Casio ClassPad 300

Posted 16 March 2006 - 06:17 PM

No! I made mistake, really it was so: I clicked "Open mcs" (by mistake), and when I realized that its wrong I clicked "Cancel" and then Lua came back to "Welcome screen" and my program was burned!

I see <_< Unfortunately this behaviour comes from the SDK, and I can't change it at all, sorry... :(

#70 Kilburn

Kilburn

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 491 posts
  • Gender:Male
  • Location:France
  • Interests:Blah

  • Calculators:
    FX-7500 G
    ClassPad 300

Posted 25 March 2006 - 08:13 PM

For the UI package, each object should have its own event functions. For example, if you define a function like button=ui.button(args), then you should define a button:clicked() function which will be called when the user clicks on the button. Then you should make a ui.execute() function to make the whole interface work, like in C++.

And some other functions, I have some more suggestions:

exit() // Exits the program without displaying the "Done. Press EXE to continue"

io.isvalid(name) // Returns true if name is a valid file or folder name
fi:type() // fi=io.file(...)	 Returns the file type ("MEM", "PRGM", "PICT")

draw.patternline(x1, y1, x2, y2, pattern) // Like PegScreen::PatternLine() C++ function
draw.fill(x1, y1, x2, y2, pattern) // Like PegScreen::BitmapFill() C++ function


#71 The_AFX_Master

The_AFX_Master

    Casio Overlord

  • Admin
  • PipPipPipPipPipPipPip
  • 519 posts
  • Gender:Male
  • Location:Black Mesa Research Facility (sector C)
  • Interests:BASIC +FORTRAN 90+ C++.....and HALF LIFE

  • Calculators:
    Casio Algebra FX 2.0 Plus, Casio fx 570 ms, Classpad 300, And a crowbar

Posted 08 April 2006 - 11:04 PM

some newbie desires :

.- Able to use the input() command on the showgraph() mode, Im trying to do an Array editor (Useful!! :) ) and i need an imput() in showgraph mode
.- a function wait.whatever :D that waits for the pen or the keyboard

.- Add the user defined libraries (as LuaNumAn) to a compiled one, built in with the cp lua add-in, with an editor...the user can compile their own libraries on LUA add-in??. this avoid lost of folders or scripts on the CP variable manager. and avoid A LOT of folders! :D

thanxx

#72 Lingenieur

Lingenieur

    Newbie

  • Members
  • Pip
  • 1 posts

  • Calculators:
    Claspad300

Posted 11 April 2006 - 03:33 PM

To include the function "to seek in this page" for better locating itself in the programs.
:D Google translate because i am french.

#73 Kilburn

Kilburn

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 491 posts
  • Gender:Male
  • Location:France
  • Interests:Blah

  • Calculators:
    FX-7500 G
    ClassPad 300

Posted 11 April 2006 - 06:01 PM

You would mean "a search function". It has already been asked, but I think this is not a high priority ;)

And, on the old screenshots from CPLua 0.6x, I saw that there was a status bar, which displays the actual line and column... Why did you remove it?

http://orwell01.free...PLua/cplua1.PNG

#74 PAP

PAP

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 681 posts
  • Gender:Male
  • Location:Somewhere in Europe.
  • Interests:Computer Algebra, Numerical Analysis.

  • Calculators:
    ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 03 May 2006 - 01:11 PM

I just realized that the backspace escape character (\B) is not suported by printf. For example, the command
printf("for\bo")
should print "foo". However, "\b" is not recognized as a backspace character, and it is printed as a crossed square (something like "<span class=×' />"), so the above command prints "for×o" instead of "foo". Orwell probably knows that, so I want to ask, is it difficult to implement the backspace character correctly?

#75 far2055

far2055

    Casio Addict

  • Members
  • PipPipPip
  • 67 posts
  • Gender:Male
  • Location:Iran
  • Interests:Robotics - Programming - Mathematics - Physics - Computer <br />ANN ( Artificial Neural Network )<br />QBasic Lover-->before-->now-&gt;*CPLua&quot; Lover.

  • Calculators:
    classpad 300

Posted 03 July 2006 - 03:29 PM

hello and really thanks for CPLua project.

I am a new user for classpad. and i know a little about programing.

i have some idea about making event driven programs in CPlua (like a GUI , and i made it about 2 month ago but it was not really what i want ) but i realy need INTERRUPTS for that.

I need software interrupts (like int 21 in MS-DOS) and some hardware interrupts ( like int 8 (clock interrupt)).
and also
it was really nice if it was possible to have some instruction like PUSHA and POPA and an instruction to store and restore PC (program counter register in cpu) .

I think adding interrupts are not so difficult but adding pusha and popa and PC maybe cause to crash (i think you know better Orwell)

if you don't say i am just a dreamer by these function we will be able to make TSR ( Terminate but Stay Resident ) and something like multi-tasking and surely event driven programs.

at last again i really thanks for CPLua and i am waiting for you answers. :)

#76 Orwell

Orwell

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 777 posts
  • Gender:Male
  • Location:Paris - France

  • Calculators:
    Casio AFX 1.02 / Casio ClassPad 300

Posted 03 July 2006 - 10:21 PM

Wowowow - slow down :lol2:

First of all, the CP OS has nothing to do with MS-DOS. Interruptions exist of course, but they certainly don't work in the same way. ;)

Second, don't forget that CPLua simply embeds the Lua interpreter. It's not like a Lua program was really executed by the CP; the CP executes the interpreter, which then interpretes the code. Your suggestions concern some very "low-level" features (close to the hardware), altough we are using a virtual machine here... Things cannot be mixed like that ;) If you want to simulate some multi-tasking features, first look at the solutions already suggested by Lua (like coroutines) :)

And third, the UI package is coming. With it you will be able to write event-driven programs without problem ^_^

But don't dream, you will never have access to the processor's registers in a Lua program. Never. :rolleyes:

#77 far2055

far2055

    Casio Addict

  • Members
  • PipPipPip
  • 67 posts
  • Gender:Male
  • Location:Iran
  • Interests:Robotics - Programming - Mathematics - Physics - Computer <br />ANN ( Artificial Neural Network )<br />QBasic Lover-->before-->now-&gt;*CPLua&quot; Lover.

  • Calculators:
    classpad 300

Posted 13 July 2006 - 09:42 PM

And third, the UI package is coming. With it you will be able to write event-driven programs without problem ^_^

But don't dream, you will never have access to the processor's registers in a Lua program. Never. :rolleyes:


thanks orwell.

writing event-driven programs is really nice.
:wub: :lmao: :bow:

#78 far2055

far2055

    Casio Addict

  • Members
  • PipPipPip
  • 67 posts
  • Gender:Male
  • Location:Iran
  • Interests:Robotics - Programming - Mathematics - Physics - Computer <br />ANN ( Artificial Neural Network )<br />QBasic Lover-->before-->now-&gt;*CPLua&quot; Lover.

  • Calculators:
    classpad 300

Posted 14 September 2006 - 11:02 PM

Orwell isn't good to add "delete" command to CPLua? so programmers will be able to make more free memory.

#79 The_AFX_Master

The_AFX_Master

    Casio Overlord

  • Admin
  • PipPipPipPipPipPipPip
  • 519 posts
  • Gender:Male
  • Location:Black Mesa Research Facility (sector C)
  • Interests:BASIC +FORTRAN 90+ C++.....and HALF LIFE

  • Calculators:
    Casio Algebra FX 2.0 Plus, Casio fx 570 ms, Classpad 300, And a crowbar

Posted 15 September 2006 - 12:49 AM

That's true now in CPLua 0.9:

If you assign nil to a variable, you actually are deleting it,
And using the dispose() command, that does the same as require, but opossite, you can discard a previously loaded package ;)

#80 Orwell

Orwell

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 777 posts
  • Gender:Male
  • Location:Paris - France

  • Calculators:
    Casio AFX 1.02 / Casio ClassPad 300

Posted 15 September 2006 - 09:31 AM

Orwell isn't good to add "delete" command to CPLua? so programmers will be able to make more free memory.

NO !
Managing memory with delete is just a headache. <_<
And there is no real need for that: if you want to "free" something to get back its memory space, you just have to give the "nil" value to that thing, and wait for the next garbage collection cycle. If you really don't want to wait, you can call collectgarbage() to force a new cycle. But there is now enough memory available in Lua so freeing memory is less critical now :rolleyes:

The only things that you cannot "free" with a nil value are the Lua chunks (scripts or libraries) loaded with require() or doscript(). That's why I added the function dispose() to unload a chunk if you need it. But you must be careful with this: if it's not used correctly, your program could even use more memory than before :rolleyes:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users