I've seen the future of Linux...

Under development: PCMCIA, wireless, etc.
Message
Author
BigPilot
Posts: 98
Joined: Sun 21 Jan 2007, 10:37

I've seen the future of Linux...

#1 Post by BigPilot »

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/c ... ardus.html

http://www.pardus.org.tr/eng/projects/c ... ardus.html

I think the Puppy developers should have a look at this. Maybe they'll find some inspiration in it. :P
Last edited by BigPilot on Thu 26 Feb 2009, 19:26, edited 1 time in total.

User avatar
pa_mcclamrock
Posts: 695
Joined: Fri 03 Jun 2005, 23:13
Location: Fort Wayne, Indiana, USA

Re: I've seen the future of Linux...

#2 Post by pa_mcclamrock »

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. :P
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

DMcCunney
Posts: 889
Joined: Tue 03 Feb 2009, 00:45

Re: I've seen the future of Linux...

#3 Post by DMcCunney »

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

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#4 Post by Lobster »

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 Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

BigPilot
Posts: 98
Joined: Sun 21 Jan 2007, 10:37

#5 Post by BigPilot »

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.

User avatar
pa_mcclamrock
Posts: 695
Joined: Fri 03 Jun 2005, 23:13
Location: Fort Wayne, Indiana, USA

Re: I've seen the future of Linux...

#6 Post by pa_mcclamrock »

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).
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. :)
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

User avatar
Mr. Maxwell
Posts: 215
Joined: Sat 30 Aug 2008, 23:56
Location: Nebraska, USA

#7 Post by Mr. Maxwell »

Yeah! Another chance to badger the puppy people into including Python!

This is why Python is so great:

Code: Select all

#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!
[url=http://www.tribalwars.net/3389956.html]Super amazing game![/url]

User avatar
pa_mcclamrock
Posts: 695
Joined: Fri 03 Jun 2005, 23:13
Location: Fort Wayne, Indiana, USA

#8 Post by pa_mcclamrock »

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! :lol:
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

User avatar
Mr. Maxwell
Posts: 215
Joined: Sat 30 Aug 2008, 23:56
Location: Nebraska, USA

#9 Post by Mr. Maxwell »

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 :D ) 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. :?
[url=http://www.tribalwars.net/3389956.html]Super amazing game![/url]

User avatar
cb88
Posts: 1165
Joined: Mon 29 Jan 2007, 03:12
Location: USA
Contact:

#10 Post by cb88 »

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.
X86: Sager NP6110 3630QM 16GB ram, Tyan Thunder 2 2x 300Mhz
Sun: SS2 , LX , SS5 , SS10 , SS20 ,Ultra 1, Ultra 10 , T2000
Mac: Platinum Plus, SE/30

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#11 Post by BarryK »

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.
[url]https://bkhome.org/news/[/url]

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#12 Post by BarryK »

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/
[url]https://bkhome.org/news/[/url]

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#13 Post by BarryK »

I just remembered the names of more Python look-alikes:

Boo: an interpreter
Nimrod: a compiler.
[url]https://bkhome.org/news/[/url]

User avatar
Mr. Maxwell
Posts: 215
Joined: Sat 30 Aug 2008, 23:56
Location: Nebraska, USA

#14 Post by Mr. Maxwell »

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.
[url=http://www.tribalwars.net/3389956.html]Super amazing game![/url]

User avatar
Mr. Maxwell
Posts: 215
Joined: Sat 30 Aug 2008, 23:56
Location: Nebraska, USA

#15 Post by Mr. Maxwell »

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?
[url=http://www.tribalwars.net/3389956.html]Super amazing game![/url]

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#16 Post by MU »

Gtkbasic is not the future, but just 200 kb, including Gtk wrappers ;)
It is not as powerfull as a language with full Gtk implementation (like freebasic), but I could write programs, that astonished myself.

Win-Thumbs
A kind of visual taskbar.
http://murga-linux.com/puppy/viewtopic. ... 389#174389

ControlCenter Prototype
unfinished, work in progress
http://murga-linux.com/puppy/viewtopic.php?t=24656

Muppy-Filer
http://murga-linux.com/puppy/viewtopic.php?t=32575

GtkBasic
A small Basic-Interpreter with a simple IDE and example programs.
Main purpose is to develop small utilities for Puppylinux.
http://murga-linux.com/puppy/viewtopic.php?p=155083

However, I think that vala is suited better for Puppy.
Very small compiled executables.
"official" Gnome language, so hopefully this will get a lot of support in future.
Syntax seems simple, and is very similar to Java.
Who goes for a Java2vala converter? That would be *really* cool.
Especially with a swing2gtk converter in addition.
http://puppylinux.com/blog/?viewDetailed=00595
http://puppylinux.com/blog/?viewDetailed=00596

Gdesklets (Python) start up pretty slow, and require a huge Python installation, so I never really was convinced from Python.
And I find Python not easy to understand, maybe this is the effect, if you learned other languages before (like C).

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
Mr. Maxwell
Posts: 215
Joined: Sat 30 Aug 2008, 23:56
Location: Nebraska, USA

#17 Post by Mr. Maxwell »

I encourage everyone who has not used Python before to install it and give it a try. Really it is a great language, if it spawns clone languages it has to be good (python just spawned a few).
[url=http://www.tribalwars.net/3389956.html]Super amazing game![/url]

MUguest
Posts: 73
Joined: Sat 09 Dec 2006, 16:40

#18 Post by MUguest »

Visual Basic also is popular, so should we use it? ;)

Here is an interesting benchmark:
http://google.com/search?q=cache:n0jYRX ... +slow&cd=2

Python is even slower than Java :(
But the benchmark is old, maybe it got better meanwhile.
It was just the first one I found.

An important issue seems to be the time required to start the virtual machine.
I really don't want to do "programming language bashing", but slogans like "is the future" are not good to determine the quality.
Benchmarks give reproducable results.


Mark

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#19 Post by Lobster »

Python is even slower than Java
Too slow.
You know what I found the main problem with python?
Basically a programming language without an easy method to create
a GUI is of limited use to me . . .

I will persevere with Genie, the Python like language that compiles . . .
Python is never going to be in Puppy as standard.
It is too big.
So it may be the best thing ever but . . . :cry:
It is too big.
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

guilty as convicted

#20 Post by mcewanw »

Mr. Maxwell wrote: I truly believe . . . Python really is the way of the future. I'm not biased, I've reaserched this for several hours.
There is nothing like conviction.

Post Reply