The SICP page recommends MIT scheme,
so that is what we will use
to install it, on Apple OSX using Homebrew:
brew tap x11
brew cask install xquartz
The SICP page recommends MIT scheme,
so that is what we will use
to install it, on Apple OSX using Homebrew:
brew tap x11
brew cask install xquartz
// primitive types | |
let isOk: boolean = true; | |
let greeting: string = "Hello"; | |
let count: number = 5; | |
let fruits: string[] = ["banana", "apple"]; // Array<string> | |
let tuple: [string, number] = ["hi", 10]; // tuple[3] = 1 <- error | |
enum Fruits { | |
banana = "BANANA", | |
apple = "APPLE", |
npm install --save-dev @babel/core @babel/preset-env |
#!/usr/bin/env node | |
console.log('Hello world!') |
var f = x => x * 10 | |
f(100) //=> 1000 | |
var f = x => console.log(x * 10) | |
f(100) //=> 1000 | |
(x => console.log(x * 10))(10) //=> 100 | |
(10)(x => console.log(x*10)) // Error |
0x594A1057366D4Db941f90F0D8311e50CB64a9979 |
import re | |
import string | |
frequency = {} | |
document_text = open('test.txt', 'r') | |
text_string = document_text.read().lower() | |
match_pattern = re.findall(r'\b[a-z]{3,15}\b', text_string) | |
for word in match_pattern: | |
count = frequency.get(word,0) |
module HashConverter | |
class << self | |
def to_underscore hash | |
convert hash, :underscore | |
end | |
def to_camel_case hash | |
convert hash, :camelize, :lower | |
end | |
def convert obj, *method | |
case obj |
::uuid generates a v4 random UUID (Universally Unique IDentifier). | |
p SecureRandom.uuid #=> "2d931510-d99f-494a-8c67-87feb05e1594" | |
p SecureRandom.uuid #=> "bad85eb9-0713-4da7-8d36-07a8e4b00eab" | |
p SecureRandom.uuid #=> "62936e70-1815-439b-bf89-8492855a7e6b" | |
The version 4 UUID is purely random (except the version). It doesn’t contain meaningful information such as MAC address, time, etc. |