[Xe said][tweet] that it'd be interesting to see how quickly my laptop builds [the application that drives xer site][xesite], so I built it.
Twenty times.
And here are the results.
grammar Breakfast; | |
breakfast : ('toast' | 'biscuits' | 'English muffin' | protein) ('with' breakfast 'on the side')? ; | |
protein : 'really'+ 'crispy bacon' | |
| 'sausage' | |
| ( 'scrambled' | 'poached' | 'fried' ) 'eggs' ; | |
WS : [ \t\r\n]+ -> skip ; // skip spaces, tabs, newlines |
const c = @cImport({ | |
@cInclude("curl/curl.h"); | |
@cInclude("stdlib.h"); | |
@cInclude("stddef.h"); | |
}); | |
const std = @import("std"); | |
// XXX Trying to use c.size_t from stddef.h results in | |
// "container … has no member called 'size_t'". | |
// |
class LinkedListNode { | |
init(value) { | |
this.value = value; | |
this.next = nil; | |
} | |
/// Gets the value of this LinkedListNode. | |
getValue() { return this.value; } | |
/// Returns true if there is another LinkedListNode after this one. |
DECLARE @UserId int = ##UserId## | |
SELECT | |
Id AS [Post Link], | |
-- TODO: Select user's answer score as well | |
Score AS [Question Score] | |
FROM | |
Posts | |
WHERE | |
Id IN |
// This strange code came to me in a dream. | |
fn main() { | |
for n in 1..20 { | |
println!( | |
"{}", | |
match (n % 3 == 0, n % 5 == 0) { | |
(true, false) => "Fizz".to_string(), | |
(false, true) => "Buzz".to_string(), | |
(true, true) => "FizzBuzz".to_string(), |
mod bindings { | |
::windows::include_bindings!(); | |
} | |
use std::ffi::c_void; | |
use bindings::Windows::Win32::WindowsAndMessaging::{ | |
SystemParametersInfoW, SystemParametersInfo_fWinIni, SYSTEM_PARAMETERS_INFO_ACTION, | |
}; |
# Usage: echo words | raku scrambler.raku | |
sub scramble-word(Str $word --> Str) { | |
if $word.chars <= 3 { | |
return $word; | |
} | |
my @letters = $word.comb; | |
my $first-letter = @letters[0]; |
sub infix:<—>($a, $b) is equiv(&infix:<->) { | |
sleep 10; | |
$a - $b | |
} | |
say 43 - 1; | |
say 43 — 1; |
import json | |
import os.path | |
import sys | |
if __name__ == "__main__": | |
if len(sys.argv) != 2: | |
sys.exit(f"Usage: {os.path.basename(sys.argv[0])} FILE") | |
file_name = sys.argv[1] |