This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aeon $ cat -n /tmp/test.aeon | |
1 class Integer: | |
2 # Overwrites the default prototype with the actual integer prototype. | |
3 __set_literal_attr(self, __get_integer_prototype(_), '__prototype') | |
4 | |
5 def +(other): | |
6 __integer_add(_, self, other) | |
7 | |
8 def -(other): | |
9 __integer_sub(_, self, other) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eon $ cat -n /tmp/test.aeon | |
1 def add(Integer left, Integer right) -> Integer: | |
2 return __integer_add(left, right) | |
3 | |
4 def print(String message) -> Integer: | |
5 return __stdout_write(message) | |
6 | |
7 def int_to_string(Integer int) -> String: | |
8 return __integer_to_string(int) | |
9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def add(Integer left, Integer right) -> Integer: | |
return __integer_add(left, right) | |
def print(String message) -> Integer: | |
return __stdout_write(message) | |
def int_to_string(Integer int) -> String: | |
return __integer_to_string(int) | |
let a = 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aeon $ cat -n /tmp/test.aeon | |
1 def add(Integer left, Integer right) -> Integer: | |
2 __get_local(0, 0) | |
3 __get_local(1, 1) | |
4 __integer_add(2, 0, 1) | |
5 __return(2) | |
6 | |
7 def print(String message) -> Integer: | |
8 __get_local(0, 0) | |
9 __stdout_write(1, 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone git@github.com:YorickPeterse/ruby-ll.git | |
cd ruby-ll | |
bundle install | |
rake clean compile | |
ruby test.rb # see Ruby script below |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rack' | |
require 'rubinius/profiler' | |
class RbxRackProfiler | |
def initialize(app) | |
@app = app | |
end | |
def call(env) | |
profiler = Rubinius::Profiler::Instrumenter.new |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'httpclient' | |
require 'json' | |
url = 'http://www.reddit.com/r/r4r.json' | |
after = nil | |
posts = [] | |
client = HTTPClient.new | |
tags = { | |
'[M4F]' => 0, | |
'[M4M]' => 0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'socket' | |
Socket.gethostbyname('localhost') # => ["localhost.localdomain", ["localhost", "x1carbon", "localhost", "x1carbon"], 10, "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01", "\x7F\x00\x00\x01"] | |
TCPSocket.gethostbyname('localhost') # => ["localhost.localdomain", ["localhost", "x1carbon", "localhost", "x1carbon"], 10, "::1", "127.0.0.1"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pkgname=android-4.0.3 | |
pkgver=r03 | |
pkgrel=3 | |
pkgdesc='Platform for Google Android SDK' | |
arch=('any') | |
url="http://developer.android.com/sdk/index.html" | |
license=('custom') | |
depends=('android-sdk>=r17') | |
_android_api=android-15 | |
_android_ver=android-4.0.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
time=1500 # 25 minutes | |
title="Pomodoro" | |
icon=/home/yorickpeterse/Pictures/icons/tomato.png | |
notify-send -i "$icon" "$title" "Starting a new Pomodoro timer" | |
sleep $time |