Skip to content

Instantly share code, notes, and snippets.

View drkameleon's full-sized avatar
🏠
Working from home

Yanis Zafirópulos drkameleon

🏠
Working from home
View GitHub Profile
@drkameleon
drkameleon / testsorting.art
Created January 10, 2023 16:33
Test sorting (in effect, test that sorting a Block and a Dictionary yields the same results; either in terms of the expected keys, or values)
labels: ["a", "b", "c", "d", "e", "f", "g", "h"]
items: ["uno", "dos", "tres", "Uno", "perversión", "ábaco", "abismo", "aberración"]
dic: function []-> #.raw flatten @[couple labels items]
revdic: function []-> #.raw flatten @[couple items labels]
verify: function [what][
toDo: [sort] ++ what
bl: do toDo ++ [items]
@drkameleon
drkameleon / lib.files.res
Created February 28, 2023 10:45
Generated output after running `arturo tests/unittests/lib.files.art`
Created: temp/
>> copy
Hello, world!
>> copy.directory - with empty folders
temp/dest/file.txt
@drkameleon
drkameleon / lib.files.res
Created March 1, 2023 15:32
Updated lib.files output (macOS)
Created: temp/
>> copy
copy is working well!
>> copy.directory - with empty folders
copy empty directory is working well!
@drkameleon
drkameleon / trial.dat.json
Created April 6, 2023 08:36
Trial.dat contents
{
"nand": 2,
"clamp": 2,
"info": 1,
"fdiv": 2,
"atanh": 1,
"regex?": 1,
"move": 2,
"all?": 1,
"first": 1,
@drkameleon
drkameleon / dictio.art
Last active October 6, 2023 09:02
Dictionary-ish example in Grafito
#!/usr/bin/env arturo
do {grafito.art}
do [
lemma: function [wrd, lng, ps][
f: form.new.unique [name: wrd]
res: word #[
lang: to :string lng,
pos: to :string ps,