background preloader

Programming

Facebook Twitter

Web

Learn You a Haskell for Great Good! - Chapters. Changing commit message of a revision in Mercurial. Hg Init: a Mercurial tutorial by Joel Spolsky. Go for Java programmers. This text is intended to help Java programmers come up to speed quickly with Go. It starts with an example highlighting features easily recognized by all Java programmers, then gives a fairly detailed description of Go’s building blocks, and ends with an example illustrating constructs that have no immediate counterpart in Java. Hello stack (example) To whet your appetite, we start with a small but complete and idiomatic example corresponding to this Stack.java program. Comments that appear directly before top-level declarations are documentation comments. They are written in plain text. And here is a Hello world program demonstrating how to use the collection.Stack abstract data type.

The test package collection_test resides in the same directory as the collection package. Conceptual differences Go does not have classes with constructors. Syntax Declarations The declaration syntax is reversed compared to Java. Var ( n int x float64 ) func f(i, j, k int, s, t string) var v9 = *v2 v10 := v1 Structs. Clockwise/Spiral Rule. [This was posted to comp.lang.c by its author, David Anderson, on 1994-05-06.] There is a technique known as the ``Clockwise/Spiral Rule'' which enables any C programmer to parse in their head any C declaration! There are three simple steps to follow: Starting with the unknown element, move in a spiral/clockwise direction; when ecountering the following elements replace them with the corresponding english statements: [X] or [] => Array X size of... or Array undefined size of...

(type1, type2) => function passing type1 and type2 returning... * => pointer(s) to... Keep doing this in a spiral/clockwise direction until all tokens have been covered. Always resolve anything in parenthesis first! Example #1: Simple declaration +-------+ | +-+ | | ^ | | char *str[10]; ^ ^ | | | +---+ | +-----------+ Question we ask ourselves: What is str?

``str is an... We move in a spiral clockwise direction starting with `str' and the first character we see is a `[' so, that means we have an array, so... Eclipse - The Eclipse Foundation open source community website.

Python

Java. Android.