Skip to content

Instantly share code, notes, and snippets.

View lbguilherme's full-sized avatar

Guilherme Bernal lbguilherme

View GitHub Profile
make[1]: Entering directory `/home/guilherme/lib/mxe'
uname -a
Linux guilherme-pc 3.8.0-29-generic #42-Ubuntu SMP Tue Aug 13 19:40:39 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
git show-branch --list --reflog=1
[refs/heads/master@{0}] (57 minutes ago) pull: Fast-forward
lsb_release -a 2>/dev/null || sw_vers 2>/dev/null || true
Distributor ID: Ubuntu
Description: Ubuntu 13.04
Release: 13.04
Codename: raring
make[1]: Entering directory `/home/guilherme/lib/mxe'
uname -a
Linux guilherme-pc 3.8.0-29-generic #42-Ubuntu SMP Tue Aug 13 19:40:39 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
git show-branch --list --reflog=1
[refs/heads/master@{0}] (5 hours ago) pull: Fast-forward
lsb_release -a 2>/dev/null || sw_vers 2>/dev/null || true
Distributor ID: Ubuntu
Description: Ubuntu 13.04
Release: 13.04
Codename: raring
make[1]: Entering directory `/home/guilherme/lib/mxe'
uname -a
Linux guilherme-pc 3.8.0-29-generic #42-Ubuntu SMP Tue Aug 13 19:40:39 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
git show-branch --list --reflog=1
[refs/heads/master@{0}] (15 minutes ago) pull: Fast-forward
lsb_release -a 2>/dev/null || sw_vers 2>/dev/null || true
Distributor ID: Ubuntu
Description: Ubuntu 13.04
Release: 13.04
Codename: raring
check every key 5.14 (± 2.82%) 16.03× slower
trie lookup 82.47 (± 1.80%) fastest
check every key 6.28M (±28.48%) 1.39× slower
trie lookup 8.7M (± 4.72%) fastest
### Keybase proof
I hereby claim:
* I am guilhermebernal on github.
* I am lbguilherme (https://keybase.io/lbguilherme) on keybase.
* I have a public key ASD4ShhM8cZhTXdXL1blQ1IGd19Vld2D3tnAMJqQS7jNbQo
To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am guilhermebernal on github.
  • I am lbguilherme (https://keybase.io/lbguilherme) on keybase.
  • I have a public key ASD4ShhM8cZhTXdXL1blQ1IGd19Vld2D3tnAMJqQS7jNbQo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am lbguilherme on github.
  • I am lbguilherme (https://keybase.io/lbguilherme) on keybase.
  • I have a public key ASD4ShhM8cZhTXdXL1blQ1IGd19Vld2D3tnAMJqQS7jNbQo

To claim this, I am signing this object:

@lbguilherme
lbguilherme / todo.cr
Created March 3, 2022 12:14
Crystal front-end app, what would it look like?
# This is a sample of what a front-end Crystal application could look like, for code review.
# The design was inspired by React and Flutter and it should be very performing and compact.
# If this is ever implemented, it will use WebAssembly to run Crystal code, together with
# some JavaScript bindings to access the DOM.
class TodoData
property text : String
property? done = false
def initialize(@text)
@lbguilherme
lbguilherme / todo-elm.cr
Last active March 3, 2022 14:42
Crystal front-end app, what would it look like? (Elm-style)
# This is a sample of what a front-end Crystal application could look like, for code review.
# The design was inspired by Elm and it should be very performing and compact.
# If this is ever implemented, it will use WebAssembly to run Crystal code, together with
# some JavaScript bindings to access the DOM.
# 1. Define a data model.
class Model < BaseModel
getter todos = [] of TodoModel
getter new_todo_text = ""