Linux.com

jabirali

jabirali

  • Linux.com Member
  • Posts: 157
  • Member Since: 30 Apr 10
  • Last Logged In: 10 Aug 11

Latest Posts

Posted by
Topic
Post Preview
Posted
  • jabirali
    RE: Am I C-ing this right?
    The C++ language is based on, and backwards-compatible with, the C language. Programs written in C++ can be compiled against libraries written in C without any issues, and C code can be recompiled as a C++ program without adjustments. C++ however enables additional features like object-orientation, namespaces, operator overloading, streams and templates. In addition, it comes with more libraries like STL, the Standard Template Library. So if you're learning to program, the basics of C and C++ should be quite similar (except the default way of handling input/output), but I would recommend that you at least familiarize yourself a bit with the features of C++. Even if you're writing purely procedural programs, the default programming paradigm of C, having features like streams and templates available can be quite neat. Having the Standard Template Library available also spares you the trouble of reimplementing common data structures and algorithms, e.g. binary search trees and sorting algorithms, every time you need them for a new datatype.
    Link to this post 09 May 11

    The C++ language is based on, and backwards-compatible with, the C language. Programs written in C++ can be compiled against libraries written in C without any issues, and C code can be recompiled as a C++ program without adjustments. C++ however enables additional features like object-orientation, namespaces, operator overloading, streams and templates. In addition, it comes with more libraries like STL, the Standard Template Library.

    So if you're learning to program, the basics of C and C++ should be quite similar (except the default way of handling input/output), but I would recommend that you at least familiarize yourself a bit with the features of C++. Even if you're writing purely procedural programs, the default programming paradigm of C, having features like streams and templates available can be quite neat. Having the Standard Template Library available also spares you the trouble of reimplementing common data structures and algorithms, e.g. binary search trees and sorting algorithms, every time you need them for a new datatype.

  • jabirali
    RE: vi - anyway to jump line while in insert mode?
    [b]marc wrote:[/b] [quote]Anyway... I *can* use the arrow keys while in insert mode... (both in vi and vim)[/quote]Many systems don't provide descendants of the original Vi anymore. I know the BSDs and ArchLinux provides it, but at least Ubuntu by default provides a a symlink to Vim, which goes into a Vi emulation mode when invoked by the name of [i]vi[/i]. Follow all the symlinks from [i]/usr/bin/vi[/i], or check which package provides the file ;)
    Link to this post 03 May 11

    marc wrote:

    Anyway... I *can* use the arrow keys while in insert mode... (both in vi and vim)
    Many systems don't provide descendants of the original Vi anymore. I know the BSDs and ArchLinux provides it, but at least Ubuntu by default provides a a symlink to Vim, which goes into a Vi emulation mode when invoked by the name of vi. Follow all the symlinks from /usr/bin/vi, or check which package provides the file ;)

  • jabirali
    RE: vi - anyway to jump line while in insert mode?
    [b]asedt wrote:[/b] [quote]I think Ctrl-O enters normal mode for only the next command.[/quote]That should work fine in Vim, but I don't believe it works in the original Vi. [b]marc wrote:[/b] [quote]I didn't understand what you need but... MACRO POWAH!!![/quote]Macros only work in normal mode, he's explicitly asking for a way to stay in insert mode ;) The power of Vi(m) really comes from all the commands available at a fingertip in normal mode. If you intend to really learn to use Vi effectively, you should get used to always returning to normal mode by pressing [i]Esc[/i] or [i]Ctrl-C[/i] after an input sequence, so that you have the full navigational power of the normal mode available between inputs. If you have the choice between Vi and Vim, you should in my opinion choose Vim, as it's more modern (syntax highlighting, text objects, built-in help) and more customizable. If you're curious about learning Vi(m), some reasons to consider learning it can be found [url=http://www.viemu.com/a-why-vi-vim.html]here[/url], and the top answer [url=http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim]here[/url] should be quite clarifying about how things work. If you don't intend to master these editors, but need text editors available from a terminal, there are several options. First of all, you might want to try [i]pico[/i] or it's more recent brother [i]nano[/i], as they are quite intuitive and are available almost everywhere. Newer versions of nano even has features like syntax highlighting and multiple file buffers. If you have Vim available, as opposed to it's ancestor Vi, you can create the file [i].vimrc[/i] in your homefolder and add the line [i]set nocompatible[/i] to it in order to disable Vi emulation. Then arrow keys should work in insert mode by default. If not, Vim also supports defining your own commands in input mode using the [i]inoremap[/i] command. In Vim, the [i]Ctrl-O[/i] trick mentioned above should also work. If the only editor available is Vi, which is a rare situation these days, I don't know of any way to make the arrow keys do what you want. You might want to install vim or nano if you have administrative privileges. If the machines have an [i]ssh[/i] server running, you could install an editor that supports editing remote files over ssh (e.g. Emacs with TRAMP) on your personal computer.
    Link to this post 03 May 11

    asedt wrote:

    I think Ctrl-O enters normal mode for only the next command.
    That should work fine in Vim, but I don't believe it works in the original Vi.

    marc wrote:

    I didn't understand what you need but... MACRO POWAH!!!
    Macros only work in normal mode, he's explicitly asking for a way to stay in insert mode ;)

    The power of Vi(m) really comes from all the commands available at a fingertip in normal mode. If you intend to really learn to use Vi effectively, you should get used to always returning to normal mode by pressing Esc or Ctrl-C after an input sequence, so that you have the full navigational power of the normal mode available between inputs. If you have the choice between Vi and Vim, you should in my opinion choose Vim, as it's more modern (syntax highlighting, text objects, built-in help) and more customizable. If you're curious about learning Vi(m), some reasons to consider learning it can be found here, and the top answer here should be quite clarifying about how things work.

    If you don't intend to master these editors, but need text editors available from a terminal, there are several options. First of all, you might want to try pico or it's more recent brother nano, as they are quite intuitive and are available almost everywhere. Newer versions of nano even has features like syntax highlighting and multiple file buffers.

    If you have Vim available, as opposed to it's ancestor Vi, you can create the file .vimrc in your homefolder and add the line set nocompatible to it in order to disable Vi emulation. Then arrow keys should work in insert mode by default. If not, Vim also supports defining your own commands in input mode using the inoremap command. In Vim, the Ctrl-O trick mentioned above should also work.

    If the only editor available is Vi, which is a rare situation these days, I don't know of any way to make the arrow keys do what you want. You might want to install vim or nano if you have administrative privileges. If the machines have an ssh server running, you could install an editor that supports editing remote files over ssh (e.g. Emacs with TRAMP) on your personal computer.

  • jabirali
    RE: To those who are System Administrators...
    [quote]Everyone was a noob at some point, how did you attain your vast Linux knowledge?[/quote]Most of my experience came from experimenting with new software and configuration files, breaking something, and then googling for some way to fix it. When you break the system enough times, you recognize the symptoms when something similar goes wrong in the future, and usually know approximately what caused it, how to troubleshoot and how to fix it when the problem is located. I'm not a professional system administrator, and don't study computer science. I've had a couple of summer jobs as an assisting system administrator, but except that, I'm just a hobbyist - and might not know the job market as well as other people in this thread. I do however know of some useful software for administrative purposes, and will list some of it below. [ul][li][url=http://docs.puppetlabs.com/guides/introduction.html]Puppet[/url] - an OS-independent configuration management tool that should make life easier if you need to administer multiple machines. It works with Unix, Linux and Windows.[/li] [li][url=http://www.gluster.com/community/documentation/index.php/GlusterFS_cookbook]GlusterFS[/url] - this is basically to networked servers what RAID is to harddrives. It allows you to organize your networked storage server into a sort of storage cloud, in order to increase speed/reliability (AFR) and storage capacity (distribute).[/li] [li]Pkgsync - a system for central configuration of which packages should be installed on Debian/Ubuntu machines. You group packages into [i]mayhave[/i] and [i]musthave[/i] - any missing package in musthave will be automatically installed on all machines with pkgsync enabled, and any package not in mayhave or musthave will be automatically removed on these machines.[/li] [li]Version control systems in general are worth knowing if you're planning to work in an environment with many programmers. [url=http://subversion.apache.org/]Subversion[/url] seems to be the most used these days; I personally prefer [url=http://git-scm.com/]git[/url] though, and the older CVS is still in active use. There are also lots of other systems in use lots of other version control systems (bazar, mercurial, etc), but knowing one of them should be a good start.[/li] [li]OpenSSH - is one of the most used programs for a Linux/Unix system administrator, as it allows you to remote control all your servers over an encrypted connection. If you're not already familiar with it, google for a guide ;)[/li] [/ul]
    Link to this post 30 Apr 11

    Everyone was a noob at some point, how did you attain your vast Linux knowledge?
    Most of my experience came from experimenting with new software and configuration files, breaking something, and then googling for some way to fix it. When you break the system enough times, you recognize the symptoms when something similar goes wrong in the future, and usually know approximately what caused it, how to troubleshoot and how to fix it when the problem is located.

    I'm not a professional system administrator, and don't study computer science. I've had a couple of summer jobs as an assisting system administrator, but except that, I'm just a hobbyist - and might not know the job market as well as other people in this thread. I do however know of some useful software for administrative purposes, and will list some of it below.
    [ul][li]Puppet - an OS-independent configuration management tool that should make life easier if you need to administer multiple machines. It works with Unix, Linux and Windows.[/li]
    [li]GlusterFS - this is basically to networked servers what RAID is to harddrives. It allows you to organize your networked storage server into a sort of storage cloud, in order to increase speed/reliability (AFR) and storage capacity (distribute).[/li]
    [li]Pkgsync - a system for central configuration of which packages should be installed on Debian/Ubuntu machines. You group packages into mayhave and musthave - any missing package in musthave will be automatically installed on all machines with pkgsync enabled, and any package not in mayhave or musthave will be automatically removed on these machines.[/li]
    [li]Version control systems in general are worth knowing if you're planning to work in an environment with many programmers. Subversion seems to be the most used these days; I personally prefer git though, and the older CVS is still in active use. There are also lots of other systems in use lots of other version control systems (bazar, mercurial, etc), but knowing one of them should be a good start.[/li]
    [li]OpenSSH - is one of the most used programs for a Linux/Unix system administrator, as it allows you to remote control all your servers over an encrypted connection. If you're not already familiar with it, google for a guide ;)[/li]
    [/ul]

  • jabirali
    RE: Help for what drivers I need please
    Most of that hardware should work out of the box with Mint. The only parts that might need additional drivers, depending on the specific model you've got, is the wireless network card and the webcam. You can go [url=http://linuxwireless.org/en/users/Devices]here[/url] to check whether or not the wireless card is supported, and which driver is necessary if it is. The installation disk comes with the drivers for many wireless cards, but not all of them. If you have access to a wired internet connection, the wireless drivers shouldn't be a concern though; you could always use the wired internet connection to later download the wireless drivers. By the way, if this is your first time installing Linux, I recommend that you create a dual boot setup. This means that instead of replacing your Windows installation with Linux, you resize your existing Windows partition and install Linux on a new partition. That way you can choose which system to boot when you start your machine, and might continue using your Windows partition for software (e.g. some games) or hardware (e.g. some camcorders) that you don't get to work properly in Linux. The installation program on the Mint disk should guide you through this process, and I believe it's the default procedure if you tell it to automatically partition your hard drive.
    Link to this post 30 Apr 11

    Most of that hardware should work out of the box with Mint. The only parts that might need additional drivers, depending on the specific model you've got, is the wireless network card and the webcam.

    You can go here to check whether or not the wireless card is supported, and which driver is necessary if it is. The installation disk comes with the drivers for many wireless cards, but not all of them. If you have access to a wired internet connection, the wireless drivers shouldn't be a concern though; you could always use the wired internet connection to later download the wireless drivers.

    By the way, if this is your first time installing Linux, I recommend that you create a dual boot setup. This means that instead of replacing your Windows installation with Linux, you resize your existing Windows partition and install Linux on a new partition. That way you can choose which system to boot when you start your machine, and might continue using your Windows partition for software (e.g. some games) or hardware (e.g. some camcorders) that you don't get to work properly in Linux. The installation program on the Mint disk should guide you through this process, and I believe it's the default procedure if you tell it to automatically partition your hard drive.

  • jabirali
    RE: Linux Worries
    I agree with mfillpots sentiments on this. You don't need any previous experience with Linux/Unix systems to install a distribution like [url=http://www.linuxmint.com/]Mint[/url] or [url=http://www.ubuntu.com/]Ubuntu[/url]. Although there exists a Windows emulation layer for Linux called Wine, many applications don't work that well with it - so the safe alternative is to install Linux alongside Windows, so that both operative systems are available on your computer. Note that many applications, e.g. Matlab, Maple and Simulink, also have native Linux versions available; you might try checking out the web pages of the applications you require to see if any of them run natively.
    Link to this post 05 Apr 11

    I agree with mfillpots sentiments on this. You don't need any previous experience with Linux/Unix systems to install a distribution like Mint or Ubuntu. Although there exists a Windows emulation layer for Linux called Wine, many applications don't work that well with it - so the safe alternative is to install Linux alongside Windows, so that both operative systems are available on your computer.

    Note that many applications, e.g. Matlab, Maple and Simulink, also have native Linux versions available; you might try checking out the web pages of the applications you require to see if any of them run natively.

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board