LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices


Reply
  Search this Thread
Old 07-28-2017, 09:29 AM   #76
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,868

Rep: Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905

I don't know what is your problem? What can't you believe?
From the other hand the speed of ls depends on a lot of things, the disk type, disk internal cache, system load, system cache, memory usage, probably the speed of network connection, whatever, but just the execution of the code should not really influence. Therefore I do not think your measurement is really reliable.
 
Old 07-28-2017, 09:31 AM   #77
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 8.0 Custom, Merged Usr, Linux 4.9.35
Posts: 472

Rep: Reputation: 118Reputation: 118
Quote:
Originally Posted by Xeratul View Post
On a distant connection, slow, via SSH. I don't know but /usr/bin/ls performs much slower than mine, 5sec / few sec differences.


Man!!! This thing below is terribly scary, really. I can't believe what I see.
1> If the default was compiled against ISO-8859-1 and you're using a UTF-8 SSH client, that would explain it. (All the translation.)

2> My car has an FM stereo! (Gasp, newfangled scandal!)
 
Old 07-28-2017, 11:27 AM   #78
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,357

Original Poster
Rep: Reputation: 213Reputation: 213Reputation: 213
I will quote something valuable:
https://en.wikipedia.org/wiki/Unix_philosophy

Quote:
Over time, the leading developers of Unix (and programs that ran on it) established a set of cultural norms for developing software, norms which became as important and influential as the technology of Unix itself; this has been termed the "Unix philosophy."

The Unix philosophy emphasizes building simple, short, clear, modular, and extensible code that can be easily maintained and repurposed by developers other than its creators.
Today programmation in Linux, due to large opensource access, has taken other directions.
Just run Ubuntu, Debian,... one must admit that those aren't according to Unix, any longer.
 
Old 07-28-2017, 11:44 AM   #79
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 8.0 Custom, Merged Usr, Linux 4.9.35
Posts: 472

Rep: Reputation: 118Reputation: 118
Guess that rules out X11 then...

1. X11 does one thing badly, IPC.
2. N/A
3. Exactly what Wayland is about...
4. XWayland?

So, there you go.
 
Old 07-28-2017, 11:47 AM   #80
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,357

Original Poster
Rep: Reputation: 213Reputation: 213Reputation: 213
Quote:
Originally Posted by Luridis View Post
Guess that rules out X11 then...

1. X11 does one thing badly, IPC.
2. N/A
3. Exactly what Wayland is about...
4. XWayland?

So, there you go.
XWayland:
Quote:
This is the Unix philosophy:
Write programs that do one thing and do it well.
->Write programs to work together. <- :-(
Write programs to handle text streams, because that is a universal interface.
 
Old 07-28-2017, 12:10 PM   #81
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,868

Rep: Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905
Quote:
Originally Posted by Xeratul View Post
Today programmation in Linux, due to large opensource access, has taken other directions.
Just run Ubuntu, Debian,... one must admit that those aren't according to Unix, any longer.
Why not? I don't agree with this statement.
 
Old 07-28-2017, 12:12 PM   #82
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 8.0 Custom, Merged Usr, Linux 4.9.35
Posts: 472

Rep: Reputation: 118Reputation: 118
Try xwayland, and then come tell me it doesn't work.

GPU's do not speak "text-stream". That philosophy is from a day when GUIs either didn't exist, or were in their infancy. Applying it to everything is like applying XML to everything. Frame rates don't matter to a serial console, but they do to a GUI. And stopping to translate unicode on every frame is silly at best.

Resisting change for the sake of resisting change is a pointless endeavor. I'll happily resist some things. But I won't argue for the continuation of a system when its core developers give presentations showing how and where is inherently flawed so badly that it cannot be fixed without breaking its core specifications. I'm inclined to accept the recommendations of someone who's worked on the project for more than a decade.

Last edited by Luridis; 07-28-2017 at 12:13 PM.
 
Old 07-28-2017, 12:12 PM   #83
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,357

Original Poster
Rep: Reputation: 213Reputation: 213Reputation: 213
Quote:
Originally Posted by pan64 View Post
Why not? I don't agree with this statement.
SysD is not that according to Unix phil. Most distros adopted it.
 
Old 07-28-2017, 02:44 PM   #84
Myk267
Member
 
Registered: Apr 2012
Location: California
Posts: 321
Blog Entries: 14

Rep: Reputation: Disabled
Here's my rule: Test the code. If you can't test the code, something is wrong with it. When I do this, I get better at programming and write better programs. When I don't, things go bad.
 
Old 07-28-2017, 04:25 PM   #85
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_10{.0|.1|.2}
Posts: 4,515
Blog Entries: 6

Rep: Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426Reputation: 2426
The premise of this thread, The Ten Rules of a Good Programmer, is based on personal preferences and somewhat vague as a topic for the programming forum. As a result, a wide ranging discussion has followed, on topics ranging from language comparisons to init-systems to display managers.

There are some very good comments on the different subjects salted through the thread, but it would be difficult to try to keep the discussion "on topic", as it is not really clear what the topic is, despite the thread title!

As such, this thread has been moved to the General forum where discussion may continue without promptings to stay on topic.

Last edited by astrogeek; 07-28-2017 at 04:51 PM. Reason: typo
 
Old 07-28-2017, 04:28 PM   #86
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,357

Original Poster
Rep: Reputation: 213Reputation: 213Reputation: 213
"Off-topic section" might be appropriated for the moment.

Let's try to keep on-topic.

Mike Gancarz: The UNIX Philosophy
The UNIX Philosophy which sums it up in 9 paramount precepts:
1. Small is beautiful.
2. Make each program do one thing well.
3. Build a prototype as soon as possible.
4. Choose portability over efficiency.
5. Store data in flat text files.
6. Use software leverage to your advantage.
7. Use shell scripts to increase leverage and portability.
8. Avoid captive user interfaces.
9. Make every program a filter.
 
Old 07-28-2017, 05:48 PM   #87
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 8.0 Custom, Merged Usr, Linux 4.9.35
Posts: 472

Rep: Reputation: 118Reputation: 118
Quote:
Originally Posted by Xeratul View Post
"Off-topic section" might be appropriated for the moment.

Let's try to keep on-topic.

Mike Gancarz: The UNIX Philosophy
The UNIX Philosophy which sums it up in 9 paramount precepts:
1. Small is beautiful.
2. Make each program do one thing well.
3. Build a prototype as soon as possible.
4. Choose portability over efficiency.
5. Store data in flat text files.
6. Use software leverage to your advantage.
7. Use shell scripts to increase leverage and portability.
8. Avoid captive user interfaces.
9. Make every program a filter.
Now, lets expand the context to include times past 1979.

1. Is small required? If so, every person whom supposedly follows this philosophy must go back to writing programs in assembler. Assemblers are small and therefore beautiful. Compilers are large and complex, thus can't be used by proponents of the Unix philosophy. Of course, compilers were small at one time, before there were so many CPU architectures, support for non-English languages and the C spec wasn't updated because of security concerns, etc.

2. This already conflicts with #1, or how would you go about building a small web browser that anyone would want to use when they kick back after work? Lynx is a useful tool, but it's unruly for doing what people expect: looking a p0rn... or, perhaps youtube.

3. This pretty much goes without saying, in every kind of engineering. It actually doesn't need to be vocalized.

4. Thanks to things like autotools and build configurations we have both, even portability as far as Windows. But, autotools is complicated, which is ruled out by number 1. So, you'll have to choose small & simple or portable. Which will it be?

5. Applicable in 1979. Or do you want to wait for your google searches to be parsed by Perl though all those page crawls? You know, the tens of millions it does every single day? Do you want it to take them 5 minutes to bring up your account when you call Amazon? While I agree with this for configuration data, I do not agree with it for all data. Good luck applying this outdated principal carte blanche without giving thought to it's contextual applicability.

6. Thank you Captain Obvious. (The author, not LQ.org poster...)

7. Conflicts with #4 if the target platform doesn't speak sh. That said, it's meaning was already implied by 4 & 6, so this is a needless restatement.

8. There are plenty of these, but doesn't that same diversity lead to a bounty of different options, too many in some cases? Don't like Gtk, try Tcl/Tk, Qt or Efl.

9. I don't know what he's getting at... By their very nature all programs are data filters that either take action on the data itself, or take other actions based on the data.

All in all, most of those are pretty obvious. I also suspect their often taken out of context, temporally if not in subject. Lastly, I don't see how stating them has steered us towards Computer Utopia.
 
Old 07-28-2017, 05:55 PM   #88
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: Slackware
Posts: 7,693

Rep: Reputation: 2979Reputation: 2979Reputation: 2979Reputation: 2979Reputation: 2979Reputation: 2979Reputation: 2979Reputation: 2979Reputation: 2979Reputation: 2979Reputation: 2979
Quote:
Originally Posted by Xeratul View Post
Mike Gancarz: The UNIX Philosophy

5. Store data in flat text files.
Might still be right for a lot of software.

Clearly not right for all software.

Last edited by dugan; 07-28-2017 at 06:14 PM.
 
Old 07-28-2017, 06:19 PM   #89
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,357

Original Poster
Rep: Reputation: 213Reputation: 213Reputation: 213
You are usually programming on high-level languages (Java, .net, C#,...), right?

It is good to have other rules and opinions.

Your comments are visibly largely different than the old 1970s ones, original of Unix. Prehistoric, right?

They may however make still sense today.

Quote:
Originally Posted by Luridis View Post
Now, lets expand the context to include times past 1979.

1. Is small required? If so, every person whom supposedly follows this philosophy must go back to writing programs in assembler. Assemblers are small and therefore beautiful. Compilers are large and complex, thus can't be used by proponents of the Unix philosophy. Of course, compilers were small at one time, before there were so many CPU architectures, support for non-English languages and the C spec wasn't updated because of security concerns, etc.
Small is good - It is important to avoid bloated and non clean codes. Programmers usually find good to have small and clean codes. It can be also valid for functions. It can be a large project with non complicated, long functions


2. This already conflicts with #1, or how would you go about building a small web browser that anyone would want to use when they kick back after work? Lynx is a useful tool, but it's unruly for doing what people expect: looking a p0rn... or, perhaps youtube.
A web browser which is efficient is possible. Look at netsurf.

3. This pretty much goes without saying, in every kind of engineering. It actually doesn't need to be vocalized.
A prototype is important to start with a code and to update it all along the programming road.

4. Thanks to things like autotools and build configurations we have both, even portability as far as Windows. But, autotools is complicated, which is ruled out by number 1. So, you'll have to choose small & simple or portable. Which will it be?
cmake and autotools are insanity, proved by many elite programmers. Make rules, as used by Linus

5. Applicable in 1979. Or do you want to wait for your google searches to be parsed by Perl though all those page crawls? You know, the tens of millions it does every single day? Do you want it to take them 5 minutes to bring up your account when you call Amazon? While I agree with this for configuration data, I do not agree with it for all data. Good luck applying this outdated principal carte blanche without giving thought to it's contextual applicability.


6. Thank you Captain Obvious. (The author, not LQ.org poster...)
Plain is not so obvious. To allow the source code to be easily read is foremost important, it is somehow the respected code source. Besides, all people aren't happy of HTML, SVG,... XML, despite it is widely used.

7. Conflicts with #4 if the target platform doesn't speak sh. That said, it's meaning was already implied by 4 & 6, so this is a needless restatement.
*non available*

8. There are plenty of these, but doesn't that same diversity lead to a bounty of different options, too many in some cases? Don't like Gtk, try Tcl/Tk, Qt or Efl.
Those libraries are well reported as bloated, but no one has better. Yes, maybe KDE Non captive interfaces makes sense, since the original ideas of Ken and Dennis Ritchie was portability foremost. They left a treasure: the C language.

9. I don't know what he's getting at... By their very nature all programs are data filters that either take action on the data itself, or take other actions based on the data.
It is about input streams. This also make sense to have an efficient programme.

All in all, most of those are pretty obvious. I also suspect their often taken out of context, temporally if not in subject. Lastly, I don't see how stating them has steered us towards Computer Utopia.
Good and bad programmes - You are free to define what are your rules.
 
Old 07-28-2017, 06:31 PM   #90
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: Slackware
Posts: 7,693

Rep: Reputation: 2979Reputation: 2979Reputation: 2979Reputation: 2979Reputation: 2979Reputation: 2979Reputation: 2979Reputation: 2979Reputation: 2979Reputation: 2979Reputation: 2979
I'll say this about 1970s stuff.

Most programmers would still agree that "separate logic from data" is a good general rule.

Colossal Cave, the first adventure game, which was written in Fortran, is an excellent example of that. Every string in the program is loaded from a tape.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Could this article be retitled "Ten Simple Rules for Getting Help from LQ"? allend General 1 06-13-2012 11:59 AM
I Look for a good programme of the networks finsh Linux - Networking 2 02-24-2008 02:33 AM
LXer: Ten BY TEN. India's IT & BPO Outsourcing. LXer Syndicated Linux News 0 12-26-2005 04:31 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 04:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration