Welcome, Guest. Please login or register.

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

Description:

0 Members and 1 Guest are viewing this topic.

Offline RodneyTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 1386
    • Show only replies by Rodney
    • 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 jahc

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 521
    • Show only replies by jahc
    • http://wookiechat.amigarevolution.com
Re: AROS ports + How to get back into C/C++
« Reply #1 on: November 27, 2003, 02:45:14 AM »
Quote
This thread was inspried by a reply on an AW thread :).

I'm glad it inspired someone. Whenever someone asks on an amiga forum how to get into programming, I always paste those links, because those two sites got me started, and I found them very easy to follow. I'm still learning as I go with AmigaOS, but yeah.. I'm well on my way I think.
 

Offline RodneyTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 1386
    • Show only replies by Rodney
    • http://donthaveone.com/
Re: AROS ports + How to get back into C/C++
« Reply #2 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 bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show only replies by bloodline
    • http://www.troubled-mind.com
Re: AROS ports + How to get back into C/C++
« Reply #3 on: November 27, 2003, 11:17:39 AM »
I think the buffer overflows are due to a recent change in our c lib... this is one of those things that needs some one to go throught the Contrib and make sure everything is correct... Time consuming and Time best spent on the OS rather than the contributed programs. :-(

As for Porting, I suggest you join the AROS-Dev mailign list, the guys on there would be happy to tell you have to port your software to AROS/AmigaOS :-)

Offline falemagn

  • Sr. Member
  • ****
  • Join Date: May 2002
  • Posts: 269
    • Show only replies by falemagn
    • http://www.aros.org/
Re: AROS ports + How to get back into C/C++
« Reply #4 on: November 27, 2003, 01:16:25 PM »
Hey Rodney,

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

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.
 

Offline RodneyTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 1386
    • Show only replies by Rodney
    • http://donthaveone.com/
Re: AROS ports + How to get back into C/C++
« Reply #5 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 falemagn

  • Sr. Member
  • ****
  • Join Date: May 2002
  • Posts: 269
    • Show only replies by falemagn
    • http://www.aros.org/
Re: AROS ports + How to get back into C/C++
« Reply #6 on: November 27, 2003, 02:48:32 PM »
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.
 

Offline RodneyTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 1386
    • Show only replies by Rodney
    • http://donthaveone.com/
Re: AROS ports + How to get back into C/C++
« Reply #7 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 falemagn

  • Sr. Member
  • ****
  • Join Date: May 2002
  • Posts: 269
    • Show only replies by falemagn
    • http://www.aros.org/
Re: AROS ports + How to get back into C/C++
« Reply #8 on: November 27, 2003, 05:29:03 PM »
Quote
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.


Aaah, ok, then it was Wanderer... I'll have a look.

And no, libXpm has not been ported, AFAIK.
 

Offline RodneyTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 1386
    • Show only replies by Rodney
    • http://donthaveone.com/
Re: AROS ports + How to get back into C/C++
« Reply #9 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 Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16866
  • Country: gb
  • Thanked: 4 times
    • Show only replies by Karlos
Re: AROS ports + How to get back into C/C++
« Reply #10 on: November 28, 2003, 02:56:44 AM »
Get back into C/C++ ? My dear boy, one never left!
int p; // A
 

Offline RodneyTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 1386
    • Show only replies by Rodney
    • http://donthaveone.com/
Re: AROS ports + How to get back into C/C++
« Reply #11 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 Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16866
  • Country: gb
  • Thanked: 4 times
    • Show only replies by Karlos
Re: AROS ports + How to get back into C/C++
« Reply #12 on: November 28, 2003, 03:39:14 AM »


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

int p; // A
 

Offline RodneyTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 1386
    • Show only replies by Rodney
    • http://donthaveone.com/
Re: AROS ports + How to get back into C/C++
« Reply #13 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 Emufreak

  • Jr. Member
  • **
  • Join Date: May 2003
  • Posts: 64
    • Show only replies by Emufreak
Re: AROS ports + How to get back into C/C++
« Reply #14 on: November 28, 2003, 08:50:06 AM »
Quote

I was thinking of porting Xevil, a great game i like to play on debian.


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.