Skip to content

Instantly share code, notes, and snippets.

<?php
$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
socket_bind($sock, '0.0.0.0', 10000);
for (;;) {
socket_recvfrom($sock, $message, 1024, 0, $ip, $port);
$reply = strrev($message)."\n";
socket_sendto($sock, $reply, strlen($reply), 0, $ip, $port);
}
@AdamHyski
AdamHyski / fer.go
Last active October 3, 2025 09:44
czemu Python jest dużo wolniejszy
package main
// go run fer.go 29.94s user 0.30s system 97% cpu 30.953 total
// ./fer 30.04s user 0.19s system 98% cpu 30.673 total
import ("math")
func main (){
exp := 2