Symbianize Forum

Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.

All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!

Bantas Programming Language : Pinoy Made!

maganda dahil concise ang syntax pero mahirap to para sa mga begginers pa lang
 
maganda dahil concise ang syntax pero mahirap to para sa mga begginers pa lang

Yup, pero maganda 'to sa mga beginners para hasa talaga utak :) Seriously speaking, if they understand the concepts, it's easy for them to create simple programs that will enhance their logic especially in the field of Math. In fact, I developed this for students. Sana lang may tumangkilik na I.T./Computer teachers at sumuportang mga estudyante :(
 
Last edited:
Yup, pero maganda 'to sa mga beginners para hasa talaga utak :) Seriously speaking, if they understand the concepts, it's easy for them to create simple programs that will enhance their logic especially in the field of Math. In fact, I developed this for students. Sana lang may tumangkilik na I.T./Computer teachers at sumuportang mga estudyante :(


Interesting sir :nice:. :thumbsup: Ngapala Incoming IT Student ako isa na ko sa tatangkilik. :thumbsup: :praise: :praise: Kaso Nasa "Newbie" level pa lang ako
 
Interesting sir :nice:. :thumbsup: Ngapala Incoming IT Student ako isa na ko sa tatangkilik. :thumbsup: :praise: :praise: Kaso Nasa "Newbie" level pa lang ako

Maraming Salamat :) No, it should not be the reason. Attitude din ang gusto kong maidevelop ng mga estudyante sa pag-aaral nito. At yun ang gagamitin niya sa pag-aaral hanggang makalabas ng eskwelahan at makapag-trabaho. It looks hard to read (i.e. code), pero pagnakuha mo na yung konsepto, tuloy-tuloy na. Ganun din ang approach sa pag-aaral ng ibang programming language. Minsan yan ang nagiging dahilan nga mga estudyante, makita pa lang isang bagay na mukang mahirap, mawawalan na ng gana o madidiscourage na siya. Ito ang sinasabi kong attitude.
 
QUADRATIC EQUATIONS (Challenge #5)

Let's solve the following quadratic equations using BantasPL.

1) 5x^2+6x+1=0
2) 6x^2+11x-35=0
3) x^2-3x-4=0
4) -3x^2+x+8=0
5) 17x^2-x-26=0

Here's our code:

Code:
%,Quadratic Equations
' Standard Form : ax^2 + bx + c = 0

@,1
>,Enter the value of a:

@,2
>,Enter the value of b:

@,3
>,Enter the value of c:

'''''''''''''''''''''''''''''
' Formula :                 '
' + => (-b+(b^2-4ac)^.5)/2a '
' - => (-b-(b^2-4ac)^.5)/2a '
' Note : ^.5 (raise to .5)  '
'        ... is square root '
'''''''''''''''''''''''''''''

''''' 4ac part at position #4 (@4) ''''
@,4
<,4
*,@1
*,@3

''''' to make b negative at position #5 (@5) ''''
@,5
<,@2
*,-1

''''' 2a part at position #6 (@6) '''''
@,6
<,@1
*,2

'''' (b^2-4ac)^.5 part at position #7 (@7) '''''
@,7
<,@2
^,2
-,@4
^,.5

''''' (-b-(b^2-4ac)^.5)/2a at position #8 (@8)'''''
''''' plus (b^2-4ac)^.5 => @7 '''''
@,8
<,@5
+,@7
/,@6

''''' (-b+(b^2-4ac)^.5)/2a at position #9 (@9)'''''
''''' minus (b^2-4ac)^.5  => @7 '''''
@,9
<,@5
-,@7
/,@6

?,

''''' Result '''''
@,10
<,x is 
&,@8
&, or 
&,@9
&,.
?,@10
?,

ScreenShots

View attachment 163958

View attachment 163959

Source:
1) http://www.mathsisfun.com/algebra/quadratic-equation.html
2) http://www.purplemath.com/modules/solvquad6.htm
3) http://www.mathsisfun.com/quadratic-equation-solver.html
 

Attachments

  • QuadEqCode.png
    QuadEqCode.png
    11.6 KB · Views: 7
  • QuadEqOutput.png
    QuadEqOutput.png
    7.7 KB · Views: 3
Last edited:
You can now download the interpreter directly from here (symbianize). Pls. click the first page.

I would be glad, if you contribute sample problems and programs written in BantasPL. Comments/Suggestions are welcome. It's a great help for me to improve this language.

If you don't have any programming background, I can teach you using this programming language. This will also help you learn other languages.

I'm happy, my son (8yrs. old) understands the basic concept of BantasPL and he can program without my guidance anymore. He now knows how to use the arithmetic operators (+,-,*,/). He proudly told his mom, that multiplication symbol is asterisk (*) and division symbol is / aside from + and - signs :)

Even pre-schoolers can learn BantasPL :)
 
Last edited:
Good Job boss... tuloy mo lang yan

Maraming Salamat, boss! :)

- - - Updated - - -

BantasPL and Other Programming Languages


BASIC
Code:
dim x as integer,y as integer
x=7
y=x
print y


C
Code:
int x,y;
x=7;
y=x;
printf("%d",y);


BANTAS
Code:
@,1
<,7
@,2
<,@1
?,@2


****************************************

BASIC
Code:
dim x as integer
input "Enter a number:",x
print x


C
Code:
int x;
printf("Enter a number:);scanf("%d",&x);
printf("%d",x);


BANTAS
Code:
@,1
>,Enter a number
?,@1

****************************************

BASIC
Code:
dim c as integer
c=2
while c<=10
  print c
  c=c+2
wend


C
Code:
int c;
c=2;
while(c<=10)
{
   printf("%d",c);
   c=c+2;
}


BANTAS
Code:
@,1
<,2
[,1
  ?,@1
  +,2
],10
 
Last edited:
ok toh ah salamat ng marami pag aaralan ko nga toh khit first year palang ako sa IT hehe !
para sakin mas maganda kpag nag aral ka advance .. :)
 
Angas :) Pede pang ma improve at baka ma discover someday pag nadevelop ng husto :)
 
ok toh ah salamat ng marami pag aaralan ko nga toh khit first year palang ako sa IT hehe !
para sakin mas maganda kpag nag aral ka advance .. :)

Good! Keep it up! :) Pa-share na lang and pls. give me feedback. Thanks!

- - - Updated - - -

Angas :) Pede pang ma improve at baka ma discover someday pag nadevelop ng husto :)

Sana nga :) salamat!
 
The actual code of my son's (8yrs old) work in BantasPL

View attachment 164397

I gave him a problem to put the following values:

[1] => lei
[2] => 100
[3] => 24
[4] => 10
[5] => 7

His output:

View attachment 164398

...then perform the following operations:

[1] just retain the value
[2] divide (/) by 50
[3] deduct (-) 10
[3] multiply (*) by 8
[5] add (+) 5

... for him to display this:

[1] => lei
[2] => 2
[3] => 14
[4] => 80
[5] => 12

His output:

View attachment 164399

This is my condition before he plays Counter Strike ( a reward system) aside from letting him to stay in our store to assist us in our business :)
 

Attachments

  • Code.png
    Code.png
    8.3 KB · Views: 5
  • Output1.png
    Output1.png
    6.9 KB · Views: 6
  • Output2.png
    Output2.png
    6.9 KB · Views: 5
While exploring with the commands of the current version of BantasPL (because I'm still thinking how to implement conditional statement), I came up with a solution on how to make a database. I used ~ and & command to generate an xml file. Here's the code:

Code:
%,Database using XML by muthym
@,1
<,1
@,3
<,<?xml version="1.0" encoding="UTF-8"?>
&,<student>
@,4
<,Record #
@,5
<,
[,1
  @,5
  &,@4
  &,@1
  ?,@5
  @,2
  >,	IDNUM:
  @,3
  &,<record>
  &,<IDNUM>
  &,@2
  &,</IDNUM>
  @,2
  >,	STUDENT NAME:
  ?,
  @,3
  &,<NAME>
  &,@2
  &,</NAME>
  &,</record>
  @,5
  <,
  @,1
  +,1
],5
@,3
&,</student>
@,1
<,@3
~,1

You will be asked to input ID number & Student name 5 times.

Screenshots:

View attachment 168024

View attachment 168026

Here's the trick. Open out.txt file and remove 1=>.

View attachment 168028

...then save the file as out.xml.

View attachment 168030

Using a spreadsheet program, (in my case, I used LibreOffice), import the xml file.

View attachment 168032

View attachment 168033


And finally... voila! :)

View attachment 168034
 

Attachments

  • xmlCode.png
    xmlCode.png
    14.3 KB · Views: 7
  • xmlOuput.png
    xmlOuput.png
    15.9 KB · Views: 10
  • xmlCode2.png
    xmlCode2.png
    15.2 KB · Views: 9
  • xmlSave.png
    xmlSave.png
    31.3 KB · Views: 4
  • xmlLO1.png
    xmlLO1.png
    18.3 KB · Views: 4
  • xmlLO2.png
    xmlLO2.png
    10.5 KB · Views: 3
  • xmlLO3.png
    xmlLO3.png
    17.4 KB · Views: 5
Last edited:

Attachments

  • elements1.png
    elements1.png
    9.4 KB · Views: 3
  • elements2.png
    elements2.png
    12.9 KB · Views: 3
  • elements3.png
    elements3.png
    14.1 KB · Views: 3
  • elements4.png
    elements4.png
    9.5 KB · Views: 3
  • Elements5.png
    Elements5.png
    8.5 KB · Views: 6
Last edited:
Thanks dito ts.

Dahil dito nalaman ko yung Esolang, tsaka yung stack system. :)

Keep it up TS. Malay natin maging popular yung BANTAS para sa mga beginner na gustong matuto ng programming.

Hilig ko din tong pag program kahit Ece yung course ko. Lalo na sa C language kaso di ko pa ganun ka master yung C.

Paturo naman diyan ts nung about sa classes.
Thanks in advance. :)
 
Thanks dito ts.

Dahil dito nalaman ko yung Esolang, tsaka yung stack system. :)

Thanks din. I hope malaman mo rin yung sa BantasPL :)

Gusto ko lang linawin... ang stack system sa BantasPL ay iba sa ibang esolang (sa mga na-encounter ko) at programming languages. Sa BantasPL, randomly pwede mo kunin yung value. Sa iba, kelangan mo muna i-pop yung sa ibabaw ng isang value na kukunin mo. Halimbawa sa assembly language para malinaw (Note: wag sanang malilito :) )

View attachment 169890

View attachment 169891

Yung unang mapu-push ay mapupunta sa ilalim at ang huli ay mapupunta sa ibabaw. Kaya pagnag-pop ka ang nasa ibabaw ay unang ma-i-extract o matatanggal. Ito yung tinatawag na LIFO (last in first out)

Paliwanag. ang AX, BX, CX, etc.. ay tinatawag na registers. Ang katumbas nito sa BantasPL ay yung mga position na ginagamitan ng @ symbol. At pag gumamit ka ng MOV command, mapupunta yung value sa register na napili mo. < (less than) symbol naman katumbas nito.


Keep it up TS. Malay natin maging popular yung BANTAS para sa mga beginner na gustong matuto ng programming.
Sa tulong mo, magiging popular ang BantasPL na ideya at gawa ng pinoy :)

Hilig ko din tong pag program kahit Ece yung course ko. Lalo na sa C language kaso di ko pa ganun ka master yung C.

Paturo naman diyan ts nung about sa classes.
Thanks in advance. :)

Yung classes na tinutukoy mo ay C++ (OOP language). Yung C na alam mo ay procedural. Search mo dito sa forum about C++ programming. Or google mo lang, maraming examples at materials na pwede mong pag-aaralan. Yun lang ang technique kung gusto matuto at mamaster ang pagpo-programming. Anyway, nagka-ideya ako na gawan ng workaround ang classes sa BantasPL.

Halimbawa:
Code:
#include <iostream>
#include <string>

using namespace std;

class Element
{
   public:
          string Symbol;
          int AtomicNumber;
          int MassNumber; 
          int ComputeNumberOfNeutrons();     
};

int Element::ComputeNumberOfNeutrons()
{
   return (this->MassNumber - this->AtomicNumber);  
}

int main ()
{ 
    int k;
    Element Oxygen;
    Oxygen.Symbol="O";
    Oxygen.AtomicNumber=8;
    Oxygen.MassNumber=16;
    cout << "The atomic number of symbol " << Oxygen.Symbol << " is " << Oxygen.AtomicNumber << endl;
    cout << "This element has " << Oxygen.ComputeNumberOfNeutrons() << " neutrons.";
    cin>>k;
    return 0;
}

Sa isang simpleng paliwanag, sa isang OOP (object oriented programming) language, ang CLASS ay ginagamit sa paggawa ng isang object (instantiate). At ang object ay mayroon o binubuo ng characteristics o attributes o members at methods (actions). Halimbawa sa code na binigay ko, ang AtomicNumber at MassNumber ay members at ComputeNumberOfNeutrons ay method o may ggawing aksyon. Ang Oxygen ay object na ginawa sa pamamagitan ng class Element.

Ito ngayon ang workaround ko sa BantasPL.

View attachment 169892

PART 1

View attachment 169893

View attachment 169894

Code:
%,PROGRAM : Chemical Elements
|,Elements\Oxygen.txt
~,3
@,4
<,The atomic number of symbol 
&,@1
&, is 
&,@2
&,.
?,@4

|,Elements\Carbon.txt
~,3
@,4
<,The atomic number of symbol 
&,@1
&, is 
&,@2
&,.
?,@4

PART 2

View attachment 169895

View attachment 169896

Code:
%,PROGRAM : Chemical Elements
|,Elements\Oxygen.txt
~,3
@,4
<,The atomic number of symbol 
&,@1
&, is 
&,@2
&,.
?,@4
@,5
<,@3
-,@2
@,6
<,This element has 
&,@5
&, neutrons.
?,@6

|,Elements\Carbon.txt
~,3
@,4
<,The atomic number of symbol 
&,@1
&, is 
&,@2
&,.
?,@4
@,5
<,@3
-,@2
@,6
<,This element has 
&,@5
&, neutrons.
?,@6

Dahil dito, idadagdag ko sa next release ang pag-call ng procedure o gawa ng command na pwede ipasok sa looping/iteration para daanan yung mga position at kunin ang mga laman o value sa mga ito.
 

Attachments

  • pushpop.png
    pushpop.png
    8.7 KB · Views: 6
  • pushpop2.png
    pushpop2.png
    19.5 KB · Views: 9
  • eleminfo1.png
    eleminfo1.png
    31.8 KB · Views: 4
  • eleminfo2.png
    eleminfo2.png
    13.3 KB · Views: 5
  • eleminfo3.png
    eleminfo3.png
    8.8 KB · Views: 2
  • eleminfo22.png
    eleminfo22.png
    14.7 KB · Views: 2
  • eleminfo32.png
    eleminfo32.png
    9.6 KB · Views: 0
Last edited:
Thanks po sa pagpaliwanag ng Classes.
Pinagaaralan ko na din po yun ngayon. Hanap hanap mode ng tutorial sa google. :)

Sa ngayon sa VB.net ko palang nasubukang gumawa ng classes at iimplement sa program na pinagpapraktisan ko.

May Decision Making na po ba yung BANTAS PL?
 
Hi TS, thanks for the infos about sa esolang, dahil dito na-open ako sa world of esolang.. hehe
Try ko tong Bantas PL sa free time ko pati yung esolang, BM ko muna.

Okay nga pla yung link mo sa first page(esolangs.org at yung attached file), good pra sa mga tulad ko na di makaaccess sa wordpress(block sa ibang lugar).

Goodluck nga pla dito and thanks again. :hat:
 
Thanks po sa pagpaliwanag ng Classes.
Pinagaaralan ko na din po yun ngayon. Hanap hanap mode ng tutorial sa google. :)

Sa ngayon sa VB.net ko palang nasubukang gumawa ng classes at iimplement sa program na pinagpapraktisan ko.

May Decision Making na po ba yung BANTAS PL?

May decision making na sa looping (i.e. [ & ] bantas/symbols)

e.g.
Code:
@,1
<,1
[,1
  ?,@1
  @,1
  +,1
],3

],3 line -> dito nangyayari decision making. Gagawin niya yung process hanggang umabot sa 3 yung value na nasa nasa position #1 ( [,1 ). Para siyang while statement sa ibang proglang. Diba ang mga looping statements may decision sa syntax nila?

Pero decision (i.e. conditional statements/symbols) per se, wala pang implementation. still thinking :) Wala pang time para galawin yung code. Marami pa akong isisingit para isang gawaan na lang.

- - - Updated - - -

Hi TS, thanks for the infos about sa esolang, dahil dito na-open ako sa world of esolang.. hehe
Try ko tong Bantas PL sa free time ko pati yung esolang, BM ko muna.

Okay nga pla yung link mo sa first page(esolangs.org at yung attached file), good pra sa mga tulad ko na di makaaccess sa wordpress(block sa ibang lugar).

Goodluck nga pla dito and thanks again. :hat:

I hope ma-i-post mo yung examples na magagawa mo sa BantasPL. At makapagbigay na rin ng feedback. Maraming Salamat :)
 
Last edited:
String Manipulation in BantasPL (A Tutorial)

Code:
@,1
<,Bantas
(,3
?,@1

Line # 1 : Isi-set natin ang ating program sa position # 1. Para ka lang nagdeclare ng isang variable. Sa position #1 tayo maglalagay ng value.
Line # 2 : Ilalagay natin ang value na "BantasPL" (without quotes) sa current position which is #1 nga.
Line # 3 : Kukunin natin ang tatlong (3) karakter mula sa kaliwa gamit ang ( na bantas.
Line # 4 : Tapos, ipi-print natin ang laman ng position # 1

Code:
@,1
<,Bantas
),5
?,@1

Ganun din ang eksplenasyon pwera yung line # 3.

Line # 3 : Kukunin natin ang limang (5) karakter mula sa kanan gamit ang ) na bantas.


... itutuloy... abangan! :)
 
Last edited:
Back
Top Bottom