Click Here
home features news forums classifieds faqs links search
5630 members 
Amiga Q&A /  Free for All /  Emulation /  Gaming / (Latest Posts)
Login

Nickname

Password

Lost Password?

Don't have an account yet?
Register now!

Support Amigaworld.net
Your support is needed and is appreciated as Amigaworld.net is primarily dependent upon the support of its users.
Donate

Menu
Main sections
Home
Features
News
Forums
Classifieds
Links
Downloads
Extras
OS4 Zone
IRC Network
AmigaWorld Radio
Newsfeed
Top Members
Amiga Dealers
Information
About Us
FAQs
Advertise
Polls
Terms of Service
Search

IRC Channel

Who's Online
 46 guest(s) on-line.
 0 member(s) on-line.



You are an anonymous user.
Register Now!
 Tiw1:  8 mins ago
 ferrels:  17 mins ago
 amipal:  33 mins ago
 Jasper:  45 mins ago
 eliyahu:  53 mins ago
 broadblues:  54 mins ago
 zipper:  1 hr 13 mins ago
 Trixie:  1 hr 37 mins ago
 amisteph:  1 hr 47 mins ago
 jPV:  2 hrs 24 mins ago

/  Forum Index
   /  General Technology (No Console Threads)
      /  Computer Programming Languages
Register To Post

Goto page ( Previous Page 1 | 2 | 3 | 4 | 5 Next Page )
PosterThread
OlafS25 
Re: Computer Programming Languages
Posted on 24-Mar-2019 9:02:39
#41 ]
Elite Member
Joined: 12-May-2010
Posts: 5451
From: Unknown

@Yssing

much more important than functionality of languages are (in my view) class libraries and 3rd party support. The rest is a more academic discussion.

 Status: Offline
Profile     Report this post  
Yssing 
Re: Computer Programming Languages
Posted on 24-Mar-2019 12:41:08
#42 ]
Cult Member
Joined: 24-Apr-2003
Posts: 985
From: Unknown

@OlafS25

I agree, one of the reasons I really like freepascal.

_________________

 Status: Offline
Profile     Report this post  
OneTimer1 
Re: Computer Programming Languages
Posted on 24-Mar-2019 13:40:05
#43 ]
Regular Member
Joined: 3-Aug-2015
Posts: 445
From: Unknown

@OlafS25

Quote:


much more important than functionality of languages are (in my view) class libraries and 3rd party support.


Ack, this is why Java, Rust and many other 'new' languages doesn't make sense on the Amiga.

 Status: Offline
Profile     Report this post  
OneTimer1 
Re: Computer Programming Languages
Posted on 24-Mar-2019 13:43:43
#44 ]
Regular Member
Joined: 3-Aug-2015
Posts: 445
From: Unknown

@cdimauro

Quote:

... one of the worst string design ever: C strings.



You can call it the worst, but I call it the most universal string design ever.

 Status: Offline
Profile     Report this post  
OneTimer1 
Re: Computer Programming Languages
Posted on 24-Mar-2019 13:48:14
#45 ]
Regular Member
Joined: 3-Aug-2015
Posts: 445
From: Unknown

@Trekiej

Quote:



BASIC makes me feel like a Rocket Surgeon.


Just use it.

But there something I dislike about Basic and Amigas:

There is no real X-Platform Basic running on Amigas and AOS4, MOS and AROS machines.

I know, differences in endianess could make it difficult, but with the right functions, it should be possible using the same programs and the same data on different platforms.

 Status: Offline
Profile     Report this post  
NutsAboutAmiga 
Re: Computer Programming Languages
Posted on 24-Mar-2019 15:45:30
#46 ]
Elite Member
Joined: 9-Jun-2004
Posts: 11015
From: Norway

@OneTimer1

Quote:
There is no real X-Platform Basic running on Amigas and AOS4, MOS and AROS machines.


Well there is Amos Kittens, it allows Amos programs written in Amos Pro to run on other operating systems.

It's a replica of original AMOS, so if woks on AmigaOS3.x is should work on AmigaoS4.x.
(this is the main difference between Amos Kittens and for example XAMOS. )

Amos kittens some parts compiles under Linux now, and has some support for little-endian cpu's.. so I guess if someone likes to port it to AROS or MorphOS it's doable. Should not be too hard. The more people working on it, the faster Amos kittens will become complete.

I can really need some helps with trackers and sound, as it's not my favorite subject.
I'm open to cooperation between camps on this projects.

Last edited by NutsAboutAmiga on 24-Mar-2019 at 04:16 PM.
Last edited by NutsAboutAmiga on 24-Mar-2019 at 03:50 PM.
Last edited by NutsAboutAmiga on 24-Mar-2019 at 03:49 PM.
Last edited by NutsAboutAmiga on 24-Mar-2019 at 03:47 PM.

_________________
Please check out my software:
Excalibur, Basilisk 2, AmigaInputAnywhere.
LiveForIt-Music
http://lifeofliveforit.blogspot.no/

 Status: Offline
Profile     Report this post  
cdimauro 
Re: Computer Programming Languages
Posted on 24-Mar-2019 17:59:57
#47 ]
Elite Member
Joined: 29-Oct-2012
Posts: 2088
From: Germany

@OneTimer1 Quote:
OneTimer1 wrote:
@cdimauro

Quote:
... one of the worst string design ever: C strings.

You can call it the worst, but I call it the most universal string design ever.

It's "universal" if it can be used in ANY kind of algorithm/problems to solve, but there are at least two (big/common) use-cases where it cannot.

I leave you as an exercise to find which ones.

 Status: Offline
Profile     Report this post  
bison 
Re: Computer Programming Languages
Posted on 26-Mar-2019 4:17:53
#48 ]
Super Member
Joined: 18-Dec-2007
Posts: 1293
From: N-Space

@cdimauro

Quote:
I know D, but I don't like C-like languages at all.

Is it just syntax and null-terminated strings, or something other?

_________________
"Unix is supposed to fix that." -- Jay Miner

 Status: Offline
Profile     Report this post  
cdimauro 
Re: Computer Programming Languages
Posted on 26-Mar-2019 5:58:47
#49 ]
Elite Member
Joined: 29-Oct-2012
Posts: 2088
From: Germany

@bison Quote:
bison wrote:
@cdimauro

Quote:
I know D, but I don't like C-like languages at all.

Is it just syntax and null-terminated strings, or something other?

Both plus the lack of commodities like the concept of module/unit/package (I really hate the "include" system used to supply the module one).

In general I find C-like languages difficult to read (with C++ which exacerbated it), whereas I prefer readability as a key element of a language. That's why I prefer Python and Pascal-like languages.

 Status: Offline
Profile     Report this post  
bison 
Re: Computer Programming Languages
Posted on 26-Mar-2019 14:32:47
#50 ]
Super Member
Joined: 18-Dec-2007
Posts: 1293
From: N-Space

@cdimauro

Quote:
Both plus the lack of commodities like the concept of module/unit/package (I really hate the "include" system used to supply the module one).

In general I find C-like languages difficult to read (with C++ which exacerbated it), whereas I prefer readability as a key element of a language. That's why I prefer Python and Pascal-like languages.

This is interesting, because I have similar views about C, other than the syntax, which I like.

My "Perfect C" language would have a Python-like import system and arrays that are (by default) heap objects with block scope. I use strdup, asprintf, and getline heavily, and it would be nice to have all this incorporated into the syntax of the language, along with basic string operations such as comparison, assignment, copy, and concatenation. A more sophisticated macro system would also be nice.

Edit: I want static type introspection as well.

Last edited by bison on 26-Mar-2019 at 02:35 PM.
Last edited by bison on 26-Mar-2019 at 02:34 PM.
Last edited by bison on 26-Mar-2019 at 02:33 PM.

_________________
"Unix is supposed to fix that." -- Jay Miner

 Status: Offline
Profile     Report this post  
NutsAboutAmiga 
Re: Computer Programming Languages
Posted on 26-Mar-2019 16:14:41
#51 ]
Elite Member
Joined: 9-Jun-2004
Posts: 11015
From: Norway

@cdimauro

Quote:
Both plus the lack of commodities like the concept of module/unit/package


"Module" is a "namespace"
"unit" is a "struct"

A package is any file ending with #?.a, #?.o, #?.so and for AmigaOS #?.library, #?.device
for Windows you have #?.dll, you might noticed that you a lot of this in your operating system.

for example libpng.a, to use you need to list all .a files in the makefile or add libraries in your development environment. Microsoft studio has the NuGet packaging system, which tries to help you with find packages etc, and add the packages to your project.

Quote:
(I really hate the "include" system used to supply the module one).

C / C++ is designed for large project, you declare functions at top, so the compiler does need to scan the files two times, or have to resolve this stuff in too complicated way. it's really just done this way to reduce compile time.

Includes or .h files has nothing to do package really, just a place to put all declarations so the source do not look too messy.

Last edited by NutsAboutAmiga on 26-Mar-2019 at 09:17 PM.
Last edited by NutsAboutAmiga on 26-Mar-2019 at 04:26 PM.

_________________
Please check out my software:
Excalibur, Basilisk 2, AmigaInputAnywhere.
LiveForIt-Music
http://lifeofliveforit.blogspot.no/

 Status: Offline
Profile     Report this post  
NutsAboutAmiga 
Re: Computer Programming Languages
Posted on 26-Mar-2019 16:19:59
#52 ]
Elite Member
Joined: 9-Jun-2004
Posts: 11015
From: Norway

@bison

Quote:
I use strdup, asprintf, and getline heavily, along with basic string operations such as comparison, assignment, copy, and concatenation.


Then your writing in a very old C style, you should upgrade to C++ style string class.
char arrays (old style strings) and string class can be combined,
you can get access to internal array by using c_str().

Last edited by NutsAboutAmiga on 26-Mar-2019 at 04:25 PM.
Last edited by NutsAboutAmiga on 26-Mar-2019 at 04:20 PM.

_________________
Please check out my software:
Excalibur, Basilisk 2, AmigaInputAnywhere.
LiveForIt-Music
http://lifeofliveforit.blogspot.no/

 Status: Offline
Profile     Report this post  
bison 
Re: Computer Programming Languages
Posted on 26-Mar-2019 21:19:13
#53 ]
Super Member
Joined: 18-Dec-2007
Posts: 1293
From: N-Space

@NutsAboutAmiga
Quote:
Then your writing in a very old C style, you should upgrade to C++ style string class

I'm writing in C11, which isn't that old. I don't like C++ much. If I were to use a more complex language, it would be D.

strdup has been in the standard library for a while. getline was originally a GNU extension, and was added to the standard library in 2008. asprintf is also a GNU extension; as far as I know it is not yet in the standard library. The main thing is, I'm putting strings on the heap and not the stack.

_________________
"Unix is supposed to fix that." -- Jay Miner

 Status: Offline
Profile     Report this post  
NutsAboutAmiga 
Re: Computer Programming Languages
Posted on 26-Mar-2019 21:45:56
#54 ]
Elite Member
Joined: 9-Jun-2004
Posts: 11015
From: Norway

@bison

Quote:
The main thing is, I'm putting strings on the heap and not the stack.


Sure something like JSON maybe: https://github.com/nlohmann/json

There is also "b-tree" maybe something to lookup.

if you look you most likely find it.

Last edited by NutsAboutAmiga on 26-Mar-2019 at 09:51 PM.

_________________
Please check out my software:
Excalibur, Basilisk 2, AmigaInputAnywhere.
LiveForIt-Music
http://lifeofliveforit.blogspot.no/

 Status: Offline
Profile     Report this post  
NutsAboutAmiga 
Re: Computer Programming Languages
Posted on 27-Mar-2019 21:34:31
#55 ]
Elite Member
Joined: 9-Jun-2004
Posts: 11015
From: Norway

@bison

I only use parts of C++, mostly string class, vector class.

I'm bit evaluating the use references, I see them as good and bad, can't decide, I guess my main issue with references, is that it's hard to see what is allocated and what is not, and where things belong and what static allocations.

Trying to be minimalist not because I think I can do better than other people, but mostly because I'm control freak. Like to know what I put in there.

C++11 or was it C++12, its that well supported from what I read, at least you need compiler your own compiler, it suggests to me that it's not official.

_________________
Please check out my software:
Excalibur, Basilisk 2, AmigaInputAnywhere.
LiveForIt-Music
http://lifeofliveforit.blogspot.no/

 Status: Offline
Profile     Report this post  
cdimauro 
Re: Computer Programming Languages
Posted on 29-Mar-2019 6:10:51
#56 ]
Elite Member
Joined: 29-Oct-2012
Posts: 2088
From: Germany

@bison Quote:
bison wrote:
@cdimauro

Quote:
Both plus the lack of commodities like the concept of module/unit/package (I really hate the "include" system used to supply the module one).

In general I find C-like languages difficult to read (with C++ which exacerbated it), whereas I prefer readability as a key element of a language. That's why I prefer Python and Pascal-like languages.

This is interesting, because I have similar views about C, other than the syntax, which I like.

My "Perfect C" language would have a Python-like import system and arrays that are (by default) heap objects with block scope. I use strdup, asprintf, and getline heavily, and it would be nice to have all this incorporated into the syntax of the language, along with basic string operations such as comparison, assignment, copy, and concatenation. A more sophisticated macro system would also be nice.

Hum. While I fully understand the need for a good string support, C macros are already complex-enough and... more difficult to read, not even counting side-effects which can have.

In general I think that if a language needs to use the pre-processor, then it's a sign of a not good design. And C needed the pre-processor from the very beginning, even for defining simple constants...
Quote:
Edit: I want static type introspection as well.

I find more exciting the dynamic type introspection. If you already know / use Python, I suggest you to install DreamPie, and have pure fun playing/tinkering with this much more advanced interactive shell.


@NutsAboutAmiga Quote:
NutsAboutAmiga wrote:
@cdimauro
Quote:
Both plus the lack of commodities like the concept of module/unit/package

"Module" is a "namespace"
"unit" is a "struct"

A package is any file ending with #?.a, #?.o, #?.so and for AmigaOS #?.library, #?.device
for Windows you have #?.dll, you might noticed that you a lot of this in your operating system.

In some languages the concept of "module" (which was explicitly define by Wirth with its MODULA family of programming languages ) is called differently: it's unit in the Pascal domain, and package in the Python, Java domains.
Quote:
for example libpng.a, to use you need to list all .a files in the makefile or add libraries in your development environment. Microsoft studio has the NuGet packaging system, which tries to help you with find packages etc, and add the packages to your project.

This has nothing to do the above concept.
Quote:
Quote:
(I really hate the "include" system used to supply the module one).

C / C++ is designed for large project, you declare functions at top, so the compiler does need to scan the files two times, or have to resolve this stuff in too complicated way. it's really just done this way to reduce compile time.

Processing n-times includes actually INCREASES the compile time.

BTW, Delphi 7 was able to compile projects of some million of lines in a few seconds, with the old mechanic disks.

C/C++ isn't a language easy and fast to parse. Take a look at Pascal & derivatives: there's a HUGE difference.
Quote:
Includes or .h files has nothing to do package really, just a place to put all declarations so the source do not look too messy.

And that's the problem, actually: they are just dumb containers.

 Status: Offline
Profile     Report this post  
bison 
Re: Computer Programming Languages
Posted on 29-Mar-2019 17:02:45
#57 ]
Super Member
Joined: 18-Dec-2007
Posts: 1293
From: N-Space

@cdimauro

Quote:
While I fully understand the need for a good string support, C macros are already complex-enough and... more difficult to read, not even counting side-effects which can have.

Yes, I agree -- C macros should not be extended, but rather replaced with something less dangerous. I'm being intentionally abstract because I'm not yet sure what this should look like. Perhaps this can't be done, and it would be better to look at cases where maros are really useful and replace them with safer language features.

In any case, I think it would be best if the pre-processor was reduced to just handling conditional compilation and compiler directives.

_________________
"Unix is supposed to fix that." -- Jay Miner

 Status: Offline
Profile     Report this post  
cdimauro 
Re: Computer Programming Languages
Posted on 30-Mar-2019 18:30:43
#58 ]
Elite Member
Joined: 29-Oct-2012
Posts: 2088
From: Germany

@bison: I agree as well.

The problem with replacing C macros is that alternative solutions might look/become worse: any reference to templates is NOT casual.

 Status: Offline
Profile     Report this post  
Trekiej 
Re: Computer Programming Languages
Posted on 4-Apr-2019 1:17:30
#59 ]
Cult Member
Joined: 17-Oct-2006
Posts: 575
From: Unknown

Pseudo Code: The Language of the Ancients

_________________
John 3:16

 Status: Offline
Profile     Report this post  
hth313 
Re: Computer Programming Languages
Posted on 4-Apr-2019 4:55:23
#60 ]
Regular Member
Joined: 29-May-2018
Posts: 123
From: Delta, Canada

@bison
@cdimauro

I do not entirely agree...

C is a low level language, much like a processor independent assembler and we all know about macro assemblers.

They are not ideal, but it is a pragmatic way of getting a lot of strange and messy things done in a fairly standardized way.

What should be done is to improve the language to avoid certain dangerous overuse, most well known is the small functions expansions inline. This should be done using an optimizer that inlines ordinary code, which gcc at least seems to allow for. Proper constants is probably also a good idea. However, there is no need to change the preprocessor, just because it can be abused we should not do it, instead we should provide better alternatives ways.

 Status: Offline
Profile     Report this post  
Goto page ( Previous Page 1 | 2 | 3 | 4 | 5 Next Page )

[ home ][ about us ][ privacy ] [ forums ][ classifieds ] [ links ][ news archive ] [ link to us ][ user account ]
Copyright (C) 2000 - 2019 Amigaworld.net.
Amigaworld.net was originally founded by David Doyle