Jump to content



Photo
- - - - -

Owbasic - The Most Common Language Of V, Now Be Ported To Cp


  • Please log in to reply
55 replies to this topic

#41 vanhoa

vanhoa

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 854 posts
  • Gender:Male
  • Location:Vietnam

  • Calculators:
    AFX 2.0, CP 300, CP 330, nSpire, TI 89, FX 5800

Posted 18 April 2007 - 05:07 PM

No, i dont think so...

I compile functions to ints...

Unlike CPLua, it's a basic-like language (asm-like) so it's lower level than CPLua

#42 Xerxes

Xerxes

    Casio Freak

  • Members
  • PipPipPipPip
  • 130 posts
  • Gender:Male

Posted 19 April 2007 - 07:31 AM

@vanhoa and Orwell:

I guess both languages are compiled to bytecode and executed by a bytecode interpreter.

Don't you think that the queen-bench is a more accurate way to find out the speed of these languages vs. CP-Basic?

#43 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 20 April 2007 - 12:55 AM

CPBasic IS defeated by default! :roflol:

#44 Xerxes

Xerxes

    Casio Freak

  • Members
  • PipPipPipPip
  • 130 posts
  • Gender:Male

Posted 20 April 2007 - 11:07 AM

I expect nothing else. ;)

#45 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 20 April 2007 - 10:08 PM

Sold? Hmm... now that you think about about it... :P

Noooooo!

No, nothing has been abandonned nor sold.

Yeeeeees!

and on top of that I had to look for my futur job (which I found now, yay :D ).

I'm sure it has to do with programming, otherwise I have a feeling that you will find your job to be boooring.

IMHO you shouldn't write benchmarks based on call to the language libraries. Do some tests with simple programs like

a  = {}
for i = 1,100000 do a[i] = i*i end
to see the real speed of the interpreter itself :)

Even better, a true test must include real world benchmark programs. For example, I could write a LNA function in OWBasic and run it to see the difference in speed. However, I don't have time for such things right now. Programs for solving problems such as the "eight queens" or the "knight tour" could also be used as benchmarks as well.
Anyway, differences in pixel-drawing programs don't prove anything, unless someone is interested on graphics only.

CPBasic IS defeated by default! :roflol:

Indeed. We could also look at any dictionary:
masochist (noun): a person who prefers CPBasic instead of CPLua or any other ClassPad programming language; synonym of CPBasicist.

I expect nothing else. ;)

Of course you should expect such an answer ;).

#46 Xerxes

Xerxes

    Casio Freak

  • Members
  • PipPipPipPip
  • 130 posts
  • Gender:Male

Posted 21 April 2007 - 08:37 PM

@PAP:
Sure, but speed is relative and so its also good to know the "slowness" of CP-Basic. I will try to add the benchmarking results of these languages to have more clarity.

#47 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 21 April 2007 - 10:01 PM

this is pointless Xerxes, isn't about two o three functions, is about anything. CPLua is 10+ times faster than basic and doing benchmarking to proof that is a time loss

#48 Xerxes

Xerxes

    Casio Freak

  • Members
  • PipPipPipPip
  • 130 posts
  • Gender:Male

Posted 21 April 2007 - 10:14 PM

Ok, I understand. I have no experience with the CP-300+, but I am going to buy one to learn more about this interesting calculator.

#49 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 21 April 2007 - 10:21 PM

then you can made the benchmarks and post them on your database :D

#50 vanhoa

vanhoa

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 854 posts
  • Gender:Male
  • Location:Vietnam

  • Calculators:
    AFX 2.0, CP 300, CP 330, nSpire, TI 89, FX 5800

Posted 22 April 2007 - 08:46 AM

Hello everybody,I've had a competion "Mathematic Olympic 30-4", it's a large comp in my contry. And now i'm back, i will continue the linking soft.

#51 kevinator9

kevinator9

    Casio Freak

  • Members
  • PipPipPipPip
  • 125 posts

  • Calculators:
    Classpad 300
    Classpad Manager

Posted 09 August 2007 - 07:54 PM

WOW, i've found an interesting function wink2.gif

PLAY mel$,dur%,vol%

Plays a melody coded in mel. The characters have the following meaning.
Character Meaning
'a'..'h' Play the corresponding note
'#' Increment next note a half step (cis, dis..)
'+' Change to next higher octave
'-' Change to next lower octave
1 Select whole notes 1/1
2 Select half notes 1/2
4 Select quarter notes 1/4
8 Select eighth notes 1/8
6 Select sixteenth notes 1/16
' ' or 'p' Play a rest
'r' Reset to default value

The parameter dur controls the duration (in milliseconds) of the sound. The parameter vol controls the volume or waveform of the signal. The value 100 is the highest volume.

example: PLAY "4ee2e4ee2e4egcd2e4ffffeeeeedde2dg",1400,100

enjoy wink2.gif

What are numerical values at the end for? What happens if you change them, do they change the song or something? Also what are the mel dur and vol things for?

#52 vanhoa

vanhoa

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 854 posts
  • Gender:Male
  • Location:Vietnam

  • Calculators:
    AFX 2.0, CP 300, CP 330, nSpire, TI 89, FX 5800

Posted 10 August 2007 - 01:18 AM

What are numerical values at the end for? What happens if you change them, do they change the song or something? Also what are the mel dur and vol things for?



dur%:controls the duration (in milliseconds) of the sound
vol%:the volume or waveform of the signal (0-100)

Compare your self:
dur%=500 and dur%=5000.
vol%=10 and vol%=100.

#53 kevinator9

kevinator9

    Casio Freak

  • Members
  • PipPipPipPip
  • 125 posts

  • Calculators:
    Classpad 300
    Classpad Manager

Posted 10 August 2007 - 07:42 PM

I am not sure where to put this in the file.
i Have.
! Test Song
PLAY "4ee2e4ee2e4egcd2ep4fffffeeeedde2dcg", 1400, 100
Where do I put the volume bit? And how EXACTLY do I insert it? Also what do the numbers
, 1400, 100
do?

#54 vanhoa

vanhoa

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 854 posts
  • Gender:Male
  • Location:Vietnam

  • Calculators:
    AFX 2.0, CP 300, CP 330, nSpire, TI 89, FX 5800

Posted 10 August 2007 - 10:02 PM

In that case, dur%=1400 and vol%=100

#55 kevinator9

kevinator9

    Casio Freak

  • Members
  • PipPipPipPip
  • 125 posts

  • Calculators:
    Classpad 300
    Classpad Manager

Posted 10 August 2007 - 11:29 PM

Oh! Thankyou for explaining!
Also you mentioned on MSN that you could put .wma files on it... Is that really possible, if so how?

#56 TomL_12953

TomL_12953

    Casio Addict

  • Members
  • PipPipPip
  • 51 posts
  • Gender:Male
  • Location:Malone, NY USA
  • Interests:Programmable calculators, BASIC computer language, Computers in general, Old movies and TV shows

  • Calculators:
    TI-59, TI-85, TI-86, TI-89, TI-89 Titanium, Radio Shack EC-4026, Algebra FX 2.0 Plus, HP-35s, Compucorp 326 Scientist, Durabrand 828, fx-9860G II SD

Posted 11 September 2007 - 02:20 PM

It cannot be a real compilation, it's just a tokenizing operation. CPLua does the same thing ;)


Why can't it be a real compilation? Is there some reason source code can't be compiled to machine language?

Tom Lake :blink:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users