Skip to content

Instantly share code, notes, and snippets.

View weakish's full-sized avatar

weakish weakish

View GitHub Profile
@weakish
weakish / Learning-programming-languages.pdf
Last active August 20, 2017 16:21
how to #learn #programming languages
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@weakish
weakish / markov-chain.lua
Created November 15, 2016 13:10
#Markov-chain in #Lua
-- PiL Exercise 10.4: Generalize the Markov-chain algorithm so
-- that it can use any size for the sequence of previous
-- words used in the choice of the next word.
local N = tonumber(arg[1])
local MAXGEN = tonumber(arg[2])
local function allwords()
local line = io.read()
@weakish
weakish / 8queen.lua
Created November 15, 2016 13:08
#eight-queen problem in #Lua
--[[
PiL Exercise 10.2: An alternative implementation for the eight-queen problem
would be to generate all possible permutations of 1 to 8 and, for each
permutation, to check whether it is valid.
--]]
local _ENV,M = require 'pl.import_into' ()
local N = 8
@weakish
weakish / call-kotlin-from-ceylon.md
Last active September 17, 2016 09:10
call #kotlin from #ceylon

Call Kotlin from Ceylon

tl;tr

If we know how to [call Kotlin from java][kotlin-in-java], and how to [call Java from Ceylon][java-in-ceylon], then we can call Kotlin from Ceylon.

@weakish
weakish / keybase.md
Created September 9, 2016 13:33
keybase proof

Keybase proof

I hereby claim:

  • I am weakish on github.
  • I am weakish (https://keybase.io/weakish) on keybase.
  • I have a public key whose fingerprint is 2414 AEA0 EA48 5263 9697 F1BA 55F6 EEC2 EA3F 0A87

To claim this, I am signing this object:

@weakish
weakish / freedom_-1.md
Last active August 20, 2017 16:14
Freedom -1 on #web services. #freedom #free #software

Consider the following two web services:

  1. The web service software is licensed under Free Software licenses but the web service does not provide any api and there is no export your data function in web UI.
  2. The web service software is proprietary, but the web service has well designed api exposing all or more functions in its web UI.

From a traditional software view: 2 is free and 3 is proprietary.

@weakish
weakish / command-line-parsers-in-python.md
Created April 12, 2016 14:20
#cli #parsering #python #review

Review of command line parsers in python

Warning

Unfinished and unmaintained.

Reviews

tl;tr

@weakish
weakish / README.md
Last active August 20, 2017 16:33
#python #persistence #marshal #cPickle #capnp #json
@weakish
weakish / llvm-snapshot.gpg.key.sha512
Created April 22, 2015 13:56
#llvm snapshot #gpg key #sha512
15a8b6bb63b14a7e64882edbc8a3425b95648624dacd08f965c60cffd69624e69c92193a694dce7f2a3c3ef977d8d1b394b6d9d06b3e10259d25f09d67baea87 llvm-snapshot.gpg.key
@weakish
weakish / print_tmux_colours.sh
Created March 24, 2015 16:10
#bash print 256 colours for tmux configuration
# Print colors used by tmux.
# via http://superuser.com/a/285400/22658
for i in {0..255} ; do
printf "\x1b[38;5;${i}mcolour${i}\n"
done