IRC log of #novawebdev for Friday, 2023-06-23

*** shmohamud has quit (Remote host closed the connection)00:55
*** shmohamud has quit (Ping timeout: 480 seconds)01:10
*** thehedgeh0g has quit (Remote host closed the connection)04:02
*** shmohamud has quit (Ping timeout: 480 seconds)07:26
mulbahkagenda!12:21
*** scooper has quit (Ping timeout: 480 seconds)12:29
shmohamudGood day guys. I'm sorry to say I'm again not feeling well today13:00
ubuntouristshmohamud, you have my sympathy.13:01
shmohamudThank you. I'm going to leave the chat for the day an get some rest13:01
mulbahkI'm so sorry shmohamud13:01
mulbahkI pray that you get well soon13:02
*** shmohamud has quit (Remote host closed the connection)13:02
mulbahkHow are you doing Mr. Cole13:02
ubuntouristSo... I'm guessing we're still expecting tboimah?13:02
ubuntouristmulbahk, I'm doing well. I've been feeling a bit fat and flabby but got out for some exercixe yesterday. 13:03
mulbahkGood to hear13:04
ubuntouristmulbahk, Becoming older and feeling the effects of it more often, but good today.13:04
ubuntouristI now have an account on the Liberian server13:05
ubuntouristI see someone has installed mumble-server on it.13:05
mulbahkso are we going to use it or tmate13:05
ubuntouristmulbahk, originally, a few weeks ago, I was thinking "both" but now I'm re-thinking that.13:07
ubuntouristmulbahk, the problem with audio communications over the 'net is that everyone needs a microphone and headphones.13:07
scooperOK Sahnun13:08
scooperspeedy recovery for my end13:08
ubuntouristmulbahk, Using the built-in computer speakers and microphone results in echo...echo... echo... echo 😉13:08
mulbahkshould I type it in my terminal13:09
ubuntouristmulbahk, because my voice comes out of the speakers (instead of headphones) and the computer microphone picks up the speech from the speakers, so it sends that back to me.... A feedback loop.13:09
*** shmohamud has quit (Ping timeout: 480 seconds)13:10
mulbahkoh I see that was the problem the other day13:11
ubuntouristmulbahk, So without headphones, it's probably not worth pursuing mumble. If there are ever good headsets with mic and headphones we can change back. But there would probably need to be a set for every participant.13:11
ubuntouristtboimah, Hi13:11
tboimahGood morning ubuntourist13:12
ubuntouristtboimah, We've just been discussing why mumble won't be great without headphones.13:12
ubuntouristtboimah, (you can talk with mulbahk or check the IRC log later.)13:12
tboimahi just login to let you know that i have some problem to handle home so i will not be with you guys today but i promise to follow the conversation later 13:13
tboimahACTION login out13:13
*** tboimah has quit (None)13:13
ubuntouristmulbahk, I see tboimah listed as an administrator on the MCSS server, but you are not listed as an administrator. (You have a username, but not admin privileges.)13:14
ubuntouristmulbahk, Are you supposed to have permissions / privileges? If so, contact jelkner, scooper, arabach, tmickelson, or tboimah and ask them to fix that. (It may be too soon for that. I'm not familiar enough with the way things are run.)13:17
mulbahkokay13:17
ubuntouristmulbahk, Let me start by asking if you have questions for me?13:17
mulbahkdid you receive the book that email you13:18
ubuntouristmulbahk, Yes, thanks. I have only skimmed it, but the publisher is one of the better publishers. So, I expect it to be  good book.13:18
ubuntouristmulbahk, I haven't looked at it much yet.13:19
mulbahkso what is the goal for today 13:19
mulbahkare we going over the book 13:20
ubuntouristHold a moment while I  open it in another window. (It will take me a minute to find it. I didn't move it to a good location when I downloaded.)13:20
mulbahkokay 13:21
ubuntouristOK. I've got it up on my screen and am taking a quick look at the Detailed Table of Contents13:23
ubuntouristmulbahk, Have you been reading through it? How far into the book are you?13:24
mulbahkto chapter 713:24
ubuntouristmulbahk, OK, let me scroll down to that... 13:25
ubuntouristmulbahk, I should re-read part of that myself. (the "arithmethic expansion" and "brace expansion" parts.)13:27
mulbahkbut I think if you explain the chapter briefly will be good13:27
ubuntouristI haven't read the chapter, but, looking at the table of contents, I can already explain  some of it.13:28
mulbahkokay than let start13:29
ubuntouristBy now, you should undderstand that when you open a terminal, it automatically starts a program that is referred to as the "shell". 13:29
mulbahkyeah13:30
mulbahkI understand it13:30
ubuntouristJust as you have several choices for which editor (vim, emacs, nano, gedit and more) or which web browser (firefox, chromium, brave, and others), you also have 13:31
ubuntouristdifferent choises for shells. However, almost everyone uses Bash as the shell program of choice, and that's what we'll be using.13:31
ubuntouristThat's what we ARE using. 😉13:32
ubuntouristBash has a "history" that it maintains.13:32
ubuntouristIt remembers the last [many] commands you've typed. One part of the expansion it talks about is being able to use abbreviations to recall previous parts of the history.13:33
mulbahkyeah and to check it you just use the history command13:34
ubuntouristAnother set of expansions are shortcuts for frequently-typed strings. A third type of expansion are for variables. Let's go to tmate for some examples...13:35
ubuntouristACTION waits for an invitation...13:35
mulbahkokay13:35
mulbahkssh zHnvQynNZb2PLRBHfGvpbK2PF@lon1.tmate.io13:36
ubuntouristSo. First, variables.13:38
ubuntouristmulbahk, Have you written computer programs in any  language?13:38
mulbahkno13:39
ubuntouristmulbahk, Have you studied any algebra, or used variables in other mathematics classes?13:39
mulbahkyeah13:40
ubuntouristOK. (I am never sure who knows what. So, I want to be sure I'm not skipping things.)13:40
ubuntouristIn the terminal, type:13:41
ubuntouristset | most13:41
ubuntouristWhat you are seeing is a list of "environment variables" and their values.13:42
ubuntouristAbout 2/3 down the screen, you should see several that begin "HIST..."13:42
mulbahkwhat is environment variables13:43
ubuntouristmulbahk, That's what I'm starting to explain.13:43
mulbahkokay13:43
ubuntouristWhen you login to your computer, the Bash shell sets up your personal "environment".13:44
ubuntouristThe "environment" includes your personal preferences for the way commands work, the name of your "home" directory,13:45
ubuntouristinformation about your command history, the size of your terminal window (number of characters or columns, and number of lines or rows),13:45
ubuntouristand many other things.13:45
ubuntouristA LOT of that information is stored in a "variable". Each variable has a name, and a value or a group of values. And, 13:46
ubuntouristbecause "variable" means "able to vary" the values can change. Some of them change when you issue various13:47
ubuntouristcommands. Some change when you explicitly set them to new values yourself.13:47
ubuntouristUnderstand so far, mulbahk?13:47
mulbahkyeah13:48
ubuntouristOn the screen right now, we can see some that tell me things about your system13:48
ubuntouristHOME=/home/mulbah0713:49
ubuntouristHOST=ASPIRE13:49
ubuntouristWhen a new user is added to a computer system, normally, the system creates a directory for that user, and uses the username.13:50
ubuntouristIt creates that directory inside of a directory named "/home/" and it sets up an environment variable "HOME".13:51
ubuntouristHOME is almost always automatically set to "/home/username" where the "username" part is the username for the person logged in.13:52
ubuntouristType Q to quit.13:52
ubuntouristls13:52
ubuntouristcd practicss13:53
ubuntouristOops. Spell it right.13:53
ubuntouristcd $HOME13:53
ubuntouristDo you understand what happened?13:54
ubuntouristTake a guess.13:54
mulbahki think because the home dir is place in the environment $HOME13:56
mulbahkam I correct13:57
ubuntouristYes. Basically correct: The value "/home/mulbah07" is stored in a variable named HOME. 13:57
mulbahkThanks13:58
ubuntouristBut, there's a tiny bit more to thie story. Try typing the command again, but without the "$"13:58
mulbahkIt say -bash: cd: HOME: No such file or directory13:59
ubuntouristSo, can you tell me what you think?13:59
mulbahkokay14:00
mulbahkI think the $ sing is bash and when it is not place there it will not work14:02
ubuntouristLet's create a temporary directory. (We'll create it, and then later, we'll remove it.)14:03
ubuntouristmkdir HOME14:03
ubuntouristNow what would happen if you typed "cd HOME"?14:04
mulbahkit will cd into the directory HOME14:04
ubuntouristYes.14:04
ubuntouristLet's get rid of it again, because it will just be confusing later: "rmdir HOME"14:05
ubuntouristThe "$" is an "expansion.14:05
mulbahkwhat do we mean by expansion14:06
ubuntouristIt means "The text that follows is not 'normal'. It is a variable. Use the value that it is set to, not the actual text"14:07
mulbahkOh okay14:07
ubuntourist"Expand" HOME - change it to the value of the variable HOME and use that instead.14:07
ubuntouristSo "cd HOME" looks for a directory named HOME. "cd $HOME" looks for a directory that is whatever the value of the HOME variable is.14:08
ubuntouristAnd, you can "mess it up". We're going to temporarily break it:14:09
ubuntouristType14:09
ubuntouristexport HOME=/var/log14:09
ubuntourist(Well, since you are already in your home directory, the cd $HOME didn't change anything. Try this first:14:11
ubuntouristcd /etc14:11
ubuntouristthen "cd $HOME".)14:11
ubuntouristPut an "ls" in between so you can see the difference.14:12
ubuntouristcd /etc14:12
ubuntouristls14:12
ubuntouristcd $HOME14:12
ubuntouristls14:12
mulbahkI did it14:13
ubuntourist$HOME always "brings you home" 😉14:13
ubuntouristBut, now we're going to temporarily confuse it and lie about where home is:14:13
ubuntouristType14:14
ubuntouristexport HOME=/var/log14:14
ubuntouristcd $HOME14:16
ubuntouristls14:16
ubuntouristACTION awaits the results of those three commands...14:16
mulbahkdone14:18
ubuntourist"export"  is one way to change the value of an environment variable. Can you fix what we broke? Try it.14:19
ubuntouristBravo!14:21
mulbahkI did 14:21
mulbahkThanks14:21
ubuntouristTha t list we started with "set | most" showed LOTS of environment variables.14:22
ubuntouristThese environment variables can be substituted into LOTS of different commands.14:22
ubuntouristAnd, you can use environment variables as parts of other values. For example:14:23
ubuntouristls $HOME/practics14:23
ubuntourist(Try it)14:24
mulbahkokay14:25
ubuntouristNo, that's not what I meant. Change it back. but then type the "ls" command I suggested above.14:26
mulbahkI did14:28
ubuntouristSo, it "expanded" $HOME to its full value "/home/mulbah07" and then tacked "/practics" on the end to give "/home/mulbah07/practics"14:29
ubuntouristBecause $HOME is one of the more useful and common values that a user might need, it gets its own very special abbreviation: The tilde ("~") character.14:29
mulbahkyeah14:29
ubuntouristThis is what the book means by "tilde expansion"14:29
mulbahki have try the ~ before14:30
mulbahkfor example14:30
ubuntouristYeah, everyone learns "~" very early. It is SUPER-useful !!!14:30
ubuntouristcd ~14:31
ubuntouristwas what you were looking for.14:31
mulbahkyeah14:32
ubuntourist~ = $HOME = /home/mulbah0714:32
mulbahkshould i type it into the terminal14:32
ubuntouristNo. That was to explain to you that the three are equal to each other.14:33
mulbahkyeah14:35
ubuntouristWhen you type "~word" (tilde followed by a word, without spaces) the Bash shell tries to expand that by looking for the home directory of a DIFFERENT user: The user whose username follows the tilde.14:35
ubuntouristCan you show me what I mean by that, using the information in your terminal window now?14:36
ubuntourist(use the "ls" followed by the tilde and ... something else without spaces. The info is on your screen right now.)14:37
ubuntouristACTION will need to leave in 20 minutes.14:40
mulbahkokay14:40
mulbahkThey are saying No such file or directory14:41
ubuntouristBingo! Correct again!14:41
mulbahkyeah14:42
mulbahkI was typing different thing14:42
mulbahkso I think the tilde is use for username14:43
ubuntouristSo, tilde ("~") isn't EXACTLY like $HOME. It's MOSTLY like $HOME. It's a bit more complicated and powerful, but almost all of the time that you will be using it, it will mean the same thing as $HOME -- your home directory.14:43
ubuntouristThe ~ is more than just the username, because it puts the "/home/" before the username.14:44
ubuntouristWithout any text followin it, the tilde means "the username of the user who is logged in right now". That is the "default" value.14:45
mulbahkokay14:46
ubuntourist"default" will come up a lot: It means "the value or behavior of a variable or command, when no additional information is provided or set".14:46
ubuntouristThat may not be clear now, but it will be clearer as you work more. 14:47
ubuntouristA default value or a default behavior is what a user typically expects and assumes. It is the most common use.14:48
ubuntouristFor example, the "default" language spoken in the US is English. That is changing, as the demographics change, and may not be true in the near future.14:49
ubuntouristBut, for now, the assuption and expectation -- unless there is information to indicate something different -- is that the person you are speaking with PROBABLY knows at least some English.14:50
ubuntourist(It's not always right, but it's the first example I could think of.)14:50
mulbahkokay14:51
ubuntouristSo, with Linux the default value for ~ is $HOME -- your home directory.14:51
mulbahkit mean /home/username14:53
ubuntouristThe "set | most" list shows lots of environment variables and their values. Eventually, we may change some of those from their default values, in the same way we did with "export HOME".14:53
ubuntouristmulbahk, yes,14:53
*** scooper has quit (Ping timeout: 480 seconds)14:54
ubuntourist(and adding a different username after it changes the default behavior or value or meaning)14:54
mulbahkwow 14:55
ubuntouristmulbahk, I think that is going to be a good introduction to some of what is in Chapter 7. As I said earlier, I need to review "arithmetic expansion" and "brace expansion".14:57
ubuntouristmulbahk, I think I have a good understanding of what the book means, but I want to be sure before I try to explain that.14:57
mulbahkOkay14:57
mulbahkbut I understand chapter 7 good now14:58
mulbahkusing the set command14:58
ubuntouristmulbahk, by learning how to permanently alter the values of environment variables, you can customize your user account, or eventually, your entire system so that all users are affected by the changes.14:59
mulbahkokay14:59
ubuntouristmulbahk,  (The "set" and "export" commands share some of the same capabilities. More about that later.)15:01
mulbahkAlright15:01
ubuntouristmulbahk, OH one very important thing to share with tboimah and others: NEXT FRIDAY I WILL NOT BE AVAILABLE!15:02
ubuntouristmulbahk, I'll see you on Monday, but I may forget to mention that I'm not going to be around next Friday.15:02
ubuntouristmulbahk, Time for me to go for today. 15:03
ubuntouristmulbahk, bye!15:03
mulbahkOkay15:03
mulbahkthanks15:03
mulbahkso much15:03
mulbahkfor today15:03
mulbahki will practice it15:04
mulbahkACTION singing out15:07
fkoikoi!add Discussion on the trial test in August (15min)15:07
LittleWebsterSuccess: "Discussion on the trial test in August (15min)" has been added to the agenda.15:07
fkoikoi!agenda15:07
LittleWebsterThis is the agenda for the next meeting:15:07
LittleWebsterDiscuss Summer schedule (10 min). (added by jelkner)15:07
LittleWebsterHow to setup Class/homework on github (added by fkoikoi)15:07
LittleWebsterDiscussion on the trial test in August (15min) (added by fkoikoi)15:07
*** fkoikoi has quit (Quit: Leaving)15:11
*** mulbahk has quit (Ping timeout: 480 seconds)15:42
*** mulbah has quit (Remote host closed the connection)16:07
*** ubuntourist has quit (Remote host closed the connection)18:11
*** shmohamud has quit (Remote host closed the connection)19:25
mulbahHello shmohamud22:38
mulbahHow are you coming on now22:38
*** shmohamud has quit (Ping timeout: 480 seconds)22:39
*** mulbah has quit (Quit: Leaving)23:21

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!