Anonymus, a New Optimal Language

For everything that's not in any way related to PureBasic. General chat etc...
xorc1zt
Enthusiast
Enthusiast
Posts: 276
Joined: Sat Jul 09, 2011 7:57 am

Anonymus, a New Optimal Language

Post by xorc1zt »

Anonymus is language made by a 16 years old guy. Like purebasic, the code is converted to a asm file wich is compiled with fasm. The compiler is written with #C and is open source (GPLv3)
you should keep a eye on this project.

http://www.codeproject.com/Articles/192 ... l-language
juror
Enthusiast
Enthusiast
Posts: 233
Joined: Mon Jul 09, 2007 4:47 pm
Location: Courthouse

Re: Anonymus, a New Optimal Language

Post by juror »

xorc1zt wrote:you should keep a eye on this project.
Thanks, I will.

I hope the author keeps his eye on it too :)
USCode
Addict
Addict
Posts: 924
Joined: Wed Mar 24, 2004 11:04 pm
Location: Seattle

Re: Anonymus, a New Optimal Language

Post by USCode »

Impressive, especially for a 16yr old ... but does the world need another OOP language?
http://www-cs-students.stanford.edu/~blynn//c/ch02.html
http://harmful.cat-v.org/software/OO_programming/
juror
Enthusiast
Enthusiast
Posts: 233
Joined: Mon Jul 09, 2007 4:47 pm
Location: Courthouse

Re: Anonymus, a New Optimal Language

Post by juror »

I see a war coming :lol:
xorc1zt
Enthusiast
Enthusiast
Posts: 276
Joined: Sat Jul 09, 2011 7:57 am

Re: Anonymus, a New Optimal Language

Post by xorc1zt »

USCode wrote:Impressive, especially for a 16yr old ... but does the world need another OOP language?
http://www-cs-students.stanford.edu/~blynn//c/ch02.html
http://harmful.cat-v.org/software/OO_programming/
unlike java or c#, this language doesn't force you to use class. you can code without OOP.
juror wrote:I see a war coming :lol:
people should try a real OOP language like smalltalk and not the crappy java or the insane c++.
juror
Enthusiast
Enthusiast
Posts: 233
Joined: Mon Jul 09, 2007 4:47 pm
Location: Courthouse

Re: Anonymus, a New Optimal Language

Post by juror »

xorc1zt wrote:people should try a real OOP language like smalltalk and not the crappy java or the insane c++.
+1
I'm mostly a procedural guy myself, but I did love smalltalk. :)
akj
Enthusiast
Enthusiast
Posts: 668
Joined: Mon Jun 09, 2003 10:08 pm
Location: Nottingham

Re: Anonymus, a New Optimal Language

Post by akj »

If anyone is interested, below is a direct translation of the first Anonymus sample program 'Squares' to PureBasic:

Code: Select all

; Squares 2.0
; Draws fading squares. When the mouse is over the square, it appears.
; Press ESC to end the program
; Translated from the Anonymus programming language
; www.codeproject.com/Articles/192825/Anonymus-the-optimal-language

EnableExplicit

;- Constants
#SquareSize = 32
#Width = 24
#Height = 20
#winMain = 0
;}

;- Globals
Global Dim Arry.d(#Width, #Height)
;}

Procedure.d Decrease(Val.d)
If Val<0.02: ProcedureReturn 0.0: Else: ProcedureReturn Val-0.02: EndIf
EndProcedure

Procedure.b InArea(x, y, w, h)
Protected mx, my
mx = WindowMouseX(#winMain): my = WindowMouseY(#winMain)
If x<=mx And mx<x+w And y<=my And my<y+h: ProcedureReturn #True: Else: ProcedureReturn #False: EndIf
EndProcedure

Procedure Update()
; Updates the squares and draws them
; If the mouse is on the square, it draws a white square and
; sets the fading rate to 1 which means it's fully visible,
; otherwise it draws with a color based on square's position
Protected x, y, Value.d, XPos, YPos
Protected Colour, Red, Green, Blue
For x = 0 To #Width
  For y = 0 To #Height
    Value = Arry(x, y)
    XPos = x*#SquareSize
    YPos = y*#SquareSize
    If InArea(XPos, YPos, #SquareSize, #SquareSize)
      Value = 1.0
      Colour = #White
      StartDrawing(ScreenOutput())
        Box(XPos, Ypos, #SquareSize, #SquareSize, Colour)
      StopDrawing()
    ElseIf Value>0.0
      Colour = 255*Value
      Red = (x*1.0/#Width)*Colour
      Green = (1-(y*1.0/#Height))*Colour
      Blue = (y*1.0/#Height)*Colour
      Colour = RGB(Red, Green, Blue)
      StartDrawing(ScreenOutput())
        Box(XPos, Ypos, #SquareSize, #SquareSize, Colour)
      StopDrawing()
    EndIf
    Arry(x,y) = Decrease(Value)
  Next y
Next x
EndProcedure

Procedure Reset()
; Zeroise the array
Protected x, y
For x = 0 To #Width
  For y = 0 To #Height
    Arry(x,y) = 0.0
  Next y
Next x
EndProcedure

; Main program
Reset() ; Unnecessary in PureBasic
; The next 3 lines translate 'Graphics SquareSize * Width, SquareSize * Height' from the Anonymus version
InitSprite()
OpenWindow(#winMain, 0, 0, #SquareSize*#Width, #SquareSize*#Height, "SQUARES", #PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(#winMain), 0, 0, #SquareSize*#Width, #SquareSize*#Height, 0,0,0)
While Not(GetAsyncKeyState_(#VK_ESCAPE) & $8000) ; Until ESC is pressed
  ClearScreen(#Black) ; Unnecessary in PureBasic
  Update()
  FlipBuffers()
  While WindowEvent(): Wend ; Mainly to ignore mouse clicks
Wend
Anthony Jordan
User avatar
IceSoft
Addict
Addict
Posts: 1698
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

Re: Anonymus, a New Optimal Language

Post by IceSoft »

akj wrote:If anyone is interested, below is a direct translation of the first Anonymus sample program 'Squares' to PureBasic:
And what is the fazit?
Belive! C++ version of Puzzle of Mystralia
Bug Planet
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
User avatar
Rings
Moderator
Moderator
Posts: 1435
Joined: Sat Apr 26, 2003 1:11 am

Re: Anonymus, a New Optimal Language

Post by Rings »

could anyone of you download the source ?
SPAMINATOR NR.1
jack
Addict
Addict
Posts: 1358
Joined: Fri Apr 25, 2003 11:10 pm

Re: Anonymus, a New Optimal Language

Post by jack »

Rings wrote:could anyone of you download the source ?
you need to be registered and loged in to download.
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Re: Anonymus, a New Optimal Language

Post by jassing »

xorc1zt wrote:people should try a real OOP language like smalltalk and not the crappy java or the insane c++.
I made a living coding in visual foxpro -- true oop; fast. I had used it for non-database apps too; just because I could use oop or not; mix/match -- use what was appropriate for a given situation... Too bad MS killed it... it never gained 'main stream' acceptance outside of the database market.
Thorium
Addict
Addict
Posts: 1308
Joined: Sat Aug 15, 2009 6:59 pm

Re: Anonymus, a New Optimal Language

Post by Thorium »

This guy is definitely a true talent.
His compiler even uses SSE and the language has a nice syntax as far as i can see.

This 16 year old guy has a bright future.
ColBoy
Enthusiast
Enthusiast
Posts: 143
Joined: Fri Feb 13, 2004 2:37 pm
Location: Ottawa, Canada
Contact:

Re: Anonymus, a New Optimal Language

Post by ColBoy »

jassing wrote:
xorc1zt wrote:people should try a real OOP language like smalltalk and not the crappy java or the insane c++.
I made a living coding in visual foxpro -- true oop; fast. I had used it for non-database apps too; just because I could use oop or not; mix/match -- use what was appropriate for a given situation... Too bad MS killed it... it never gained 'main stream' acceptance outside of the database market.
Sorry did I just hear you say Visual FoxPro was true OOP? True version 9 had an OOP/.NET addon, but I hardly think you can call it tru OOP.

Colin
Colin
Zach
Addict
Addict
Posts: 1677
Joined: Sun Dec 12, 2010 12:36 am
Location: Somewhere in the midwest
Contact:

Re: Anonymus, a New Optimal Language

Post by Zach »

Visual Foxpro used both OOP/Procedural paradigms

I would expect a "true" language to be OOP only, from its inception.
Post Reply