flat assembler
Message board for the users of flat assembler.

Index > Projects and Ideas > Creating a object-oriented programming language...

Goto page 1, 2  Next
Author
Thread Post new topic Reply to topic
sylwek32



Joined: 27 Apr 2006
Posts: 339
sylwek32
Has somebody on this board try to make an own
object-oriented language?

With object-oriented i mean something like "visual basic"..

Please post your experiences and notes here..
Thanks
Post 26 Oct 2006, 22:13
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7108
Location: Slovakia
vid
i am doing many thinking with OOP things in FASMLIB. i am slowly going through way that resulted into creating OOP. It sure has it's point, but this point is seldom understood by people who use it. Same as with assembly
Post 26 Oct 2006, 22:26
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
sylwek32



Joined: 27 Apr 2006
Posts: 339
sylwek32
@vid..
fasmlib is great..
i will try it out.
Post 26 Oct 2006, 22:42
View user's profile Send private message Reply with quote
Reverend



Joined: 24 Aug 2004
Posts: 408
Location: Poland
Reverend
Isn't it better just to get used to one of existing languages? You have a lot of programming languages, and surely one will suit you. Let people who are specialists design them, and let programmers learn/use them. Of course you may find some bugs/stupidities in every language, but still I don't see a point in designing one on your own. Maybe just for educational resons, id so then try your best.
Post 27 Oct 2006, 21:52
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7108
Location: Slovakia
vid
sylwek32: for now it is more like set of useful routines. real tight library will come with next version, where you will have streams and input.

Unfortunatelly, there is delay in releasing it... you can't imagine things that need to be solved for it to work at least like libc.

anyway, let me know how you (dis)like it, or if there are any problems. Wink
Post 27 Oct 2006, 22:29
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4225
Location: 2018
edfed
i am trying to make it
but not really like object files

it is a file system object file

as the files have extension in windows, the object have a type code who determinate what is it

if it's a bmp, then the macrofile refer to it like this:

macrofile:
size_in_bytes dd @f-$-4
@macroroutine dd routine0
@1st_object rd 1,@routine rd 1
@2nd_object rd 1,@routine rd 1
etc...
@@:

it works very well for 3dmacros and panels macros


Description: the 3dengine in 32bit integer mode
how to build a 3dmacro is in the 'terre.inc' file and the 'plan.inc' file

Download
Filename: 3d_prossessing.zip
Filesize: 44.83 KB
Downloaded: 521 Time(s)

Description: a little program to modify in real time the components of the mode 13h palette
how to construct a panel macro is in the 'fadertable.inc' file and the 'buttontable.inc' file

Download
Filename: palette.zip
Filesize: 20.48 KB
Downloaded: 497 Time(s)


_________________
Smile fool iem.design


Last edited by edfed on 29 Jul 2008, 00:18; edited 1 time in total
Post 02 Nov 2006, 11:50
View user's profile Send private message Visit poster's website Reply with quote
RedGhost



Joined: 18 May 2005
Posts: 444
Location: BC, Canada
RedGhost
If you want a really solid object oriented language I suggest C#, it has finalizing, operating overloading, multi-inheritance, explicit member implementation, garbage collection and etc. On the plus it also allows you to load unmanaged modules, call unmanaged functions and use pointers of nearly every type. It is also somewhat platform independent with Windows and Linux support.

_________________
redghost.ca
Post 01 Dec 2006, 10:38
View user's profile Send private message AIM Address MSN Messenger Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7108
Location: Slovakia
vid
RedGhost: If you know assembly, then there is no reason not to use C++. You will understand it, it is as low as OO language can be etc.

.NET has disadvantage of ~25 MB runtime, and of shitty stack-machine MSIL (which just can't be compiled to good x86 code)
Post 01 Dec 2006, 12:56
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Raedwulf



Joined: 13 Jul 2005
Posts: 375
Location: United Kingdom
Raedwulf
vid wrote:
RedGhost: If you know assembly, then there is no reason not to use C++. You will understand it, it is as low as OO language can be etc.

.NET has disadvantage of ~25 MB runtime, and of shitty stack-machine MSIL (which just can't be compiled to good x86 code)


vid: a reflection of my own mind
or is it the other way round Laughing

An alternative to C++, slightly less OO, bit more C-ish (and C-compatible)
http://en.wikipedia.org/wiki/Objective-C

Just a thought....

_________________
Raedwulf
Post 01 Dec 2006, 14:10
View user's profile Send private message MSN Messenger Reply with quote
RedGhost



Joined: 18 May 2005
Posts: 444
Location: BC, Canada
RedGhost
vid wrote:
RedGhost: If you know assembly, then there is no reason not to use C++. You will understand it, it is as low as OO language can be etc.

.NET has disadvantage of ~25 MB runtime, and of shitty stack-machine MSIL (which just can't be compiled to good x86 code)

C++ is no where near the level of OOP that C# is, this is why C# was created. Let's not forget there was always managed C++.

_________________
redghost.ca
Post 01 Dec 2006, 15:22
View user's profile Send private message AIM Address MSN Messenger Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7108
Location: Slovakia
vid
RedGhost: as long as you take OOP as "programming paradigm" yes. But looking at it from reality side, what was OOP:

- we got C. But how the do the proper resource releasing? After anything that can cause error, you need free all resources that are taken (allocated memory, opened files). Can we make this
process automatical?
- well, let's make some common interface to free up any kind of resource. Let there be Destructor.
- but how do we know which ones to free?
- we can make common interface to take resources too. Let there be Constructor

and that is about all of OOP from my point of view. You have SEH in strutured programming too, of course. All classes in inheritance are just about extending this interface. Or COM objects are another extension to this interface (which allows sharing of objects).
Post 01 Dec 2006, 15:54
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Raedwulf



Joined: 13 Jul 2005
Posts: 375
Location: United Kingdom
Raedwulf
C# would be nice if it wasn't bloated.NET fullstop.
And Mono/.NET compatibility is much less than desired. Awful in fact...

If you are desperate you can make a very nice Object-Oriented FASM just using FASM's macros Smile. Constructors, Destructors and Inheritance etc. etc.
But where as Object-orientation is all good and clever, you can still make an equivalent, easily manageable modular system which surpasses the class version in speed....
C++'s main advantage IMO is template classes. Its a really clever idea and they say C can't do it(and for this case ASM too) but people forgot <macros> Very Happy

I maybe talking a bit of garbage right now, but I believe my ideas are true, its just that I need to sit down and prove them Laughing . vid could you verify this for me?

Cheers.
Post 01 Dec 2006, 18:03
View user's profile Send private message MSN Messenger Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7108
Location: Slovakia
vid
Raedwulf: no need to verify anything. OOP can be implemented neatly by FASM macros. It would be better than C++ in some areas, worser in others. Generally, it would be worser than C++

OOP is great thing. But 99.999% people using it have no idea about what it is, and why, and they use it everywhere. Even where it is not needed.

When you go apart from "OOP is programming paradigm", you find out that OOP is making different things beheaving same way, eg. providing common interface for different things. Construction and Desctructor is always-present example of this. In case of COM objects, AddRef and Release are another examples. In case of inheritance, parent object is the interface.

And you can put things under same interface pretty neatly under C, plus the compiler doesn't hide this aspect behind "paradigm".

generally, OOP is *good* thing. But only for people who understand it.
Post 02 Dec 2006, 01:01
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Raedwulf



Joined: 13 Jul 2005
Posts: 375
Location: United Kingdom
Raedwulf
vid wrote:

generally, OOP is *good* thing. But only for people who understand it.


Yes I agree.

vid wrote:

It would be better than C++ in some areas, worser in others. Generally, it would be worser than C++


I got a bit off topic, i meant it probably be faster than C#, but yes C++ is faster.

Cheers.

_________________
Raedwulf
Post 02 Dec 2006, 16:58
View user's profile Send private message MSN Messenger Reply with quote
OzzY



Joined: 19 Sep 2003
Posts: 1029
Location: Everywhere
OzzY
The idea of OOP language built with FASM macros would be very educative.

But as for existing languages:
If you want a really good OOP language try D.
It's similar to C#, but without targeting the .NET framework.

It's native compiled code, that run as fast as C++ (may be slower in very rare cases, and sometimes is faster).

It has lots of good features like dynamic arrays, unit testing system, version control system, very good core library, optional GC, compatibility with C (very few changes to make your C code work in D), helpfull community, nice IRC channel, growing language that can be the future beside C#.

I've been using it for quite a few weeks and I must say that I found my favorite language (it has all things I like from C and C++ and it does not has all things I hate about C,C++, C# and Java).

So, why not try?

Official site: http://www.digitalmars.com/d/
Nice site with DFL GUI library (very similar to WindowsForms) + Entice GUI Designer and other things: http://www.dprogramming.com/
IRC channel: #D on freenode

Just to let you know:
I'm planning about building my new project in D. It's an utility to make FASM applications faster to develop and deploy (it's a console-based IDE). It's a new concept. Wink
Post 03 Dec 2006, 02:00
View user's profile Send private message Reply with quote
Raedwulf



Joined: 13 Jul 2005
Posts: 375
Location: United Kingdom
Raedwulf
Yes, I've been following D, I was wondering however can GDC target 64-bit? I believe it requires 64-bit libraries - not sure. Apart from that minor issue it looks to be a very promising language.

Cheers.
Post 04 Dec 2006, 08:39
View user's profile Send private message MSN Messenger Reply with quote
tantrikwizard



Joined: 13 Dec 2006
Posts: 142
tantrikwizard
sylwek32 wrote:
Has somebody on this board try to make an own
object-oriented language?

With object-oriented i mean something like "visual basic"..

Please post your experiences and notes here..
Thanks


I've written an OO language called OOB (oo basic) similar to C#. The compiler produced TASM source from OOB source which could be compiled into a binary. I like the C# syntax but cant stand the need for the .NET framework. Interpreted code sucks and doesn't produce a machine code binary. I used Gold Parser by Devin Cook for the parsing. http://www.devincook.com/goldparser/ which is a great product. The parsing is the most difficult part and Gold takes care of that headache for almost free. Given the power of Gold, i began an x86 emulator in addition to the compiler but never got around to finishing it. My compiler had a few optimization options but nothing like what is possible with mainstream compilers. Most mainstream compilers have some very intellegent optimization which would take a long time to fully comprehend.
Post 03 Jan 2007, 15:43
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
tantrikwizard



Joined: 13 Dec 2006
Posts: 142
tantrikwizard
RedGhost wrote:
...I suggest C#, it has...multi-inheritance...

Actually it only supports single inheritance though you can implement multiple interfaces.
Post 23 Jan 2007, 20:08
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4225
Location: 2018
edfed
coding result always in a machine code
so C,C++ and else exists only for the capitalist challenge
create slow programms very fast

and i think that the people who don't code in asm are tired
but people who code asm are crazy
Post 26 Jun 2007, 13:53
View user's profile Send private message Visit poster's website Reply with quote
Maverick



Joined: 07 Aug 2006
Posts: 251
Location: Citizen of the Universe
Maverick
Actually C,C++ and else may also exist so you can do more interesting things in your life with your limited time. Otherwise when you're old it may happen someday that's the day you have to die, and you've only finished two big programs in asm.

Wink
Post 26 Jun 2007, 14:40
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2019, Tomasz Grysztar.

Powered by rwasa.