Skip to content

Instantly share code, notes, and snippets.

View gosukiwi's full-sized avatar

Federico Ramirez gosukiwi

View GitHub Profile
@gosukiwi
gosukiwi / README.md
Last active February 25, 2016 19:33
alpha_sapphire

alpha_sapphire is a toy programming language concept. Designed for minimal syntax and fully object-oriented expressiveness a-la Smalltalk and Ruby.

Things trying to archieve:

  • Everything should be an object
  • Meta-programming should be easy
  • Syntax shold be minimal yet expressive
  • Should be inspired by Smalltalk and Ruby
  • Should give the power to the programmer, not limit him
@gosukiwi
gosukiwi / README.md
Created November 26, 2015 08:16
N00b notes on CHICKEN scheme

The following is a collection of notes generated while learning CHICKEN Scheme.

Syntax

Function definition using defun:

(define (my-name arg1 arg2)
  (body...))

Functions that return true (#t) or false (#f) are called predicates:

(define-syntax hash
(er-macro-transformer
(lambda (expr r c) ; expression rename compare
(let ((body (cdr expr)))
;; code-expansion, self-executable lambda
`(((lambda ()
(let ((table make-strong-eq-hash-table))
,(let loop
((pairs body))
(if (> (length pairs) 2)
@gosukiwi
gosukiwi / openSUSE-init.md
Last active April 13, 2024 18:52
Things to do after installing openSUSE
  1. Add packman packages
  2. Install Infinality
  3. Install "build essentials": sudo zypper in --type pattern devel_basis
  4. Install Linuxbrew (to install apps which might not be in zypper, or to install them in $HOME)
  5. Get Dropbox: sudo zypper in Dropbox && dropbox start -i
  6. Get Source Code Pro font
  7. Set "Source Code Pro" as default monospace font, "Roboto" as default sans-serif and "Droid Serif" as default serif.
  8. Configure gnome shell as login shell and set up base16
  9. Use numix theme with elementary icons or paper icons
  10. Set up development environment
@gosukiwi
gosukiwi / README.md
Last active March 30, 2016 07:57
alpha_sapphire draft

alpha_sapphire

Simplistic, interpreted, dynamic, object-oriented language inspired by Ruby and Coffeescript.

Simplistic

While trying to be expressive, the main focus on alpha_sapphire's syntax is to keep it simple. There is always a trade-off between expresiveness and complexity. For instance:

foo() unless bar == 2

Is more expressive than:

@gosukiwi
gosukiwi / fuzzy_search.md
Last active June 15, 2016 19:25
Fuzzy Search

Usage: zf PATTERN [DIR]

Example: zf foo app/

Paste this somewhere. I use it in /usr/local/bin. Remeber to chmod +x /usr/local/bin/zf.

if [ -z "$1" ]
  then
 echo "usage: zf PATTERN [DIR]"
@gosukiwi
gosukiwi / AboutTheStockExample.fs
Created August 2, 2016 01:26
FSharpKoans: AboutTheStockExample solution
namespace FSharpKoans
open FSharpKoans.Core
//---------------------------------------------------------------
// Apply Your Knowledge!
//
// Below is a list containing comma separated data about
// Microsoft's stock prices during March of 2012. Without
// modifying the list, programatically find the day with the
// greatest variance between the opening and closing price.
@gosukiwi
gosukiwi / .vimrc
Created August 10, 2016 01:42
My vim configuration
" [ CORE ] ------------------------------------------------------------------
" Very much needed settings to provide a solid base for source code editting
" DEPENDENCIES:
" - vim-plug: For managing plugins
" - ag: The silver searcher
" - editorconfig: For projects where common configuration is important
" - SourceCodePro: Pretty font for coding
" ---------------------------------------------------------------------------
" don't make vim compatible with vi
@gosukiwi
gosukiwi / demo.rb
Last active June 8, 2017 20:10
Code snippets for markdown compiler blog post, part 1
Markdown.to_html('_Foo_ **bar**') # => "<p><em>Foo<em> <strong>bar<strong></p>"
class Tokenizer
TOKEN_SCANNERS = [
SimpleScanner, # Recognizes simple one-char tokens like `_` and `*`
TextScanner # Recognizes everything but a simple token
].freeze
def tokenize(plain_markdown)
tokens_array = tokens_as_array(plain_markdown)
TokenList.new(tokens_array)
end