English Amiga Board


Go Back   English Amiga Board > Main > Amiga scene

 
 
Thread Tools
Old 04 November 2019, 21:32   #41
malko
Ex nihilo nihil
 
malko's Avatar
 
Join Date: Oct 2017
Location: CH
Posts: 4,856
Quote:
Originally Posted by Gorf View Post
Did you write an assembler version of your startup-sequence?
Quote:
Originally Posted by meynaf View Post
No, but i could if i wanted to.
Did you write a python version of your startup-sequence ?
asm VS python : I bet on meynaf
malko is offline  
Old 04 November 2019, 21:44   #42
Gorf
Registered User
 
Gorf's Avatar
 
Join Date: May 2017
Location: Munich/Bavaria
Posts: 2,294
Quote:
Originally Posted by meynaf View Post
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.
They allow off kinds of "runtimes", so I guess your own libraries would qualify as such.
Put your examples up!

Quote:
And how does a language qualify for being "appropriate" ?
Allowing me to solve the task in an easy and reproducible way.
Depending on the task it is often more important to archive a results fast, that archiving a fast result ... even if this means bloat.
I am no fan and compared to most colleges my code is still dense and efficient ... but I have no problem using all kinds of sugar if it makes my life easier.

Quote:
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.
screaming does not help ... in most cases ..
And often enough I had to implement my own libraries or hack others to provide the functionality needed.

But in a working environment the code needs to stay manageable by others than myself ... so it is preferred to use what is already there.

Quote:
There are lots of possible tasks, if you really want me to suggest some.
Show an IFF image ?
Lib/chunk.py
Quote:
Play a Protracker module ?
libxmplite

Quote:
Execute some custom bytecode ?
https://access.redhat.com/documentat...ng_Python.html

Quote:
Do some file format conversion ?
convertapi-python

Quote:
Or perhaps something simpler, like a custom atoi() function ?
myatoi = atoi(s[,base])



Quote:
Quote:
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 ?
I could, but it would not execute since it lacks proper system integration.

But even if it did: it would not be the appropriate tool for the task.

Last edited by Gorf; 04 November 2019 at 22:09.
Gorf is offline  
Old 04 November 2019, 22:13   #43
Gorf
Registered User
 
Gorf's Avatar
 
Join Date: May 2017
Location: Munich/Bavaria
Posts: 2,294
Quote:
Originally Posted by malko View Post
Quote:
Quote:
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 ?
asm VS python : I bet on meynaf
me too!

But both things would be impractical - that is the point I was trying to make!
Gorf is offline  
Old 04 November 2019, 22:47   #44
chb
Registered User
 
Join Date: Dec 2014
Location: germany
Posts: 439
Quote:
Originally Posted by malko View Post
asm VS python : I bet on meynaf
Code:
set;print """
MakeDir RAM:ENV
Assign >NIL: ENV: RAM:ENV
LoadWB
EndCLI >NIL;"""

(should work with WB 2.1 and above)

Quote:
Originally Posted by Gorf View Post
But both things would be impractical - that is the point I was trying to make!
I totally agree!

Last edited by chb; 04 November 2019 at 22:52.
chb is offline  
Old 04 November 2019, 22:50   #45
grelbfarlk
Registered User
 
Join Date: Dec 2015
Location: USA
Posts: 2,902
I have an opinion that I must express. On the internet! I built Python for WarpUP for GemRB and it actually runs pretty well. The slow part is actually the non Python stuff, or maybe it's the Python stuff calling the non-Python stuff. Anyway the GUI is reasonably fast and that's all Python. So, that's the end of my story. In summary, Python is a language of contrasts.
grelbfarlk is offline  
Old 04 November 2019, 23:06   #46
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
As an aside, Python is included with OS4, and it includes an arexx module that lets Python scripts do ARexx-specific things, like sending messages, opening ARexx host ports etc. It's quite neat, and would be nice to see backported to 68k. Also included are amiga, asl, catalog, icon and installer modules that together offer a reasonable level of system integration.
Daedalus is online now  
Old 04 November 2019, 23:38   #47
Gorf
Registered User
 
Gorf's Avatar
 
Join Date: May 2017
Location: Munich/Bavaria
Posts: 2,294
Quote:
Originally Posted by Daedalus View Post
As an aside, Python is included with OS4, and it includes an arexx module that lets Python scripts do ARexx-specific things, like sending messages, opening ARexx host ports etc. It's quite neat, and would be nice to see backported to 68k. Also included are amiga, asl, catalog, icon and installer modules that together offer a reasonable level of system integration.
Add „Lupa" to it - a Lua implementation in Python, and we are complete:
https://github.com/scoder/lupa
Gorf is offline  
Old 05 November 2019, 00:30   #48
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 4,332
Quote:
Originally Posted by Gorf View Post
Python is by no means "shit". It is a beautiful language.
And with Cython it can be fast!

But it lacks system integration for AmigaOS and the constant development and changes make it very hard to adapt these things to a new environment.

Maybe MicroPhython would be a good candidate for a 3.x based AmigaPython...
https://micropython.org

An other approach would be "StacklessPython", that might be a good fit for Exec (with some adaptions):

https://github.com/stackless-dev/stackless/wiki
The Amiga already has a standard scripting language with proper system integration. Use that instead of trying to contort Python into even compiling on AmigaOS.
idrougge is offline  
Old 05 November 2019, 01:08   #49
Gorf
Registered User
 
Gorf's Avatar
 
Join Date: May 2017
Location: Munich/Bavaria
Posts: 2,294
Quote:
Originally Posted by idrougge View Post
The Amiga already has a standard scripting language with proper system integration. Use that instead of trying to contort Python into even compiling on AmigaOS.
This thread is about Python for AmigaOS.
There can be more than just one programming language.

If you read the posts in this thread, you will realize, that Python is already compiling and running on AmigaOS - a outdated version on 3.x a more up to date version on 4.x

Please stop telling people what software they must use or wish for.
Gorf is offline  
Old 05 November 2019, 01:29   #50
grelbfarlk
Registered User
 
Join Date: Dec 2015
Location: USA
Posts: 2,902
Quote:
Originally Posted by Gorf View Post
This thread is about Python for AmigaOS.
There can be more than just one programming language.

If you read the posts in this thread, you will realize, that Python is already compiling and running on AmigaOS - a outdated version on 3.x a more up to date version on 4.x
And a 2.7.1 version for WarpUP on AmigaOS 3.x which really isn't that old. Really it wasn't that hard to do, with some competent effort getting it finished should only take 2 weeks.
grelbfarlk is offline  
Old 05 November 2019, 05:15   #51
Bruce Abbott
Registered User
 
Bruce Abbott's Avatar
 
Join Date: Mar 2018
Location: Hastings, New Zealand
Posts: 2,544
Quote:
Originally Posted by grelbfarlk View Post
And a 2.7.1 version for WarpUP on AmigaOS 3.x which really isn't that old.
It's ancient.

Quote:
Really it wasn't that hard to do, with some competent effort getting it finished should only take 2 weeks.
So why don't we have it already?
Bruce Abbott is offline  
Old 05 November 2019, 06:18   #52
IanS
Registered User
 
IanS's Avatar
 
Join Date: Aug 2002
Location: Nottingham England
Posts: 277
Quote:
Originally Posted by Bruce Abbott View Post
It's ancient.

So why don't we have it already?
It's actually not that old, and compared to Amiga OS it's brand new.

We don't have these things because it takes time and effort. And at the end of it, all they get is crap from people like you and meynaf saying how crap it is, and how it's a waste of time. Apparently, if you don't like it, it can't be good for anyone else either.
IanS is offline  
Old 05 November 2019, 07:24   #53
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,161
Quote:
The Amiga already has a standard scripting language with proper system integration. Use that instead of trying to contort Python into even compiling on AmigaOS.
Same for Windows with .bat. One of the main reasons I'm using python on Windows

I use 68k asm, C++, C, python, with a good level of expertise (check my Stackoverflow profile to see what I'm talking about), and they all complete nicely each other.
jotd is offline  
Old 05 November 2019, 09:35   #54
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Quote:
Originally Posted by Gorf View Post
They allow off kinds of "runtimes", so I guess your own libraries would qualify as such.
Put your examples up!
I doubt they use not standard runtimes, and if they do, there is still the host OS to be discussed.
And even if they did have AOS support here, they still don't have 68020+ category.
Are you afraid to show your Python skills, that you rely on others ?
This thread isn't the place to do this. But if i open new thread with a concrete example, will you come in and show working code ?


Quote:
Originally Posted by Gorf View Post
Allowing me to solve the task in an easy and reproducible way.
Depending on the task it is often more important to archive a results fast, that archiving a fast result ... even if this means bloat.
I am no fan and compared to most colleges my code is still dense and efficient ... but I have no problem using all kinds of sugar if it makes my life easier.
Yes but this is the job of programmers, having to cope with everchanging specs, marketing people negociating impossible delays, and customers who don't know what they want. It's not really the point here.


Quote:
Originally Posted by Gorf View Post
screaming does not help ... in most cases ..
And often enough I had to implement my own libraries or hack others to provide the functionality needed.

But in a working environment the code needs to stay manageable by others than myself ... so it is preferred to use what is already there.
Again, this has nothing to do with programming on the Amiga.


Quote:
Originally Posted by Gorf View Post
Lib/chunk.py
This is only for reading chunks. It will not display the image.


Quote:
Originally Posted by Gorf View Post
libxmplite
libxmp does not play all mods properly. So you will think it did the job and some user will reports his mods don't play right. Result : miserable failure, as there is nothing you can do about it.


You are confusing virtualization and custom bytecode.


Quote:
Originally Posted by Gorf View Post
convertapi-python
Only for standard conversions. If you have custom work to do on files, you have to do it yourself and this is what my example was about.


Quote:
Originally Posted by Gorf View Post
myatoi = atoi(s[,base])
Which does not return updated value of "s" to point on next non-numeric character, nor detects if "myatoi" doesn't overflow, nor detects if "s" isn't a number at all.


Quote:
Originally Posted by Gorf View Post
I could, but it would not execute since it lacks proper system integration.

But even if it did: it would not be the appropriate tool for the task.
Right.
And during that time, i could just start single asm-written command in startup-sequence. Ok, it still needs very small script to run it - so i could eventually place the code in custom kickstart to actually replace said startup-sequence...


Quote:
Originally Posted by Gorf View Post
But both things would be impractical - that is the point I was trying to make!
You did not look like if you were trying to make this point. You were just saying one of the two things would be impractical, (carefully ?) forgetting to mention the other also would.


Quote:
Originally Posted by IanS View Post
We don't have these things because it takes time and effort. And at the end of it, all they get is crap from people like you and meynaf saying how crap it is, and how it's a waste of time. Apparently, if you don't like it, it can't be good for anyone else either.
But it's rather the other way around. If YOU like it, then it must be good for everyone ?
And now if i just emit some small criticism, i get charged of emitting crap in return...
My point was just to say python isn't any better than the others.


Quote:
Originally Posted by jotd View Post
Same for Windows with .bat. One of the main reasons I'm using python on Windows
On windows it makes sense, because what's there at first place sucks.
But on Amiga ?
meynaf is offline  
Old 05 November 2019, 12:15   #55
Anubis
Retro Gamer
 
Anubis's Avatar
 
Join Date: Jan 2005
Location: Underworld
Age: 51
Posts: 4,058
you told me I am emotionally involved here?! Look at you friend...

Let's hope your are just trolling...

It would be great to have newer version of Python on AmigaOS.
Anubis is offline  
Old 05 November 2019, 13:20   #56
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Quote:
Originally Posted by Anubis View Post
you told me I am emotionally involved here?! Look at you friend...

Let's hope your are just trolling...
Read back to the first page. I didn't write anything aggressive and you charged me of trolling. Facts speak against you.
meynaf is offline  
Old 05 November 2019, 13:56   #57
Anubis
Retro Gamer
 
Anubis's Avatar
 
Join Date: Jan 2005
Location: Underworld
Age: 51
Posts: 4,058
Reading first page - question does python exist for Amiga OS, many years ago - people said it does, not new version, tho.

I've already said - you are entitled to your own opinion. (no matter how wrong it is)

As I have already pointed in previous posts, Python is used by many universities and organizations and is language of choice to teach kids about programming today. I also pointed to class by one of best technical research universities that is using Python and teaching introduction to programming by use of python.

Now read your response...

How did you response to this? Python is shit??

If not trolling, tell me what your response is. Why?

Last edited by Anubis; 05 November 2019 at 15:02.
Anubis is offline  
Old 05 November 2019, 14:12   #58
gimbal
cheeky scoundrel
 
gimbal's Avatar
 
Join Date: Nov 2004
Location: Spijkenisse/Netherlands
Age: 42
Posts: 6,905
A typical case of iterating too long on a done deal.
gimbal is offline  
Old 05 November 2019, 14:18   #59
Gorf
Registered User
 
Gorf's Avatar
 
Join Date: May 2017
Location: Munich/Bavaria
Posts: 2,294
Quote:
Originally Posted by meynaf View Post
I doubt they use not standard runtimes, and if they do, there is still the host OS to be discussed.
And even if they did have AOS support here, they still don't have 68020+ category.
Are you afraid to show your Python skills, that you rely on others ?
This thread isn't the place to do this. But if i open new thread with a concrete example, will you come in and show working code ?
It I look at your comments below, you would not accept anything I do.
So this would be rather futile.

Quote:
Yes but this is the job of programmers, having to cope with everchanging specs, marketing people negociating impossible delays, and customers who don't know what they want. It's not really the point here.
it is part of the point, as languages like Python can make things easier.

Quote:
Again, this has nothing to do with programming on the Amiga.
because you say so?

Quote:
This is only for reading chunks. It will not display the image.
You asked for IFF, which is only the container.

For ILBM you would read the chunks, convert the data and probably your pythons image library "pillow", to display it...

To de-interlieve the image on an classic Amiga might be stupid, so the smarter way would be to get amiga datatypes working on Python and let the system do the job.

You could also try to write the bitplane data directly into chip-ram ... Barry Walker has put up some examples for direct memory access with python for amiga in Aminet.

While all this is possible and Python more powerful and flexibel than AREXX this is NOT the typical use-case, but something, you do ONCE, as part of the system-integration.

usually a user would later just do:
"from Amiga-System import ILBM"

Quote:
libxmp does not play all mods properly. So you will think it did the job and some user will reports his mods don't play right. Result : miserable failure, as there is nothing you can do about it.
it is open source:
https://github.com/cmatsuoka/libxmp

If it does not work for you, why didn't you fix it?


Quote:
You are confusing virtualization and custom bytecode.
It sets up a VM that executes bytecode.


But probably that is more to your liking .. (or not, since I don't seem to understand what you re aiming at...)

https://csl.name/post/vm/

Quote:
Only for standard conversions. If you have custom work to do on files, you have to do it yourself and this is what my example was about.
was it?
Or is it just now about it?

You seem to move the target around as soon as I am getting close...

Quote:
Which does not return updated value of "s" to point on next non-numeric character, nor detects if "myatoi" doesn't overflow, nor detects if "s" isn't a number at all.
again: you did not ask for that specifics

(I really do not see the point in all that ...)

Quote:
Right.
And during that time, i could just start single asm-written command in startup-sequence. Ok, it still needs very small script to run it - so i could eventually place the code in custom kickstart to actually replace said startup-sequence...
sure - but that is not very flexible, so you will probably never do it.

That is the point: assembler is here the wrong tool form the job, and a shell-script is doing just fine.

Also scripting languages like AREXX and Python do have its place and that is why many people use them for fitting tasks.

Quote:
You did not look like if you were trying to make this point. You were just saying one of the two things would be impractical, (carefully ?) forgetting to mention the other also would.
nope - I did not.

Quote:
But it's rather the other way around. If YOU like it, then it must be good for everyone ?
Nobody was trying to force it on you.
You did post in a thread called "Python for Amiga" and started criticizing it.

Quote:
And now if i just emit some small criticism, i get charged of emitting crap in return...
My point was just to say python isn't any better than the others.
still think it is much better than "brainfuck" (and probably many others)


Quote:
On windows it makes sense, because what's there at first place sucks.
But on Amiga ?
AREXX has its quirks and limitations and someone might prefer Python or Lua.

As others prefer C or AMOS over Assembler.
Gorf is offline  
Old 05 November 2019, 15:07   #60
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Quote:
Originally Posted by Anubis View Post
Reading first page - question does python exist for Amiga OS, many years ago - people said it does, not new version, tho.
Question answered long ago and now we're OT. Perhaps this should just stop right here.


Quote:
Originally Posted by Anubis View Post
I've already said - you are entitled to your own opinion. (no matter how wrong it is)
I especially like the "no matter how wrong it is".


Quote:
Originally Posted by Anubis View Post
As I have already pointed in previous posts, Python is used by many universities and organizations and is language of choice to teach kids about programming today. I also pointed to class by one of most technical research universities that is using Python and teaching introduction to programming by use of python.
Wait a minute. Isn't this called "argumentum ad populum" ?


Quote:
Originally Posted by Anubis View Post
Now read your response...

How did you response to this? Python is shit??
My response clearly wasn't "Python is shit".
However, yours was "Holly shit, how did we miss this ridiculous statement..."


Quote:
Originally Posted by Anubis View Post
If not trolling, tell me what your response is. Why?
My response is available at post #20. Read again.


Quote:
Originally Posted by Gorf View Post
It I look at your comments below, you would not accept anything I do.
So this would be rather futile.
Your replies were just choosing some lib that remotely looks as if it could do the work...
So i had to be a little more specific.
If we decide to really start the code contest, the rules should be as clear as possible, but why should they be fully specified now as it's likely that nothing will be done ?


Quote:
Originally Posted by Gorf View Post
it is part of the point, as languages like Python can make things easier.
This thread is "python on amiga", not "python at work".


Quote:
Originally Posted by Gorf View Post
because you say so?
No, because it is the thread's topic.


Quote:
Originally Posted by Gorf View Post
You asked for IFF, which is only the container.
I wrote "iff image", which was assumed to mean ilbm.


Quote:
Originally Posted by Gorf View Post
For ILBM you would read the chunks, convert the data and probably your pythons image library "pillow", to display it...

To de-interlieve the image on an classic Amiga might be stupid, so the smarter way would be to get amiga datatypes working on Python and let the system do the job.

You could also try to write the bitplane data directly into chip-ram ... Barry Walker has put up some examples for direct memory access with python for amiga in Aminet.

While all this is possible and Python more powerful and flexibel than AREXX this is NOT the typical use-case, but something, you do ONCE, as part of the system-integration.

usually a user would later just do:
"from Amiga-System import ILBM"
I'd really like to see actual code doing that.

But the situation isn't different with asm (on which it's very easy for me to load and show an iff file due to my existing loading routine), maybe 'xcept on one point : Amiga asm isn't a moving target. It will hardly ever change.
So maybe writing a routine for some task may take longer (NOT for that one, though).
But it will also last longer. A routine for life, instead of a routine that will have compatibility problems when next major version of the language comes out.
What happened to python 2.x programs already when 3.x came out ?


Quote:
Originally Posted by Gorf View Post
it is open source:
https://github.com/cmatsuoka/libxmp

If it does not work for you, why didn't you fix it?
So now i must be doing YOUR work ? Remember, it's YOU who said this lib would do the job !
For me it's a lot easier to use some asm replay routine...


Quote:
Originally Posted by Gorf View Post
It sets up a VM that executes bytecode.


But probably that is more to your liking .. (or not, since I don't seem to understand what you re aiming at...)

https://csl.name/post/vm/
It's indeed closer. And now, by having seen it, it looks simpler to actually do that in asm.
I'm not aiming at something specific.


Quote:
Originally Posted by Gorf View Post
was it?
Or is it just now about it?

You seem to move the target around as soon as I am getting close...
The target wasn't supposed to be clearly defined to start with...
It was just raw idea, and then instead of simply choosing one you throw library names.
What should i have done about it ?


Quote:
Originally Posted by Gorf View Post
again: you did not ask for that specifics

(I really do not see the point in all that ...)
And again, it wasn't supposed to be fully defined either. I just had to be more specific to prevent you from just throwing in some existing function.
Anyway, this was just what my actual asm routine provides...


Quote:
Originally Posted by Gorf View Post
sure - but that is not very flexible, so you will probably never do it.

That is the point: assembler is here the wrong tool form the job, and a shell-script is doing just fine.

Also scripting languages like AREXX and Python do have its place and that is why many people use them for fitting tasks.
It was about saying that while both tools are inappropriate for the task, one is less inappropriate than the other.


Quote:
Originally Posted by Gorf View Post
nope - I did not.
These things can be made unintentionnally.


Quote:
Originally Posted by Gorf View Post
Nobody was trying to force it on you.
You did post in a thread called "Python for Amiga" and started criticizing it.
And now criticizing is forbidden so i should just stop ?


Quote:
Originally Posted by Gorf View Post
still think it is much better than "brainfuck" (and probably many others)
Since when being better than the worse means being good ?


Quote:
Originally Posted by Gorf View Post
AREXX has its quirks and limitations and someone might prefer Python or Lua.

As others prefer C or AMOS over Assembler.
Every language has its warts.
But replacing arexx by python or lua isn't very clever for the simple reason they don't have built-in port to send commands to other programs.
Arexx also does not have big runtime.
Anyway, the point was - once again - it is here all about python on amiga, not python on windows or at work.
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 19:54
Monty Python's Flying Circus sareks support.Games 8 10 March 2008 12:23
Python 1 joystick ladybird Retrogaming General Discussion 3 08 August 2007 15:06
Python Joysticks ? blade002 MarketPlace 11 18 June 2006 04:48
Monty Python Bueller request.Demos 2 12 October 2005 16: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 18:05.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.24365 seconds with 15 queries