The time now is Thu 23 May 2013, 21:02
All times are UTC - 4 |
|
Page 1 of 4 [54 Posts] |
Goto page: 1, 2, 3, 4 Next |
| Author |
Message |
BigPilot
Joined: 21 Jan 2007 Posts: 98
|
Posted: Wed 25 Feb 2009, 12:43 Post subject:
I've seen the future of Linux... Subject description: ...and it's Python based |
|
and it's called: Pardus Linux
What's so special about it? Well, it uses Python instead of shell scripts. The installer, package manager and configuration managers are all written in Python and you can easily extend the system by writting your own graphical or non-graphical Python applets.
http://www.pardus.org.tr/eng/projeler/comar/SpeedingUpLinuxWithPardus.html
http://www.pardus.org.tr/eng/projects/comar/PythonInPardus.html
I think the Puppy developers should have a look at this. Maybe they'll find some inspiration in it.
Last edited by BigPilot on Thu 26 Feb 2009, 15:26; edited 1 time in total
|
|
Back to top
|
|
 |
pa_mcclamrock

Joined: 03 Jun 2005 Posts: 657 Location: Fort Wayne, Indiana, USA
|
Posted: Wed 25 Feb 2009, 17:09 Post subject:
Re: I've seen the future of Linux... Subject description: ...and it's Python based |
|
| BigPilot wrote: | it uses Python instead of shell scripts. The installer, package manager and configuration managers are all written in Python and you can easily extend the system with graphical KDE interfaces which use the base classes. [ . . . ] I think the Puppy developers should have a look at this. Maybe they'll find some inspiration in it.  |
Python, I believe--like Tcl, which I use--is considerably more human-readable than your average concise but cryptic shell script, and this is a very good thing. On the other hand, graphical KDE interfaces probably won't go over too well with Puppy developers who try hard to cram the most value into the least space. What else, if anything, does it use for GUI scripts? Python/Tk? PyGTK? And how does the total size of the Python-with-GUI component compare to Tcl, Tk, and Gnocl (all together, well under 2 MB compressed), which will be built into Puppy 4.2?
_________________ It's stupid to use inferior software for ideological reasons.
--Linus Torvalds
Visit Pa Penguin's Icebox: http://www.pa-mcclamrock.com/icebox.html
|
|
Back to top
|
|
 |
DMcCunney
Joined: 02 Feb 2009 Posts: 894
|
Posted: Wed 25 Feb 2009, 17:28 Post subject:
Re: I've seen the future of Linux... Subject description: ...and it's Python based |
|
| pa_mcclamrock wrote: | | BigPilot wrote: | | it uses Python instead of shell scripts. |
Python, I believe--like Tcl, which I use--is considerably more human-readable than your average concise but cryptic shell script, and this is a very good thing. |
Whether it's more human readable is entirely a matter of whether you know the language. A lot of folks are proficient in Bourne shell scripting (and the bash script language is Bourne shell with extensions.) Less people are proficient in Python and TclTk.
I'd be reluctant to move to something that would require people to learn Yet Another Script Language to configure Puppy, if they didn't want to use a GUI.
______
Dennis
Who is in favor of including Python and TclTk in base Puppy distros
|
|
Back to top
|
|
 |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 15109 Location: Paradox Realm
|
Posted: Thu 26 Feb 2009, 00:37 Post subject:
|
|
Bash is indeed powerful. Once you have been using
Linux for a while you realise its potential.
One thing that surprises me:
programmers do not choose or use the most useful languages
Programmers follow trends and misinformation - programming fashion.
Barry has been experimenting with compilable Python type programs.
That is a smart move because it means the whole python library
is not required in future Woofery.
_________________ Puppy WIKI
|
|
Back to top
|
|
 |
BigPilot
Joined: 21 Jan 2007 Posts: 98
|
Posted: Thu 26 Feb 2009, 06:26 Post subject:
|
|
I know they use PythonQT for the GUI library (KDE is built with QT) and they're focused on KDE. Then again, there may be Python GUI libraries for the Window Manager Puppy is using (JWM?).
My personal opinion is that shell scripts are often used for things where a full blown programming language, like Python, would be much more suited. The added advantage of Python is that you can also program GUI applets with them, including installers and OS configuration stuff. It's really a one stop shop.
Python based systems also tend to start up much faster (see the Pardus Linux articles). I'm hoping that Puppy developers will be inspired to make a Python based system for older systems. Python doesn't use so much memory that it becomes unsuited for such systems.
|
|
Back to top
|
|
 |
pa_mcclamrock

Joined: 03 Jun 2005 Posts: 657 Location: Fort Wayne, Indiana, USA
|
Posted: Thu 26 Feb 2009, 06:28 Post subject:
Re: I've seen the future of Linux... Subject description: ...and it's Python based |
|
| DMcCunney wrote: | | Whether it's more human readable is entirely a matter of whether you know the language. |
True, but Tcl (as well as, I believe, Python) is a lot more human-readable to people who primarily know the English language. To take just one simple example, compare "-f" (bash) with "file exists" (Tcl).
| Quote: | | A lot of folks are proficient in Bourne shell scripting (and the bash script language is Bourne shell with extensions.) Less people are proficient in Python and TclTk. |
But far more people are proficient in English. For professional programmers, no doubt, bash will do just fine. Not so for people who (like me) aren't professional programmers but have some interest in programming, and would like our computers to understand English so far as possible.
| Quote: | | I'd be reluctant to move to something that would require people to learn Yet Another Script Language to configure Puppy, if they didn't want to use a GUI. |
So would I. There should be no question of dumping bash (even if it were feasible)--but only of also including a language that is more immediately and obviously human-readable to people who understand English, and allows you to create GUIs pretty quickly and easily.
_________________ It's stupid to use inferior software for ideological reasons.
--Linus Torvalds
Visit Pa Penguin's Icebox: http://www.pa-mcclamrock.com/icebox.html
|
|
Back to top
|
|
 |
Mr. Maxwell

Joined: 30 Aug 2008 Posts: 215 Location: Nebraska, USA
|
Posted: Sun 08 Mar 2009, 22:42 Post subject:
|
|
Yeah! Another chance to badger the puppy people into including Python!
This is why Python is so great:
| Code: | #initilize a list
my_list = ["item1", "item2", "item3", "did you know you can put any data type in a python list?"]
#print each item in the list
for item in my_list:
# no curly braces! compound statements are indentation based!
print(item)
# output
item1
item2
item3
did you know you can put any data type in a python list?
|
A 10 year old can read that! It is executable puesudocode!
Now as for the GUIs...
Python comes with the Tkinter toolkit which is the Tk graphics library! Tkinter is already very robust and powerfull, but, there is also the WxPython binding of WxWidgets! This is the best Python GUI toolkit on the face of the Earth. But it is a 10MB library. So, if Python / WxPython would be included we would be looking at 50MB of Python (i think).
Remember, NASA uses Python!
_________________ Super amazing game!
|
|
Back to top
|
|
 |
pa_mcclamrock

Joined: 03 Jun 2005 Posts: 657 Location: Fort Wayne, Indiana, USA
|
Posted: Mon 09 Mar 2009, 05:35 Post subject:
|
|
| Mr. Maxwell wrote: | This is why Python is so great: [human-readable Python code follows]
A 10 year old can read that! It is executable p[se]udocode! |
Yes, human-readable scripting languages--the more human-readable, the better--are by far the best bet for maximizing the number of people who can read and write program code, and maybe even contribute some code of value. If I didn't use Tcl (which fits pretty well into a very small distribution like Puppy), I'd probably use Python (which doesn't)--despite lingering qualms about who in his right mind (if anyone) would name a programming language after Monty Python!
| Quote: | if Python / WxPython would be included we would be looking at 50MB of Python (i think).
Remember, NASA uses Python! |
NASA doesn't impose a limit of 100 MB (compressed) on the operating system plus all bundled software on its computers. Make yourself a custom Python puplet with no 100 MB (or even 150 MB) limit, and promote it in the "Puppy Derivatives" forum. This is (one reason) why Puppy is so great: if you're not satisfied with what's in the official distribution, you can easily put together something you are satisfied with, and see whether other people like it too.
_________________ It's stupid to use inferior software for ideological reasons.
--Linus Torvalds
Visit Pa Penguin's Icebox: http://www.pa-mcclamrock.com/icebox.html
|
|
Back to top
|
|
 |
Mr. Maxwell

Joined: 30 Aug 2008 Posts: 215 Location: Nebraska, USA
|
Posted: Mon 09 Mar 2009, 21:54 Post subject:
|
|
Well, I've given it a little thought and a lot of reaserch, but I think it is feasable to replace Bash with Python. (but it would require herculean effort) All it takes is a C/C++ program with a couple functions to execute programs and the like, then wrap it to Python. Then you could just import that module to Python and bang! You have a bash free Python environment. However, if a Bash to Python script (tcl to python for pa penguin ) was created then I think Bash may finaly face the light at the end of the tunnel.
I'm going to seriously consider doing this, if anyone would like to lend help and years of Linux experiance it would be greatly apprecated. Also, I have a little exeriance with C/C++ but writting the shell program would be way over my head so that is what I really need help with.
Please don't tell me I'm crazy because I already know it will take years.
_________________ Super amazing game!
|
|
Back to top
|
|
 |
cb88

Joined: 28 Jan 2007 Posts: 1160 Location: USA
|
Posted: Mon 09 Mar 2009, 22:54 Post subject:
|
|
Dude, you have to remind yourself to take into consideration what the various languages were designed for.
Python was designed to be quick to learn and easy to use it is a middle weight language
Bash .... you can run bash on practically any hardware even back to the 386 and it is pretty fast
my experience ... with bash your using a few Mb tops to run it... with python you could be using tens of Mb to run a few simple deamons
I would suggest you try out lua it is fast and very lightweight it doesn't look too hard to learn having c++ roots and can be easily bound to C++ libs (see murgalua) also DSL has used murgalua
also ... when you make a lanuage "easy" you are almost certain to make it less flexible and most likely slower that just the plain and simple fact of the matter
how I see it:
#1 Bash (init system deamons etc...) + Python console perhaps optimal for your purposes
#2 Python only (oh look we are wasting huge ammounts of ram and the system boots very slowly!)
#3 Bash only (fast low mem usage...hard for noobs to program)
oh look which of these models we currently use! #1 so... basically what you are doing isn't crazy (good idea and good intentions) its just not well thought out or really that great of an idea after you look into it especially since well... you can already write sytem deamons in python etc... if you are gonna write init systems and such you should know bash or some other light scripting language
perhaps tcsh will appeal to you? its a c code like shell
_________________ Taking Puppy Linux to the limit of perfection. meanwhile try "puppy pfix=duct_tape" kernel parem eater.
BeOS Max-Vectorgamma: Tyan thund 2 512 ram 2x PII 300
Vectorsigma (laptop): Gentoo Athlon II X2 2Ghz 4Gb ram radeon 4200 mesa-git
|
|
Back to top
|
|
 |
BarryK
Puppy Master

Joined: 09 May 2005 Posts: 6861 Location: Perth, Western Australia
|
Posted: Tue 10 Mar 2009, 06:27 Post subject:
|
|
yes, I did a lot of research into Python variants. I was looking for tiny-interpreters and true compilers. I discovered heaps of stuff, reported it on my blog.
There are many Python-like true compilers, for example 'Delight', 'Wirbel', 'Genie' ...more, I can't recall their names right now.
One little Python interpreter that is really nice is 'TinyPy'. It is written in plain C and can compile statically (so could even be used in the initial ramdisk) just 127KB static:
http://puppylinux.com/blog/?viewDetailed=00486
http://puppylinux.com/blog/?viewDetailed=00487
...now, if you could marry 'gtkdialog' to tinypy, you would have a very nice means of writing GTK GUI apps. Someone with C knowledge could hack tinypy to do anything they want, as it's pretty small and straightforward code.
As for Genie, I wrote about it here:
http://puppylinux.com/blog/?viewDetailed=00494
And Wirbel:
http://puppylinux.com/blog/?viewDetailed=00469
http://murga-linux.com/puppy/viewtopic.php?t=35118
There are a couple more Python-like true compilers... can't recall their names ...um, yes 'Shed Skin', another one too but name still escapes me.
Of the true compilers, I was only satisfied with Genie from the point of view of final executable size.
_________________ http://bkhome.org/blog2/
|
|
Back to top
|
|
 |
BarryK
Puppy Master

Joined: 09 May 2005 Posts: 6861 Location: Perth, Western Australia
|
Posted: Tue 10 Mar 2009, 06:50 Post subject:
|
|
A postscript to the above post, my current thinking is that the future of Puppy should be Vala/Genie based, as well as Ash/Bash.
Vala is the official language of the GTK project, but is independent of GTK (just needs the glib library, which is in every distro). It is a new language, but extremely active. Vala has a C# like syntax, and Genie is an alternative syntax that the Vala compiler understands, with a Python-like syntax.
The really great things about it is the extemely small executables created, similar to C coding, plus the builtin easy GTK GUI coding.
Currently, this is my vision of the way ahead.
The Genie syntax is not as actively supported as the Vala syntax, but still works fine. My Genie pages are here:
http://puppylinux.com/genie/
_________________ http://bkhome.org/blog2/
|
|
Back to top
|
|
 |
BarryK
Puppy Master

Joined: 09 May 2005 Posts: 6861 Location: Perth, Western Australia
|
Posted: Tue 10 Mar 2009, 12:36 Post subject:
|
|
I just remembered the names of more Python look-alikes:
Boo: an interpreter
Nimrod: a compiler.
_________________ http://bkhome.org/blog2/
|
|
Back to top
|
|
 |
Mr. Maxwell

Joined: 30 Aug 2008 Posts: 215 Location: Nebraska, USA
|
Posted: Wed 11 Mar 2009, 22:39 Post subject:
|
|
Why Python should be included in Puppy:
1. Python is about 80% faster than bash because it is byte compiled while base is interperated.
2. Python has almost no syntax makeing it very readable, bash has very crypic syntax. (like the $ infront of every varible)
3. Python is dynamicaly typed, makeing it much more flexible than bash.
4. Python is the easyest launguage to learn, therefore we will get many more newbs programing and makeing puppy better if Python is included.
5. Python ships with the Tkinter GUI toolkit which is the wrapper for the tcl/tk GUI tookit. If tcl/tk is already installed the wrapper is only 100KB or 40KB if compressed.
6. A fully functional console Python can be striped down to less than 3MB.
7. Python comes with 20MB of standard library scripts, everythin from webprograming to an IDE and the entire library can be removed from puppy with new files only added as dependices need them. That cuts the Python size in half.
8. Python is named after Monty Python, enough said.
9. Python is the strongest laungage in it's league as it is much more readable than perl and much more mature than ruby.
10. I would be more than happy to create a Python wrapper for GTK dialog, reducing the size of Python by 10MB.
11. Python is the way of the future.
12. The runtime memory load is only 2.5MB
13. Bash is outdated and due for replacement, Microsoft has almost compleatly dumped batch. (if anyone would like to use microsoft as a role-model, not the best way to improve puppy but their not compleate screw-ups)
The future of Linux if we go along with my suggestions:
1. If Python was to really take a part in puppy we could put the awesome 'Python Powered' logo on everything. That might not seem like much but tech-savvy people really dig that kind of stuff plus we would get all kinds of Python deveolpers here to help expand python.
2. If Python compleatly replaced bash we could advertise Puppy as the most modern OS (which would be very true) and would skyrocket Linux into a new age where Linux dominates the market.
3. In a few weeks we could create a Python system compleaty independant of bash and would be albe to replace bash with a little elbow grease.
4. If we created that system it would begin a snowball effect that would attract python developers as mentioned above and they would actively participate in replaceing bash with python.
As for the python imitators, the reason Puppy needs Python is because you can't compile everything, somethings need to be scripted plus binaries are larger than scripts. Also, the Python imitators still lack most of the syntax features, dynamic typeing, and the standard library. Tinypy is still lacking many features of Python which, as much as I want to, cannot agree with using it instead of Python.
I truly believe Python is the way ahead for Linux, the controversy is only skin deep; the deeper you look the more convinced you become Python really is the way of the future. I'm not biased, I've reaserched this for several hours. I also understand why nobody wants it here, I will attempt to get you guys to include it to the limits of my capabilities however.
Is there anyone at all who wants to help me revolutionize Linux? I'll take all the help I can get.
_________________ Super amazing game!
|
|
Back to top
|
|
 |
Mr. Maxwell

Joined: 30 Aug 2008 Posts: 215 Location: Nebraska, USA
|
Posted: Thu 12 Mar 2009, 18:58 Post subject:
|
|
Check this out, it's a multi launguage VM. Unfortinatly the Python support is very poor, otherwise it would be perfect.
Is there any takers on helping me with the project in the above post?
_________________ Super amazing game!
|
|
Back to top
|
|
 |
|
|
Page 1 of 4 [54 Posts] |
Goto page: 1, 2, 3, 4 Next |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|