function range(start, stop, step)
if step == nil then step = 1 end
if stop == nil then stop = start start = 0 end
return function()
if start < stop then
local value = start
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
| .TH bendun 7 2022-11-09 People Diana\ Bendun | |
| .SH NAME | |
| Diana Bendun \- programming language reasercher | |
| .SH SYNOPSIS | |
| Diana is a programming language reasercher, software engineer, hacker | |
| and student at AMU Poznań. | |
| .SH CONFORMING TO | |
| Free software, art and freedom of self-expression | |
| .SH ENVIRONMENT | |
| Arch Linux + KDE on Thinkpad x270 |
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 4 columns, instead of 1 in line 5.
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
| Waypoints Statue of The Seven 37 https://act-webstatic.hoyoverse.com/map_manage/20231214/c59585d1fabc9c22ad3fcf94e1622aa8_357413506633071859.png?x-oss-process=image%2Fresize%2Cw_85%2Fquality%2CQ_90%2Fformat%2Cwebp | |
| Waypoints Teleport Waypoint 323 https://act.hoyoverse.com/map_manage/20221125/7d650757c10b70cb42189f7fca0c9778_7547860493386240880.png?x-oss-process=image%2Fresize%2Cw_85%2Fquality%2CQ_90%2Fformat%2Cwebp | |
| Waypoints Domain 56 https://act.hoyoverse.com/map_manage/20220928/186a776c87addad503af2d730230e333_5715047075425774284.png?x-oss-process=image%2Fresize%2Cw_85%2Fquality%2CQ_90%2Fformat%2Cwebp | |
| Waypoints The Crux: The Alcor 1 https://act.hoyoverse.com/map_manage/20220922/4a0f9e1667273d98ebe66fdfb99b331d_4041655545632778907.png?x-oss-process=image%2Fresize%2Cw_85%2Fquality%2CQ_90%2Fformat%2Cwebp | |
| Waypoints Jade Chamber 1 https://act.hoyoverse.com/map_manage/20220922/5f447e0aa6631d19cddaa725ac504871_8968142801522331020.png?x-oss-process=image%2Fresize%2Cw_85%2Fquality%2CQ_90%2Fformat%2Cwebp | |
| Special Items |
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
| enum class Keyword : u16 | |
| { | |
| #define Keywords_Enumeration(X) \ | |
| X(If) \ | |
| X(Else) | |
| #define X(KW) KW, | |
| Keywords_Enumeration(X) | |
| #undef X | |
| }; |
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
| -- | Having fun with continued fractions | |
| module ContinuedFraction where | |
| import Data.Ratio | |
| -- To print them in decimal form you can use: | |
| -- > map fromRational phi | |
| phi, sqrt2, e, pi :: [Rational] |
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
| main = putStrLn . getPath $ root/home/user | |
| where | |
| root = Path "/" | |
| home = Path "home" | |
| user = Path "students" | |
| data Path = Path { getPath :: String } | |
| instance Num Path where | |
| -- TODO: Proper path concatenation |
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 | |
| pacman -Qq | xargs pacman -Qi | grep '^Packager' | awk -F': ' '{ print $2 }' | sort | uniq -c | sort -rn | head -n10 | awk '{ print $1 / '"$(pacman -Qq | wc -l)"' * 100, $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
| {-# LANGUAGE TypeFamilies, FlexibleInstances, FlexibleContexts #-} | |
| type family Flat a where | |
| Flat [[a]] = Flat [a] | |
| Flat [a] = a | |
| class Flatten a where | |
| flatten :: a -> [Flat a] | |
| -- Base case. |
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
| trait StartsWith<T> { | |
| fn starts_with(self, other: T) -> bool; | |
| } | |
| // This should work for pairs of iterators, used to compare if | |
| // both iterators describe the same beggining of the sequence | |
| impl<It, OtherIterator> StartsWith<OtherIterator> for It | |
| where | |
| OtherIterator: Iterator, | |
| It: Iterator<Item = <OtherIterator as Iterator>::Item>, |
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
| module params_loader; | |
| struct Variable | |
| { | |
| string type, value; | |
| } | |
| private Variable[string] parse(string source) | |
| { | |
| import std.array, std.algorithm, std.string; |
NewerOlder