English Amiga Board


Go Back   English Amiga Board > Main > Amiga scene

 
 
Thread Tools
Old 04 November 2019, 15:36   #21
Gorf
Registered User

 
Join Date: May 2017
Location: Munich/Bavaria
Posts: 869
Quote:
Originally Posted by meynaf View Post
If "fast" means "not crawling down to completely unusable speeds" then yes.
That very much depends of what you expect from a scripting language like Python.

NumPy for example has excellent and very fast modules that are very well suited for all kinds of heavy calculations. It is a valuable tool for researchers and engineers all over the world.

Python is probably best suited for an interactive work-book like environment and helps you to get results fast and makes it easy to try things out ...

But Python is not meant to program a game or application.
Gorf is offline  
Old 04 November 2019, 15:42   #22
Anubis
Maj. Voodoo

Anubis's Avatar
 
Join Date: Jan 2005
Location: Raking Woods...
Age: 47
Posts: 2,844
@ meynaf -

Did you program anything in Python? What is your Python experience??

If no and none, then you are just trolling.

May I suggest nice introduction to computer science and programming using Python class @ edx.org (done by MIT)

https://www.edx.org/course/6-00-1x-i...using-python-4

Anyone interested in good class that covers many good practice aspects of programming class - this is well up to date class (there is follow up class with more advanced techniques).

Free to try / with option to get certificate if interested...
Anubis is offline  
Old 04 November 2019, 15:47   #23
Gorf
Registered User

 
Join Date: May 2017
Location: Munich/Bavaria
Posts: 869
@ meynaf
P.S.:
are you sure you did read that I wrote Cython and not Python in my statement?
If Cython is slow, than every C code is slow ... and that would rule out any language besides assembler.
Gorf is offline  
Old 04 November 2019, 16:24   #24
chb
Registered User

 
Join Date: Dec 2014
Location: germany
Posts: 197
Python can be very fast language - in the sense that you're often able to write a program to solve your problem in considerably shorter time than it is possible in e.g. C++, thanks to the features of the language and a rich choice of powerful libraries especially for scientific applications.

So if it is "fast" for you depends on the ratio of time spend during programming vs. the execution time (real time applications etc. notwithstanding). I really like to use it for data evaluation (and libraries like Numpy o Pandas etc. aren't even particularly slow here), smaller one-off tasks that just need to be solved, interactive programming... or just for prototyping, to check if some algorithm is feasible for my problem before implementing it in some compiled language. And in that role it is very fast for me.
chb is offline  
Old 04 November 2019, 18:15   #25
meynaf
son of 68k
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 46
Posts: 3,616
Quote:
Originally Posted by Anubis View Post
@ meynaf -

Did you program anything in Python? What is your Python experience??

If no and none, then you are just trolling.

May I suggest nice introduction to computer science and programming using Python class @ edx.org (done by MIT)

https://www.edx.org/course/6-00-1x-i...using-python-4

Anyone interested in good class that covers many good practice aspects of programming class - this is well up to date class (there is follow up class with more advanced techniques).

Free to try / with option to get certificate if interested...
My experience with Python is none of your business, but anyway, do I need heavy experience in it to know an interpreted language is slow ?
Do someone need to have done anything but read the docs to know this language isn't better than any other ?
Knowing many other languages - with asm in the middle - should suffice anyway. One can't compare without a good reference. What could be your experience in this domain ? I don't need to know, but ask yourself.


Quote:
Originally Posted by Gorf View Post
@ meynaf
P.S.:
are you sure you did read that I wrote Cython and not Python in my statement?
If Cython is slow, than every C code is slow ... and that would rule out any language besides assembler.
Yes i read "Cython". And ? Either it's not Python anymore - it's directly C - or it gets converted in a way or another to C and this conversion isn't free.
IOW, automatic conversion of something to C doesn't make it as fast as C (in the same way compiling something to asm doesn't make it as fast as asm).

Oh, of course i might also say that any language beside assembler is slow but that's not the point
meynaf is offline  
Old 04 November 2019, 18:51   #26
Gorf
Registered User

 
Join Date: May 2017
Location: Munich/Bavaria
Posts: 869
Quote:
Originally Posted by meynaf View Post
Yes i read "Cython". And ? Either it's not Python anymore - it's directly C - or it gets converted in a way or another to C and this conversion isn't free.
IOW, automatic conversion of something to C doesn't make it as fast as C (in the same way compiling something to asm doesn't make it as fast as asm).

Oh, of course i might also say that any language beside assembler is slow but that's not the point
As your main argument was, Python would be terribly slow, I mentioned Cython as an easy way to make it fast by using strong types.

Also any modules/libraries like NumPy, SciPy etc. contain compiled and optimized functions and are therefor fast.

So what is a good programming language in your opinion besides assembler?
Gorf is offline  
Old 04 November 2019, 19:53   #27
Anubis
Maj. Voodoo

Anubis's Avatar
 
Join Date: Jan 2005
Location: Raking Woods...
Age: 47
Posts: 2,844
Quote:
Originally Posted by meynaf View Post
My experience with Python is none of your business, but anyway, do I need heavy experience in it to know an interpreted language is slow ?
Do someone need to have done anything but read the docs to know this language isn't better than any other ?
Knowing many other languages - with asm in the middle - should suffice anyway. One can't compare without a good reference. What could be your experience in this domain ? I don't need to know, but ask yourself.
Usually you should know or use something that you talk about. From this I understand that you don't like Python even you never used it, and that is OK, you have right to have your own opinion, no matter how wrong or immature it is.

Sure, programming in assembly is far better (?) and all you need is few languages that can be used around it. That is why everything now day is programmed in assembly , right??

We are pass time when programmer's main job was to find a way to run program fast enough to work for specific task or have enough memory/resources to run / be compiled.

My only assembly experience is following assy tutorial here on EAB/youtube and it surely is something I like to do as hobby, but would never want to do anything similar as main job.

Makes me wonder what you think of Java and Kotlin. Should we program Android and iOS in assy??
Anubis is offline  
Old 04 November 2019, 20:25   #28
Bruce Abbott
Registered User

Bruce Abbott's Avatar
 
Join Date: Mar 2018
Location: Hastings, New Zealand
Posts: 284
Quote:
Originally Posted by Anubis View Post
My only assembly experience is following assy tutorial here on EAB/youtube and it surely is something I like to do as hobby, but would never want to do anything similar as main job.
Why not?

Quote:
Makes me wonder what you think of Java and Kotlin. Should we program Android and iOS in assy??
Does Android or iOS run on the Amiga? If not then it's irrelevant.
Bruce Abbott is offline  
Old 04 November 2019, 20:28   #29
meynaf
son of 68k
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 46
Posts: 3,616
Quote:
Originally Posted by Gorf View Post
As your main argument was, Python would be terribly slow, I mentioned Cython as an easy way to make it fast by using strong types.
Is my main argument that Python would be terribly slow ? No. Don't confuse me with someone else. This is only one point.


Quote:
Originally Posted by Gorf View Post
Also any modules/libraries like NumPy, SciPy etc. contain compiled and optimized functions and are therefor fast.
And reusable components can be made to ease coding in asm, making it nearly as easy to work with as a high level language.
Does the language itself really matter that much ? No. When you know how to code, unless of severe design mistakes in the language it does not matter.


Quote:
Originally Posted by Gorf View Post
So what is a good programming language in your opinion besides assembler?
I am afraid there is none (not even assembler, actually, but at least this one is fast and gives small executables).
I tried to create mine, but all attempts failed.


Quote:
Originally Posted by Anubis View Post
Usually you should know or use something that you talk about. From this I understand that you don't like Python even you never used it, and that is OK, you have right to have your own opinion, no matter how wrong or immature it is.
You seem to be emotionally involved here. Yes i know what i am talking about.
But you are overestimating how much i may dislike Python. I don't dislike it more than any other language. I just don't agree to people saying it's a pure wonder : it ain't better than the others.


Quote:
Originally Posted by Anubis View Post
Sure, programming in assembly is far better (?) and all you need is few languages that can be used around it. That is why everything now day is programmed in assembly , right??
No, but you might eventually ask yourself why there are so many bloatwares today...
Remember that everything today is basically far, very far away, from theoretical max performance the machine is supposed to procure.


Quote:
Originally Posted by Anubis View Post
We are pass time when programmer's main job was to find a way to run program fast enough to work for specific task or have enough memory/resources to run / be compiled.
Yes but we have passed from one extreme to the other : now programmers just don't care at all and write horrors.


Quote:
Originally Posted by Anubis View Post
My only assembly experience is following assy tutorial here on EAB/youtube and it surely is something I like to do as hobby, but would never want to do anything similar as main job.
So something you like as a hobby, you'd dislike doing the same for a living ? It feels strange to me...


Quote:
Originally Posted by Anubis View Post
Makes me wonder what you think of Java and Kotlin.
I won't answer to this. Wouldn't be polite


Quote:
Originally Posted by Anubis View Post
Should we program Android and iOS in assy??
Considering the cpu architecture these have to run on, the answer is a big 'no'.
But if you can spend millions of $$$ to build a 68k-based handheld device, then i'd happily do asm on it.
meynaf is offline  
Old 04 November 2019, 20:44   #30
Gorf
Registered User

 
Join Date: May 2017
Location: Munich/Bavaria
Posts: 869
Quote:
Originally Posted by meynaf View Post
Is my main argument that Python would be terribly slow ? No. Don't confuse me with someone else. This is only one point.
Well that was my impression.
If this is not your major concern, what is it then?

Quote:
And reusable components can be made to ease coding in asm, making it nearly as easy to work with as a high level language.
Does the language itself really matter that much ? No. When you know how to code, unless of severe design mistakes in the language it does not matter.
expressiveness, easy of reading, helpful constructs, intuitive syntax ...
yes, I think it matters.

Quote:
I am afraid there is none (not even assembler, actually, but at least this one is fast and gives small executables).
I tried to create mine, but all attempts failed.
well, until someone succeeds mankind will have to use one of the existing languages - and for many tasks Python is just fine.

Quote:
No, but you might eventually ask yourself why there are so many bloatwares today...
Remember that everything today is basically far, very far away, from theoretical max performance the machine is supposed to procure.
true and that is a pity.
(I wonder why KI and machine learning don't give us the perfect compilers ... probably because these are just buzz words)

I understand the need of something fairly small and fast in the case of Amiga - even accelerated or emulated ones.
Still I think Python as a language would be up for the task (see MicroPython and StacklessPython), delivering a useful scripting language in addition to AREXX.
Gorf is offline  
Old 04 November 2019, 21:03   #31
Bruce Abbott
Registered User

Bruce Abbott's Avatar
 
Join Date: Mar 2018
Location: Hastings, New Zealand
Posts: 284
Quote:
Originally Posted by Gorf View Post
As your main argument was, Python would be terribly slow, I mentioned Cython as an easy way to make it fast by using strong types.
Cython
Quote:
Cython works by producing a standard Python module. However, the behavior differs from standard Python in that the module code, originally written in Python, is translated into C. While the resulting code is fast, it makes many calls into the CPython interpreter and CPython standard libraries to perform actual work. Choosing this arrangement saved considerably on Cython's development time, but modules have a dependency on the Python interpreter and standard library.

Although most of the code is C-based, a small stub loader written in interpreted Python is usually required (unless the goal is to create a loader written entirely in C, which may involve work with the undocumented internals of CPython).
Shit piled on top of shit.
Bruce Abbott is offline  
Old 04 November 2019, 21:21   #32
meynaf
son of 68k
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 46
Posts: 3,616
Quote:
Originally Posted by Gorf View Post
Well that was my impression.
If this is not your major concern, what is it then?
Should I have a major concern ?


Quote:
Originally Posted by Gorf View Post
expressiveness, easy of reading, helpful constructs, intuitive syntax ...
yes, I think it matters.
This is theory.
But in practice nothing can really be considered as expressive, easy to read, helpful nor intuitive...
It's not without reason code is named "code".

Perhaps we could do some kind of code contest, just to show how different languages look like for the exact same task ?
Concrete examples always say more than just talking.
This would be, however, in another thread as we're already quite OT here.


Quote:
Originally Posted by Gorf View Post
well, until someone succeeds mankind will have to use one of the existing languages - and for many tasks Python is just fine.
Right, but for many tasks the other languages are also just fine.
However, sometimes a language just plain sucks.

I want a language that can be used for any possible task a computer can do.
I want a language that is good at bit fiddling.
A language that can easily detect arithmetic carry/overflows.
A language that does not do things behind my back.
One that has an easy way to provide a simple frame buffer instead of having to use dubious external libraries.


Quote:
Originally Posted by Gorf View Post
true and that is a pity.
(I wonder why KI and machine learning don't give us the perfect compilers ... probably because these are just buzz words)
Actually even a "perfect compiler" (whatever that means) would have trouble beating a good asm coder. And this, for the simple reasons it has to respect the specs of the source language (which has its own limitations), isn't allowed to completely redesign how data is stored within the program, and of course has no clue about what the program is actually doing.


Quote:
Originally Posted by Gorf View Post
I understand the need of something fairly small and fast in the case of Amiga - even accelerated or emulated ones.
Still I think Python as a language would be up for the task (see MicroPython and StacklessPython), delivering a useful scripting language in addition to AREXX.
If it is in same category as Arexx, then it's not exactly all-purpose.
And then i admit it does not interest me that much.


Quote:
Originally Posted by Bruce Abbott View Post
Shit piled on top of shit.
meynaf is offline  
Old 04 November 2019, 21:22   #33
Gorf
Registered User

 
Join Date: May 2017
Location: Munich/Bavaria
Posts: 869
Quote:
Originally Posted by Bruce Abbott View Post
Cython
Shit piled on top of shit.
So? It is still fast.
What exactly is "shit" about it? It is a scripting language!
Is AREXX "shit" too?
Gorf is offline  
Old 04 November 2019, 21:25   #34
malko
Ex nihilo nihil

malko's Avatar
 
Join Date: Oct 2017
Location: CH
Posts: 2,319
Excuse my ignorance on this python topic but why not using à langage provided with the OS ?
Is python doing things ARexx can't ?

Edit: Damn, Gorf posted before me
malko is offline  
Old 04 November 2019, 21:35   #35
meynaf
son of 68k
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 46
Posts: 3,616
Quote:
Originally Posted by malko View Post
Is python doing things ARexx can't ?
I would rather see things the other way around. ARexx is basically a remote command for other programs - something probably not doable directly with python.
meynaf is offline  
Old 04 November 2019, 21:37   #36
Gorf
Registered User

 
Join Date: May 2017
Location: Munich/Bavaria
Posts: 869
Quote:
Originally Posted by meynaf View Post
Should I have a major concern ?


This is theory.
But in practice nothing can really be considered as expressive, easy to read, helpful nor intuitive...
It's not without reason code is named "code".

Perhaps we could do some kind of code contest, just to show how different languages look like for the exact same task ?
Concrete examples always say more than just talking.
This would be, however, in another thread as we're already quite OT here.
that has been done before:
http://rosettacode.org/wiki/Rosetta_Code

I find Python much better in every way than "brainfuck" ...

Quote:
Right, but for many tasks the other languages are also just fine.
However, sometimes a language just plain sucks.
true

Quote:
I want a language that can be used for any possible task a computer can do.
I prefer the appropriate language for the task at hand...

Quote:
I want a language that is good at bit fiddling.
A language that can easily detect arithmetic carry/overflows.
most of the times I prefer some higher level approach - again this is a matter of the task. What problem do I need to solve?

Quote:
A language that does not do things behind my back.
One that has an easy way to provide a simple frame buffer instead of having to use dubious external libraries.
often unavoidable for e.g. shell-scripts or JavaScript ... and that's part of my work. Somehow I have to earn my money...

Quote:
Actually even a "perfect compiler" (whatever that means) would have trouble beating a good asm coder.
well - a "perfect compiler" would be better - but there is none

Quote:
And this, for the simple reasons it has to respect the specs of the source language (which has its own limitations), isn't allowed to completely redesign how data is stored within the program, and of course has no clue about what the program is actually doing.
this is irrelevant for a scripting language

Quote:
If it is in same category as Arexx, then it's not exactly all-purpose.
It more or less is. Nobody claimed otherwise

Quote:
And then i admit it does not interest me that much.
Did you write an assembler version of your startup-sequence?
Gorf is offline  
Old 04 November 2019, 21:50   #37
Gorf
Registered User

 
Join Date: May 2017
Location: Munich/Bavaria
Posts: 869
Quote:
Originally Posted by malko View Post
Excuse my ignorance on this python topic but why not using à langage provided with the OS ?
Is python doing things ARexx can't ?

Edit: Damn, Gorf posted before me


It lacks system integration, so AREXX can do some things on AmigaOS Python can not do - unless someone creates a system-module.

On MorphOS this has been done for Lua, so there is no reason it can't be done for Python, except probably no-one will ever do so...

Python aims at different goals than AREXX, is more "modern" ... main difference would obviously be, that for AREXX everything is a string, while for Python everything is an object.

A Python tutorial was already linked above ...

try it out in a browser for yourself:
https://mybinder.org/v2/gh/ipython/i...er/Index.ipynb
Gorf is offline  
Old 04 November 2019, 21:50   #38
saimon69
J.M.D - Bedroom Musician

 
Join Date: Apr 2014
Location: los angeles,ca
Posts: 1,156
I might go completely OT and suggest lua as scripting language, at least has some ties with AROS, considered its bindings (incomplete) with gadtools (amilua) and zune (zulu)
saimon69 is offline  
Old 04 November 2019, 21:55   #39
Gorf
Registered User

 
Join Date: May 2017
Location: Munich/Bavaria
Posts: 869
Quote:
Originally Posted by saimon69 View Post
I might go completely OT and suggest lua as scripting language, at least has some ties with AROS, considered its bindings (incomplete) with gadtools (amilua) and zune (zulu)
Lua is nicely integrated in MorphOS ... would love to see this backported.

But this is not a question of either or.
Gorf is offline  
Old 04 November 2019, 22:20   #40
meynaf
son of 68k
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 46
Posts: 3,616
Quote:
Originally Posted by Gorf View Post
that has been done before:
http://rosettacode.org/wiki/Rosetta_Code
It doesn't include my fave language (i code 020+, not bare 68000).
And it probably does not allow using own libraries.
So no, it hasn't been done before.


Quote:
Originally Posted by Gorf View Post
I find Python much better in every way than "brainfuck" ...
Probably not difficult


Quote:
Originally Posted by Gorf View Post
I prefer the appropriate language for the task at hand...
And how does a language qualify for being "appropriate" ?


Quote:
Originally Posted by Gorf View Post
most of the times I prefer some higher level approach - again this is a matter of the task. What problem do I need to solve?
The problem with languages such as python is mainly that you often have to use libraries rather than built-in stuff and when these don't support what you want to do, you just scream.

There are lots of possible tasks, if you really want me to suggest some.
Show an IFF image ?
Play a Protracker module ?
Execute some custom bytecode ?
Do some file format conversion ?
Or perhaps something simpler, like a custom atoi() function ?


Quote:
Originally Posted by Gorf View Post
often unavoidable for e.g. shell-scripts or JavaScript ... and that's part of my work. Somehow I have to earn my money...
Right, but it ain't fun.


Quote:
Originally Posted by Gorf View Post
well - a "perfect compiler" would be better - but there is none
There is none and it's too bad because i would have a lot of fun beating the crap out of it


Quote:
Originally Posted by Gorf View Post
this is irrelevant for a scripting language
I haven't said otherwise but you were speaking about compilers.


Quote:
Originally Posted by Gorf View Post
Did you write an assembler version of your startup-sequence?
No, but i could if i wanted to.
Did you write a python version of your startup-sequence ?
meynaf is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Python errors from fs-uae-launcher [Solved] mocham support.FS-UAE 8 01 November 2012 20:54
Monty Python's Flying Circus sareks support.Games 8 10 March 2008 13:23
Python 1 joystick ladybird Retrogaming General Discussion 3 08 August 2007 16:06
Python Joysticks ? blade002 MarketPlace 11 18 June 2006 05:48
Monty Python Bueller request.Demos 2 12 October 2005 17:39

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 06:31.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Page generated in 0.09948 seconds with 13 queries