Poster | Thread |
Hypex
| |
Re: New beta of PortablE (r6, the beginner-friendly release) Posted on 28-Jul-2013 15:50:44
| | [ #81 ] |
|
|
|
Elite Member |
Joined: 6-May-2007 Posts: 11230
From: Greensborough, Australia | | |
|
| @ChrisH
Quote:
Supporting dynamic GUI lists in a portable yet fairly efficient fashion was the biggest work by far, but I think fairly successful. Thanks for the encouragement! |
You're welcome. I just need to get my head around what a dynamic list is. I looked up some GUI example code which didn't really clue me in.
Quote:
Do you mind if I ask for what kind of usage? Then I might be able to give a better answer. |
Sure, I am thinking in the lines of a module. where I write a set of E functions for external use. That is compiled in as static code. So the short of it is a module. Can a module be converted to an object file?
ChaosLord pretty much answered it. So what I am thinking is, if a main program is written in C, linked with supporting object files, can E code be compiled to be a supporting object file? Last edited by Hypex on 29-Jul-2013 at 04:12 PM.
|
|
Status: Offline |
|
|
Hypex
| |
Re: New beta of PortablE (r6, the beginner-friendly release) Posted on 28-Jul-2013 16:01:12
| | [ #82 ] |
|
|
|
Elite Member |
Joined: 6-May-2007 Posts: 11230
From: Greensborough, Australia | | |
|
| @ChrisH
Quote:
3. C is more widely supported than C++. |
I'm shocked. When ever I see source code, mostly from things I'm porting to OS4 or considering, it is always C++. I got the feeling that C was considered obsolete or old and C++ was considered the evolutionary model of C programming.Last edited by Hypex on 29-Jul-2013 at 04:13 PM.
|
|
Status: Offline |
|
|
ChrisH
| |
Re: New beta of PortablE (r6, the beginner-friendly release) Posted on 28-Jul-2013 17:35:43
| | [ #83 ] |
|
|
|
Elite Member |
Joined: 30-Jan-2005 Posts: 6679
From: Unknown | | |
|
| @Hypex Dynamic GUI lists are GUI lists whose contents can be updated at any time (rather than being fixed at window creation time).
There are C compilers for 'everything', and it's better supported on the Amiga!
Gotos are only considered harmful for HUMANS, because their use tends to produce an impenentrable "rats nest" of interwined gotos, which tends to make understanding & debugging very hard. Basically, gotos are too easily abused (and I make similar arguments about a lot of C++ features).
Quote:
So what I am thinking is, if a main program is written in C, linked with supporting object files, can E code be compiled to be a supporting object file? |
I think I already answered this earlier, but the short answer is: Not easily, at least not yet (maybe in the future if some planned changes are made).
But the opposite (using C/C++ code within E code) is very easy.Last edited by ChrisH on 28-Jul-2013 at 05:51 PM. Last edited by ChrisH on 28-Jul-2013 at 05:49 PM. Last edited by ChrisH on 28-Jul-2013 at 05:39 PM. Last edited by ChrisH on 28-Jul-2013 at 05:38 PM. Last edited by ChrisH on 28-Jul-2013 at 05:37 PM.
_________________ Author of the PortablE programming language. It is pitch black. You are likely to be eaten by a grue... |
|
Status: Offline |
|
|
ChaosLord
| |
Re: New beta of PortablE (r6, the beginner-friendly release) Posted on 28-Jul-2013 19:49:46
| | [ #84 ] |
|
|
|
Cult Member |
Joined: 4-Apr-2005 Posts: 782
From: Houston, Texas USA | | |
|
| @Hypex
Quote:
Hypex wrote: @ChrisH
Quote:
3. C is more widely supported than C++. |
I'm shicked. When ever I see source code, mostly from things I'm porting to OS4 or considering, it is always C++. I got the feeling that C was considered obsolete or old and C++ was considered the evolutionary model of C programming. |
I know whatcha mean but every device in the universe has a C compiler. Not all devices have C++ compilers and/or some devices have C++ compilers but they have "problems" so it can be better to use C on those devices.
Sometimes you get hired to write some code for an embedded device that never had any c++ compiler made for it. Or you could get one but your boss won't pay the $60,000 for it. So you hafta use the perfectly working and free C compiler.
The code you're looking at on the net is written by regular ppl on regular desktop computers usually using Windoze or ???ix. These machines have giant amounts of ram and fully functional C++ compilers. The ppl writing the code don't care if their code is portable to every device in the universe. They only care that C sux and C++ sux less because C++ fixed some of the problems with C. In some cases C++ intentionally did not fix a C problem but did allow a way to improve the problem.
At some point in a few weeks I intend to test out the SASC v7.x C++ compiler. It might be that it works well enuff that it could support portablE, work 100% with the world-famous SASC Debugger and save ChrisH a bunch of work rewriting everything down to C.
For all we know, PortablE works with SASC++ v7.x right now today with full debugger support. But we don't know because nobody ever gave it a try!
I predict a 50% chance of it working out of the box (without knowing anything about the kind of code that portablE generates). If I actually knew what the code looked like I could give a better estimate like 0% or 75%.
I also predict a 99% chance of PortablE working with SASC by going through the Comeau C++ transpiler. The trouble with that solution is I doubt #line directives will match up right after going thru 2 transpilers.
I will test both SASC++ v7.x and (Comeau C++ into SASC 6.58) and (Comeau C++ into SASC v7.x) to see if it can compile my 200,000 lines of code.
If it is all bugridden gobledygook I will let everyone know. But if everything seems to work out ok then I will try to brainwash some E user (who may or may not be from either Australia or Minnesota ) to try out PortablE using one of those systems.
I am predicting that SASC++ v7 has perfectly working 64-bit numbers (long long) and classes and direct inheritance and some other C++ features. But I also predict that at least 1 major C++ feature will be missing, like Templates (or maybe Templates work but there is just no STL Standard Template Library).
From what I can tell by just looking at it, a bunch of the C++ standard library is missing from SASC v7.x but this is really easy to fix by downloading and compiling free C++ library code from the internet.
So it seems like a really good chance that PortablE can be stacked on top of SASC++ v7.x, be made to work perfectly and have full use of the superduperdebugger.
p.s. I was reading some instruction manual the other day that said the SASC v7 debugger is even better than the v6.58 debugger!
@ChrisH When using a C++ backend: is there any chance of mapping E objects/classes 1:1 as C++ objects/classes?
The reason I ask is that it could make debugging feel really luxurious and comfortable and not feel so much like debugging transpiled code.
_________________ Wanna try a wonderfull magical Amiga strategy game? Total Chaos AGA |
|
Status: Offline |
|
|
ChrisH
| |
Re: New beta of PortablE (r6, the beginner-friendly release) Posted on 28-Jul-2013 20:09:39
| | [ #85 ] |
|
|
|
Elite Member |
Joined: 30-Jan-2005 Posts: 6679
From: Unknown | | |
|
| @ChaosLord In the 'old' days, I was compiling PortablE's C++ code with StormC (the version before they used GCC), and StormC was one of the worst compilers I ever used (so buggy!). I also compiled it with Microsoft freebie compiler (forget name). But as I've stuck to GCC for some years, it's possible they may no longer work. Still, I think there is a good chance of it compiling on any random and not-too-buggy compiler.
BTW, is this SAS/C compiler 68k based? Hopefully you will be running it under WinUAE or similar?
PortablE's classes DO map 1:1 to C++ classes! But methods don't when certain features are used (for example, off the top of my head, ORPHAN methods, or when the method of your sub-class has more parameters than the parent).
BTW, PortablE's "transpiled" C++ code even preserves indentation & comments! Last edited by ChrisH on 28-Jul-2013 at 08:11 PM.
_________________ Author of the PortablE programming language. It is pitch black. You are likely to be eaten by a grue... |
|
Status: Offline |
|
|
ChaosLord
| |
Re: New beta of PortablE (r6, the beginner-friendly release) Posted on 28-Jul-2013 20:32:36
| | [ #86 ] |
|
|
|
Cult Member |
Joined: 4-Apr-2005 Posts: 782
From: Houston, Texas USA | | |
|
| @ChrisH
Quote:
ChrisH wrote: @ChaosLord In the 'old' days, I was compiling PortablE's C++ code with StormC (the version before they used GCC), and StormC was one of the worst compilers I ever used (so buggy!).
|
Yep. Everyone complained about StormC a lot.
I just kept happily compiling away on my SASC 6.58.
Quote:
I also compiled it with Microsoft freebie compiler (forget name).
|
That is the one where they banned C1999. They only allow C1989 or C++
Quote:
But as I've stuck to GCC for some years, it's possible they may no longer work. Still, I think there is a good chance of it compiling on any random and not-too-buggy compiler.
BTW, is this SAS/C compiler 68k based?
|
Yes of course. My main Amiga coding is Motorola 680x0 for Amiga Real Machines and Amiga Virtual Machines (AVMs).
I have nothing against PPC Amigas its just that I don't own one. I would really love to own an ARM based Amiga running AROS, MorphOS or OS4.
But there is a PPC version of SASC v7.x. IIRC It was actually released first, waaaaaay back in the PPC accelerator card days.
Quote:
Hopefully you will be running it under WinUAE or similar?
|
WinUAE on a 3.1Ghz core i5 and an A1200 with 50Mhz 060. But my A1200 needs a tiny bit of work done on it before I can use it again and I am in waaaay to much pain to do it. Also I plan to buy a FPGA Replay NostalgiaStation(tm) with 100Mhz 060 and quadruple-speed chipram soon.
So eventually I will have 3 different systems to test on.
Quote:
PortablE's classes DO map 1:1 to C++ classes!
|
Ok awesome!
Quote:
But methods don't when certain features are used (for example, off the top of my head, ORPHAN methods, or when the method of your sub-class has more parameters than the parent).
BTW, PortablE's "transpiled" C++ code even preserves indentation & comments! |
World Domination coming soon!_________________ Wanna try a wonderfull magical Amiga strategy game? Total Chaos AGA |
|
Status: Offline |
|
|
kamelito
| |
Re: New beta of PortablE (r6, the beginner-friendly release) Posted on 29-Jul-2013 15:48:04
| | [ #87 ] |
|
|
|
Cult Member |
Joined: 26-Jul-2004 Posts: 815
From: Unknown | | |
|
| |
Status: Offline |
|
|
ChaosLord
| |
Re: New beta of PortablE (r6, the beginner-friendly release) Posted on 29-Jul-2013 16:07:39
| | [ #88 ] |
|
|
|
Cult Member |
Joined: 4-Apr-2005 Posts: 782
From: Houston, Texas USA | | |
|
| @kamelit0
Quote:
Never heard of the SAS/C V7, the last one being 6.58 with PPC patches. Any pointers?
|
This is for 680x0. It was originally placed on Aminet around 1996. But surprisingly a small update was uploaded in 2007._________________ Wanna try a wonderfull magical Amiga strategy game? Total Chaos AGA |
|
Status: Offline |
|
|
kamelito
| |
Re: New beta of PortablE (r6, the beginner-friendly release) Posted on 29-Jul-2013 16:19:03
| | [ #89 ] |
|
|
|
Cult Member |
Joined: 26-Jul-2004 Posts: 815
From: Unknown | | |
|
| @ChaosLord
I remember now thanks. Off topic but why not do a bounty to buy SAS/C for Amiga.
Kamelito Last edited by kamelit0 on 29-Jul-2013 at 04:19 PM.
|
|
Status: Offline |
|
|
ChaosLord
| |
Re: New beta of PortablE (r6, the beginner-friendly release) Posted on 29-Jul-2013 16:29:40
| | [ #90 ] |
|
|
|
Cult Member |
Joined: 4-Apr-2005 Posts: 782
From: Houston, Texas USA | | |
|
| @kamelit0
Quote:
kamelit0 wrote: @ChaosLord
I remember now thanks. Off topic but why not do a bounty to buy SAS/C for Amiga.
Kamelito |
Because: 1. They won't sell the source for any amount of money we could raise.
2. The source wouldn't really help us unless/until someone decided to dedicate a huge amount of time to learning how it works and improving it. The odds of anyone volunteering to do that are quite low.
I admit it would be wonderful to have the source released just in case some nice genius coder came along and started improving it._________________ Wanna try a wonderfull magical Amiga strategy game? Total Chaos AGA |
|
Status: Offline |
|
|
Hypex
| |
Re: New beta of PortablE (r6, the beginner-friendly release) Posted on 31-Jul-2013 14:58:35
| | [ #91 ] |
|
|
|
Elite Member |
Joined: 6-May-2007 Posts: 11230
From: Greensborough, Australia | | |
|
| @ChrisH
Quote:
Dynamic GUI lists are GUI lists whose contents can be updated at any time |
Okay, yes I undeerstand.
Quote:
Gotos are only considered harmful for HUMANS |
I guess it was fine when all we had was BASIC.
Quote:
I think I already answered this earlier, but the short answer is: Not easily, at least not yet (maybe in the future if some planned changes are made). |
Oh dear. Well I suppose I can do some experiments to see hoe bad the situation really is.
Depending on how it stores the local and global variables. It might even be easier to write the code as a module and then convert to C/++. That should compile to an object as long as E dependcies are met. Which is where I see a problem. |
|
Status: Offline |
|
|
Hypex
| |
Re: New beta of PortablE (r6, the beginner-friendly release) Posted on 3-Aug-2013 16:24:16
| | [ #92 ] |
|
|
|
Elite Member |
Joined: 6-May-2007 Posts: 11230
From: Greensborough, Australia | | |
|
| |
Status: Offline |
|
|
ChaosLord
| |
Re: New beta of PortablE (r6, the beginner-friendly release) Posted on 3-Aug-2013 16:30:58
| | [ #93 ] |
|
|
|
Cult Member |
Joined: 4-Apr-2005 Posts: 782
From: Houston, Texas USA | | |
|
| @Hypex
I agree the syntax is stupid.
It should have simply been int64 and uint64 and/or long64 ulong64.
Then in the future you get long128 and ulong128. _________________ Wanna try a wonderfull magical Amiga strategy game? Total Chaos AGA |
|
Status: Offline |
|
|
ChrisH
| |
Re: New beta of PortablE (r6, the beginner-friendly release) Posted on 3-Aug-2013 17:24:51
| | [ #94 ] |
|
|
|
Elite Member |
Joined: 30-Jan-2005 Posts: 6679
From: Unknown | | |
|
| @ChaosLord & Hypex I would appreciate it if stuff not directly related to PortablE was kept out of this thread... Thanks in advance! (And if you wish to respond to this message, please PM or email me instead - no point in adding ANOTHER off-topic post here!) Last edited by ChrisH on 03-Aug-2013 at 05:27 PM.
_________________ Author of the PortablE programming language. It is pitch black. You are likely to be eaten by a grue... |
|
Status: Offline |
|
|
ChrisH
| |
Re: New beta of PortablE (r6, the beginner-friendly release) Posted on 20-Nov-2014 15:22:32
| | [ #95 ] |
|
|
|
Elite Member |
Joined: 30-Jan-2005 Posts: 6679
From: Unknown | | |
|
| After a user reported the problem, I've released a minor update to PortablE which fixes it to work with AmigaOS4's current SDK (better late than never): http://cshandley.co.uk/portable/
This does mean you will probably be unable to cross-compile OS4 programs using AmiDevCpp (on a Windows PC), at least until AmiDevCpp is updated to match OS4's SDK (or you update it manually).
If your installation of PortablE already works, then there is NO reason to install this update. Last edited by ChrisH on 20-Nov-2014 at 08:05 PM.
_________________ Author of the PortablE programming language. It is pitch black. You are likely to be eaten by a grue... |
|
Status: Offline |
|
|