Skip to content
View gist:cb5b1f58d7f10a4d3b96f24e28b87d77
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)
View gist:0e72898c5f7727de2303747ae62383bc
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
View gist:c162e5184a1f14c50f3d47ea65afe552
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
View gist:5369ccf26b569068a6948f32fcdfabe0
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)
View this_is_why_socket_stdlib_is_fucking_terrible.rb
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"]
View results.txt
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
View webscale.rb
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
View recvmsg.rb
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')
View external-monitor.fish
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
View gist:a7ff06705b5816106f88
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]
Something went wrong with that request. Please try again.