Created Tuesday 08 October 2024
The power of scripting frequently lies in using other programs.
Has diminished RAPIDLY, moreso because of AI
Why write anything twice?
It's the most versatile/powerful way
to use OTHER PEOPLES code
(probably)
After all, what's the difference between
PROGRAMMING and USING?
APPS/PROGRAMS (what you made from below )
LANGUAGES (C, JAVA, JAVASCRIPT, PYTHON)
OS - LINUX (use COMMANDLINE/BASH)
COMPUTER (REAL/DISTRO/VIRTUAL)
WEB BROWSER
APPS/PROGRAMS (what you made from below )
LANGUAGES (C, JAVA, JAVASCRIPT, PYTHON)
OS - LINUX (use COMMANDLINE/BASH)
COMPUTER (REAL/DISTRO/VIRTUAL)
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)
You know this quite a bit already...
Usually ISOs
We've been dealing with general, but
Very common and useful these days
Especially with Raspberry Pis
(We'll come back later, but Docker, and LXC can do these in "Containers"
- Text editors
- Games
- Web Servers
- anything, really.
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?
(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.."
And now you delete one of them.
Or they use different versions.
How do you deal with this?
Nice right? Curated, rated, clean set of apps
That get rid of themselves when you remove them
..theoretically
We saw app stores, and were like
Oh, you mean like "package managers using repositories"
wait...y'all gotta PAY for the apps lol
Windows: e.g. .ini files, or dropdown menus with "preferences"
Linux: Dotfiles, which can litter your home drive
Was *terrible* at first:
COMPILE THE PROGRAM YOURSELF.
(the precursor to app stores)
Try to track and manage libraries et al
This is Ubuntu, Mint, Pop, MX LINUX
apt/ apt-get
(synaptic, which is a gui version)
(aptitude, which is similar)
Also, the less preferred "dpkg", used to install "debs"
Fedora, Red Hat - RPM
Arch, Manjaro - pacman
Linux is beginning to adopt the bifurcation
for better or for worse
of END USERS v. ADMIN/DEVELOPER
- Snap
- Flatpak
- AppImage
WHAT ABOUT BACKEND?
Theoretically very dangerous
Practically? In Linux? Probably not so much.
Especially if:
So yes, maybe
curl http:XXX | bash
isn't so evil.
Git, like Linux, is exactly what you get when a genius does his own thing;
It's great, people use it, and other parties can build on top and centralize it.
(also, it might be a *tad* depressing when you realize that there are 1000x programmers)
Presently still a great resource.
Reasonably safe place to download and run code from "raw"
See also, Gitlab and other competitors.
(there is a LOT more to say about git.
we spend an entire class period on it in 5367)
C
Rust
Go
- Low level, Compiled, Native
Java
Python
(Midrange, Python's honestly probably the best all around, let the fights begin)
Bash and other SCRIPTING LANGUAGES
Very powerful, and weirdly often not considered
"languages"
What about MySQL, et al?
Declarative, and not specialized
(why do I hate workbench? :))
A lot of the times, the above will work.
But, you're tinkering, so you may need to dig deeper.
Frontend - HTML/CSS for visuals, Javascript for interactivity
Backend - PHP or Node or Python or Java
(Data - SQL)
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."
Plain ol' text. BBS and the like
"Lets make this look better than the Matrix, SEMANTICALLY"
"Still kind of ugly, now let's go VISUAL"
The 800lb gorilla.
Because
First to market. That's pretty much it.
"Because we need interactivity on the web right now, and anything’s better than Flash."
“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.”
yeah, I know. it's a little weird.
deal with it
Making Standalone Apps?
C, the C's, Java's and sometimes Pythons
Backend Web
Java, Python, PHP, Server-side Javascript
Frontend Web
HTML / CSS / Javascript
Cutting Edge AI stuff?
Web + lots of Python
Enter Docker.
Amazingly good idea that mostly works.
WEB BROWSER
APPS/PROGRAMS (what you made from below )
LANGUAGES (C, JAVA, JAVASCRIPT, PYTHON)
OS - LINUX (use COMMANDLINE/BASH)
COMPUTER (REAL/DISTRO/VIRTUAL)
Put things in "Containers."
Not as heavy as entire VMs
But walled off from everything.
END USERS usually don't need "special configs"
or "opening things to the internet"
Very cool thing about docker is PORTABILITY.
Their metaphor is "everything in shipping containers"
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.
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
The presence of these others probably keeps Docker pretty good.
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
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
Probably useful for some, but big bloated thing
that Docker's trying to use to make things "too easy"
The difference between
Command Line MySQL
and
Mysql-Workbench
(might work for y'all but meh)