Giter VIP home page Giter VIP logo

learn's Introduction

Learn

Learn the very basics of different languages, currently around 12 different languages:

  • perl
  • python
  • ruby
  • lua
  • javascript
  • php
  • bash
  • C
  • spin (propeller microcontroller)
  • Assembly (nasm/ld/linux[elf64] stack)
  • Assembly (nasm/ld/linux[elf32] stack)
  • Assembly (Propeller)

Description

With enough knowledge/experience in one or more scripting/programming languages, I start finding it to be a waste of time reading a 500+ page book to learn a new language. There are only a few essential things I really want to know in order to get quickly started, the rest I can usually google. Sometimes I just feel like asking "Just tell me how to print and do a while loop and I'll be on my way."

This project is an attempt to make a skeleton for a few languages as a point of reference to the most commonly used programming/scripting concepts (subjective declaration). If you want to master the language, maybe a few 500+ page books is the best option; this project is for quick and dirty hacks in a language you probably wont use much. Looking over my own code, I do notice that 80%-90% of it are the common basics that can be found in these skeletons. If something more specific needs to be done, there is web-documentation for most languages, and search engine on the web.

Most of these will be somewhat sparse on comments for readability, with exception to the perl script. This script is heavily littered with comments. If you have very little scripting/programming experience, look at this one first; as it explains each part at a very granular level.

Below are my "challenges" for each language:

Note that depending on the language, certain things may have to be done differently. For example, file IO with javascript (maybe use textboxes instead), or flow control in assembly (if/then/else if functionality is possible, it just looks a lot "different").

  • comments
  • printing (along with concatenation and variable interpolation)
  • take input
  • how to math
  • variables and arrays
  • logic/comparisons
  • loops
  • subroutines
  • handling files

Here is a small list of useful things, but not something I would consider essential for a skeleton:

  • modules (importing external code)
  • regex
  • hashes

Script/Program Operation

  • Prints a welcome statement
  • Takes user input for file name
  • Opens the file and
  • ---Counts the lines
  • ---Stores character count of each line in an array
  • ---Notes the last line
  • Close file
  • Prints out the last line
  • Loop through the character count array and get total chars for file
  • Print how many lines and characters the file had
  • Prompt user for another line to add to the file (has to be less than 30 characters)
  • ---Use subroutine/function to validate that the line is less than 30 characters
  • Write this user supplied line to the file (append)

A Language for each Directory

Each directory should at least have a skeleton script that covers most of what is described above.

There may also be extra scripts to cover additional features that are unique to the language, or just useful in general, but would significantly add to the complexity or size of the skeleton script

If there are differences in the skeleton, from filehandle differences (javascript) to completely different skeleton goals in general (Assembly), then there should be some "diff" notes in the README for that folder. The README should also contain "environmental" notes; this merely describes my personal environment in getting these programs/scripts running (editor, compiler, command to execute, etc...)

Some Meat

If Each language has a 'skeleton' of basic functions of a programming language, everything else would be 'meat.' Some of the languages in here may have extra files in addition to just a skeleton in order to suppliment popular features of a language or in general. The goal is to keep the 'skeleton' to about as much code as can be reasonably printed on one page. But some languages may have some really awesome features, however, it may take a bit of code to go through these features. A great example of this is Regular Expressions. Regular Expressions can be useful in several of these languages, however, are not crucial to the bare bones of the language. Adding regex to one of these skeletons would increase the line count moderately enough to nessesitate its own 'meaty' script.

learn's People

Contributors

xlogicx avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.