├── README.md ├── sql.md ├── rust.md ├── perl.md ├── latex.md ├── fsharp.md ├── scala.md ├── elixir.md ├── bin └── org_url2md.py ├── bash.md ├── octave.md ├── r.md ├── haskell.md ├── python.md ├── compilers.md ├── ocaml.md ├── go.md └── LICENSE /README.md: -------------------------------------------------------------------------------- 1 | # Computer Language Notes 2 | 3 | Menu: [bash](bash.md) | [Compilers](compilers.ms) | [Elixir](elixir.md) | [F#](fsharp.md) | [Go](go.md) | [Haskell](haskell.md) | [OCaml](ocaml.md) | [Octave](octave.md) | [Perl](perl.md) | [Python](python.md) | [R](r.md) | [Rust](rust.md) | [Scala](scala.md) | [SQL](sql.md) 4 | -------------------------------------------------------------------------------- /sql.md: -------------------------------------------------------------------------------- 1 | # SQL 2 | 3 | Menu: [Home](README.md) | [bash](bash.md) | [Compilers](compilers.md) | [Elixir](elixir.md) | [F#](fsharp.md) | [Go](go.md) | [Haskell](haskell.md) | [OCaml](ocaml.md) | [Octave](octave.md) | [Perl](perl.md) | [Python](python.md) | [R](r.md) | [Rust](rust.md) | [Scala](scala.md) | [SQL](sql.md) 4 | 5 | ## Inbox 6 | 7 | + https://blog.jooq.org/2016/04/25/10-sql-tricks-that-you-didnt-think-were-possible/ 8 | -------------------------------------------------------------------------------- /rust.md: -------------------------------------------------------------------------------- 1 | # Rust 2 | 3 | Menu: [Home](README.md) | [bash](bash.md) | [Compilers](compilers.md) | [Elixir](elixir.md) | [F#](fsharp.md) | [Go](go.md) | [Haskell](haskell.md) | [OCaml](ocaml.md) | [Octave](octave.md) | [Perl](perl.md) | [Python](python.md) | [R](r.md) | [Rust](rust.md) | [Scala](scala.md) | [SQL](sql.md) 4 | 5 | ## Inbox 6 | 7 | - https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/ 8 | - https://news.ycombinator.com/item?id=22448933 9 | 10 | ## Books 11 | 12 | - 13 | -------------------------------------------------------------------------------- /perl.md: -------------------------------------------------------------------------------- 1 | # Perl 2 | 3 | Menu: [Home](README.md) | [bash](bash.md) | [Compilers](compilers.md) | [Elixir](elixir.md) | [F#](fsharp.md) | [Go](go.md) | [Haskell](haskell.md) | [OCaml](ocaml.md) | [Octave](octave.md) | [Perl](perl.md) | [Python](python.md) | [R](r.md) | [Rust](rust.md) | [Scala](scala.md) | [SQL](sql.md) 4 | 5 | ## Inbox 6 | 7 | * Variables 8 | 9 | ```perl 10 | 11 | my $str = "hello"; 12 | my $pi = 3.14; 13 | my num = 42; 14 | 15 | ``` 16 | 17 | * Arrays 18 | 19 | * Dictionaries 20 | 21 | 22 | * Functions 23 | 24 | ```perl 25 | sub add { 26 | my($var1, $var2) = @_; 27 | 28 | return $var1 + $var1; 29 | } 30 | 31 | my $result = add(2,3); 32 | ``` 33 | -------------------------------------------------------------------------------- /latex.md: -------------------------------------------------------------------------------- 1 | # Latex and Tex 2 | 3 | Menu: [Home](README.md) | [bash](bash.md) | [Compilers](compilers.md) | [Elixir](elixir.md) | [F#](fsharp.md) | [Go](go.md) | [Haskell](haskell.md) | [OCaml](ocaml.md) | [Octave](octave.md) | [Perl](perl.md) | [Python](python.md) | [R](r.md) | [Rust](rust.md) | [Scala](scala.md) | [SQL](sql.md) 4 | 5 | ## Inbox 6 | 7 | - [Master LATEX in Minutes](https://github.com/VoLuong/Master-Latex-in-minutes) 8 | - https://news.ycombinator.com/item?id=12829799 9 | 10 | ## CV Templates 11 | 12 | - https://olivierpieters.be/projects/limecv 13 | - https://news.ycombinator.com/item?id=15639339 14 | - https://github.com/posquit0/Awesome-CV 15 | - https://texblog.org/2012/04/25/writing-a-cv-in-latex/ 16 | -------------------------------------------------------------------------------- /fsharp.md: -------------------------------------------------------------------------------- 1 | # F# 2 | 3 | Menu: [Home](README.md) | [bash](bash.md) | [Compilers](compilers.md) | [Elixir](elixir.md) | [F#](fsharp.md) | [Go](go.md) | [Haskell](haskell.md) | [OCaml](ocaml.md) | [Octave](octave.md) | [Perl](perl.md) | [Python](python.md) | [R](r.md) | [Rust](rust.md) | [Scala](scala.md) | [SQL](sql.md) 4 | 5 | ## Inbox 6 | 7 | - [Mere Functional Programming in F#](https://dev.to/kspeakman/mere-functional-programming-in-f-do8) 8 | - [Tour of F#](https://docs.microsoft.com/en-us/dotnet/articles/fsharp/tour) 9 | - https://news.ycombinator.com/item?id=13708453 10 | - [F# for Azure Notebooks](https://notebooks.azure.com/library/samples/html/FSharp%20for%20Azure%20Notebooks.ipynb) 11 | - [Functional Koans - F#](https://github.com/ChrisMarinos/FSharpKoans/tree/ae7e081f839929b898d1f09e7893e1f3ff5c4d61) 12 | -------------------------------------------------------------------------------- /scala.md: -------------------------------------------------------------------------------- 1 | # Scala 2 | 3 | 4 | Menu: [Home](README.md) | [bash](bash.md) | [Compilers](compilers.md) | [Elixir](elixir.md) | [F#](fsharp.md) | [Go](go.md) | [Haskell](haskell.md) | [OCaml](ocaml.md) | [Octave](octave.md) | [Perl](perl.md) | [Python](python.md) | [R](r.md) | [Rust](rust.md) | [Scala](scala.md) | [SQL](sql.md) 5 | 6 | ## Inbox 7 | 8 | - [Creative Scala](https://www.creativescala.org) 9 | - [Awesome Scala](https://github.com/lauris/awesome-scala) 10 | - [Learn X in Y minutes Where X=Scala](https://learnxinyminutes.com/docs/scala) 11 | - [Scala School by Twitter](http://twitter.github.io/scala_school) 12 | - [Scala for the Impatient](http://fileadmin.cs.lth.se/scala/scala-impatient.pdf) 13 | - [Functional Programming Principles in Scala](https://www.coursera.org/course/progfun) 14 | - [The Neophyte's Guide to Scala](http://danielwestheide.com/scala/neophytes.html) 15 | - [Scala Center](http://scala.epfl.ch) 16 | - http://aperiodic.net/phil/scala/s-99/ 17 | - http://scalacookbook.com/ 18 | -------------------------------------------------------------------------------- /elixir.md: -------------------------------------------------------------------------------- 1 | # Elixir 2 | 3 | Menu: [Home](README.md) | [bash](bash.md) | [Compilers](compilers.md) | [Elixir](elixir.md) | [F#](fsharp.md) | [Go](go.md) | [Haskell](haskell.md) | [OCaml](ocaml.md) | [Octave](octave.md) | [Perl](perl.md) | [Python](python.md) | [R](r.md) | [Rust](rust.md) | [Scala](scala.md) | [SQL](sql.md) 4 | 5 | ## Inbox 6 | 7 | + http://elixir-lang.org 8 | + https://media.pragprog.com/titles/elixir/ElixirCheat.pdf 9 | + https://sameroom.io/blog/why-erlang-matters/ 10 | + [Elixir is for programmers]([https://www.pluralsight.com/blog/software-development/elixir-is-for-programmers) 11 | + [Awesome Elixir](https://elixir.libhunt.com) 12 | 13 | ## Phoenix Framework 14 | 15 | + http://www.phoenixframework.org/docs/overview 16 | + http://phoenix.thefirehoseproject.com/1.html 17 | 18 | 19 | ## Editor Support 20 | 21 | + Atom - https://github.com/msaraiva/atom-elixir 22 | + Emacs - https://github.com/tonini/alchemist.el 23 | + IntelliJ - https://github.com/KronicDeth/intellij-elixir 24 | + vim - https://github.com/carlhuda/janus 25 | 26 | ## Books 27 | 28 | + https://pragprog.com/book/elixir12/programming-elixir-1-2 29 | -------------------------------------------------------------------------------- /bin/org_url2md.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | """ 4 | Simple script to convert .org url lines to .md urls 5 | 6 | + [[http://www.h4labs.com][h4labs]] 7 | to 8 | + [h4labs](http://www.h4labs.com) 9 | 10 | If the line doesn't match, simply print the line. 11 | 12 | bin/org_url2md.py haskell.md 13 | 14 | """ 15 | import os 16 | import sys 17 | import re 18 | 19 | prog = re.compile(r"\+ \[\[(.*?)\]\[(.*?)\]\]") 20 | 21 | 22 | def convert2md(line): 23 | str = line.strip() 24 | m = prog.match(str) 25 | 26 | if m: 27 | n = len(m.groups()) 28 | #print("n={}".format(len(m.groups()))) 29 | if n == 2: 30 | print("+ [{}]({})".format(m.group(2), m.group(1))) 31 | return 32 | 33 | print("{}".format(str)) 34 | 35 | 36 | def org2md(fname): 37 | with open(fname) as fp: 38 | line = fp.readline() 39 | while line: 40 | convert2md(line) 41 | # print("{}".format(line), end="") 42 | line = fp.readline() 43 | 44 | 45 | filepath = sys.argv[1] 46 | 47 | if not os.path.isfile(filepath): 48 | print("File path {} does not exist. Exiting...".format(filepath)) 49 | sys.exit() 50 | 51 | org2md(filepath) 52 | 53 | -------------------------------------------------------------------------------- /bash.md: -------------------------------------------------------------------------------- 1 | # Bash 2 | 3 | Menu: [Home](README.md) | [bash](bash.md) | [Compilers](compilers.md) | [Elixir](elixir.md) | [F#](fsharp.md) | [Go](go.md) | [Haskell](haskell.md) | [OCaml](ocaml.md) | [Octave](octave.md) | [Perl](perl.md) | [Python](python.md) | [R](r.md) | [Rust](rust.md) | [Scala](scala.md) | [SQL](sql.md) 4 | 5 | 6 | + http://xmodulo.com/better-alternatives-basic-command-line-utilities.html 7 | + http://github.com/revans/bash-it 8 | + http://news.ycombinator.com/item?id=8611767 9 | + [[http://pgas.freeshell.org/shell/bash-ido][Bash ido]] 10 | 11 | 12 | ``` 13 | !^ - the first argument from the previous command 14 | !$ - the last argument from the previous command 15 | !* - all of the arguments from the previous command 16 | !! - the entire previous command 17 | ``` 18 | 19 | ## Inbox 20 | + http://github.com/x0054/hyperjump 21 | - http://news.ycombinator.com/item?id=9323135 22 | + http://www.skorks.com/2009/09/bash-shortcuts-for-maximum-productivity/ 23 | + http://news.ycombinator.com/item?id=5690235 24 | + http://news.ycombinator.com/item?id=2983079 25 | + http://news.ycombinator.com/item?id=4369485 26 | + http://news.ycombinator.com/item?id=3341542 27 | + http://news.ycombinator.com/item?id=6077775 28 | + http://news.ycombinator.com/item?id=1699080 29 | + http://news.ycombinator.com/item?id=4687653 30 | + http://news.ycombinator.com/item?id=3492939 31 | + http://news.ycombinator.com/item?id=6221790 32 | + http://news.ycombinator.com/item?id=8092439 33 | + http://news.ycombinator.com/item?id=6155556 34 | + http://news.ycombinator.com/item?id=5307491 35 | + http://news.ycombinator.com/item?id=4974197 36 | + http://stackoverflow.com/questions/68372/what-is-your-single-most-favorite-command-line-trick-using-bash 37 | + http://superuser.com/questions/90196/case-insensitive-tab-completion-in-bash 38 | -------------------------------------------------------------------------------- /octave.md: -------------------------------------------------------------------------------- 1 | # Octave 2 | 3 | 4 | Menu: [Home](README.md) | [bash](bash.md) | [Compilers](compilers.md) | [Elixir](elixir.md) | [F#](fsharp.md) | [Go](go.md) | [Haskell](haskell.md) | [OCaml](ocaml.md) | [Octave](octave.md) | [Perl](perl.md) | [Python](python.md) | [R](r.md) | [Rust](rust.md) | [Scala](scala.md) | [SQL](sql.md) 5 | 6 | ## Inbox 7 | + https://www.chemie.fu-berlin.de/chemnet/use/info/octave/octave_toc.html 8 | + http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-octave-matlab.html 9 | 10 | ## Misc Commands 11 | ```octave 12 | % Comments begin with percent sign: % 13 | PS1('>> ') % Change prompt 14 | pwd % Current directory 15 | cd '/tmp' % Change working directory; Will load .m functions from here 16 | help help 17 | help plot 18 | ``` 19 | 20 | * Language Introduction 21 | 22 | ** If statement 23 | ```octave 24 | 25 | ``` 26 | 27 | ** For loop 28 | ```octave 29 | 30 | ``` 31 | 32 | ** Simple Function 33 | ```octave 34 | % No parameters 35 | % Invoke: hello() or hello 36 | % 37 | function hello() 38 | printf("Hello\n"); 39 | 40 | end 41 | 42 | % Two parameters 43 | % Invoke: mymax(1,2) 44 | % 45 | function mysum(x,y) 46 | a = x + y 47 | printf("Sum:%d\n", a); 48 | end 49 | 50 | % Two parameters 51 | % Invoke: mysum(1,2) 52 | % 53 | function a = mysum(x,y) 54 | a = x + y 55 | 56 | end 57 | ``` 58 | 59 | ** Load and Save Data 60 | ```octave 61 | 62 | ``` 63 | 64 | ** Plot statement 65 | ```octave 66 | 67 | ``` 68 | 69 | ** Matrices 70 | ```octave 71 | A = [1 2; 3 4; 5 6]; 72 | B = [1 2 3; 4 5 6]; 73 | zeros(1,3) % [0 0 0 0] 74 | ``` 75 | 76 | A = 77 | |1| 2| 78 | |3|4| 79 | |5|6| 80 | ```octave 81 | A = [1 2; 3 4; 5 6]; 82 | ``` 83 | 84 | B= 85 | |1|2|3 86 | |4|5|6 87 | ```octave 88 | B = [1 2 3; 4 5 6]; 89 | ``` 90 | *** Identity Matrix 91 | ```octave 92 | eye(4) % 4x4 identity matrix 93 | ``` 94 | -------------------------------------------------------------------------------- /r.md: -------------------------------------------------------------------------------- 1 | # R 2 | 3 | Menu: [Home](README.md) | [bash](bash.md) | [Compilers](compilers.md) | [Elixir](elixir.md) | [F#](fsharp.md) | [Go](go.md) | [Haskell](haskell.md) | [OCaml](ocaml.md) | [Octave](octave.md) | [Perl](perl.md) | [Python](python.md) | [R](r.md) | [Rust](rust.md) | [Scala](scala.md) | [SQL](sql.md) 4 | 5 | ## Inbox 6 | 7 | - [Statistical Rethinking: A Bayesian Course Using R and Stan](https://github.com/rmcelreath/statrethinking_winter2019) 8 | - https://news.ycombinator.com/item?id=20102950 9 | - [GAMs in R - Free course](https://noamross.github.io/gams-in-r-course/) 10 | - [Introduction to R Programming](https://cecilialee.github.io/blog/2017/12/05/intro-to-r-programming.html) 11 | - https://news.ycombinator.com/item?id=15868595 12 | - [R Tutorial](http://www.statmethods.net/r-tutorial/index.html) 13 | - [Advanced R by Hadley Wickham](http://adv-r.had.co.nz) 14 | - [Learn X in Y minutes Where X=R](https://learnxinyminutes.com/docs/r/) 15 | - [The R Inferno](http://www.burns-stat.com/documents/books/the-r-inferno) 16 | - [Coursera R Programming Course](https://www.coursera.org/learn/r-programming) 17 | - [swirl - Learn R, in R](http://swirlstats.com) 18 | - [Try R by Code School](http://tryr.codeschool.com) 19 | - [R for Data Science](http://r4ds.had.co.nz) 20 | - [Impatient R](http://www.burns-stat.com/documents/tutorials/impatient-r/) 21 | 22 | ## ggplot2 23 | 24 | - http://r-statistics.co/Top50-Ggplot2-Visualizations-MasterList-R-Code.html 25 | 26 | ## Shiny 27 | 28 | - https://shiny.rstudio.com/gallery/ 29 | - https://heads0rtai1s.github.io/2019/12/05/shiny-starter-code/ 30 | 31 | ## Machine Learning 32 | 33 | - https://www.r-bloggers.com/2014/09/in-depth-introduction-to-machine-learning-in-15-hours-of-expert-videos/ 34 | 35 | ## Editor Support 36 | 37 | - [Announcing R Tools for Visual Studio](https://blogs.technet.microsoft.com/machinelearning/2016/03/09/announcing-r-tools-for-visual-studio-2) 38 | - [[https://github.com/Microsoft/RTVS][R Tools for Visual Studio]] 39 | - [Emacs Speaks Statistics (ESS)](http://ess.r-project.org) 40 | - [RStudio](https://www.rstudio.com/home/) 41 | -------------------------------------------------------------------------------- /haskell.md: -------------------------------------------------------------------------------- 1 | # Haskell 2 | 3 | Menu: [Home](README.md) | [bash](bash.md) | [Compilers](compilers.md) | [Elixir](elixir.md) | [F#](fsharp.md) | [Go](go.md) | [Haskell](haskell.md) | [OCaml](ocaml.md) | [Octave](octave.md) | [Perl](perl.md) | [Python](python.md) | [R](r.md) | [Rust](rust.md) | [Scala](scala.md) | [SQL](sql.md) 4 | 5 | 6 | ## Inbox 7 | 8 | - [Simon Peyton Jones: papers](http://research.microsoft.com/en-us/um/people/simonpj/Papers/papers.html) 9 | - https://github.com/bitemyapp/learnhaskell 10 | - [Four months with Haskell](https://lexi-lambda.github.io/blog/2016/06/12/four-months-with-haskell/) 11 | 12 | ### Editor Support 13 | 14 | - [Haskell, Stack and Intellij IDEA IDE setup tutorial how to get started](https://gist.github.com/androidfred/a2bef54310c847f263343c529d32acd8) 15 | 16 | ## Tutorials 17 | 18 | - [Writing a simple evaluator and type-checker in Haskell](https://bor0.wordpress.com/2019/03/15/writing-a-simple-evaluator-and-type-checker-in-haskell/) 19 | - https://news.ycombinator.com/item?id=19399737 20 | - http://begriffs.com/posts/2015-10-24-learning-haskell-incrementally.html 21 | - http://news.ycombinator.com/item?id=9830431 22 | - http://learnyouahaskell.com/input-and-output 23 | - http://book.realworldhaskell.org 24 | - [Learn Physics by Programming in Haskell -pdf](http://news.ycombinator.com/item?id=9003898) 25 | - http://www.kronosnotebook.com/haskell 26 | 27 | ## Misc 28 | - [Higher-order Type-level Programming in Haskell](https://www.microsoft.com/en-us/research/uploads/prod/2019/03/ho-haskell-5c8bb4918a4de.pdf) 29 | - [Ninety-Nine Problems in Haskell](https://github.com/shekhargulati/99-problems/tree/master/haskell) 30 | - [Hackage is the Haskell community's central package archive of open source software](https://hackage.haskell.org) 31 | - http://www.haskellforall.com/2015/10/basic-haskell-examples.html 32 | - https://github.com/chrisdone/structured-haskell-mode 33 | - [The Algebra of Algebraic data types](http://news.ycombinator.com/item?id=9775467) 34 | - http://science.raphael.poss.name/haskell-for-ocaml-programmers.html 35 | - https://news.ycombinator.com/item?id=9704679 36 | - #haskell-beginners on freenode 37 | - http://www.reddit.com/r/haskell/comments/3959r0/haskellbased_bicycle_parking_guidance_system_in 38 | - http://github.com/kqr/gists/blob/master/articles/simple-syntax-of-haskell.hs 39 | - Haskell:http://lpaste.net/91637 40 | - http://news.ycombinator.com/item?id=8618486 41 | - http://www.haskellforall.com/2015/01/use-haskell-for-shell-scripting.html 42 | - http://news.ycombinator.com/item?id=8970733 43 | - http://www.reddit.com/r/programming/comments/2u6il8/use_haskell_for_shell_scripting 44 | - http://www.reddit.com/r/haskell/comments/2r43q0/kronos_haskell_notebook_mac_app/ 45 | - http://www.haskell.org/documentation 46 | - http://www.seas.upenn.edu/~cis194/ 47 | 48 | ## Monads 49 | 50 | - [Monad metaphors](https://www.futurelearn.com/courses/functional-programming-haskell/1/steps/108529) 51 | 52 | ## Lens 53 | 54 | - [Lens Over Tea](https://artyom.me/lens-over-tea-1) 55 | -------------------------------------------------------------------------------- /python.md: -------------------------------------------------------------------------------- 1 | # Python 2 | 3 | Menu: [Home](README.md) | [bash](bash.md) | [Compilers](compilers.md) | [Elixir](elixir.md) | [F#](fsharp.md) | [Go](go.md) | [Haskell](haskell.md) | [OCaml](ocaml.md) | [Octave](octave.md) | [Perl](perl.md) | [Python](python.md) | [R](r.md) | [Rust](rust.md) | [Scala](scala.md) | [SQL](sql.md) 4 | 5 | ## Inbox 6 | 7 | - https://medium.com/swlh/top-useful-python-snippets-that-save-time-38958f256822 8 | - [Python built-ins worth learning](https://treyhunner.com/2019/05/python-builtins-worth-learning/) 9 | - https://news.ycombinator.com/item?id=19971274 10 | - [Creating Heatmap From Scratch](https://www.geodose.com/2018/01/creating-heatmap-in-python-from-scratch.html) 11 | - [PyPI](https://pypi.python.org/pypi) - The Python Package Index 12 | - http://lucumr.pocoo.org/2015/11/18/pythons-hidden-re-gems 13 | - http://www.dataquest.io/blog/python-vs-r 14 | - http://news.ycombinator.com/item?id=7727369 - Write to a Google Spreadsheet from a Python script (2009) (mattcutts.com) 15 | - http://www.nltk.org 16 | - http://madlag.github.io/jarvis/ 17 | - http://news.ycombinator.com/item?id=7715349 - Common Python Mistakes 18 | - http://pypi.python.org/pypi/goslate 19 | - http://www.blog.pythonlibrary.org/2014/02/26/python-101-reading-and-writing-csv-files/ 20 | - http://github.com/binux/pyspider 21 | - http://news.ycombinator.com/item?id=8665820 22 | 23 | ## Mathplotlib 24 | 25 | - [Effectively Using Matplotlib](https://pbpython.com/effective-matplotlib.html) 26 | 27 | ## Pandas 28 | 29 | - [Stylin’ with Pandas](https://pbpython.com/styling-pandas.html) 30 | - https://towardsdatascience.com/plotting-in-pandas-just-got-prettier-289d0e0fe5c0 31 | - https://www.freecodecamp.org/news/how-to-combine-multiple-csv-files-with-8-lines-of-code-265183e0854/ 32 | 33 | ## Django 34 | 35 | - http://www.marinamele.com/taskbuster-django-tutorial 36 | 37 | 38 | ```sh 39 | 40 | python3 -m http.server --cgi 8000 41 | 42 | ``` 43 | 44 | ```sh 45 | $ cd /home/somedir 46 | $ python -m SimpleHTTPServer 47 | ``` 48 | 49 | That's it! Now your http server will start in port 8000. You will get the message: 50 | 51 | Serving HTTP on 0.0.0.0 port 8000 ... 52 | 53 | Now open a browser and type the following address: 54 | 55 | http://192.168.1.2:8000 56 | 57 | You can also access it via: 58 | 59 | http://127.0.0.1:8000 60 | 61 | If the directory has a file named index.html, that file will be served as the initial file. If there is no index.html, then the files in the directory will be listed. 62 | 63 | If you wish to change the port that's used start the program via: 64 | 65 | $ python -m SimpleHTTPServer 8080 66 | 67 | If you want to only serve on localhost you'll need to write a custom Python program such as: 68 | 69 | import sys 70 | import BaseHTTPServer 71 | from SimpleHTTPServer import SimpleHTTPRequestHandler 72 | 73 | HandlerClass = SimpleHTTPRequestHandler 74 | ServerClass = BaseHTTPServer.HTTPServer 75 | Protocol = "HTTP/1.0" 76 | 77 | if sys.argv[1:]: 78 | port = int(sys.argv[1]) 79 | else: 80 | 81 | port = 8000 82 | server_address = ('127.0.0.1', port) 83 | 84 | HandlerClass.protocol_version = Protocol 85 | httpd = ServerClass(server_address, HandlerClass) 86 | 87 | sa = httpd.socket.getsockname() 88 | print "Serving HTTP on", sa[0], "port", sa[1], "..." 89 | httpd.serve_forever() 90 | 91 | ``` 92 | 93 | ``` 94 | 95 | http://stackoverflow.com/questions/101268/hidden-features-of-python 96 | 97 | ### Machine Learning 98 | 99 | - https://machinelearningmastery.com/lasso-regression-with-python/ 100 | - https://jdridgeway.com/deep-learning-from-scratch-generalizing-gradient-descent/ 101 | 102 | #### PyTorch 103 | 104 | - https://github.com/Atcold/pytorch-Deep-Learning 105 | 106 | ### Games in Python 107 | 108 | - http://inventwithpython.com/chapters/ 109 | - http://anandology.com/python-practice-book/index.html 110 | 111 | ### Pyflakes 112 | 113 | - http://stackoverflow.com/questions/35470/are-there-any-static-analysis-tools-for-python 114 | - http://stackoverflow.com/questions/115977/using-pylint-with-django 115 | - http://articles.sitepoint.com/article/django-crash-course 116 | - http://www.sqlalchemy.org/ 117 | - http://www.jonobacon.org/2010/01/08/acire-delivering-a-world-of-python-snippets/ 118 | - [300 Tutorials](http://dis.4chan.org/read/prog/1180084983/) 119 | - [ElementTree](http://effbot.org/zone/element.htm) 120 | - [Django Forms](http://uswaretech.com/blog/2010/01/doing-things-with-django-forms/) 121 | 122 | ``` 123 | -------------------------------------------------------------------------------- /compilers.md: -------------------------------------------------------------------------------- 1 | # Compilers and Interpreters 2 | 3 | Menu: [Home](README.md) | [bash](bash.md) | [Compilers](compilers.md) | [Elixir](elixir.md) | [F#](fsharp.md) | [Go](go.md) | [Haskell](haskell.md) | [OCaml](ocaml.md) | [Octave](octave.md) | [Perl](perl.md) | [Python](python.md) | [R](r.md) | [Rust](rust.md) | [Scala](scala.md) | [SQL](sql.md) 4 | 5 | 6 | ## Inbox 7 | 8 | - [C Compiler from Scratch](https://github.com/DoctorWkt/acwj) 9 | - https://news.ycombinator.com/item?id=21968420 10 | - https://github.com/kanaka/mal/ 11 | - https://news.ycombinator.com/item?id=21670442 12 | - https://generalproblem.net/lets_build_a_compiler/01-starting-out/ 13 | - https://news.ycombinator.com/item?id=20444474 14 | - https://github.com/igorkulman/SwiftPascalInterpreter 15 | - [Writing a C Compiler, Part 2](https://norasandler.com/2017/12/05/Write-a-Compiler-2.html) 16 | - https://news.ycombinator.com/item?id=15861788 17 | - https://github.com/alexfru/SmallerC 18 | - https://news.ycombinator.com/item?id=15463738 19 | - http://staff.polito.it/silvano.rivoira/HowToWriteYourOwnCompiler.htm 20 | - https://news.ycombinator.com/item?id=15096881 21 | - https://francisstokes.wordpress.com/2017/08/16/programming-language-from-scratch/ 22 | - https://news.ycombinator.com/item?id=15034089 23 | - https://nicoleorchard.com/blog/compilers 24 | - https://news.ycombinator.com/item?id=15005031 25 | - [Parsing Expressions](http://www.craftinginterpreters.com/parsing-expressions.html) 26 | - https://news.ycombinator.com/item?id=13914218 27 | - [Step-by-step development of a Scheme-to-x86 compiler](https://github.com/namin/inc) 28 | - [Write your own compiler - Introduction](http://blog.klipse.tech/javascript/2017/02/08/tiny-compiler-intro.html?tiny) 29 | - https://news.ycombinator.com/item?id=13608810 30 | - [How to implement a programming language in JavaScript](http://lisperator.net/pltut/) 31 | - https://news.ycombinator.com/item?id=11998581 32 | - [Anders Hejlsberg on Modern Compiler Construction](https://channel9.msdn.com/Blogs/Seth-Juarez/Anders-Hejlsberg-on-Modern-Compiler-Construction) 33 | - https://news.ycombinator.com/item?id=11685317 34 | - http://squanch.org/writing-a-compiler-in-go/ 35 | - [How to Write a (Lisp) Interpreter (in Python))](http://norvig.com/lispy.html) 36 | - https://news.ycombinator.com/item?id=12777852 37 | - [Resources for Amateur Compiler Writers](http://c9x.me/comp-bib/) 38 | - [Want to Write a Compiler? Read These Two Papers - HN](https://news.ycombinator.com/item?id=10786842) 39 | - [An Incremental Approach to Compiler Construction](http://schemeworkshop.org/2006/11-ghuloum.pdf) 40 | - https://news.ycombinator.com/item?id=10785164 41 | - https://news.ycombinator.com/item?id=13207441 42 | - [Inside a register allocator](http://artagnon.com/inside-a-register-allocator) 43 | - https://news.ycombinator.com/item?id=11365154 44 | - Let's Build a Simple Interpreter: [Part #1](https://ruslanspivak.com/lsbasi-part1/) | [Part #2](https://ruslanspivak.com/lsbasi-part2/) | [Part #3](https://ruslanspivak.com/lsbasi-part3/) | [[Part #4](https://ruslanspivak.com/lsbasi-part4/) | [Part #5](https://ruslanspivak.com/lsbasi-part5/) | [Part #6](http://ruslanspivak.com/lsbasi-part6) | [Part 7](http://ruslanspivak.com/lsbasi-part7/) | [Part 8](https://ruslanspivak.com/lsbasi-part8/) | [Part 9](https://ruslanspivak.com/lsbasi-part9/) 45 | - [Python: Writing a Compiler and Interpreter in 160 lines of code](http://www.jroller.com/languages/entry/python_writing_a_compiler_and) 46 | - [Implementing a programming language in D: Lexical Analysis](http://blog.felixangell.com/implementing-a-programming-language-in-d-part-1/) 47 | - [CS143 Compilers - 2011](http://www.keithschwarz.com/cs143/WWW/sum2011/) 48 | - https://news.ycombinator.com/item?id=11277979 49 | - [Basics of Compiler Design (Mogensen)](http://www.diku.dk/hjemmesider/ansatte/torbenm/Basics/) 50 | - [Stanford CS243: Program Analysis and Optimization Winter 2016](http://suif.stanford.edu/~courses/cs243/) 51 | - [Compiler Construction - Niklaus Wirth](http://www.ethoberon.ethz.ch/WirthPubl/CBEAll.pdf) 52 | - [SSA-based Compiler Design](http://ssabook.gforge.inria.fr/latest/book.pdf) 53 | - https://gist.github.com/mamcx/e1743571b9a1ea163a7f9f07aa6a8ae2 - Lista de recursos sobre crear lenguajes de programacion 54 | - [DIY: Make Your Own Programming Language](http://blog.ppelgren.se/2015-01-03/DIY-Make-Your-Own-Programming-language/) 55 | - https://news.ycombinator.com/item?id=11748484 56 | - [So You Want to Be a (Compiler) Wizard](http://belkadan.com/blog/2016/05/So-You-Want-To-Be-A-Compiler-Wizard/) 57 | - https://news.ycombinator.com/item?id=11777631 58 | - [Let's Build a Compiler - Jack Crenshaw](http://compilers.iecc.com/crenshaw/) 59 | - https://news.ycombinator.com/item?id=22346532 60 | - https://news.ycombinator.com/item?id=6641117 61 | - https://news.ycombinator.com/item?id=1727004 62 | - https://news.ycombinator.com/item?id=232024 63 | - [ParTcl - a micro Tcl implementation](https://github.com/zserge/partcl) 64 | - https://news.ycombinator.com/item?id=13675166 65 | 66 | 67 | ## Compilers 68 | 69 | - https://github.com/andrewchambers/c 70 | - [A Small C Compiler](https://github.com/rui314/8cc) 71 | - [A Quick C Compiler](http://c9x.me/qcc) 72 | - [The Super Tiny Compiler](https://github.com/thejameskyle/the-super-tiny-compiler) 73 | - https://news.ycombinator.com/item?id=11395656 74 | - [Ultra Tiny Compiler](https://github.com/elfet/ultra-tiny-compiler) 75 | - https://github.com/rcorcs/rcc 76 | - https://news.ycombinator.com/item?id=11903674 77 | 78 | ## Parsing 79 | 80 | - [Parsing Expressions by Recursive Descent](https://www.engr.mun.ca/~theo/Misc/exp_parsing.htm) 81 | - https://blog.gopheracademy.com/advent-2014/parsers-lexers 82 | - [Parsing: The Solved Problem That Isn't](http://tratt.net/laurie/blog/entries/parsing_the_solved_problem_that_isnt) 83 | - [Flex and Bison: tips for beginners](http://stanislaw.github.io/2016/04/02/flex-and-bison-tips-for-beginners.html) 84 | 85 | 86 | ## Optimization 87 | 88 | - [Scaling up Superoptimization](http://www.eecs.berkeley.edu/~mangpo/www/papers/lens-asplos16.pdf) 89 | 90 | ## Books 91 | 92 | - http://www.amazon.com/Compiler-Construction-Principles-Kenneth-Louden/dp/0534939724 93 | - http://www.springer.com/fr/book/9780387202488 - Parsing Techniques 94 | - [Theory and Techniques of Compiler Construction](http://www.ethoberon.ethz.ch/WirthPubl/CBEAll.pdf) 95 | -------------------------------------------------------------------------------- /ocaml.md: -------------------------------------------------------------------------------- 1 | # OCaml 2 | 3 | Menu: [Home](README.md) | [bash](bash.md) | [Compilers](compilers.md) | [Elixir](elixir.md) | [F#](fsharp.md) | [Go](go.md) | [Haskell](haskell.md) | [OCaml](ocaml.md) | [Octave](octave.md) | [Perl](perl.md) | [Python](python.md) | [R](r.md) | [Rust](rust.md) | [Scala](scala.md) | [SQL](sql.md) 4 | 5 | ## The Short List 6 | 7 | + [Web REPL](https://try.ocamlpro.com) 8 | + [A Concise Introduction to Objective Caml](http://www.csc.villanova.edu/~dmatusze/resources/ocaml/ocaml.html) 9 | + [Awesome OCaml: A curated collection of awesome OCaml tools, frameworks, libraries and articles](https://github.com/rizo/awesome-ocaml) 10 | + [Real World OCaml](https://realworldocaml.org) 11 | + [33 Learning oCaml videos](https://www.youtube.com/playlist?list=PLea0WJq13cnCef-3KSU3qWFge9OGUlKx1) 12 | + [Official OCaml Site](https://ocaml.org) 13 | 14 | 15 | ## Inbox 16 | + [Functional Programming in OCaml](http://www.cs.cornell.edu/courses/cs3110/2019sp/textbook/) 17 | - https://news.ycombinator.com/item?id=19292067 18 | + [ML for the Working Programmer, 2nd Edition](https://www.cl.cam.ac.uk/~lp15/MLbook/pub-details.html) 19 | + [99 Problems (solved) in OCaml](https://ocaml.org/learn/tutorials/99problems.html) 20 | + https://www.reddit.com/r/ocaml/comments/49zzg6/oml_machine_learning_in_ocaml_composeconf_talk 21 | + http://roscidus.com/blog/blog/2014/06/06/python-to-ocaml-retrospective 22 | - http://roscidus.com/blog/blog/2014/02/13/ocaml-what-you-gain/ 23 | + https://news.ycombinator.com/item?id=7234855 24 | + [OCaml Data Structures - YouTube](https://www.youtube.com/playlist?list=PLea0WJq13cnA1622rtoEhd911spMDRvWh) 25 | + [Merlin: Context sensitive completion for OCaml in Vim and Emacs](http://github.com/the-lambda-church/merlin) 26 | + [A brief introduction to OCaml](http://www.lexicallyscoped.com/2015/06/06/intro-to-ocaml.html) 27 | - http://news.ycombinator.com/item?id=9712225 28 | + http://www.reddit.com/r/ocaml/comments/39pxqg/what_are_the_most_common_bugs_in_ocamlfunctional 29 | + http://www2.lib.uchicago.edu/keith/ocaml-class/home.html 30 | + http://www2.lib.uchicago.edu/keith/ocaml-class/userdefined.html 31 | + https://ocaml.org/learn/tutorials/ocaml_and_the_web.html 32 | + [Beginner's guide to OCaml beginner's guides.](http://blog.nullspace.io/beginners-guide-to-ocaml-beginners-guides.html) 33 | + [F# for fun and profit](http://fsharpforfunandprofit.com) 34 | + http://www.infoq.com/presentations/jane-street-caml-ocaml 35 | + [Why We Use OCaml](http://tech.esper.com/2014/07/15/why-we-use-ocaml/) 36 | + https://www.reddit.com/r/ocaml/comments/3ifwe9/what_are_ocamlers_critiques_of_haskell 37 | + [Why OCaml, why now?](https://spyder.wordpress.com/2014/03/16/why-ocaml-why-now) 38 | - https://news.ycombinator.com/item?id=9049467 39 | + [So you're learning OCaml](http://hyegar.com/2015/10/20/so-youre-learning-ocaml/index.html) 40 | - http://news.ycombinator.com/item?id=10417521 41 | + https://www.reddit.com/r/ocaml/comments/4b2oot/dealing_with_strings_in_ocaml_for_a_beginner/ 42 | + https://michipili.github.io/essay/2016/04/11/ocaml-on-operations.html 43 | + [Generated OCaml bindings for Amazon Web Services](https://github.com/inhabitedtype/ocaml-aws) 44 | 45 | ## F# 46 | 47 | + [Getting started with F#](http://jj09.net/getting-started-with-fsharp/) 48 | + https://www.reddit.com/r/fsharp/comments/4ggl1c/getting_started_with_f_via_the_linux_command_line/ 49 | 50 | ### F# Differences 51 | + http://stackoverflow.com/questions/179492/f-changes-to-ocaml 52 | + http://web.archive.org/web/20080410181630/http://research.microsoft.com/fsharp/manual/ml-compat.aspx 53 | 54 | ## Libraries 55 | + https://github.com/hammerlab/oml 56 | - http://www.hammerlab.org/2015/08/11/introducing-oml-a-small-ocaml-library-for-numerical-computing/ 57 | - https://www.youtube.com/watch?v=czZ18YtZlaw 58 | + Slides: http://rleonid.github.io/slides/oml/compose2016 59 | 60 | ```ocaml 61 | 62 | (* Addition *) 63 | 64 | 1 + 1 65 | 66 | ``` 67 | 68 | 69 | * Variables 70 | 71 | ```ocaml 72 | let pi = 3.1416;; 73 | 74 | let () = print_endline "Hello, World!" 75 | ``` 76 | 77 | 78 | ```ocaml 79 | toplevel 80 | 81 | let average a b = 82 | (a +. b) /. 2.0;; 83 | average;; 84 | 85 | let rec // recursion 86 | 87 | my_ref := 100; 88 | ``` 89 | 90 | * Functions 91 | 92 | A function always has exactly one parameter, and returns one result. 93 | ```ocaml 94 | (* In this case, the one argument is a tuple, and the one result is a tuple. *) 95 | let swap (x, y) = (y, x);; 96 | ``` 97 | 98 | 99 | ```ocaml 100 | let sum (x, y) = x + y;; 101 | sum(3, 5);; 102 | let max (x, y) = if x > y then x else y;; 103 | max(9, 5) 104 | 105 | let hi () = 106 | print_string "hello\n";; 107 | ``` 108 | 109 | 110 | ```ocaml 111 | (* 112 | Here, the one argument is the unit, (), which is a value--it is not syntax to indicate an empty parameter list. Similarly, the unit is returned as a result. 113 | *) 114 | print_newline ();; 115 | ``` 116 | 117 | ## Include Files 118 | ```ocaml 119 | use "myFile.sml" 120 | ``` 121 | The most common functions are in the "Pervasives module," which means you don't have to do anything special to use them 122 | 123 | ```ocaml 124 | open String;; 125 | length "hello";; 126 | ``` 127 | 128 | Identifiers must begin with a lowercase letter or underscore, and may contain letters, digits, underscores, and single quotes. 129 | 130 | ## Lists 131 | [2; 3; 5; 7] 132 | Only the :: operator (LISP cons) and @ operator (list concatenation) can be used without opening the List module or prefixing the function name with List. . 133 | 134 | ### List Operations 135 | 136 | ```ocaml 137 | 5 :: [6; 7] 138 | [5] @ [6; 7] 139 | List.nth [3; 5; 7] 2 140 | List.rev [1; 2; 3] 141 | ``` 142 | 143 | ## Tuples 144 | ```ocaml 145 | (5, "hello", ~16) 146 | ``` 147 | 148 | ### Tuple Operations 149 | ```ocaml 150 | open Char;; 151 | Char.uppercase 'a' 152 | ``` 153 | 154 | ## Exceptions 155 | 156 | The name of an exception must begin with a capital letter. 157 | 158 | You can declare new types of exceptions, with or without a parameter 159 | 160 | ## Comments 161 | ```ocaml 162 | (* One line *) 163 | (* 164 | * Multi-line 165 | *) 166 | 167 | (* 168 | * (* Embedded *) 169 | *) 170 | 171 | ``` 172 | 173 | ## opam Package Manager 174 | + http://opam.ocaml.org/doc/Install.html 175 | - brew install opam 176 | ```ocaml 177 | 178 | ``` 179 | 180 | ```ocaml 181 | 182 | ``` 183 | 184 | ```ocaml 185 | 186 | ``` 187 | 188 | ```ocaml 189 | 190 | ``` 191 | 192 | ```ocaml 193 | 194 | ``` 195 | -------------------------------------------------------------------------------- /go.md: -------------------------------------------------------------------------------- 1 | # Go 2 | 3 | Menu: [Home](README.md) | [bash](bash.md) | [Compilers](compilers.md) | [Elixir](elixir.md) | [F#](fsharp.md) | [Go](go.md) | [Haskell](haskell.md) | [OCaml](ocaml.md) | [Octave](octave.md) | [Perl](perl.md) | [Python](python.md) | [R](r.md) | [Rust](rust.md) | [Scala](scala.md) | [SQL](sql.md) 4 | 5 | ## The Short List 6 | + [Awesome Go](https://github.com/avelino/awesome-go) 7 | + [Go in 5 Minutes](https://github.com/arschles/go-in-5-minutes) 8 | - http://www.goin5minutes.com/screencasts/index.html 9 | + [Go by Example](https://gobyexample.com) 10 | 11 | ## Editor/IDE Support 12 | 13 | + [Visual Studio Code Plugin](https://github.com/Microsoft/vscode-go) 14 | + https://rootpd.com/2016/02/04/setting-up-intellij-idea-for-your-first-golang-project 15 | + http://hadihariri.com/2015/09/30/setting-up-go-on-intellij 16 | + http://marcio.io/2015/07/supercharging-atom-editor-for-go-development 17 | 18 | ## Web 19 | 20 | + [RSS Collector in Ruby and Go](http://rrmartins.herokuapp.com/blog/2016/05/12/rss-collector-in-ruby-and-go/) 21 | + [Building Web Apps in Go](https://astaxie.gitbooks.io/build-web-application-with-golang/content/en/preface.html) 22 | + [Curl to Go](https://mholt.github.io/curl-to-go) 23 | + http://java.dzone.com/articles/exploring-go-template-engine 24 | + http://news.ycombinator.com/item?id=9439041 - A minimal blog engine written in Go, compatible with Ghost themes 25 | + http://getting-started.md/guides/3-go-martini 26 | + [yquotes - Yahoo Stock Quotes in Go](http://github.com/doneland/yquotes) 27 | - http://news.ycombinator.com/item?id=9374373 28 | + http://nicolasmerouze.com/build-web-framework-golang/ 29 | + [Build a Web Crawler in Go](http://jdanger.com/build-a-web-crawler-in-go.html) 30 | + http://soryy.com/blog/2014/not-another-go-net-http-tutorial 31 | + [How To Deploy a Go Web Application with Docker](https://semaphoreci.com/community/tutorials/how-to-deploy-a-go-web-application-with-docker) 32 | 33 | ## Inbox 34 | + [Visualizing Concurrency in Go](http://divan.github.io/posts/go_concurrency_visualize/) 35 | - https://news.ycombinator.com/item?id=14224118 36 | + [Time in Go: A primer](https://machiel.me/post/time-in-go-a-primer/) 37 | + [Go tooling essentials](http://golang.rakyll.org/go-tool-flags/) 38 | + http://news.ycombinator.com/item?id=10395694 - Statistics package 39 | + [An introduction to LLVM in Go](https://blog.felixangell.com/an-introduction-to-llvm-in-go/) 40 | + http://blog.ksred.me/post/learning-golang-stock-notifier 41 | + http://github.com/m3ng9i/ran 42 | + http://news.ycombinator.com/item?id=10286852 - A Lisp Compiler and Environment in Go 43 | + http://devdungeon.com/content/working-files-go 44 | + http://news.ycombinator.com/item?id=9829025 - Go-datastructures 45 | + http://news.ycombinator.com/item?id=9751121 - Resources to learn Go(lang) 46 | + [Tetris in Go](http://www.jjinux.com/2015/05/tetris-written-in-go.html) 47 | - http://news.ycombinator.com/item?id=9607651 48 | + http://blog.golang.org/normalization 49 | + http://news.ycombinator.com/item?id=9058872 - calc 50 | + [Show HN: I rendered the Go gopher using Go](http://news.ycombinator.com/item?id=9009554) 51 | + http://www.wadewegner.com/2014/12/4-simple-steps-to-run-go-language-in-azure-websites/ 52 | + http://weblogs.java.net/blog/manningpubs/archive/2014/11/19/go-practical-introduction-slices 53 | + [gorename: easy refactoring tool for Golang](https://texlution.com/post/gorename/) 54 | - http://news.ycombinator.com/item?id=8643461 55 | + [Futures in Go](http://blog.charmes.net/2014/11/futures-in-go.html) 56 | - http://news.ycombinator.com/item?id=8645394 57 | + [When in Go, do as Gophers do](http://talks.golang.org/2014/readability.slide#1) 58 | + http://avtok.com/2014/11/05/interface-upgrades.html 59 | + [Go Wiki - A simple HTTP server rendering Markdown styled documents http://renstrom.github.io/go-wiki](http://github.com/renstrom/go-wiki) 60 | + [Go Koans](http://github.com/cdarwin/go-koans) 61 | 62 | ## Setup 63 | 64 | ```sh 65 | export GOPATH=$HOME 66 | 67 | go get github.com/mattn/go-sqlite3 68 | go get github.com/gorilla/mux 69 | go get github.com/gorilla/pat 70 | go get github.com/go-sql-driver/mysql; # http://github.com/go-sql-driver/mysql 71 | 72 | --- 73 | 74 | golang-book.com 75 | gpm 76 | godep 77 | goop 78 | ``` 79 | 80 | 81 | ## Tutorials 82 | 83 | http://www.digitalocean.com/company/blog/get-your-development-team-started-with-go/ 84 | 85 | http://micknelson.wordpress.com/2012/11/14/a-tour-of-go-the-web-crawler-exercise/ 86 | http://www.golang-book.com/ 87 | http://play.golang.org/ 88 | http://gobyexample.com/ 89 | 90 | http://github.com/jimmahoney/golang-webserver/blob/master/webserver.go 91 | http://github.com/TeamTwilightSparkle/webserver 92 | http://blog.smartbear.com/web-development/how-to-build-a-web-service-in-5-minutes-with-go/ 93 | 94 | http://www.jeffreybolle.com/blog/create-a-web-app-using-google-go 95 | http://github.com/jeffreybolle/rebuilder 96 | 97 | http://codegangsta.gitbooks.io/building-web-apps-with-go/ 98 | 99 | http://eager.io/blog/go-and-json/|Go and JSON 100 | 101 | http://news.ycombinator.com/item?id=8413341 102 | 103 | http://soryy.com/blog/2014/not-another-go-net-http-tutorial/ 104 | 105 | http://github.com/apsdehal/Konsoole 106 | http://news.ycombinator.com/item?id=8440755 107 | 108 | http://github.com/sosedoff/pgweb/ 109 | 110 | 111 | go test -cover 112 | eg example-based factoring 113 | 114 | gorename 115 | http://godoc.org/code.google.com/p/go.tools/cmd/gorename 116 | http://github.com/smartystreets/sublime-gorename 117 | 118 | go/types 119 | 120 | goimports 121 | http://blog.campoy.cat/2013/12/integrating-goimports-with-gosublime-on.html 122 | go oracle 123 | go tool pprof in 1.4 124 | 125 | llgo 126 | 127 | http://github.com/smartystreets/mafsa 128 | 129 | ### Emacs and Go 130 | 131 | http://tleyden.github.io/blog/2014/05/22/configure-emacs-as-a-go-editor-from-scratch/ 132 | http://github.com/dominikh/go-mode.el 133 | http://medium.com/@olebedev/live-code-reloading-for-golang-web-projects-in-19-lines-8b2e8777b1ea 134 | http://news.ycombinator.com/item?id=8772636 135 | 136 | + http://news.ycombinator.com/item?id=8791935 137 | + http://news.ycombinator.com/item?id=8797590 138 | 139 | ### Simple Crawler 140 | ``` 141 | package main 142 | 143 | import ( 144 | // "fmt" 145 | // "html/template" 146 | "fmt" 147 | "io/ioutil" 148 | "net/http" 149 | // "strconv" 150 | // "strings" 151 | // "time" 152 | ) 153 | 154 | func crawl() { 155 | var url = "http://www.h4labs.com" 156 | 157 | resp, err := http.Get(url) 158 | if err != nil { 159 | // handle error 160 | } 161 | defer resp.Body.Close() 162 | body, err := ioutil.ReadAll(resp.Body) 163 | fmt.Print(string(body)) 164 | } 165 | 166 | func main() { 167 | crawl() 168 | } 169 | ``` 170 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | CC0 1.0 Universal 2 | 3 | Statement of Purpose 4 | 5 | The laws of most jurisdictions throughout the world automatically confer 6 | exclusive Copyright and Related Rights (defined below) upon the creator and 7 | subsequent owner(s) (each and all, an "owner") of an original work of 8 | authorship and/or a database (each, a "Work"). 9 | 10 | Certain owners wish to permanently relinquish those rights to a Work for the 11 | purpose of contributing to a commons of creative, cultural and scientific 12 | works ("Commons") that the public can reliably and without fear of later 13 | claims of infringement build upon, modify, incorporate in other works, reuse 14 | and redistribute as freely as possible in any form whatsoever and for any 15 | purposes, including without limitation commercial purposes. These owners may 16 | contribute to the Commons to promote the ideal of a free culture and the 17 | further production of creative, cultural and scientific works, or to gain 18 | reputation or greater distribution for their Work in part through the use and 19 | efforts of others. 20 | 21 | For these and/or other purposes and motivations, and without any expectation 22 | of additional consideration or compensation, the person associating CC0 with a 23 | Work (the "Affirmer"), to the extent that he or she is an owner of Copyright 24 | and Related Rights in the Work, voluntarily elects to apply CC0 to the Work 25 | and publicly distribute the Work under its terms, with knowledge of his or her 26 | Copyright and Related Rights in the Work and the meaning and intended legal 27 | effect of CC0 on those rights. 28 | 29 | 1. Copyright and Related Rights. A Work made available under CC0 may be 30 | protected by copyright and related or neighboring rights ("Copyright and 31 | Related Rights"). Copyright and Related Rights include, but are not limited 32 | to, the following: 33 | 34 | i. the right to reproduce, adapt, distribute, perform, display, communicate, 35 | and translate a Work; 36 | 37 | ii. moral rights retained by the original author(s) and/or performer(s); 38 | 39 | iii. publicity and privacy rights pertaining to a person's image or likeness 40 | depicted in a Work; 41 | 42 | iv. rights protecting against unfair competition in regards to a Work, 43 | subject to the limitations in paragraph 4(a), below; 44 | 45 | v. rights protecting the extraction, dissemination, use and reuse of data in 46 | a Work; 47 | 48 | vi. database rights (such as those arising under Directive 96/9/EC of the 49 | European Parliament and of the Council of 11 March 1996 on the legal 50 | protection of databases, and under any national implementation thereof, 51 | including any amended or successor version of such directive); and 52 | 53 | vii. other similar, equivalent or corresponding rights throughout the world 54 | based on applicable law or treaty, and any national implementations thereof. 55 | 56 | 2. Waiver. To the greatest extent permitted by, but not in contravention of, 57 | applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and 58 | unconditionally waives, abandons, and surrenders all of Affirmer's Copyright 59 | and Related Rights and associated claims and causes of action, whether now 60 | known or unknown (including existing as well as future claims and causes of 61 | action), in the Work (i) in all territories worldwide, (ii) for the maximum 62 | duration provided by applicable law or treaty (including future time 63 | extensions), (iii) in any current or future medium and for any number of 64 | copies, and (iv) for any purpose whatsoever, including without limitation 65 | commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes 66 | the Waiver for the benefit of each member of the public at large and to the 67 | detriment of Affirmer's heirs and successors, fully intending that such Waiver 68 | shall not be subject to revocation, rescission, cancellation, termination, or 69 | any other legal or equitable action to disrupt the quiet enjoyment of the Work 70 | by the public as contemplated by Affirmer's express Statement of Purpose. 71 | 72 | 3. Public License Fallback. Should any part of the Waiver for any reason be 73 | judged legally invalid or ineffective under applicable law, then the Waiver 74 | shall be preserved to the maximum extent permitted taking into account 75 | Affirmer's express Statement of Purpose. In addition, to the extent the Waiver 76 | is so judged Affirmer hereby grants to each affected person a royalty-free, 77 | non transferable, non sublicensable, non exclusive, irrevocable and 78 | unconditional license to exercise Affirmer's Copyright and Related Rights in 79 | the Work (i) in all territories worldwide, (ii) for the maximum duration 80 | provided by applicable law or treaty (including future time extensions), (iii) 81 | in any current or future medium and for any number of copies, and (iv) for any 82 | purpose whatsoever, including without limitation commercial, advertising or 83 | promotional purposes (the "License"). The License shall be deemed effective as 84 | of the date CC0 was applied by Affirmer to the Work. Should any part of the 85 | License for any reason be judged legally invalid or ineffective under 86 | applicable law, such partial invalidity or ineffectiveness shall not 87 | invalidate the remainder of the License, and in such case Affirmer hereby 88 | affirms that he or she will not (i) exercise any of his or her remaining 89 | Copyright and Related Rights in the Work or (ii) assert any associated claims 90 | and causes of action with respect to the Work, in either case contrary to 91 | Affirmer's express Statement of Purpose. 92 | 93 | 4. Limitations and Disclaimers. 94 | 95 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 96 | surrendered, licensed or otherwise affected by this document. 97 | 98 | b. Affirmer offers the Work as-is and makes no representations or warranties 99 | of any kind concerning the Work, express, implied, statutory or otherwise, 100 | including without limitation warranties of title, merchantability, fitness 101 | for a particular purpose, non infringement, or the absence of latent or 102 | other defects, accuracy, or the present or absence of errors, whether or not 103 | discoverable, all to the greatest extent permissible under applicable law. 104 | 105 | c. Affirmer disclaims responsibility for clearing rights of other persons 106 | that may apply to the Work or any use thereof, including without limitation 107 | any person's Copyright and Related Rights in the Work. Further, Affirmer 108 | disclaims responsibility for obtaining any necessary consents, permissions 109 | or other rights required for any use of the Work. 110 | 111 | d. Affirmer understands and acknowledges that Creative Commons is not a 112 | party to this document and has no duty or obligation with respect to this 113 | CC0 or use of the Work. 114 | 115 | For more information, please see 116 | 117 | --------------------------------------------------------------------------------