Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
  • entries
    3
  • comments
    0
  • views
    86

About this blog

What Even is the Linux Operating System?

Linux is actually not an operating system but rather an open-source kernel used in many applications for servers, internet of things, phones, desktop, and even the servers running the WHOLE internet. Linux is used in many places, mostly in servers. Most servers run some form of the Linux kernel with something connecting that to the person maintaining the server. Linux is great because it is customization for the most part. Oddly enough one main thing that stays unchanged is the file system organization, which has a specification. There are many operating systems running the Linux kernel. Some popular ones include Ubuntu, Debian, Manjaro, Arch, and well over 200 others. Each one of these 200+ operating systems have pros and cons and obviously there is no one in their right mind to do it. One day I might but I am busy for right now to test all of them.

 

What is a distro and how do I pick one?

A distro, also known as distribution, is basically the 200+ Linux based operating system. Picking one has a few questions to ask.

  • More software
  • Fixed release or rolling release (more explanation later)
  • What environment do I want (more explanation later)
  • How good is my hardware
  • Do I want to stick with popular or go lesser known

Now to answer these we need definitions and examples. Starting with the more software. Easy to define, has more software that I don't have to compile from source. Compiling from source means you get the source code in a zip or tarball, extract it in a folder, and follow the instructions to compile the code. What we want is if we want more of that and where to get it. Now usually this comes at a risk. Ubuntu has more software but it is... freezing? dropping? removing? still supporting?... 32 bit software which means devs will have to work around a 64 bit system (which more MODERN computers use). Now many people will not care, but if you are a programmer this is highly bad as some code needs to run as the 32 bit architecture. Right now no one really knows what is going to happen but we hope good things come out of it. Now Ubuntu is based off of Debian, and Pop!_OS are based off of Ubuntu which means they can keep 32 bit so those two are still on the table. Now I cannot confirm this but I think NASA uses Debian, so that's cool. So go with something Debian based if you want software. The Debian family is also the biggest too which is cool. Also pay attention for Package Managers (PMs) because PMs are how you get software. Debian uses DPKG and APT. Arch uses PacMan, and others have... other ones.
What the Debian family tree does not have is Rolling release which if you are an average user, step away. This means Gentoo, Arch, Manjaro as all of them run into problems. Now if you like what the Linux market has to offer NOW then a rolling release will be fine, but be prepared for problems. Now a fixed release is nice, where you download it once and never have to reset everything to update it as you can stay on that updates for several years after LTS and not run into problems where Windows 7 is not quite yet dead but like you should upgrade to Windows 10 or anything Linux. FRC (fixed release cycles) are easy to use. I use Ubuntu on my main laptop, and every update I have to download a new ISO and redo the whole install but then again you can still use 16.04 (we are on 19.04) and still have no issues. Heck I see people doing just fine on 14.04 which is awesome.
Now one part many people just glance over is their DE (desktop environment) AKA how it all looks. A GUI system. MacOS was the first to implement GUI's and Xerox developed the tech. Just choose one that looks nice so basically GNOME only and have fun! Nothing much to add here.
Hardware is important. Most if not all modern hardware can work with Linux. The only things that might not are graphics cards (GPU's). Just know your architectures (whether your system is 32 bit (usually older hardware) or 64 bit (newer hardware)) and get the version for that system architecture. A good one for old computers is Core Linux/Tiny Core Linux which is impressively small. Newer stuff can use Pop!_OS, Ubuntu, Arch, etc.
More or less popular depends on one thing. How much support. Your options are community, small, and none. The only few distros I can think of that have good support teams are Ubuntu, Pop!_OS, OpenSUSE and Debian. The rest have community support (like Arch, Gentoo, etc.), or small to none (which is 99% of all distros). How much can you do by yourself basically.

That is all the information I need to share, the rest you can google.

Basic commands in terminal

sudo <pm> install <package>

switch <pm> with your package manager and <package> with your package.

nano file.txt

Nano is like text editing but in terminal. It is also better than Vim that is just opinion fact

make

Whenever you compile from source this command will SAVE YOU. Common variants are make install, make regular, make check, etc depending on how the software was designed.

sh file.sh

This is how to run shell scripts. This command is awesome.

gcc anyfile.c

The C compiler, keep it in mind

g++ morefiles.cpp

Like GCC but for C++.

mkdir directoryname/

Makes directories

rm file.txt

Removes files

rm -r directory/

Removes directories. 

<command> -v 

Verbose, tells you what it does. Looks AWESOME and also could share useful information but it looks SOOO COOL like you are a true hacker.

Thats all I have to share for this confusing mess.

Entries in this blog

 

10 Programming Languages RANKED

This is just a fun thing of 10 programming languages ranked. Random, and you might not even know them.

10 - Python - Good for beginners, has tons of use, BUT: Slowest language, worst syntax, has less uses than it claims
9 - C - Much better than python except not beginner friendly and is slowly being killed out by C++
8 - C++ - Speaking of which this is just a more complex C, but nicer in my opinion 7 - F# - FUCK R is what F# stands for. F# is great for data science. Fuck R.
6 - D - Not much to say, it's pretty average
5 - C# - Used fucking everywhere it seems. Unity has it, Godot, and other Game Engines. Great for coding games and also some general coding
4 - Java - Great for easy-to-setup cross platform applications.
3 - JavaScript - Basically today's big thing
2 - Clojure - Good language and 6 fig salaries
1 - Kotlin/Swift - Great for their respective platforms (Android with Kotlin, iOS with Swift), Kotlin also can go desktop.

Closing: Fuck R

Syntatical

How and why I made Syntatical (an NPM package that changes how you write JavaScript)

Basics of Syntatical: Goal:  The initial goal was to make an NPM package that changed how JavaScript is written. Not to make it "easier" or "weirder", just a different way to write it. How it works: Syntactical basically just puts JavaScript code into functions. Making multi-line functions one-line. It also makes console.log shorter, I did this because I hate using console.log() to log everything.
To show it better I will use a snippit from the index file "arr_buff":function(num){ if(isNaN(num) == false){ var b = new ArrayBuffer(num); console.log(b.byteLength); } else if(Array.isArray(num)){ var x = num.length; console.log(x) } else { console.log("input invalid") } }, This basically takes if(isNaN(num) == false){ var b = new ArrayBuffer(num); console.log(b.byteLength); } else if(Array.isArray(num)){ var x = num.length; console.log(x) } else { console.log("input invalid") } and shrinks it down to s.arr_buff(633) // ------ OR ------ // You can use: s.arr_buff(["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]) The one on top will print out: 633
The one bellow will print out: 26 s.arr_buff("a string, not an array") This one will print our "input invalid"

Why Node.js and NPM? JavaScript's syntax is fine, but I thought I could make it simple. I would have done it in Python if I felt like Python needed this, which I feel it really does not.

JavaScript's syntax is easy, but I wanted to make it easier.   How to install and use: Install script and view the  Syntatical NPM repo

What does the future hold for Syntatical?
A lot actually. I am going to gather a few friends to continue development on the main Syntatical package.
Plans for syntatical-electron, syntatical-discord, syntatical-express and syntatical-passport do exist and are being considered. Having a Syntatical.py module is also in thought, same with a Syntatical.lua package. However these are plans in consideration, not yet confirmed!
 

Packaging for PyPI

How to PROPERLY Make and Package a PyPI module First thing is first: Python This is a case you are making a PYTHON module and unless you WANT to go into the nitty gritty of compilers and binaries for lets say JavaScript, stick with Python files.    Proper folder-ing This is how your folder should be set up (with files   Creating the actual functionality of the package Creating the package just requires code that does SOMETHING. Here I will just use a simple one. def switch(x): x_a = x.lower().replace('e', 'a') print(x_a) Name the file what you wanna call your package! This one of mine is called e so I will call it e.py   Next thing you wanna do before adding everything is to test your package. Make app.py and do import your_pkg your_pkg.fucntion("whatever you want to do with this") My example of e.py would be the following import e e.switch("Hello everyone! Welcome to the ever-lasting e-party where we try to use e") Now delete app.py from your folder. We will now set up the folder to look as it does in Proper folder-ing You might also get a folder called __pycashe__, delete that too.

For those who did not understand the text version here is an image of what you should see
e.py being named what you named your package.   NOTE: I misspelled "setup" and did not notice until running the command in Command Time, so don't be like me and spell it RIGHT
NOTE2: I upper cased the MD in README.MD, don't do that, do README.md

Now sign up for https://pypi.org/ (this is Pythons repo for the modules (like NodeJS's npmjs.com))   Remember those login details for later.   Setup the bakery (get it because Py sounds like pie) Now set your setup.py file like this: from setuptools import setup with open("README.md", "r") as fh: long_description = fh.read() setup(name='your_pkg', version='1.0.0', description='describe your package', long_description=long_description, long_description_content_type="text/markdown", author='Your Name', author_email='your@email.tld', license='your_licence', py_modules=['your_pkg'], package_dir={'': 'src'}, zip_safe=False) My e example would look like this: from setuptools import setup with open("README.md", "r") as fh: long_description = fh.read() setup(name='e_switch', version='1.0.0', description='hallo world this is my packaga for "e" tha packaga that switchas all "e"s with "a"s', long_description=long_description, long_description_content_type="text/markdown", author='Safyre Lyons', author_email='lyons.safyre@gmail.com', license='MIT', py_modules=['e_switch'], package_dir={'': 'src'}, zip_safe=False) Feel free to copy/paste it, just change the needed things.
ALSO!! Make sure you look up whether your package name was taken. e was taken.

FINAL PREP: README.md README data is essential for ALL projects. Here you just need to include: How to install (if you plan on sharing the source code on GitHub or something), how to use.   README.md should be like my example: # E Turn e's into a's!! ## Installation: `pip install e_switch` ## Usage: ```python import e_switch as e e.switch("eeee look at meeee") ``` #### Output: aaaa look at maaaa and print out as   Command Time!! Well it's the hardest part. Command time.

NOW!! My examples might look different from how you do it.
I have both Python2 and Python3, so my terminal has to do "python3 somrthofbwibfewibfiub.py" for any code in Python3, setup.py was written for Python3. If you don't have Python2 set as "python" then when it says "python3" type out "python".

Setup dist
This will create a folder called dist/ it will be important for our next command. Do: and follow the prompts     BRAG!!! Well, ya did it. If you did everything RIGHT, you should end up with a working package Go to https://pypi.org/manage/projects/ and make sure you are logged in
Look at the top there, (it will not be outlined in red on your screen) but it is THERE!!! IT EXISTS!!!

You win!
Sign in to follow this  
×