Welcome, Guest. Please login or register.

Author Topic: AROS ports + How to get back into C/C++  (Read 4051 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline RodneyTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 1386
    • Show all replies
    • http://donthaveone.com/
AROS ports + How to get back into C/C++
« on: November 27, 2003, 02:34:42 AM »
I've been looking at getting back into some coding. Haven't done any C/C++ for, well, a long time... since my algorithyms and data structures subject at uni, which was a bout 1+ ago. I've done some PHP since, but even that was 7+ months ago... The most recent i've done is Java 4+ months ago and Javascript 2+ months ago...

Any Ideas about how to get back into the swing of things and maybe re-learn a lot of stuff. I was thinking of porting the DOM to AROS. But thats a pretty big task, and not only would i have to learn C/C++ and get used to it, but also understand IDL and the mapping to C++. It took me several hours or days to work out the C++ mapping of a sequence and "port" the idl deffinition to C++. What a pain. I think i may just use a compiler instead next time..

Anyway, i thought the best way might be to port some simple or complex applications to AROS. Such as xpat? Which if i was to write the DOM, it would sit ontop of it. Has Xpat been ported to AROS?

I was thinking that porting may be a little less difficult in comparison to writing a program from scratch. Any ideas would be welcome on how to get back into C/C++ coding.

This thread was inspried by a reply on an AW thread :).

Quote

jahc wrote:
http://www.cplusplus.com/doc/tutorial/
http://www.cprogramming.com/


I was going to reply to it there, but i asked a lot of questions and thought it'd screw the thread up and take it somewhere the original poster didnt want it to go. Also, AW doesnt have any topics that cover my questions. Neither does AO but i though AROS dev was close enough :)

Also, on a side note, i've been getting buffer overflows on every contrib program in AROS. At least everyone i tried, except for the chess game which didnt do anything. I dont believe this woudl have anything to do with the problems the AROS team where having with the nightlys would it? Also, could this have something to do with the stack - im guess it could be, but i didnt know how to enlarge it... havnt looked into it yet?
We are not Humans having a spirital experiance
We are Spirits having a Human experiance.
 

Offline RodneyTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 1386
    • Show all replies
    • http://donthaveone.com/
Re: AROS ports + How to get back into C/C++
« Reply #1 on: November 27, 2003, 06:06:31 AM »
so would porting programs, possibly small to start of with, be a good way of getting my skills up to scratch? I figured doing is better than reading a heap of crap, because its likly whilst doing i'll come across something that'll require me to read it and i should just do it then! In comparison to reading a heap of stuff front up, and then doing some dev work...
We are not Humans having a spirital experiance
We are Spirits having a Human experiance.
 

Offline RodneyTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 1386
    • Show all replies
    • http://donthaveone.com/
Re: AROS ports + How to get back into C/C++
« Reply #2 on: November 27, 2003, 02:38:25 PM »
Quote

falemagn wrote:
Hey Rodney,

Yes, libexpat has been ported already, you can find it in the contrib dir, indeed.


Hrmm, that woulda been a good project and good ramp up for a C++ DOM implementation. Im pretty damn sure there is NO C++ DOM implementation in the world. I nearly came close but i saw a guy who was looking for one and hadnt found one of the the 25 parsers he had found!

So my idea is still go, but a long way off happening! :)

Quote

About the buffer overflow... what exactly do you mean? Is it an error the shell report? If so, then it must be because our shell doesn't handle paths longer than 256 characters (I know, this is a limitation which I always forget we have... need to find the time to fix it), and it might be that the current pathname lenght is longer than the maximum. Try renaming the contrib dir from its name to just "contrib", and see if things change.

[/quote]

That worked :) It was in Zune, actualy, but i guess it all comes down to the shell! It was the AROS-Contrib-all path that was getting me! Thanx... That solution does sound oddly familiar thought, i prolly had to do a similar things last time i installed AROS :)

EDIT - wow - this message was a mess :)
We are not Humans having a spirital experiance
We are Spirits having a Human experiance.
 

Offline RodneyTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 1386
    • Show all replies
    • http://donthaveone.com/
Re: AROS ports + How to get back into C/C++
« Reply #3 on: November 27, 2003, 03:40:14 PM »
Quote

falemagn wrote:
Quote

It was in Zune, actualy, but i guess it all comes down to the shell!


Zune? Could you please tell me in detail what happened, then?

Thanks a lot.


Well i hope i said that right :)

Basicly i extracted the AROS-contrib-all bz2 archive under the AROS-linux directory. Once AROS loaded, which was damn fast! I'd open the system "drive" by double clicking it on the desktop/workbench and proceed to AROS-blablalbla-contib-all (this was before i renamed it) and double click on some of the demos. All of the ones i tried said "buffer overflow". That message was presented in a small window, possibly with an OK button or something.

But i renamed the folder to "aros-contrib" (as to not conflict with the contrib folder AROS puts there by default (i know i could have put the stuff in there, but i wanted to keep it seperate)) and it all works :)

This is under linux, with root user too, if that would make a difference.

Also, note, any port i'll do will most likly take me years :) as i've only one 1st and 2nd year uni projects. But im keen. Has libXpm been ported? I was thinking of porting Xevil, a great game i like to play on debian. I think i'd have to do most of the graphix all by my wee self, which means learning all the aROS stuff  which should be fun, otherwise i'd have to port Xlibs as well or something nasty and thats not going to happen. But one thing that will ease the pain if is libXpm is ported. If not, i may have a go at the first which should give me some experience for the xevil port and working with graphix... I feel as thought i should start with much more simpler things, but i think throughing myself in the depend could also be good for me :)... Any thoughts?
We are not Humans having a spirital experiance
We are Spirits having a Human experiance.
 

Offline RodneyTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 1386
    • Show all replies
    • http://donthaveone.com/
Re: AROS ports + How to get back into C/C++
« Reply #4 on: November 28, 2003, 02:51:33 AM »
Quote

And no, libXpm has not been ported, AFAIK.


Well i was thinking there would be a similar AROS way of doing it anyway :) libxpm is for Unix. Anyway i've got a lot of reading to do i would think. The archetectural document developers document for both xevil and aros... Ohhh yer, gota download gcc :) unless its already in the AROS archive, but i dont think it is.
We are not Humans having a spirital experiance
We are Spirits having a Human experiance.
 

Offline RodneyTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 1386
    • Show all replies
    • http://donthaveone.com/
Re: AROS ports + How to get back into C/C++
« Reply #5 on: November 28, 2003, 03:08:36 AM »
Quote

Karlos wrote:
Get back into C/C++ ? My dear boy, one never left!


Well its not that i've left :) its just that i've only done pissy uni projects and i havnt coded in it for about a year or more.

I dont need to re-learn the basics, such as classes, functions, pointers, conditionals etc I think i just wanna learn about real platform issues such as portability, that i havnt had a great chance to learn about. I think thats what really interests me. I believe the best way to go about it would be to jump into a project of somekind and learn on the way. But im not sure. You'r comments woudl be highly helpful :)
We are not Humans having a spirital experiance
We are Spirits having a Human experiance.
 

Offline RodneyTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 1386
    • Show all replies
    • http://donthaveone.com/
Re: AROS ports + How to get back into C/C++
« Reply #6 on: November 28, 2003, 06:12:27 AM »
Quote

Karlos wrote:


Hmmmm. You could be the perfect guinea pig for something I've been working on (but currently on hold)....



That does sound evil... Im interested :)

Well i've got my AROS dev environment set up, im gunna unpack the xevil source and hopfuly get to read some stuff. Maybe i'll start by reading all the comments in the source.
We are not Humans having a spirital experiance
We are Spirits having a Human experiance.
 

Offline RodneyTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 1386
    • Show all replies
    • http://donthaveone.com/
Re: AROS ports + How to get back into C/C++
« Reply #7 on: November 28, 2003, 11:49:37 AM »
Quote

Emufreak wrote:
Well I try to port that at the moment. So we should probably try to coordinate that a bit. I have to be honest here too. My problem is I can't make too much promises. Because I have just very little time and very little experience in C/C++. What I wan't to say with that is, that I'm motivated right now but I might give up realizing that it's a bit too difficult or that I just don't have enough time for it.


Thats fantastic :) So you'r porting it to AROS atm? You'r concerns about skill level are echoed in my mind as well. Although, theres no telling, and once i "truly" get started on a project, i know i'll find it hard to stop, and i've played the R&D role in a few projects before, so im used to "digging" for information.

ATM im reading the xevil archetectural document. It goes throught he modules and their relationships, duties etc. Its not a bad read. Have you read  it? How far through are you in you'r efforts?

Also, where are you from? country etc!?
We are not Humans having a spirital experiance
We are Spirits having a Human experiance.
 

Offline RodneyTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 1386
    • Show all replies
    • http://donthaveone.com/
Re: AROS ports + How to get back into C/C++
« Reply #8 on: November 28, 2003, 12:52:23 PM »
Yup here what i've figured so far. I may even be tempted to write up a document describing how i think i should go about it ect. It also may be helpful to get others in on the project. That is, others who know what to do when it comes to creating Amiga interfaces and playing around with Amiga specific functions for drawing ect...

Having said that, i dont believe anything from the X11 or Win32 directorys should be ported. It may be easier to do so , but it may be harder. For example, if we wanna port the unix stuff, there's gunna have to be a port of libXPM which is the X pixmap library they use to draw the images... or something like that.

I also believe that starting from Main could be a bad idea. Although its prolly more intuitive to start from the start, its going to have the most dependancies. When i say dependancies, i mean included C++ files. So i think it may be smart to start at the other end, then when we get to the main function, all the other stuff would have been done and it should be trivial from there :)... However, it may be a good idea to start from main when initialy reading through the code to get an idea of the system.

But maybe a good place to start would be utils.cpp ? Or something like that. I think it may have some include files, but im not sure how it uses them, because it was explained to be a C runtime wrapper.

Also, i already know of stuff we should NOT touch for the moment. Such as Role and the streams files. That is, the client server stuff. I hope, we dont have to port those unless we want a client/server game. I dont have to start a server to run Xevil so im guessing that stuff is not neccessary. Althoug having said that, Role has three things (interfaces/objects?) called Client, Sever and Standalone... Im guessing then we may have to port Role, but only the standalone thingo, for the moment :)

As i may or may not have mentioned, i read the document now, but i'll have to go over some of the diagrams again to get a good feel for the module hierarchy.

Anyway, theres still a lot of reading to do. Also, i noticed on the AROS dev manual (if it infact was that) that ViM would be nice to be ported... I know these pages are old, but maybe that'd be a nice project as well? It might be a little easier too... although now i remember its not JUST a text editor, its pretty powerful :)

Well, im gunna relax a little, surf, maybe read some more, i'll cya later :)
We are not Humans having a spirital experiance
We are Spirits having a Human experiance.