summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorr14c <>2022-04-10 01:32:37 +0000
committerr14c <>2022-04-10 01:32:37 +0000
commit23326d9a5d3fa660d8e509743ffe543024f74978 (patch)
tree7cc8a89d60941282bc0257fd40248889d4aaab8d
parente6235e272df63f9eaa9f5e0a9e35c8d590783f00 (diff)
partial csv library
FossilOrigin-Name: 888cbfdd196437d1e96c422fd53a1f7a4cd676fce79940b6f16b3ae15a08cfd0
-rw-r--r--__tests__/csv.spec.bqn2
-rw-r--r--__tests__/sunshine-gardens-classic.files.csv79
-rw-r--r--csv.bqn4
-rw-r--r--formats.bqn2
4 files changed, 87 insertions, 0 deletions
diff --git a/__tests__/csv.spec.bqn b/__tests__/csv.spec.bqn
new file mode 100644
index 0000000..b8d12ad
--- /dev/null
+++ b/__tests__/csv.spec.bqn
@@ -0,0 +1,2 @@
+⟨CsvReader⟩←•Import "../csv.bqn"
+•Show CsvReader •FLines "./sunshine-gardens-classic.files.csv"
diff --git a/__tests__/sunshine-gardens-classic.files.csv b/__tests__/sunshine-gardens-classic.files.csv
new file mode 100644
index 0000000..3702435
--- /dev/null
+++ b/__tests__/sunshine-gardens-classic.files.csv
@@ -0,0 +1,79 @@
+9front, 9front.png
+ablobcatcoffee, ablobcatcoffee.png
+angry_cirno, angry_cirno.png
+annoyed, annoyed.png
+apika_dance, apika_dance.png
+benis_chomp, benis_chomp.gif
+benis_dance, benis_dance.gif
+blind_cirno, blind_cirno.png
+blob_grinning_sweat, blob_grinning_sweat.png
+blobaww, blobaww.png
+blobbee, blobbee.png
+blobbeepeek, blobbeepeek.png
+blobblush, blobblush.png
+blobcatgooglyshrug, blobcatgooglyshrug.png
+blobcatknife, blobcatknife.png
+blobdab, blobdab.png
+blobglare, blobglare.png
+blobgrimacing, blobgrimacing.png
+blobheart, blobheart.png
+bloblewd, bloblewd.png
+blobmelt, blobmelt.png
+blobowo, blobowo.png
+blobpat, blobpat.png
+blobpeek, blobpeek.png
+blobsad, blobsad.png
+blobslightsmile, blobslightsmile.png
+blobtea, blobtea.png
+blobthinkingfast, blobthinkingfast.png
+blobuwu, blobuwu.png
+blobwhistle, blobwhistle.png
+blobwink, blobwink.png
+blush_cirno, blush_cirno.png
+breadpeek, breadpeek.png
+bun, bun.png
+cofe, cofe.png
+comfy_cirno, comfy_cirno.png
+cop_cirno, cop_cirno.png
+cry_cirno, cry_cirno.png
+facepalm_cirno, facepalm_cirno.png
+gay, gay.png
+grans, grans.png
+greedy_cirno, greedy_cirno.png
+happyday, happyday.png
+heart_cybre, heart_cybre.png
+heart_lesbian, heart_lesbian.png
+heropunch, heropunch.png
+hi_cirno, hi_cirno.png
+kirby_idle, kirby_idle.png
+kiss_cirno, kiss_cirno.png
+lmao_cirno, lmao_cirno.png
+metamorph, metamorph.png
+miyano_yay, miyano_yay.png
+olive, olive.png
+owobread, owobread.png
+owobreadpeek, owobreadpeek.png
+parrot, parrot.png
+pika, pika.gif
+pikadab, pikadab.png
+pokeball, pokeball.png
+prepare-to-be-bullied-nerds, prepare-to-be-bullied-nerds.png
+psyduck, psyduck.png
+rainbowdance, rainbowdance.png
+sayheypog, sayheypog.png
+searx, searx.png
+sega, sega.png
+so_gay, so_gay.png
+sonichu, sonichu.png
+spurdo, spurdo.png
+thaenkin, thaenkin.png
+think_bread, think_bread.png
+thinkhappy, thinkhappy.png
+thinking_cirno, thinking_cirno.png
+uwu_cirno, uwu_cirno.png
+walkaway, walkaway.png
+weed, weed.png
+what_cirno, what_cirno.png
+xj9_sad, xj9_sad.png
+xj9_wut, xj9_wut.png
+yay, yay.png
diff --git a/csv.bqn b/csv.bqn
new file mode 100644
index 0000000..492223d
--- /dev/null
+++ b/csv.bqn
@@ -0,0 +1,4 @@
+Split←{𝕨((⊢-˜¬×·+`»⊸<)∘∊˜⊔⊢)𝕩}
+# un list the elements
+# ((∨`∧∨`⌾⌽)' '⊸≠)⊸/𝕩
+CsvReader⇐{⍉≍","⊸Split¨𝕩}
diff --git a/formats.bqn b/formats.bqn
index acd9deb..d25a1bb 100644
--- a/formats.bqn
+++ b/formats.bqn
@@ -6,6 +6,8 @@ MetricDay ⇐ {𝕩⌊∘÷86400.0}
#
# mayan calendar
#
+# https://github.com/edgararuiz-zz/maya/tree/master/R
+#
## places
baktun ← 144000