Can shell mean a translator?

New to Debian (Or Linux in general)? Ask your questions here!

Re: Can shell mean a translator?

Postby djk44883 » 2019-08-17 13:26

pylkko wrote:Well, to be fair, the fact that some computer buses use a serialized architecture and do not send the bits in a parallel manner does not really make that guy's point invalid, now does it? But the way that the peripherals send the data is a bit off topic,

yes, getting off topic... keyboards send keyboard scancodes! press a key it sends a signal, not a "switch" toggling multiple wires! Leaning towards topic, the article, completely missing this leads me to believe it's mostly hogwash.

pylkko wrote:The wikipedia article on shells does well in explaining it as an interface and even why it is called "a shell".

Virtually everything you read refers to them as interpreter. There is enough of a subtle difference between the two. A translator, a shell really isn't - but it may be semantics to some.
djk44883
 
Posts: 80
Joined: 2010-12-11 13:14

Re: Can shell mean a translator?

Postby hack3rcon » 2019-08-19 10:39

pylkko wrote:
if you believe "when you press the key 'A', your keyboard sends a combination of 1s and 0s through a bundle of 7 wires" - nope. [and so on]

Well, to be fair, the fact that some computer buses use a serialized architecture and do not send the bits in a parallel manner does not really make that guy's point invalid, now does it? But the way that the peripherals send the data is a bit off topic, if the question is how a shell works. The wikipedia article on shells does well in explaining it as an interface and even why it is called "a shell".

https://en.wikipedia.org/wiki/Shell_(computing)

Thanks.
Thus GUI is a kind of shell?
Who translate our tasks into 0 and 1 for the computer?
hack3rcon
 
Posts: 293
Joined: 2015-02-16 09:54

Re: Can shell mean a translator?

Postby pylkko » 2019-08-19 17:21

djk44883 wrote:[
yes, getting off topic... keyboards send keyboard scancodes! press a key it sends a signal, not a "switch" toggling multiple wires! Leaning towards topic, the article, completely missing this leads me to believe it's mostly hogwash.


I share your mistrust in the author. At some point he even writes "Walla!"... I guess he is trying to write the French word "voilà"...

However, that is essentially how most computer peripherals work. ASCII characters (the simple set) are expressed in 7-bits
https://www.sciencebuddies.org/science- ... scii-table

So you can use 7 wires with either 1 or 0 to represent them all (each keyboard key, see above link). In practice, this binary representation is done using a high voltage (say 5 V) to represent the 1 and a ground (0 V) to represent the 0. These are essentially switches, if you pass electricity through, you get a 1, if you cut the current off, you get a 0.

The reason some busses like i2C and USB can have only 2 wires for data is because they send all of the 7 or more bits on the same line, using some process with which the data can be separated into the original 7 or many. for example, they can send the first wire on the first millisecond, the second on the second and so on. There are many different ways to do this, but essentially the idea is to send the many parallel signals over only one line

hack3rcon wrote:Thanks.
Thus GUI is a kind of shell?
Who translate our tasks into 0 and 1 for the computer?


I wouldn't say that any graphical interface is a shell. However, some are or can be. For example GNOME-shell is a shell, or the interpreter in a Python IDE, but the graphical interface for rsync isn't. The term is kind of hazy and was never meant to be that exact. Most often people think of a non-graphical program which interactively responds to user inputted comannds when they hear the word "shell'
User avatar
pylkko
 
Posts: 1567
Joined: 2014-11-06 19:02

Re: Can shell mean a translator?

Postby djk44883 » 2019-08-19 18:58

pylkko wrote:So you can use 7 wires with either 1 or 0 to represent them all (each keyboard key, see above link). In practice, this binary representation is done using a high voltage (say 5 V) to represent the 1 and a ground (0 V) to represent the 0. These are essentially switches, if you pass electricity through, you get a 1, if you cut the current off, you get a 0.

This somewhat goes back to a post I made at the beginning.
Computers don''t understand 0 and 1, people do, computers understand binary either it is, or isn't... we call it 0 or 1 - depending on it's "state"

5V and 0V represent a 1 or 0 to people. A computer understand, either it is, or it isn't. People call it one or zero so as to understand things.

I don't completely refute your logic. But we don't truly believe a keyboard is "hardwired" to send A no matter what. It sends a keyboard scan-code, and computers are programed to accept it as A... but it doesn't have to. scan-codes can be set keys to de virtually what every programming dictates. It doesn't send an ASCII65 necessarily.
djk44883
 
Posts: 80
Joined: 2010-12-11 13:14

Re: Can shell mean a translator?

Postby hack3rcon » 2019-08-20 04:19

pylkko wrote:
djk44883 wrote:[
yes, getting off topic... keyboards send keyboard scancodes! press a key it sends a signal, not a "switch" toggling multiple wires! Leaning towards topic, the article, completely missing this leads me to believe it's mostly hogwash.


I share your mistrust in the author. At some point he even writes "Walla!"... I guess he is trying to write the French word "voilà"...

However, that is essentially how most computer peripherals work. ASCII characters (the simple set) are expressed in 7-bits
https://www.sciencebuddies.org/science- ... scii-table

So you can use 7 wires with either 1 or 0 to represent them all (each keyboard key, see above link). In practice, this binary representation is done using a high voltage (say 5 V) to represent the 1 and a ground (0 V) to represent the 0. These are essentially switches, if you pass electricity through, you get a 1, if you cut the current off, you get a 0.

The reason some busses like i2C and USB can have only 2 wires for data is because they send all of the 7 or more bits on the same line, using some process with which the data can be separated into the original 7 or many. for example, they can send the first wire on the first millisecond, the second on the second and so on. There are many different ways to do this, but essentially the idea is to send the many parallel signals over only one line

hack3rcon wrote:Thanks.
Thus GUI is a kind of shell?
Who translate our tasks into 0 and 1 for the computer?


I wouldn't say that any graphical interface is a shell. However, some are or can be. For example GNOME-shell is a shell, or the interpreter in a Python IDE, but the graphical interface for rsync isn't. The term is kind of hazy and was never meant to be that exact. Most often people think of a non-graphical program which interactively responds to user inputted comannds when they hear the word "shell'

So, When I'm working with a graphical environment and do some tasks like copy and paste then who translate it for the computer? copy and paste in a graphical environment not doing by "cp" command?
hack3rcon
 
Posts: 293
Joined: 2015-02-16 09:54

Re: Can shell mean a translator?

Postby pylkko » 2019-08-20 11:05

How X manages selections and clipboards is to some extent explained here:

https://en.wikipedia.org/wiki/X_Window_ ... #Clipboard
User avatar
pylkko
 
Posts: 1567
Joined: 2014-11-06 19:02

Re: Can shell mean a translator?

Postby djk44883 » 2019-08-21 20:20

hack3rcon wrote:So, When I'm working with a graphical environment and do some tasks like copy and paste then who translate it for the computer? copy and paste in a graphical environment not doing by "cp" command?

I suppose those who wrote the computer programming code to execute the functions and systems calls necessary to complete the transaction, if you want a "who". What - the program code.
djk44883
 
Posts: 80
Joined: 2010-12-11 13:14

Previous

Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable