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
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 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
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 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 '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
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 |
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' | |
server = Socket.new(:INET, :DGRAM) | |
client = Socket.new(:INET, :DGRAM) | |
server.bind(Socket.sockaddr_in(0, '127.0.0.1')) | |
client.connect(Socket.sockaddr_in(server.connect_address.ip_port, '127.0.0.1')) | |
client.write('hello world how are you doing') |
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
function external-monitor -d 'Enable/disable external monitor' | |
if [ "$argv[1]" = "on" ] | |
echo 'Starting bumblebeed...' | |
sudo systemctl start bumblebeed | |
echo 'Enabling discrete GPU...' | |
echo ON | sudo tee /proc/acpi/bbswitch |
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
Starting program: /home/yorickpeterse/Private/Projects/ruby/rubinius/bin/rbx ./bin/mspec spec/ruby/core/io/select_spec.rb | |
[Thread debugging using libthread_db enabled] | |
Using host libthread_db library "/usr/lib/libthread_db.so.1". | |
[New Thread 0x7ffff7f8d700 (LWP 7548)] | |
[New Thread 0x7ffff1086700 (LWP 7549)] | |
[New Thread 0x7ffff0c85700 (LWP 7550)] | |
[New Thread 0x7fffe3fff700 (LWP 7551)] | |
[New Thread 0x7ffff0484700 (LWP 7552)] | |
[Thread 0x7fffe3fff700 (LWP 7551) exited] | |
[Thread 0x7ffff0484700 (LWP 7552) exited] |
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
The program being debugged has been started already. | |
Start it from the beginning? (y or n) y | |
Starting program: /home/yorickpeterse/.rubies/ruby-2.2.2/bin/ruby /tmp/sequel_test.rb | |
[Thread debugging using libthread_db enabled] | |
Using host libthread_db library "/usr/lib/libthread_db.so.1". | |
[New Thread 0x7ffff7ff7700 (LWP 21397)] | |
Preparing... | |
Starting threads... | |
[New Thread 0x7ffff3a9a700 (LWP 21399)] | |
[New Thread 0x7ffff3898700 (LWP 21400)] |