Just A Small Guideline

Feel free to browse the site. Don't be afraid to leave comments, they're supportive.
Please follow me on Twitter @ehldmnt and retweet my posts.

Sunday, April 28, 2013

UTAU, MMD, PMD/PMX Editor in Linux. -- Status, Installation, and more.

UTAU



If you know of Vocaloid, you probably know of UTAU. UTAU is a singing synthesis shareware application designed for Microsoft windows [With it's recent Mac Implementation which has spurred some rumors of another version to soon come out for Linux], that allows users to create their own "voice banks" and have their personal "UTAU's" sing in harmony. It is known to at times produce better, more realistic results than Yamaha's Vocaloid, amongst others, but requires more effort on part of the user.


MMD [Miku Miku Dance]


If you know of UTAU, you probably know of Miku Miku Dance. Miku Miku Dance is free software that is designed for Microsot Windows that allows users to move models that either they or others created. This can be use to create lipsyncing videos, music and dancing videos, PV's, home made movies (with the models) amongst other things, frame by frame.

PMD/PMX Editor


This program was also designed for Windows. It is for the creation and editing of .PMD/.PMX files that are used to dance/move/sing in MikuMikuDance.


Prerequisites [Required Programs]:


-- Linux Distribution [Any kind will do, really]
-- Playonlinux
-- Wine
-- Winetricks
-- Japanese Locale Enabled

Assuming that you already have a Linux distribution coming to this tutorial, first, download and install the lastest play on linux version. At the time of this tutorial, that would be 4.2.1. The instructions for installation depends upon your distro. If you use Arch like me, then it's no problem! Installation is as simple as popping a terminal and entering in:

pacman -Syu playonlinux wine winetricks

This command, not only updates your system but it also syncs to the repositories and gives you the proper programs that you need for this tutorial.

The Japanese Locale issue [This will demonstrate how to acquire it in Archlinux], is a no brainer. If locale -a yields anything similar to these:

C
POSIX
en_US
en_US.iso88591
en_US.utf8
ja_JP
ja_JP.eucjp
ja_JP.ujis
ja_JP.utf8 # Specifically this one
japanese
japanese.euc

zh_CN
zh_CN.gb18030
zh_CN.gb2312
zh_CN.gbk
zh_CN.utf8

Then there is really nothing else you have to do.

Otherwise, uncomment the line ja_JP.UTF-8 in the file /etc/locale-gen. And then run:

sudo locale-gen

If you already have these things, then great, skip this step.

Installation of UTAU




To install utau, it is pretty easy.

Steps:

1. Use Playonlinux To Install the Program.
2. Enjoy!

Step 1:

Select the install button as depicted above.



This dialogue should pop up.





Check testing and this dialogue should pop up, just click okay.



Then type into the search bar: UTAU, this should pop up.

Step 2:

Finish the installer and you're done! If it asks to create a virtual drive and/or a shortcut select yes! You can choose to install the English patch or not. Click on UTAU and hit the "run" button in the upper left corner.


Installing Miku Miku Dance/MMD [WIP -- Check back later for an update!


The installation of MMD is a bit more involved.

Prerequisites [Required Programs]:

-- Playonlinux
-- Wine
-- Winetricks
-- MMD

Steps:
1. Correct Settings, Create the 64 Bit Virtual Drive, and put MMD inside of it
2. Adjust the Windows version
3. Debug to figure out the required programs to run
4. Fix The Layout Issue
5. Enjoy MMD!




Step 1:

First, select tools.

Then select x64 and scroll down to the wine version 1.4-rc4-raw3 and install it. Then click on configure.


In the bottom left corner, select new, run through the installer and select 1.4-rc4-raw3 for your wine version.


Take note of the name of your Virtual Drive. The next part will be easier. Open a terminal and Do:

cd /path/to/the/mmdfile.zip
unzip -x *thezipfile*; cp -a *thefolderthatcomesoutofit* ~/.PlayOnLinux/wineprefix/nameofthevirtualdrive/drive_c/Program\ Files\(x86\)/

Now you go into the PlayOnLinux configuration dialogue and you click on "Create shortcut from virtual drive."



Step 2:

Now it's the time to adjust the Windows version. Click on the Wine tab Inbetween "general" and "install components" and select "Configure wine".



Then in the first part of the Windows 98 looking dialogue box on the bottom right, select "Windows 7". It should be towards the top.


You may now press apply and okay, and then close the dialogue boxes. Leave the main Playonlinux window open, the one that has your shortcuts in it.

Finally, you settings must match the ones I have up on my virtual drive. Select the "Display" tab second to last and then change your settings to match.





Step 3:

In order to complete step five, you'll have to select MMD, and then "debug" on the right hand side above "Report a problem". If no errors are returned and MMD runs successfully, congratulations, move to the next step! Otherwise, watch the error messages dialogue to figure out if there are any necessary .dll's.

Step 4:

With MMD open in Linux at the moment, it looks atrocious.

So, to solve this, click on the window and press  alt+ V and then alt+W (view > separate window). Resize them to your heart's content and enjoy MMD in linux.

Step 5:

So far in this wine version that we've selected, there are no issues with even multimodels. In fact, I feel like it ran faster in linux than it ever did on any of my Windows computers. The raw speed is incredible. The controls like on Windows are the same, so enjoy the familiarity of the program!!

Installing PMD/PMX Editor [WIP -- Check back later for an update!]


Friday, April 5, 2013

My Opinion on Ubuntu

Don't get me wrong, I've used Ubuntu before, in fact, it was my first distro. My mother's computer n
ow runs Ubuntu specifically because I found that it was easier for her to use. My biggest problems w
ith Ubuntu Linux are coming from the Unity interface, which I was very much objective of, despite fi
rst trying Ubuntu roughly 9 months ago, when Unity had first begun to rear its ugly head in 12.04LTS
..


 Lag and Slow Boot-Up Times.
        Sometimes, you want to use your computer, but if you're like me, you'll turn it off so that
you don't kill your battery life when it's not in use. Bad idea with Ubuntu 12.10. For me, it takes
roughly 5 - 10 minutes for Ubuntu to load, even after removing grub's 5 second count down feature in the boot loader and adding readahead. I won't say it's because they aren't using Systemd because I've used other distros that don't use systemd that don't boot as slowly as this. I am going to just assume it's because of the next reason why I don't like Ubuntu.

At Times, *understandable* Software Bloat.
        Ubuntu is meant to be a complete distro with a complete suite and set of applications. And that's fine, but there are some things that it includes that should be left out, like for example, maybe "gimp". That sounds silly on some level, but think about it, most people who switch from Windows to Linux(Ubuntu) Aren't necessarily doing it for the painting/image editing programs. I see that there is something called "Ubuntu studio" that should already have these things packaged with it. There are a few others that I can't name off the top of my head, but there are quite a few applications such as VNC that seems to have come preinstalled on the Desktop version that most people wouldn't even really look into, and somehow the number of preinstalled applications make it really hard to have a lightweight system in general. Your System can be lightweight AND stable, it's just a matter of method This also slows down the time it takes for the desktop to load on unity, which is what I find as unsurprising.

Limited GUI System Settings [Though this could be Gnome 3's Fault], and the long APT command [probably Debian's fault also].
        Why is it that I can't change some things around with the launcher? Why can't I change the color from the apperance settings? And what's the deal with this bluetooth thing? How many people use Bluetooth with their computers?! This can't be right. And why must I have to update the system with "sudo apt-get update && apt-get upgrade" everytime I log in from SSH?

Dock that sucks up screen realestate.
        This a big one. Especially since the feature there is to mess with the existence of the launcher is the "hide" and the "resize" feature, both of which are functionally retarded. I've tried unhiding the launcher only to watch it bounce back into "crouching position" when I'm trying to get work done.

Buggy and incomplete GUI that lacks important features.
        When you go into ubuntu's System settings and page around a bit, you'll notice that there are a few things that you might want to change that aren't so much listed up there. Why should you have to install Ubuntu tweak or *insert_some_other_appearance_setting_manager_here* to make it look nice? What's the deal? What if I want the launcher on the right side instead of the left? What if I wanted it on the bottom? Why can't we move the unity launcher? Would it be that hard to flip it around a bit? Less lag on the launcher bar showing please and maybe a bit of an interval adjustment with numerals instead of "slow and fast". I've seen videos with older versions of Ubuntu that have far more features in the software center than the CURRENT system settings. That, in my opinion, is a bit sad.

Unity that seems to suck the strength out of the graphics card.
        If you were to play minecraft on my Archbox, and you were to play minecraft on the Ubuntu laptop in the house, you'd see a significant difference. What's the deal? Why is that? Is it Unity's fault? Or is it the software bloat?

Broken "sleep" mode.
        I won't blame Ubuntu entirely for this, I feel that this is on part of the fact that my Mother's Ubuntu installation is a wubi installation. Though, that is no excuse for being unable to close the lid, and then expect myself to see Ubuntu's horrific Unity mess pop back up again.

But It's All Good.
        Fortunately, this is a Linux Distro, enabling us to install something that is less non-sensical, like... KDE[Also bloated on ubuntu], GNOME3 [Ha, ha... Right ], or Xfce4[This is just about right]. But what were the devs thinking? I mean, I can understand having the community judge and mess with your interface to find bugs and whatnot, but can't you at least make some real changes and get rid of the real functionality faults in the interface itself? I don't ask that you include less software in your distro, as I understand that it's supposed to be complete, but it seems like there is more than what is necessary in this distro. Ubuntu could be a distribution worth mentioning to people to install, but because of the unity interface, it is really making it heisitate on suggesting it over maybe something like Linux Mint. I'm certain that it could be something much better than it is, and that with a few more additional features and updates, it would make the userspace a better place.

Feel free to comment if you think my arguments are biased, or out of place.

Wednesday, April 3, 2013

A Bit More on Chmod & Chown

There are a few more things that I would like to introduce when it comes to the chmod and the chown command, one of these things being options that can be passed to reduce the amount of typing the user does in the command line. I'm certain that there are those of us who have had yet to learn how to touch type in QWERTY and even fewer of us who have learned to type in DVORAK. There is such thing as OCTAL NUMBERS that I would like to introduce in this chapter.

Octal Numbers

With octal numbers:
  • They are any number between 0 and 7.
  • Each digit in an octal number represents three binary digits.

Now, for further explanation, you lay out a chart like this for better understanding:


OctalBinaryFile Mode
0000---
1001--x
2010-w-
3011-wx
4100r--
5101r-x
6110rw-
7111rwx

How This Can Be Applied to Chown

Now, you would use octal numbers as an 'option' rather than an argument when you're making a change to a file, but unlike most options that we have seen, it does not possess a "-" before it. That's okay, different programs might not even contain options and might just have the program itself and yet the use of the program, or command, may vary. For example:

chmod 777 text.txt.




With an ls -l, we'd see that everyone can see, edit, and execute the file called "text".


But what if we don't want to put in that extra typing into the command line to see what the changes made were? Then we use the '-c' [called 'change'] option to print only if there was a change. If you want an output regardless, use the '-v' [called verbose] option.



These same commands can be passed to someone who wants to print the change in a file [if there is one], or just the supposed adjustments made regardless of whether there is an actual change or not.

And Those Two Options Are The Same For Chown

Simply 'chown -c olduser newuser' where the 'olduser' is the original owner and 'newuser' is the new owner, will print a change only if there is one, but 'chown -v olduser newuser' will print a change regardless.

That's it.


Thanks for taking the time to read this and be sure to comment if there is anything that you are fuzzy about or that you do not understand. useradd

userdel


usermod

Tuesday, April 2, 2013

Awesome-WM: How to Set Dvorak [or other keyboard layouts] as default.

In my personal experiences with AwesomeWM, I could not seem to set the DVORAK keyboard layout without messing around with the xorg.conf files, and even then it was to no avail.

As an actual solution [or in other words 'work around' to this, the ~/.xinitrc file must contain:

setxkbmap -layout dvorak [or ru, fr, etc..]

Before the line:

exec awesome

And that should solve the issue.

Monday, April 1, 2013

The Linux Command Line Interface -- File and Directory Manipulation Tutorial

Manipulating Files & File Permissions

Now before we even get started, this is going to be a bit of a large article, so you can read maybe the first three commands and study them or you can try and learn everything here as you go along.

First off, I'll start by explaining files and file permissions in layman's terms so that everyone can easily grasp the concept.


ls -l & ls -h



ls -l is a very useful command that is good to know for a few reasons.

Regular ls:


ls -l:


Let's take a closer look at the output of one of these commands. ls -l prints a "longer version" of the ls command. Here are two perfect examples of the ls -l output.


Now, there are two things. The user name "vadim" and the group "users". They sit beside the 10 characters on the far left. After that is the file size in kilobytes, the last time it was modified, and finally, the name. Now that I've clarified that, I'll explain those characters a bit more.

"d" in the first strip represents a "directory", in the second strip, it is a "-" which represents a file. You'd see as "l" if it was a link, which is similar to a "shortcut" in windows [We'll go over creating links in a later guide]. The r stands for "read" which means that you can see, and look into the file. W meaning "write" means that you can edit or "write" into the file, and "x" means you can "execute" that file, like for example if it was a program of some kind then you could run it by typing ./programname and hitting enter in the terminal.
There are nine of these characters, the first one being for the owner of the file which is the user name that is listed above. The second one being the group that is "users". Anyone in the "users" group on the computer can edit the file. The last, being "global" or "everyone". Anyone can read and execute, or go into the (d)irectory.
In the file (as expressed by the "-"), the owner can read, but not execute the file and every one else can only read it, and see that it's there.

ls -lh


The only thing that ls -lh changes is the way that the file size is read. It actually tells you that it is 4.0K(ilobytes) instead of expecting you to figure it out.

For more, see man ls.

cp


The cp command is actually a very simple command. It copies a file from one place in the file system to another. Say we had a file on the Desktop called "some_text.txt". We wanted to copy that file to our "Documents" directory.

To copy that file:


As you can see, I've both copied the file and then shown you that it is now ALSO in the Documents folder. "But what if we want to move folders? It just tells me that it 'omitted the directory'." - That's why we use the -a option for "archive".




For more, see man cp.

mv

Let's say that we didn't want our text file to be "some_text.txt" anymore, and we wanted to name it "a_text_file.txt". That's where the move command comes in.

But it doesn't just "rename" files, it also allows us to move them too! That's why it's called "move"!


You do not need an option to move a folder.


For more, see man mv.
mkdir



Being able to edit directories is fine, but what about making them? mkdir does this.


rm



What about getting rid of, or r(e)m(oving) the old file that's on the desktop? No problem.





Once again, an option is needed to remove directories. That option is -r.



It is extremely important that you do not remove things you think you might want to recover later with the "rm" command. There is no way to recover those files! To be extra careful, add the -i option to prompt you before every removal!


For more, see man rm.

less


The less command just allows you to read your text files.


For more, see man less.

chmod



Remember what we were talking about with permissions? This command allows us to change the permissions of a file. "u" represents the user, "g" represents the group, and "a" represents "all" or everyone.


But what if we wanted to be selfish and make it so that no one but ourselves could see, change, or edit the file?



For more, see man chmod.

chown



But let's say that we wanted to change who owned the file?


For more, see man chown.

If there are any questions or criticisms, feel free to comment.

Tuesday, March 26, 2013

5. Reasons For Why You Should Learn the Terminal (CLI)

I've argued this with my girlfriend, time and time again. "Why do I have to learn the command line? I'm fine, I can do everything without it," she says before something breaks. I honestly sometimes shake my head and sigh when I hear those types of things. I can understand being impatient, but that doesn't mean that you should neglect learning a tool that is apart of your system. You didn't neglect learning how to use an internet browser right? I mean, you managed to get on the computer somehow, don't tell me you didn't have to at least try a few times to learn how to use the windows and your mouse.

I'm here, arguing five of my best reasons for learning the CLI, A.K.A. Command Line Interface.

5. If you don't like being patient, then you should hurry up and learn it then. This logic makes sense, because with Linux, if you don't know what you're doing you're more likely to spend more time with a problem if something breaks. Failing to Google for answers, nagging someone else who knows what they're doing for help, or even just being a little help-vampire all over the boards. In fact, you might become so frustrated that you abandon Linux and Unix operating systems altogether to settle for an even slower, buggier Windows.
 The reason why open-source is better than closed-source is because if something breaks on your open-source system, you're more likely to find lots of documentation, lots of help, and maybe even lots of other people with the same problem as you're having which actually urges developers to work faster to fix the bug. In addition to that statement, sometimes, with Arch [I don't know about the other Distro communities], you'll see that users will band together and use their accumulated knowledge to solve problems that they have with their systems. Even though sometimes it can be a bit rough out there, it's not so much impoliteness as it's just getting to the point.


4. People don't always want to have to solve your problems for you. I mean, the hacker mind-set is that problems can be fun and that everything is broken and needs fixing, but that doesn't mean that they want to help you with the same problem that many other people, somewhere on the internet, have already learned because you're too stubborn to learn something as basic as "tar -jxvf *.tar.bz2". Mind you, it's not bad to ask questions and to seek answers from someone else, but it's bad to actively seek someone to just magically pop up and give you the answer instead of reading a small bit of Documentation all the time. It doesn't work that way, and it isn't fair to those around you.


3. Your system will have less bloat because you'll have apps that won't require a GUI wrapper to function. This is another perfectly logical reason for why you should learn to use the CLI. For example, my girlfriend will go as far as to go to YouTube to find a song, get a Firefox plugin, and then use the plugin and have it download and convert the file to mp3 [of all things] for her.She could have accomplished the searching with three, very simple commands and would have more time to do whatever she wanted while it downloaded in the background, reducing the occasional lag in her system.
Try this, open up a file manager, and open up something like xterm, and then tell me how much of a delay you feel. To see a tutorial on how to navigate and see your files in the CLI, check out my developing tutorial series.


2. Once you learn, you're hooked. The both cool and weird thing about using the terminal is that it becomes a habit of a kind that you won't want to break. Another personal experience that I had while learning the command line, was that once I had gotten my new computer, Windows had become too painful of an experience for me to want to keep for any extended period of time. I just had to get virtual-box and say good riddance! It came to me that I had to literally click on the explorer icon each time in order to navigate my folders. I couldn't change most of the colours to something darker for my light sensitive eyes, and there wasn't even a keyboard shortcut! So I had to feel like a retard every time I pressed ^T (Ctrl-T) and didn't get anything at all! It was so annoying that I wiped my drive and threw Arch on there as soon as was possible, and I didn't even have a dedicated internet connection which just goes to show how much I despise the Windows operating system.
But back on track, after a while, the terminal becomes less of a "hindrance" and more of a tool. Yes, there are times where using the file manager is faster than using the terminal but that depends on from who's point of view, whether or not you can touch type, how fast you type, and how many things you actually keep on your computer. When clutter collects and you need to sort it, a wild card [or asterisk(*)] to get all of your image files into your pictures folder is always a good thing. Want to run programs in the background? Throw a little bit of ampersand(&) spice up in there! The possibilities are limitless, and once you learn commands like sed and grep, you'll be well on your way to proficiency.


1. Self-Sufficiency is a good thing. To be self-sufficient is a big part of being independent and is a greater step towards grown and personal, mental, enrichment. Though there is happiness in ignorance, if that is what you wanted then you should have stayed with Windows, or OSX and just not have even bothered coming this far. It's like going to get water, filling up the buckets, only to walk half way and leave the buckets behind. It just doesn't make sense and isn't the way things were meant to be done. There are commands for a reason, sure there are a lot to memorize, but the only way you're going to do that is by doing it. Not complaining about the difficulty of the feat, not whining about a lack of skill, and certainly not by whining to others about problems that occurred and acting like it is their problem that something on your system broke and you weren't competent enough to fix it.

Buliding A Simple Game In Python3

In order to have a better understanding of the program that I am writing, I've decided that I would write a dead simple tutorial series on how to make a small game in Python. Links to all of my places of reference will take place as I find them.

Step 1: Setting up the script

There are two ways we can write this script.
-- As as executable. [Optional]
-- As a script to import into the interpreter so that we can update it as we go along. [Recommended, but also optional]

The first way is as such:

#!/usr/bin/python3

def function():
...


The second way:



def function():
...


And then simply execute it in the shell like so:

[~]> python3 script.py
Or Import it into the Python3 interpreter like so:
[~]> python3
>>>> import script
>>>>
Now, onto the actual coding..

#-- Say Game Title --#
print("---------------------------------------")
print("\nWelcome to \"Dineros\"\n")
print("---------------------------------------")
#-- Defining Global Variables --#
x_pos = 0
y_pos = 0

#-- Event Functions --#

#N/A

#-- Shitty Functions that don't really work --#

#def wall():
#    global x_pos, y_pos
#    if x_pos >= 10 and y_pos >= 10:
#        print("You hit a wall.")
#        x_pos = 10 and y_pos = 10
#    if x_pos <= -10 and y_pos <= -10:
#        print("You hit a wall.")
#        x_pos = -10 and y_pos = -10


#-- Main Game Function --#

# Define the function "move"
def move():
    # Refer to the variables we made earlier, not ones made locally.
    global x_pos, y_pos
    # Create an array of words that will be later used.
    where = ("\nWhere would you like to go?",
    "\nYou can go\n(N)orth, (S)outh, \n(E)ast, or (W)est.\n",
    "Or you can find out (wh)ere you are.\n")
    # Print objects from that array in the order as we need it to. We'll improve this later.
    print(where[0])
    print(where[1])
    print(where[2])
    # Create a prompt by which people know they are to type. 
    dir = input('> ')
    # If you put in capital or lower case n
    if dir == "N" or dir == "n":
        # Then the global y_pos will have 1 added to it.
        y_pos += y_pos + 1
    elif dir == "S" or dir == "s":
        y_pos += y_pos - 1
    elif dir == "E" or dir == "E":
        x_pos += x_pos + 1
    elif dir == "W" or dir == "W":
        x_pos += x_pos - 1
    elif dir == "wh" or dir == "WH" or dir == "Wh" or dir == "wH":
        print("You are at %d x, and %d y,\n" % (x_pos, y_pos))
    #If you didn't type any of the things above, then it will ask you to choose a direction.
    else:
        print("\nChoose a Direction.")
        exit
        return(dir)

#-- Conclusion Var. --#

# The variable that defines how it all ends.
ending = 1

#-- Game Running --#
# The condition for as long as this game is running
while ending == 1:
# The function we defined earlier
    move()
# The places to be when this is all complete [temporary]
    if x_pos == 1 and y_pos == 1:
# The thing that stops the loop and ends the game.
        ending += ending + 1 


The program is far from complete, but this is a good start to our character being able to move. Load it up and try it for yourself!

Initialization Method 1:

[~]> ./script.py


Initialization Method 2:

[~]> python3 script.py


Initialization Method 3 [OPTIONAL]:

[~]> python3
>>>import script

The Linux Command Line Interface -- System Navigation Tutorial [Part 1]

The linux terminal is a tool that can very easily simplify a lot of different tasks.

I'll be going over 3 system navigation tools, as well as the linux file system, though you'll need to open the terminal first.

Like so:


The key-bindings, distro-to-distro might be different. But on ubuntu it is ctrl+alt+T, the keybinding in awesomewm is actually mod4 + enter [Windowskey-Enter], and that is distro wide.

The Linux File System


The linux file system is a bit like an up-side down tree. It is universal in every linux distro.

A bit like this:


A bit more embedded details:

It is a hierarchy system of directories or "folders" as a windows user might term it. Though it doesn't have a C:\ for the top of all folders inside of the computer, instead, it has / [pronounced root but don't be confused by /root or the root user folder]. When people say "root" they're referring to what is known a "super user" or the highest system administrator imaginable on the system which is why protecting the root password is important. Dot files [.foo, .bar for example] are hidden files that can only be seen by using a specific option with a command. Options change the basic function or behaviour of the command in and of itself as we'll soon learn.

Click here to learn more about the linux file system.

Linux Commands


Commands in the CLI that come with bash, typically work like this:

[COMMAND] [OPTIONS] [ARGUMENTS]

For example:
ls -a /usr/bin

This will show all folders and all dot folders [like .foo] inside of the /usr/bin folder. Options will usually always have a dash (-) in front of them unless it is explicitly told as otherwise. You can use more than one option in a fashion such as:

ls -a -t /usr/bin

This will show all of the things inside of the folder according to their modification date. But that's not all. You can also combine options to form a "super option".

ls -at /usr/bin

 
ls


This is one of the most useful commands that you'll ever use. "ls" stands for List, which means to list all of the files in the directory. Try it out for yourself like in the image below.


This command is useful because it enables us to see what is inside any folder at any given time that the prompt is available and as a result allows us to see what is inside our system. You can use ls to not only see what is inside the current folder, but others as well.


And as you can see from this image, you not only can do one at a time, but more than one if you add them to your "arguments". An example of an option or two thrown in for fun:



cd

The letters "cd" are an abbreviation of the words "Change Directory". Let's say we had a folder called "books" in the home folder. Then all you have to do is type:




And you'd be in the "books" directory. That's all there is to it.

pwd

You know how to get to a folder, and how to see what's inside, but let's say you don't know where in the file-system you are? "pwd" is the answer. To implement it, do:




It'll print the full path in the system, which is pretty useful when you don't know where you are exactly.

Man Pages


To learn more about any command we learned above, and it's optionn, all you'd have to do is type "man [COMMAND]". That's all there is to it.

If there are any questions or criticism, feel free to comment.

Awesome WM Set up.

This is why I love awesome:


Sunday, March 24, 2013

Troubles With Learning Modules Python(2) -- Figured out.

In my last post, I had trouble figuring out why the Fibonacci Series wouldn't print. Then suddenly, after spending a bit of time studying and reviewing knowledge that I had acquired, I realized that the issue was in fact the line 6.

# Fibonacci numbers module

def fib(n):    # write Fibonacci series up to n
    a, b = 0, 1
    while b < n:
        print b,
        a, b = b, a+b

def fib2(n): # return Fibonacci series up to n
    result = []
    a, b = 0, 1
    while b < n:
        result.append(b)
        a, b = b, a+b
    return result 
 
Something as simple as this:
 
 
# Fibonacci numbers module

def fib(n):    # write Fibonacci series up to n
    a, b = 0, 1
    while b < n:
        print(b),
        a, b = b, a+b

def fib2(n): # return Fibonacci series up to n
    result = []
    a, b = 0, 1
    while b < n:
        result.append(b)
        a, b = b, a+b
    return result 
 
That pretty much solved everything for me.
 
Update:  Mon Mar 25 21:47:07

I realized that the issue was with the shell using python 3 instead of python 2. 
Python 2 still uses the print function in the way that I'm used to, python 3 does not.

Troubles With Learning Modules Python(2) -- Figured out.

In my last post, I had trouble figuring out why the Fibonacci Series wouldn't print. Then suddenly, after spending a bit of time studying and reviewing knowledge that I had acquired, I realized that the issue was in fact the line 6.

# Fibonacci numbers module

def fib(n):    # write Fibonacci series up to n
    a, b = 0, 1
    while b < n:
        print b,
        a, b = b, a+b

def fib2(n): # return Fibonacci series up to n
    result = []
    a, b = 0, 1
    while b < n:
        result.append(b)
        a, b = b, a+b
    return result 
 
Something as simple as this:
 
 
# Fibonacci numbers module

def fib(n):    # write Fibonacci series up to n
    a, b = 0, 1
    while b < n:
        print(b),
        a, b = b, a+b

def fib2(n): # return Fibonacci series up to n
    result = []
    a, b = 0, 1
    while b < n:
        result.append(b)
        a, b = b, a+b
    return result 
 
That pretty much solved everything for me. 

Harddrive Failure & The Troubles that Come With It

So, my last hard-drive failed, so I paid $20 to retrieve my old one and popped it in. I figured "It should work just fine if I just pacman -Syu." It had an older version of arch from like two months ago and everything. Then I realized that I had forgotten that it was a 32-bit harddrive! I had to pop the Archlinux CD into the computer and then update everything that was known on the system, as well as uncomment the multilib repository. But even then, that didn't stop the system from being buggy, so I just formatted the root partition and keep the home folder and all of my files. So now, my personal computer has become the project of the weekend. I hope I can get it done in time for some school work.

Trouble with Learning Modules in Python (2)

So, I was reading directly from the python Documentation, and on this page they present a code that actually creates the Fibonacci series:

# Fibonacci numbers module

def fib(n):    # write Fibonacci series up to n
    a, b = 0, 1
    while b < n:
        print b,
        a, b = b, a+b

def fib2(n): # return Fibonacci series up to n
    result = []
    a, b = 0, 1
    while b < n:
        result.append(b)
        a, b = b, a+b
    return result
 
 
This code has worked before, but this is the first time I've ever run into problems with it on the python
 interpreter.
I've actually typed it in manually at first, and then attempted to utilize this code, and got this error:
 
[python_prac_mod]> python 
Python 3.3.0 (default, Dec 22 2012, 21:02:07) 
[GCC 4.7.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import fibo
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "./fibo.py", line 6
    print b,
          ^
SyntaxError: invalid syntax
>>> 

Strange as hell. I even tried copy pasting the python code into the file and then saving it. 
That didn't work either. And despite my limited knowledge of python programming, I feel that this error is not
quite accurate. Oh, well, I'll have to look up another tutorial or something.

Friday, March 22, 2013

Frustration: AwesomeWM & My Use of Dvorak

Seeing as I have this lovely devotion to the DVORAK keyboard layout (to the extent that I literally rearranged the entire keyboard, upside down keys and all, specifically to facilitate this need), I tend to get extremely frustrated by what seems to be a bug in Awesomewm.

At first, it was just a minor annoyance, and then gradually it became a bit more than a nuisance as I literally have to reach into my 3 - 5 years of qwerty knowledge in order to remember what which key was supposed to be. Mind you, I've memorized the Qwerty and Dvorak style because there are those times in school where I have no choice but to use it.

This is all besides the point,

Which is that awesomewm is a great Window Manager but it doesn't seem to keep to anything I tell it to, which is extremely frustrating when I have to type Mod4 + R. I've looked into Xorg on the archwiki, amongst other things in the AwesomeWiki, but it seems that the only thing that ever solves it is restarting awesome after typing in "setkbmap dvorak" into a terminal. Thankfully, I have zsh, and that helped me through a lot of the worries because once I find the "s" on the keyboard (Which is right next to a for those that are wondering, where it used to be on Qwerty), I just had to press the up arrow key and found what I wanted.

If I find a solution for this, I'll write up a tutorial.

Wednesday, February 27, 2013

Learning To Code: Python & Linux = Awesome & How to get started on a Linux Operating System

So, in the short period of time that I've spend using GNU/linux (the last 7 - 7&1/2 months), I've acquired more than enough knowledge about command line editing and system administration. The only things I'm really still fuzzy about are the commands top and find, and that's just a small portion of my coding knowledge. I recently just barely dabbled in the art of Java, C, C++, and Javascript, I already know my HTML and my CSS so well that I really don't google much code anymore (except for a few subjects here and there that I'm also fuzzy about -- I'm talking to you --moz-border). The "CLI anxiety" came away from me when I destroyed my ubuntu set up to attempt to install Archlinux last summer and at first I was a bit upset but then I quickly got over it once I successfully managed to install arch. My point is, I really wanted to learn how to code something other than a half-assed webpage or a weebly layout for some friends. I wanted to screw around with different kinds of code, and even create an RPG but unsurprisingly, Linux lacks some RPG makers and ever since even before I switched from Vista [Lovely Service pack 2~!] I had been trying to learn this programming language called: Python.

You can acquire Python for *nix, Windows, Mac OSX, *bsd's etc, and it's a great programming language to learn as far as my very limited experiences go. But the point is, for a beginning learner of a programming language, the complexity of C, C++, and Java was too extreme for me, while Javascript, I found, well, useless to what I wanted to do. Now, the Python documentation is perhaps helpful for many people, but to me, it was really just a pain in my a**. It didn't explain much of anything, or at least didn't have many examples that had the potential of showing me how I could possibly utilize the tricks that were listed. Call me retarded if you want, but I couldn't work it for my life! Then I found Learn Python The Hard Way which to me is an amazing guide that taught me everything I wanted/needed to know and even answered some of my questions. It was clear to me after a while of reading the Python Documentation that it was definitely not geared towards newbies to programming and programming languages.

It was useless for me to try and figure out where I was going with it, because it gradually began to confuse me as I read it without any other form of foundation. That is what most linux users aspiring to write code need in my personal belief. For those interested in learning a programming language, for those ubuntu users who just recently switched from Windows, or for those who are in the process of doing so, or even those who just want to know how to use the command line, I suggest to you download the e-book on Linuxcommand.org and get to reading. You don't even have to devote a lot of time to learning what you read because that guide is so basic that it's not even funny. The youtube user metalx1000 has a ton of bash tutorials and such.

Getting back on track, one who is interested in getting started on learning how to program should look into lifehacker's javascript guide, because it teaches some foundational things, especially for those who decide that they want to dive right into Java code. But this is all in my opinion, everyone has a different way of learning and they might actually find the Python Documentation a lot easier to learn than I might. The Internet is crawling with options, do what goes best with you.

Friday, February 22, 2013

Minecraft On Archlinux -- Tutorial

There are a few ways to go about getting minecraft on Archlinux and while the Wiki is there to guide you through . I recommend using my favorite AUR installer yaourt to get the job done.

Here's my Video Tutorial: