Show Posts

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 - Jim Bauwens

Pages: 1 ... 4 5 [6] 7 8 ... 125
76
Introduce Yourself! / Re: New Lua Coder
« on: October 05, 2013, 12:42:33 pm »
Hello :)
It's always nice to see more and more Lua coders join the forum.

77
Yup, I've experienced this problem before too, when creating my online converter. After talking with timwessman he figured out the problem and I patched my code to use another color instead of pure white for alpha.

78
Miscellaneous / Re: Religion Discussion
« on: October 02, 2013, 05:57:56 am »
Well, I don't hate Muslims, but Islam has violent precepts at it's core. The reason why it's progressing so fast is because of that : Islam encourages the use of violence to spread itself. BTW if you look at terrorists then most of them are Islam fanatics.
Another thing is how they treat women. They consider that women are inferior to men and are here only for sex, reproduction and home tasks. While I don't consider women nor anybody else equal to me (we are all different and one of a kind), I believe that no hierarchy exists between human beings.
Another thing : the Hamas's slogan (one of many pro islamisation groups) is "We love death more than you love life". I think this is pretty much self explanatory.
One last thing : there are only a couple Nobel prices won by muslims. So the proportion of intelligent people adept of this religion is ridiculously low.

Now I hope that these arguments make you reconsider your opinion a bit and realize that Islam is not only good. There are good muslims but not all of them are and the Coran has two halves : the beginning of Mohammed's life which was good and the second part which was only war and blood.

I know others have already replied to your post, but I still would like to add some stuff. In your post you are generalizing many things and generalisation to me ruins good discussion. It doesn't mean when one certain group (mis) interpretes something in the Bible/Koran that the entire group following those books do so. You always have extremists, in any religion (and I count atheism to that group too).

Beside that, I find your point on intelligence of muslims utterly ridiculous. Again, you're generalizing and even on a ridiculous point. The nobel prize is something that has been extremely western for a long period of time, there was little interaction with the many asian countries until recently. And if you look in the history books, you can see those countries contributed very much to science.

There is a muslim girl that I  know and am very befriended with. She is also one of the only girls I know that is studying computer science. Very bright and intelligent, more so than many other students. Although I don't agree with some of her religious viewpoints (I'm Christian) I certainly do respect them. She to me is a great proof of how muslims can be (and are) just normal people. It is the propaganda of western governments that tries to change this view, to make them all terrorists. (well, some governments more than others)

As a final note, every group that has power will take advantage of it. Be it a government, the Catholic church or certain muslim leaders. But they don't define all the people that are part of (or affected by) the group.

79
TI-Nspire / Re: LuaTerm v2.0 - An interactive Lua prompt for your TI-Nspire
« on: September 15, 2013, 02:35:41 pm »
That's good to hear :)
It means that the different 3.2 routines I implemented work properly on 3.1 (for example, withGC and updated setColorRGB to support one digit color codes).

80
Ndless / Re: Virtual Directory
« on: September 11, 2013, 05:23:30 pm »
Because the TI-Nspire OS is bases on the Nucleus RTOS, you should look if you can find some info regarding filesystem implementations on Nucleus. According to Wikipedia, it has a "Virtual file system Application programming interface", which is just what you need I think.

Edit: AFAICT, the Datalight Reliance filesystem that is being used on the TI-Nspire uses this API. So in theory you might be able to reverse engineer how this API works out of the OS. But I think I don't need to say that that's going to be a hard and complex task.

AFAIK, at the moment there is no easy way to do what you want. Maybe it would even be easier to patch the functions that are used to open files.

81
TI-Nspire / Re: LuaTerm v2.0 - An interactive Lua prompt for your TI-Nspire
« on: September 11, 2013, 10:45:02 am »
Well, if you just use the sessions how they are implemented now, no, because the code still runs in the same script and the only thing that happens here is that it splits the code flow a bit. But I might add support for something like multi-script communication. That might give some more performance.

The thing is, if you run tight loops in a session, you still should interrupt (using interrupt or sleep) it once in awhile, because it will block the entire script otherwise.
For example:
Code: [Select]
function mySessionFunc(session)
  while true do
    -- do stuff
    session:interrupt()
  end
end

Once interrupt is called, the control flow goes back to the TI-Nspire API. The next tick should be <0.01s after that and it will give control back to the session, and the loop itself will continue normally.

So if you would have sessions A, B and C the 'flow' looks like this:

[TI-Nspire event system]
   [part of A]
   [part of B]
   [part of C]

82
TI-Nspire / Re: LuaTerm v2.0 - An interactive Lua prompt for your TI-Nspire
« on: September 11, 2013, 07:00:57 am »
Glad you guys like it :)

Also, my session library can also be used for non Nspire Lua based systems, such as Love2D. Maybe I should split it out from this project and put it on github.

83
TI-Nspire / LuaTerm v2.0 - An interactive Lua prompt for your TI-Nspire
« on: September 09, 2013, 04:03:33 pm »
Hi all,

As some of you might remember, in the very beginning of the TI-Nspire Lua era I released LuaTerm. It was the very first tool that allowed you to enter and run Lua code directly on your calculator.

Now more than two years later (yes, it has been that long) I am proud to announce a new release of LuaTerm!
So what's new ?
  • OOP design
  • Monospace font using a custom font routine
  • Multi-line syntax
  • Cursor support so you can easily edit your command
  • Built using a special session engine that allows cooperative multitasking
  • New build system

The session engine is the biggest change to LuaTerm. This engine is not only useful for LuaTerm, but other projects can take advantage of it as well.



Spoiler For Large screenshot made from TINCS:


LuaTerm functions and Session API
Code: [Select]
------------------------------
-- LuaTerm spefic functions --
------------------------------

print(...)      : print to the console
clear()         : clear the console
sleep(n)        : sleep n seconds. Please note that this lets the execSession sleep, so if you want to sleep another session use yourSession:sleep(n)
readLine([str]) : reads console input. Please note, that just as sleep this is linked to the session execSession, don't use it in other sessions. If str is specified, it will be preinserted in the input stream.

gcct()          : List all (registered) sessions
browse([tbl])   : Browse the global enviroment. If tbl is specified, browse that instead.
 
getConsole() : returns the Console object
getSession() : returns the execSession Session object


The following documentation is not needed to use LuaTerm; it just describes the internal classes used by LuaTerm.
But you can also use them from within the console.

--------------
-- Sessions --
--------------

There are two sessions used by default:
luaTermSession and execSession.

luaTermSession implements the entire input handling and terminal functionality.
After the user enters a command, it will dynamically generate the execSession, suspend itself, pass control to execSession.
After execSession is completed, it will resume luaTermSession and pass the results to it.

-------------------
-- Console class --
-------------------

Console()                     : create a new Console object

.cursorX                      : cursor column
.cursorY                      : cursor row
.cursorVisisble               : boolean, show/hide the cursor
.height                       : height (in px) of the console
.width                        : width (in px) of the console
.rows                         : amount of rows
.cols                         : amount of collumns
.linesMoved                   : how many lines the console shifted during its lifecycle
.lineBuffer                   : table representing the console buffer

:fit([w], [h])                : resize the console. If parameters ommited it will use the display size
:draw(gc)                     : draw the console to the specified graphical context
:moveUp()                     : shift the console buffer one line. Internally used by :write
:write(str, [ignoreCursor])   : write str to the console (at the location of the cursor). If ignoreCursor is specied and true, the cursor position will not be updated after writing.
:print(...)                   : print the arguments to the console plus a new line
:clear()                      : clear the console
:read(session)                : reads one character. You need to supply a session; and you may only call it from within that session. (otherwise the world can collapse)
:readLine(session, [str])     : reads a line. You can prefill the line with str. Same session restrictions as read
:dataIn(str)                  : used to send data to the console. This data will eventually be parsed by read[Line]
:cursorBack()                 : move the cursor back
:cursorForward()              : move the cursor forward

-----------------------------------------
--           Session class             --
-- implements cooperative multitasking --
-----------------------------------------

Session(console, func, [callback], [commandTable])
                               : create a new Session from func with console as console. If specified, callback will get called when the Session object ends. The thread state and result will be passed as argument to the function. commandTable is used to define functions that can be called using :sendCommand to the Session object.
     
Session.addSession(session)    : register a Session object
Session.removeSession(session) : unregister a Session object
Session.updateSessions()       : 'tick' all registered Session objects
Session.getSessions()          : return the registered Session object table. Warning: this is a reference! Don't mess with it.

.thread                        : the coroutine behind everything
.console                       : the sessions Console object
.callback                      : the callback function
.commandTable                  : the commandTable
.started                       : true if the Session object has been started
.suspended                     : true if the Session object has been suspended
.nextTick                      : time when the Session may resume its thread

:checkSession(state, ...)      : internally used the check the thread state
:start([run])                  : start the session. If run is specified and true, the session will wait until the next global tick to start the thread
:suspend()                     : suspend the session
:interrupt()                   : interrupt the session
:triggerResume()               : session will resume on next tick
:sleep(n)                      : let the session sleep for n seconds
:tick([forcetick])             : tick the session. If forcetick is true, it will tick regardless if the session is suspended or nextTick isn't due yet
:sendCommand(command, ...)     : call command out of commandTable and pass the arguments. Warning, this is not thread safe!

-- Aliases to the console functions
:print(...)
:write(str)
:read()
:readLine(str)

I have attached the latest build to this post (LuaTerm v2.0beta). I would really appreciate if people could test it and report any bugs they can find :)
Please note that I haven't tried it on 3.1, although it *should* work as I've implemented some compatibility options.

84
Lua / Re: 'Display Digits' in math.setEvalSettings()?
« on: September 08, 2013, 12:24:45 pm »
Hi,

I'll test later to see what the cause could be. Are you using math.eval or math.evalStr? If math.eval, could you try math.evalStr?
Maybe the setting doesn't get applied when it returns a Lua number.



85
News / Re: New TI-Nspire CX hardware revision K
« on: September 04, 2013, 05:27:04 pm »
No, the boot2 is also signed by a private key. It is therefore only possible to use official boot2's. Ndless might indeed be possibly by exploiting bugs in the Lua framework, but those bugs have to be uncovered/found first before that can happen. Bugs that can be exploited and that can result into execution of custom code are very rare. That's the reason why Ndless 3.1 took such a long time to be released in the first place.

86
Computer Projects and Ideas / Re: Sorunomes IRC Bots
« on: September 02, 2013, 04:40:04 pm »
Hmm, really sorry that happened. It wasn't even my intention (I have no idea how the file got removed..)...
What I did was "cat front cas.py", seeing that the output was correct I did "cat front cas.py>cas.py". I should have made a backup of it first though...

87
If you divide by 2^n (and remove the remainder, with something like int() ) it's the same like shifting with n. And then you can use the modulus operator to get the bits you want. (So basically you simulate bitwise operators).

88
Other Calculators / Re: Have you seen BSOD on nspire before?
« on: August 21, 2013, 03:26:55 am »
Very interesting. You can see it's a prototype (TI-Nspire color), so this is just for easy debugging. I wonder if other dev OS's contain it too.

89
HP Calculators / Re: Let's hack the HP Prime!
« on: August 20, 2013, 04:37:43 pm »
That post is written by Adriweb ;)

90
Introduce Yourself! / Re: Hello - AvianIsTheTerm
« on: August 20, 2013, 03:10:51 pm »
Welcome AvianIsTheTerm :)

(Also a little note: it's Nspire, not nSpire ;P)

Pages: 1 ... 4 5 [6] 7 8 ... 125