LIS-3353 - Beyond Linux - Languages and Platforms
Created Tuesday 08 October 2024
HOBBY ERA
- Buy Paid Programs
- Copy "Freeware"
- (write your own, copy out of a magazine)
MICROSOFT ERA
- Buy "Office"
- Possibly Buy others
- Free/ Freedom begins to emerge,
POST-MICROSOFT, the SPLIT.
- IPHONE / cellphone
- The WEB
LINUX ERA
- "Package management" — more on that later
IPHONE ERA
WEB ERA
Just keep it on the back-end.
IN THE BEGINNING
When the USERS were also the ADMINS/DEVELOPERS
(Windows/Mac users, I'm guessing it felt like
"Buy the physical disc in a store"
or
"Download and hope for the best, as it litters your drive"
wand then just jumped to APP STORES?
Again, the problem:
(this is a completely made up example)
E.g. you install Libreoffice Calc (like Excel)
and also
A TI-graphing calculator app
Which both use a "lib-math.."
Again the problem
And now you delete one of them.
Or they use different versions.
How do you deal with this?
App Stores
Nice right? Curated, rated, clean set of apps
That get rid of themselves when you remove them
..theoretically
Us Linux snobs...
We saw app stores, and were like
Oh, you mean like "package managers using repositories"
wait...y'all gotta PAY for the apps lol
A related problem: Configurations
Windows: e.g. .ini files, or dropdown menus with "preferences"
Linux: Dotfiles, which can litter your home drive
Linux
Was *terrible* at first:
COMPILE THE PROGRAM YOURSELF.
Installing Stuff Notes
The power of scripting frequently lies in using other programs.
The value of coding from scratch
Has diminished RAPIDLY, moreso because of AI
Why write anything twice?
Why I harp on Bash
It's the most versatile/powerful way
to use OTHER PEOPLES code
(probably)
So you want to grab some code and use it?
After all, what's the difference between
PROGRAMMING and USING?
OLD REALITY
APPS/PROGRAMS (what you made from below )
LANGUAGES (C, JAVA, JAVASCRIPT, PYTHON)
OS - LINUX (use COMMANDLINE/BASH)
COMPUTER (REAL/DISTRO/VIRTUAL)
NEXT REALITY
WEB BROWSER
APPS/PROGRAMS (what you made from below )
LANGUAGES (C, JAVA, JAVASCRIPT, PYTHON)
OS - LINUX (use COMMANDLINE/BASH)
COMPUTER (REAL/DISTRO/VIRTUAL)
TODAY, ANOTHER POSSIBILITY
WEB BROWSER IS THE "OS"
APPS/PROGRAMS (what you made from below )
LANGUAGES (C, JAVA, JAVASCRIPT, PYTHON)
OS - LINUX (use COMMANDLINE/BASH)
COMPUTER (REAL/DISTRO/VIRTUAL)
Virtualizations
You know this quite a bit already...
Distributions
Usually ISOs
We've been dealing with general, but
Specialized Distributions
Very common and useful these days
Especially with Raspberry Pis
(We'll come back later, but Docker, and LXC can do these in "Containers"
LANGUAGES
Examples of classic languages
C
Rust
Go
- Low level, Compiled, Native
Examples
Java
Python
(Midrange, Python's honestly probably the best all around, let the fights begin)
Examples
Bash and other SCRIPTING LANGUAGES
Very powerful, and weirdly often not considered
"languages"
Examples
What about MySQL, et al?
Declarative, and not specialized
(why do I hate workbench? :))
ADMIN
A lot of the times, the above will work.
But, you're tinkering, so you may need to dig deeper.
THE WEB as platform
Frontend - HTML/CSS for visuals, Javascript for interactivity
Backend - PHP or Node or Python or Java
(Data - SQL)
the holy mess that is the web.
Here goes: This ONLY makes sense if you remember that the
web grew and accreted on itself, and encouraged to do so
primarily by "market forces"...
as opposed to "designed."
Text
Plain ol' text. BBS and the like
HTML
"Lets make this look better than the Matrix, SEMANTICALLY"
CSS
"Still kind of ugly, now let's go VISUAL"
JAVASCRIPT
The 800lb gorilla.
Once again, why this mediocre language?
Because
- Bandwidth isn't infinite
- People want interactivity
- Ergo, MUCH must be offloaded to the users machine.
But why THIS language?
First to market. That's pretty much it.
But why THIS language?
"Because we need interactivity on the web right now, and anything’s better than Flash."
Brendan Eich, Creator of Javascript...
“I was writing something that could be used by people who didn’t know what a compiler was.
They were just going to load it.
“It was like Basic. That was really the pitch….”
“I was under marketing orders to make it look like Java but not make it too big for its britches.
It’s just this sort of silly little brother language, right? The sidekick to Java.”
Umm we spend a lot of time here on (my)SQL
yeah, I know. it's a little weird.
deal with it
TODAY WHATS THE DEAL:
Making Standalone Apps?
C, the C's, Java's and sometimes Pythons
TODAY WHATS THE DEAL:
Backend Web
Java, Python, PHP, Server-side Javascript
TODAY WHATS THE DEAL:
Frontend Web
HTML / CSS / Javascript
TODAY WHATS THE DEAL:
Cutting Edge AI stuff?
Web + lots of Python
CONTAINERS
Enter Docker.
Amazingly good idea that mostly works.
CONTAINERS CAN SORT OF DO ALL OF THE BELOW
WEB BROWSER
APPS/PROGRAMS (what you made from below )
LANGUAGES (C, JAVA, JAVASCRIPT, PYTHON)
OS - LINUX (use COMMANDLINE/BASH)
COMPUTER (REAL/DISTRO/VIRTUAL)
Docker
Put things in "Containers."
Not as heavy as entire VMs
But walled off from everything.
Why not just apps like the end users?
END USERS usually don't need "special configs"
or "opening things to the internet"
Docker
Very cool thing about docker is PORTABILITY.
Their metaphor is "everything in shipping containers"
Docker
Also, it's own ecosystem. Frequently you can be like "install directly"
or "use a docker container"
The latter usually makes complicated above stuff into
"docker run hello-world"
(with some more flags to point to folders and ports for the net.
Too good to be true?
Kind of.
The Good: "Docker" uses a completely open standard.
Meaning, other programs can step in and replace it (e.g. podman)
Kind of like eg. Word and Libreoffice or Google Docs
Kind of Like Linux itself
The presence of these others probably keeps Docker pretty good.
The great: Docker Compose
What if you have not a simple "hello-world"
but
docker run -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock:ro --restart always --log-opt max-size=1g nginx
Just put it in a file
name: <your project name> services: nginx: ports: - 80:80 volumes: - /var/run/docker.sock:/tmp/docker.sock:ro restart: always logging: options: max-size: 1g image: nginx
The ugly - Docker Desktop
Probably useful for some, but big bloated thing
that Docker's trying to use to make things "too easy"
I'm reminded EXACTLY of
The difference between
Command Line MySQL
and
Mysql-Workbench
(might work for y'all but meh)
v