This file contains hidden or 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
| # __get_binding_of_caller and __run_code is a compiler hack to invoke VM | |
| # instructions directly. | |
| class Closure: | |
| def construct(code): | |
| let @code = code | |
| let @binding = __get_binding_of_caller(_) | |
| pub def call(args...): | |
| __run_code(_, @code, args, @binding) |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
This file contains hidden or 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
| diff --git a/gc.c b/gc.c | |
| index 0f84e22..feb54f1 100644 | |
| --- a/gc.c | |
| +++ b/gc.c | |
| @@ -98,6 +98,15 @@ ruby_gc_params_t initial_params = { | |
| #endif | |
| }; | |
| +#ifndef HAVE_LONG_LONG | |
| +#define LONG_LONG long |
This file contains hidden or 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 | |
| set -e | |
| minimum=2000 | |
| medium=4500 | |
| maximum=6200 | |
| value=$minimum |
This file contains hidden or 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
| Numbers indicate the amount of iterations in 5 seconds. | |
| The C example was compiled using: | |
| clang -Wall -Wextra -pedantic -O2 test.c -o test | |
| Results: | |
| C: 2272688181 | |
| LuaJIT 170557787 => ~13x slower |
This file contains hidden or 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
| Calculating ------------------------------------- | |
| Array#[] 201.052k i/100ms | |
| Array#at 194.228k i/100ms | |
| ------------------------------------------------- | |
| Array#[] 11.090M (± 2.2%) i/s - 55.490M | |
| Array#at 10.003M (± 1.3%) i/s - 50.111M | |
| Comparison: | |
| Array#[]: 11089538.6 i/s | |
| Array#at: 10002944.7 i/s - 1.11x slower |
NewerOlder