Page 1 of 1
Anonymus, a New Optimal Language
Posted: Wed Mar 28, 2012 9:38 pm
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
Re: Anonymus, a New Optimal Language
Posted: Wed Mar 28, 2012 11:32 pm
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

Re: Anonymus, a New Optimal Language
Posted: Wed Mar 28, 2012 11:57 pm
by USCode
Re: Anonymus, a New Optimal Language
Posted: Thu Mar 29, 2012 12:24 am
by juror
I see a war coming

Re: Anonymus, a New Optimal Language
Posted: Thu Mar 29, 2012 1:00 am
by xorc1zt
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

people should try a real OOP language like smalltalk and not the crappy java or the insane c++.
Re: Anonymus, a New Optimal Language
Posted: Thu Mar 29, 2012 1:12 am
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.

Re: Anonymus, a New Optimal Language
Posted: Thu Mar 29, 2012 2:57 am
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
Re: Anonymus, a New Optimal Language
Posted: Thu Mar 29, 2012 6:04 am
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?
Re: Anonymus, a New Optimal Language
Posted: Thu Mar 29, 2012 10:05 am
by Rings
could anyone of you download the source ?
Re: Anonymus, a New Optimal Language
Posted: Thu Mar 29, 2012 11:08 am
by jack
Rings wrote:could anyone of you download the source ?
you need to be registered and loged in to download.
Re: Anonymus, a New Optimal Language
Posted: Thu Mar 29, 2012 2:49 pm
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.
Re: Anonymus, a New Optimal Language
Posted: Thu Mar 29, 2012 8:39 pm
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.
Re: Anonymus, a New Optimal Language
Posted: Fri Mar 30, 2012 6:36 am
by xorc1zt
Re: Anonymus, a New Optimal Language
Posted: Sun Apr 01, 2012 3:21 pm
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
Re: Anonymus, a New Optimal Language
Posted: Mon Apr 02, 2012 2:02 am
by Zach
Visual Foxpro used both OOP/Procedural paradigms
I would expect a "true" language to be OOP only, from its inception.